OpenWrt Forum Archive

Topic: How do I chose a kernel version of choice before compileing openwrt

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

Hi,

Everytime I compile the openwrt, it chose the latest one and my driver does not work with it.
How do I specify openwrt to choose a different kernel version?

Thanks,

I've read this wiki page and many others and I also don't know where I could set a specific kernel version.
If I choose my target system in menuconfig to be  "Atheros 231x/5312 [2.6]", I see under the help screen "Selects: LINUX_2_6 && LINUX_2_6_23 && ..."
So it looks as if the kernel version is hardcoded depending on the kamikaze revision (r 11949 in this case).

Or if I use a very recent kamikaze trunk version (r 15226) where under "target/linux/atheros/" there are allready all the files and patches for the 2.6.28 and the 2.6.26 kernel.
Where could I change the default behaviour to comple 2.6.26 instead of 2.6.28? If I change for example "CONFIG_LINUX_2_6_28=y" to "CONFIG_LINUX_2_6_26=y" in .config, it  has no effect and gets overwritten everytime I do "make menuconfig".

Thanks for any hints, oli

Look into target/linux/atheros/Makefile, LINUX_VERSION

Thanks!

Now I got an old 2.6.23 kernel configured (through copying .23 kernel files from an older kamikaze r11949 "target/linux/atheros" dir over)  into a recent kamikaze 809 trunk revision. There's probably something messed up now because i also had to copy over "build_dir/linux-2.6.23.17" from the older kamikaze revision buildroot in order to escape kernel build problems...

Should it work painless to include an older kernel in the current build process? Maybe I'm sill doing something wrong?

I have the problem that with Accton MR3201_P_ modules (slightly modified MR3201A modules, sold by open-mesh.com) only the 2.6.23.17 kernel boots into the rootfs. 2.6.26 or 2.6.28 kernels complain at boot that they can't find the magic JFSS2 bitmask and end with "Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(31,1)"

regards, oli

(Last edited by ozel on 15 Apr 2009, 12:35)

Hint:
after any changes in target/linux/* you have to do "make target/linux/clean" in order build cleanly another kernel with new settings.
After that my .23 kernel compile went without the erros described above. So copying the relevant patches-xxx/ and files-xxx/ folders and the config-xxx file into target/linux/atheros and selecting the new kernel version in the Makefile as describe above is enough!

OpenWrt is really great but the documentation is a little... well, widespread. wink

Hi ozel,
           I want to do the same what you did - use other kernel version than the standard one  to compile the openwrt image.

        I red through your posts, but i need it in more detail.  Can you please give me the steps? I am confused about the Makefile changes.

        Regarding the Makefile, you meant to say just keep the original Makefile and replace other files from the other kernel version and just change the kernel version in the Makefile, right?

Thanks!

The discussion might have continued from here.