2
votes

I build an embedded linux with YOCTO for the KARO TX6S-8035 target. I use the Mfgtools-TX6-2018-01 tool to flash images into the board but when i boot the device i have the following error: Kernel panic - not syncing: Requested init /linuxrc failed (error -2). How can i fix this?

Here is the result of printenv from U-BOOT: printenv

And the serial output from the board: serial output

2

2 Answers

1
votes

The kernel is looking for the init program and cannot find it. Most likely your image is corrupt. More info here: What is linuxrc purpose and is it needed in the rootfs?

I would try:

  1. reflash the image
  2. check the image to be sure that linuxrc exists
  3. post a questions to the meta-freescale mailing list

Also, I do not know what setup you are using, but I would look at the FSL Community BSP. There is a good chance others are building for that platform.

0
votes

Kernel panic - not syncing: Requested init /linuxrc failed (error -2)

In my case, I create initrd with busybox. /linuxrc execute error, because of it can't find the dynamic library.

execute below script after mount the initrd

file linuxrc
  • linuxrc: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for GNU/Linux 3.7.0, stripped

Fix-Option1:

copy library to initrd.

mkdir -p $WORKSPACE/initrd
mount $WORKSPACE/ramdisk.img $WORKSPACE/initrd -t ext2 -o loop=/dev/loop0
pushd $WORKSPACE/initrd/
cp -rf /opt/buildtools/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/lib ./
cp -rf /opt/buildtools/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/aarch64-none-linux-gnu/libc/lib64 ./
aarch64-none-linux-gnu-strip $WORKSPACE/initrd/lib/*
aarch64-none-linux-gnu-strip $WORKSPACE/initrd/lib64/*
aarch64-none-linux-gnu-strip $WORKSPACE/initrd/bin/busybox
popd

umount $WORKSPACE/initrd
gzip -9 $WORKSPACE/ramdisk.img

Fix-Option2:

build busybox statically.

make -j16 -C $WORKSPACE/$BUSYBOX ARCH="arm64" LDFLAGS="--static" CROSS_COMPILE="aarch64-none-linux-gnu-" install
  • busybox-1.32.1/_install/bin/busybox: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, for GNU/Linux 3.7.0, stripped