Cross-Compile & Install Modified Kernel
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:
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:
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
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.
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_installAnd 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
https://forum.loverpi.com/discussion/873/mainline-linux-lts-5-4-x-issues-ethernet-mmc-drm#latest
4. make CROSS_COMPILE=aarch64-linux-gnu- ARCH=arm64 -j 4 deb-pkg amlogic/meson-gxl-s805x-libretech-ac.dtb
5. copy meson-gxl-s805x-libretech-ac.dtb from arch/arm64/boot/dts/amlogic/ (not 100% about the directory right now) and place it into /boot/efi/libre-computer/aml-s805x-ac/ with the name platform.dtb
You could also use a mainline kernel version from kernel.org instead using the same procedure. I've compiled kernel-5.6.2 and no issues so far.
You can manually enable the necessary modules in case they are not included automatically using menuconfig as shown here:
http://wiki.loverpi.com/specs:sbc:libre-aml-s805x-kernel-config-file