So I'm working with the TP-Link TD-W8968 V3.
I have learnt how to make a custom image for my device.
Now I am trying to create a patch. I have very little grasp on it yet. My main question is this...
I read this file for clues on how to create my image. But take for example the first patched file 01_leds. In thier patch the enrty is
showing practically only the new lines added. When I try to create a patch it includes the entire contents of the edited file. How do I make quilt recognize only my new lines and not include the entire file?
I am using that config.
Following the instructions down at "Adding or editing kernel patches" section I run
make target/linux/{clean,prepare} V=s QUILT=1
cd build_dir/target-*/linux-*/linux-*
quilt new platform/581-board_td-w8968_v3.patch
quilt add ~/openwrt/target/linux/brcm63xx/base-files/etc/board.d/01_leds
quilt edit ~/openwrt/target/linux/brcm63xx/base-files/etc/board.d/01_leds
I then edit the file and run
quilt refresh
cd ~/openwrt
make target/linux/update
and check the patch file it creates. That is where it is listing the entire contents of ~/openwrt/target/linux/brcm63xx/base-files/etc/board.d/01_leds
Why are you using quilt????
It is only needed for a patch series of multiple patches (like the actual kernel patches). Not for editing a normal file...
Using quilt there sounds wrong.
Normal git diff should show your changes to that file.
I'm using quilt because the page didn't mention git. I dunno what I'm doing which is why I was following their instructions. I wanted to make a patch so could include the model for future openwrt users.
If you edit existing files, you can simply edit them, and then finally take "git diff" to show the edits.
And do " git diff > newdevice.patch " to get a patch file. Or if you add new files, you may need to git add them first, and then take a "git diff HEAD"
Quilt is mainly meant for editing a long series of consecutive patches that during the compile process edit partially same files, which are usually downloaded from upstream and then patched in Openwrt to be suitable for our needs. (If the edited files would be in Openwrt sources, they would be edited directly, not patched in the compile time.)
The big difference is that you are not editing patch files that are in the Openwrt source, but you are editing source files and then want to create an external patch to repeat those changes.
I also noticed that running the patch command broke my symlinks. I had desktop shortcuts to the files I was editing and after running patch they were broken