imx7, runaway loop modprobe binfmt-464c

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx7, runaway loop modprobe binfmt-464c

3,087 Views
carlosbejar-col
Contributor I

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

Labels (4)
0 Kudos
6 Replies

2,340 Views
kballantyne
Contributor I

Seeing a similar problem...these have to be the least helpful technical support answers on the web.  I've seen reference to the 32 vs 64 bit mismatch before, but not in the context of ARM.

0 Kudos

2,340 Views
igorpadykov
NXP Employee
NXP Employee

Hi Carlos

first please run ddr test for custom board

i.MX6/7 DDR Stress Test Tool V2.70 

and rebuild image with new calibration coefficients in uboot/board/freescale/mx7dsabresd/imximage.cfg

http://git.freescale.com/git/cgit.cgi/imx/uboot-imx.git/tree/board/freescale/mx7dsabresd?h=imx_v2016... 

then try with minimal configuartion using sect.5.1 Build configurations

and Table 1. Freescale Yocto project images attached Yocto Guide with nxp official bsps described on

http://www.nxp.com/products/software-and-tools/software-development-tools/i.mx-software-and-tools/i....

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,340 Views
carlosbejar-col
Contributor I

Hi Igor,

Could you provide more information about the suspicious part that causes the error I posted?

I don’t know much about the DDR Stress Tool, but do you thing the memory RAM is “out of calibration” that can cause that problem?

Thanks,

Carlos

0 Kudos

2,340 Views
igorpadykov
NXP Employee
NXP Employee

Hi Carlos

for new board first it is necessary to run ddr test to avoid memory errors,

please look at appnote AN4467 i.MX6 Series DDR Calibration

https://www.nxp.com/docs/en/application-note/AN4467.pdf 

and description and comments on

i.MX6/7 DDR Stress Test Tool V2.70 

Best regards
igor

0 Kudos

2,340 Views
carlosbejar-col
Contributor I

Hi Igor,

Thanks for your quick reply. Just want to mention the board already runs a custom Linux that was built in a non-Yocto environment.

Now, we are trying to move to Yocto Project and that is when we are facing the issue.

I have noticed the initramfs created by Yocto has the hard-float ABI enabled while the Kernel is soft-float ABI. Could this mismatch cause the issue?

If yes, how can I change it to soft-float in Yocto?

$ readelf -h sbin/init.sysvinit | grep Flag

Flags: 0x5000400, Version5 EABI, hard-float ABI

$ readelf -h ./build/vmlinux | grep Flags

Flags: 0x5000200, Version5 EABI, soft-float ABI

Thanks,

Carlos

0 Kudos

2,340 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos