Using Linux 4.20 for x86_64

Hi all!

I'm developing a little gateway appliance for x86_64 and I'd like to use the latest kerne (no particular reason).

What changes do I need to make in the source tree?

The change I've made is:

diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index 533c0e5248..12eb95cbb4 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -13,7 +13,7 @@ FEATURES:=squashfs ext4 vdi vmdk pcmcia targz fpu
 SUBTARGETS:=generic legacy geode 64
 MAINTAINER:=Felix Fietkau <nbd@nbd.name>

-KERNEL_PATCHVER:=4.14
+KERNEL_PATCHVER:=4.20

 KERNELNAME:=bzImage

I get the below:

make[1]: Entering directory '/home/ubuntu/openwrt'
make[2]: Entering directory '/home/ubuntu/openwrt'
make[3]: Entering directory '/home/ubuntu/openwrt/target/linux'
make[4]: Entering directory '/home/ubuntu/openwrt/target/linux/x86'
mkdir -p /home/ubuntu/openwrt/dl
SHELL= flock /home/ubuntu/openwrt/tmp/.linux-4.20.tar.xz.flock -c '     /home/ubuntu/openwrt/scripts/download.pl "/home/ubuntu/openwrt/dl" "linux-4.20.tar.xz" "" "" "@KERNEL/linux/kernel/v4.x"    '
Cannot find appropriate hash command, ensure the provided hash is either a MD5 or SHA256 checksum.
Makefile:24: recipe for target '/home/ubuntu/openwrt/dl/linux-4.20.tar.xz' failed
make[4]: *** [/home/ubuntu/openwrt/dl/linux-4.20.tar.xz] Error 255
make[4]: Leaving directory '/home/ubuntu/openwrt/target/linux/x86'
Makefile:13: recipe for target 'compile' failed
make[3]: *** [compile] Error 2
make[3]: Leaving directory '/home/ubuntu/openwrt/target/linux'
time: target/linux/compile#0.05#0.04#0.12
target/Makefile:23: recipe for target 'target/linux/compile' failed
make[2]: *** [target/linux/compile] Error 2
make[2]: Leaving directory '/home/ubuntu/openwrt'
target/Makefile:18: recipe for target '/home/ubuntu/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile' failed
make[1]: *** [/home/ubuntu/openwrt/staging_dir/target-x86_64_musl/stamp/.target_compile] Error 2
make[1]: Leaving directory '/home/ubuntu/openwrt'
/home/ubuntu/openwrt/include/toplevel.mk:216: recipe for target 'world' failed
make: *** [world] Error 2

So, I seem to need to make additional changes (i.e. add the checksums and such), but I searched for some time and I've shamefully failed to find the place where I do that/additional modifications.

Any help would be great, thank you!!

You need to copy/modify/create all kernel patches (backport, hack, pending) as needed.

All 4.14 patches in generic, and all patches in x86, need to be modified for 4.20:
https://github.com/openwrt/openwrt/tree/master/target/linux/generic
https://github.com/openwrt/openwrt/tree/master/target/linux/x86

It will not be easy.

1 Like

Hi hnyman,

Ah, I somehow missed all those patches.

I'll just stick with 4.14, porting kernel patches is out of my league. :frowning:

Thanks anyway!

1 Like

A 4.19 WIP might be of interest, but it is not a trivial pursuit.

2 Likes

@xorkle 4.19 will be the next LTS after 4.14, if you want/need a newer kernel (see @anomeome's link). As you found out it takes a lot more than just changing the kernel version in the Makefile though :slight_smile: .

1 Like

Ah okay, thanks everyone for the info. :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.