Reputation: 53
Is there any possibility to install totally new kernel on OpenWRT? Currently I have 3.18 version, but I have to downgrade to patched kernel by Candela Tech to install new firmware for ath10k. I have been searching in google how to bite this, but there is no fine instruction how to do that.
Update: (copied from answer of TS)
Nam Pham...
I tried to do as you instructed me, but there occured one problem
Applying patch platform/310-lib-add-rle-decompression.patch
patching file lib/Kconfig
Hunk #1 succeeded at 227 with fuzz 2 (offset -6 lines).
patching file lib/Makefile
Hunk #1 FAILED at 97.
1 out of 1 hunk FAILED -- rejects in file lib/Makefile
patching file include/linux/rle.h
patching file lib/rle.c
Patch platform/310-lib-add-rle-decompression.patch does not apply (enforce with -f)
make[3]: *** [sdk2/build_dir/target mips_34kc_uClibc-0.9.33.2/linux-ar71xx_generic/linux-3.17/.quilt_checked] Error 1
make[3]: Leaving directory `sdk2/target/linux/ar71xx'
make[2]: *** [compile] Error 2
make[2]: Leaving directory `sdk2/target/linux'
make[1]: *** [target/linux/compile] Error 2
make[1]: Leaving directory `sdk2'
make: *** [target/linux/compile] Error 2
Upvotes: 1
Views: 8301
Reputation: 11
in case someone finds this page for changing openwrt kernel, here is what I figured out based on this page info, thanks again!
Here I'm taking changing kernel 5.10 to kernel 5.16 for example for x86 platform:
update this file kernel info from 5.10.x -> 5.16.y: target/linux/x86/Makefile
create this file: include/kernel-5.16 and its hash value is based on this calculating: ${openwrt_topdir}/staging_dir/host/bin/mkhash sha256 linux-5.10.92.tar.xz
create this file: target/linux/generic/config-5.16 if not sure, just #cp config-5.10 config-5.16
create confg-5.16 file under target/linux/x86/ this dir and subdirectory which have config-5.10
with these changes, I successfully build the 5.16 kernel in openwrt.
Upvotes: 1
Reputation: 316
If I'm not wrong ,your question is how to change the kernel version in OpenWRT.
Let's say I'm using
OpenWRT: CC 15.05
Target system: Atheros AR7xxx/AR9xxx
The current version of kernel is 3.18 and I want to downgrade to 3.17
There are 2 folders you need to care :
openwrt/target/linux/generic
openwrt/target/linux/ar71xx
Step1.Edit the Makefile in openwrt/target/linux/ar71xx/Makefile
- KERNEL_PATCHVER:=3.18
+ KERNEL_PATCHVER:=3.17
Step2.Create the configuration files for your kernel
openwrt/target/linux/generic/config-3.17
openwrt/target/linux/ar71xx/config-3.17
I suggest you just copy the config-3.18 to config-3.17. You can modify them later by
cd openwrt
make kernel_menuconfig
Step3.Try to compile it:
cd openwrt
make target/linux/clean
make target/linux/compile V=s
For the first time,the kernel source code linux-3.17.tar.xz will be downloaded into openwrt/dl. Then it's uncompressed and compiled without any patches.
Step4. Create folder patches-3.17 then put your own kernel patches (from Candela Tech) in it.
openwrt/target/linux/ar71xx/patches-3.17
Repeat with Step3.
To make a patch file in OpenWRT ,you can take a look on this link https://wiki.openwrt.org/doc/devel/patches
Upvotes: 2
Reputation:
Using openwrt master branch and then building for your device should give you a new kernel. Last time I checked it was 4.1 I guess.
Upvotes: 0