0

I'm trying to start my Raspberry Pi with a custom 5.10.y cross-compiled Kernel for https://cdimage.ubuntu.com/releases/20.04.2/release/ubuntu-20.04.2-preinstalled-server-arm64+raspi.img.xz with HUGETLB enabled.

I've successfully cross-compiled the Kernel (I believe) and installed it to my SD card following the generic cross-compilation instructions from the Raspberry Pi website. However, when booting, I get an error about initramfs not being able to find the correct Kernel.

I've copied the initramfs.conf from the SD card into my cross compile directory and am running:

mkinitramfs -d ~/linux -o myinitramffs 5.10.0-v7l-custom

Which results in the following errors:

W: missing /lib/modules/5.10.0-v7l-custom
W: Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/5.10.0-v7l-custom: No such file or directory
depmod: FATAL: could not search modules: No such file or directory

How do I build an initramfs from my cross-compile machine for the Ubuntu 20.04 LTS Raspberry Pi image that will work with my custom Kernel?

0

I always use the package initramfs-tools which contains update-initramfs its a pretty easy to use script based initramfs-hook system. Though as making a single mistake will r

So when I've modified the /etc/initramfs entries I then just have to run..

sudo update-initramfs -u

https://wiki.ubuntu.com/InitramfsUpdates

2
  • 1
    This seems to apply when updating the initramfs from within the Pi not from the machine that is cross-compiling the Kernel. – amb85 Feb 25 at 13:30
  • That is true but initramfs is architecture dependant so you should be able to build your initramfs using update-ramps and specify an non-default output.. .. -b Set an different bootdir for the image creation. – Simon Banks Feb 25 at 13:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.