Cross-Compile & Install Modified Kernel

edited April 2020 in AML-S805X-AC
Hi everyone!

First of all, i'm sorry, really, i've been looking around for the past two days for a way to do this and trying to piece together different instructions but there is always something missing and i can't quite make it work...

My goal is to have a headless debian, for now, with working IPSec/L2TP functionality. I've done this already on RPi, but i can't make Strongswan work with the Debian images available for the La Frite... Apparently, because of the lack of IPSec support on a Kernel level. (Missing NetLink module, according to this)

Ok, so, looking for how to recompile the kernel, i started here:
http://wiki.loverpi.com/faq:sbc:libre-aml-s805x-howto-native-compile-kernel
But it would inevitably fail in the La Frite, be it temp or just random error messages... So, since natively it won't work, i moved on to cross compilation, here:
http://wiki.loverpi.com/faq:sbc:libre-aml-s805x-howto-compile-kernel
Doing this on a Debian VM the compilation ends ok, meaning this last command runs smoothly:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4 Image modules amlogic/meson-gxl-s805x-p241.dtb
But then?
I tried this: http://wiki.loverpi.com/faq:sbc:libre-aml-s805x-install-newly-compiled-kernel
But i haven't natively compiled it, so... I run this, on my VM:

make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=../modules modules_install
And this:

mkimage -A arm64 -O linux -C none -T kernel -a 0x01080000 -e 0x01080000 -d arch/arm64/boot/Image uImage
And then copied the "modules" folder and the "uImage" to my board...
But now, everything becomes messier... I think... On /boot i don't have "uImage" nor "zImage", what i have is "vmlinuz-4.19.64+" 
Still, i backed up vmlinuz-4.19.64+ and initrd.img-4.19.64+, ran

sudo update-initramfs -c -k 4.19.0
And now have "initrd.img-4.19.0"...
If i restart at this point, it just boots up exactly the same. If i replace vmlinuz-4.19.64+ with uImage, on restart i get "error: Invalid magic number"

Can someone give me a hand? Tell me where i'm messing up?

Thanks,
Diego.

Comments

Sign In or Register to comment.