OpenWrt Forum Archive

Topic: Build Version with Custom Kernel Changes

The content of this topic has been archived on 1 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello.

I need to make a couple of changes in the file linux-4.4-14/drivers/usb/serial/option.c and linux-4.4-14/drivers/usb/serial/usb_wwan.c in order to recognize a Quectel UC15 usb modem I need to work with. But after running 'make menuconfig' and then running 'make', I see that all the changes i've made are reverted and every source file turns into the original, so my question is: How can I make the builder to respect the changes I make to the source code, or how to make an offline build?

Thank you!

You need to create a patch for your changes, which patch then gets applied along all other patches in the quilt queue.
Place the patches either in target/linux/generic/patches-4.4 or the similar dir for your platform.

See
https://github.com/openwrt/openwrt/tree … atches-4.4

or ar71xx for platform example:
https://github.com/openwrt/openwrt/tree … atches-4.4


make target/linux/clean      (cleans the kernel sources in build_dir/target... )
make target/liunx/prepare   (applies the patches, you can verify)
make target/linux/compile   (compiles kernel), or of course you can use the normal plain "make".

toolchain... is the sources for the toolchain tools used in the build/compilation/make process (gcc, gdb, etc.)

target... is the stuff ending up in the router firmware. You want your patches here.

(Last edited by hnyman on 22 Nov 2016, 23:27)

The discussion might have continued from here.