OpenWrt Forum Archive

Topic: To compile OpenWRT kernel

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

I want to modify some Linux source files under the directory openwrt/build_mipsel/linux/net/sched, and then recompile the kernel to get a new bin file.

However, after I "make" the openwrt at the root directory, the kernel change I made have not been incorporated into openwrt-xxx-.bin file, because there is almost no difference between old bin file and new bin file.

My question is that how to compile the OpenWrt kernel, if I want to do some kernel development based on OpenWrt. It seems to me that just type "make" is not enough.

Thank you

Make a patch, place it in target/linux/generic/patches, then recompile your kernel

could you give me more detail solution? Where to download the patch? Is there any detail manual?

Thank you very much

If you just want to compile new modules or change what is under "openwrt/build_mipsel/linux-2.4-brcm/linux-2.4.30", you can do that:

cd openwrt/build_mipsel/linux-2.4-brcm/linux-2.4.30
rm .depend .depend_done .modules_done

Then patch the kernel, run make menuconfig to select new modules etc.
When you're ready, go to openwrt root, and run "make".

Find new/changed modules and upload it to your router.

Sometimes, you'll have to flash the image (unresolved symbol...); sometimes it won't help and you'll have to patch the kernel (still problems with "unresolved symbol...") - this is where it's getting hard.

Thanks

In fact, I am not going to create some new modules. I want to directly modify the kernel source by myself to have a customized Openwrt BIN file. Just type "make" in the linux root does not generate a BIN file that contains my changes.

let me remove .depend .depend_done .modules_done and do "make" again. Let me see if it works this time.

(Last edited by wrtfan on 10 Mar 2006, 19:13)

florian_ wrote:

Make a patch, place it in target/linux/generic/patches, then recompile your kernel

I think it's target/linux/linux-2.4/generic/patches, for the svn whiterussian version.

The discussion might have continued from here.