AnsweredAssumed Answered

imx7, runaway loop modprobe binfmt-464c

Question asked by Carlos Bejar-Colonia on Sep 22, 2017
Latest reply on Sep 26, 2017 by igorpadykov

Dear NXP community,

 

I am trying to bring up a Yocto build on a custom i.MXD board which uses NAND flash.
I am using yocto build from fsl-community-bsp (Morty), MACHINE=imx7dsabresd (modified).
Here is part of the machine config I use:

IMAGE_FSTYPES := "ubifs cpio.gz"
MKUBIFS_ARGS = "--squash-uids --min-io-size 2048 --leb-size 126976 --max-leb-cnt 940"

KERNEL_CLASSES ?= " kernel-fitimage "
KERNEL_IMAGETYPE := "fitImage"

# imx7koji-initramfs is defined as a recipe in recipe-core/image/
INITRAMFS_IMAGE = "imx7koji-initramfs"

 

I created append recipes to customize u-boot (u-boot-imx_2016.03.bbappend); to add a new device tree and change kernel config (linux-imx_4.1.15.bbappend).

Yocto builds fine, however when tried to boot the board, the kernel is not able to run "/init":
===
...
Freeing unused kernel memory: 188K (804f7000 - 80526000)
request_module: runaway loop modprobe binfmt-464c
request_module: runaway loop modprobe binfmt-464c
Failed to execute /init (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /sbin/init exists but couldn't execute it (error -8)
request_module: runaway loop modprobe binfmt-464c
Starting init: /bin/sh exists but couldn't execute it (error -8)
Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
Rebooting in 5 seconds..

===
I searched online for these errors, and they seem to be related to mismatch in the architecture of the kernel 32bit and OS 64bit, but in my case I have both 32-bits.

$ file ./linux-imx/4.1.15-r0/build/vmlinux
./linux-imx/4.1.15-r0/build/vmlinux: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, BuildID[sha1]=9d64e3cab02bd4ab3c548b18c1dc5228116cf913, not stripped


$ file sbin/init.sysvinit
deploy/images/imx7koji/mp/sbin/init.sysvinit: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 3.2.0, BuildID[sha1]=610388df391c1223d7522530fde8097537356288, stripped

 

Othe people suggested "error -8" is invalid format so the kernel needs to support ELF. In my case, the kernel config includes that.

CONFIG_BINFMT_ELF=y
CONFIG_BINFMT_SCRIPT=y

 

Any ideas on what could be the root cause?

Thanks,
Carlos

Outcomes