0

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?

  • I'm guessing that error wasn't fatal as 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 checking lsmod -- if you see nothing, it hasn't found anything acceptable. Otherwise you are probably okay. – goldilocks Nov 12 '18 at 15:11
  • @goldilocks Oh, wow, it doesn't need additional modules? That's great, I will try booting. – Akito Nov 12 '18 at 15:13
  • It doesn't if you applied one of the pi specific defconfigs properly. Otherwise it may not boot at all, whether the modules built correctly or not. It's different from normal kernels in that because it is intended for a very specific piece of hardware, it doesn't need an initramfs 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 the initramfs. On the pi they are just built-in. – goldilocks Nov 12 '18 at 15:18
  • @goldilocks I remember, that I actually applied the proper defconfigs already. The device still won't boot, though. – Akito Nov 12 '18 at 15:38
  • @goldilocks Okay, seems like there was a file-system related problem when copying the kernel files from device to device. The original device installs the modules without any problem. – Akito Nov 12 '18 at 15:42
0

My error was to copy the compiled files to different devices instead of copying it directly from source to destination. The process is completed and everything works now.

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.