Hi,
Im new to the OpenWrt Dev environment, but not development.
All I want to do is take a copy of mjpg-streamer and modify it for my use.
I can get see the source in the build_dir, and can edit it, but anything like make clean etc and I loose edits.
I have looked at the 'documentation' for using quilt etc, and to be honest if doesnt make much sense.
Is there anyway to simply get the package, modify the source without fighting it trying to sync back to git?
Yes this seems what Im after to a fashion, however I change a file (input_uvc.c to input_uvc.cpp) and it doesnt like that. "Cant find file to patch plugins/input_uvc/input_uvc.cpp" and even more oddly it seems to find the input_uvc.c file to build still, even though its deleted.
Oh and it even deletes my input_uvc.cpp file not when I try to rebuild package....
Is there a better example on paching to be found anywhere
Patches can also delete and create files.
Have quilt track the entire directory, then make all of your changes as required and then quilt refresh.
Check this patch is as you’d expect before moving forward.
OK so Patch is new to me, been a windows programmer too long, and I think I have mucked things up now.
I deleted the input_uvc.c file and created an input_uvc.cpp file....that was the last thing I did that went well
Now building gives the below, the input_uvc.c file stays gone but it also removes the input_uvc.cpp file.
Applying ./patches/030-remove-git-hash-version-number.patch using plaintext:
patching file CMakeLists.txt
patching file plugins/input_uvc/CMakeLists.txt
patching file plugins/input_uvc/input_uvc.c
can't find file to patch at input line 965
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
Alternatively research diff -u you copy a certain file to make an original file.
You edit the file and then diff -u the edited file with the original file now you have a patch file.
Make the diff from the directory you want to use to patch, see below to get the correct file path.
When you are done with setup then add your patches (I have different patches) with: patch -p1 < patchfile
-p1 removes the first / in the path if there is any change as needed
I have this more or less automated with some scripts