I successfully cross-compiled the current Raspi Kernel on my 64-bit machine to the target architecture arm64
. I went through all the necessary steps for inserting the newly built kernel into my Dietpi image. Now the only step left is cross-compiling the kernel modules into the target image.
When I run
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- INSTALL_MOD_PATH=/mnt/img modules_install
Sadly, this returns the following:
/bin/sh: 1: Syntax error: "(" unexpected
DEPMOD 4.14.79-v8+
What can I do about that?
depmod
is still applied. Does/mnt/img/lib/modules/4.14.78-v8+
exist with content (directory w/ ~75 MB of modules) ? The Pi kernel (as default configured) actually doesn't require any modules to boot (although it will not have wifi). You can then tell whether any are available by checkinglsmod
-- if you see nothing, it hasn't found anything acceptable. Otherwise you are probably okay. – goldilocks♦ Nov 12 '18 at 15:11initramfs
containing a bunch of optional modules -- no kernel can access the stuff in/lib/modules
until it has mounted the filesystem, and to do that it will require appropriate hardware drivers. These are normally in theinitramfs
. On the pi they are just built-in. – goldilocks♦ Nov 12 '18 at 15:18