Starting init: /sbin/init exists but couldn't execute it (error -13)

-1

I am trying to mount the file system of a firmware image on QEMU.

I have built a toolchain and kernel for the versatile-pb board. Using this, I am able to mount a busybox file system and run the shell using QEMU.

But I am unable to mount the file system of the firmware.

This is the content of the firmware file system.

bin  dev  etc  home  ibridge  lib  linuxrc  mnt  opt  proc  root  sbin  srv  sys  tmp  usr  var  zImage

This is the command I am using to run QEMU

QEMU_AUDIO_DRV=none 
\qemu-system-arm -m 256M -M versatilepb -kernel ~/Downloads/linux-4.19.184/arch/arm/boot/zImage 
\-append "console=ttyAMA0,115200 rdinit=/sbin/init" 
-dtb ~/Downloads/linux-4.19.184/arch/arm/boot/dts/versatile-pb.dtb 
-initrd ~/Downloads/firmware/_rootfs.extracted/initramfs_3.cpio.gz 
-nographic

This is the kernel panic error I am facing.

Run /sbin/init as init process
input: AT Raw Set 2 keyboard as /devices/platform/amba/amba:fpga/10006000.kmi/serio0/input/input0
Failed to execute /sbin/init (error -13)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -13)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -13)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         4.19.184 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001bfec>] (unwind_backtrace) from [<c0018ee0>] (show_stack+0x10/0x14)
[<c0018ee0>] (show_stack) from [<c03ef9cc>] (panic+0xc8/0x244)
[<c03ef9cc>] (panic) from [<c03f1d7c>] (kernel_init+0xb8/0xe8)
[<c03f1d7c>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

Below is the entire boot message obtained once I run the QEMU command.

vpb_sic_write: Bad register offset 0x2c
Booting Linux on physical CPU 0x0
Linux version 4.19.184 (..) (gcc version 8.3.0 (crosstool-NG 1.24.0)) #1 Tue Apr 6 07:56:40 EDT 2021
CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00093177
CPU: VIVT data cache, VIVT instruction cache
OF: fdt: Machine model: ARM Versatile PB
Memory policy: Data cache writeback
random: get_random_bytes called from start_kernel+0x7c/0x3d8 with crng_init=0
Built 1 zonelists, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyAMA0,115200 rdinit=/sbin/init
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 235764K/262144K available (4024K kernel code, 148K rwdata, 1012K rodata, 172K init, 133K bss, 26380K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0x(ptrval) - 0x(ptrval)   (4026 kB)
      .init : 0x(ptrval) - 0x(ptrval)   ( 172 kB)
      .data : 0x(ptrval) - 0x(ptrval)   ( 149 kB)
       .bss : 0x(ptrval) - 0x(ptrval)   ( 134 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
VIC @(ptrval): id 0x00041190, vendor 0x41
FPGA IRQ chip 0 "intc" @ (ptrval), 20 irqs, parent IRQ: 47
clocksource: arm,sp804: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275 ns
sched_clock: 32 bits at 1000kHz, resolution 1000ns, wraps every 2147483647500ns
Failed to initialize '/amba/timer@101e3000': -22
sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
Console: colour dummy device 80x30
Calibrating delay loop... 531.66 BogoMIPS (lpj=2658304)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x8400 - 0x8458
VFP support v0.3: implementor 41 architecture 1 part 10 variant 9 rev 0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
OF: amba_device_add() failed (-19) for /amba/smc@10100000
OF: amba_device_add() failed (-19) for /amba/mpmc@10110000
OF: amba_device_add() failed (-19) for /amba/sctl@101e0000
OF: amba_device_add() failed (-19) for /amba/watchdog@101e1000
OF: amba_device_add() failed (-19) for /amba/sci@101f0000
OF: amba_device_add() failed (-19) for /amba/spi@101f4000
OF: amba_device_add() failed (-19) for /amba/fpga/sci@a000
Serial: AMBA PL011 UART driver
101f1000.uart: ttyAMA0 at MMIO 0x101f1000 (irq = 28, base_baud = 0) is a PL011 rev1
console [ttyAMA0] enabled
101f2000.uart: ttyAMA1 at MMIO 0x101f2000 (irq = 29, base_baud = 0) is a PL011 rev1
101f3000.uart: ttyAMA2 at MMIO 0x101f3000 (irq = 30, base_baud = 0) is a PL011 rev1
uart-pl011 10009000.uart: aliased and non-aliased serial devices found in device tree. Serial port enumeration may be unpredictable.
10009000.uart: ttyAMA3 at MMIO 0x10009000 (irq = 54, base_baud = 0) is a PL011 rev1
clocksource: Switched to clocksource arm,sp804
NET: Registered protocol family 2
tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
TCP established hash table entries: 2048 (order: 1, 8192 bytes)
TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
TCP: Hash tables configured (established 2048 bind 2048)
UDP hash table entries: 256 (order: 0, 4096 bytes)
UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
Trying to unpack rootfs image as initramfs...
random: fast init done
Freeing initrd memory: 18380K
NetWinder Floating Point Emulator V0.97 (double precision)
workingset: timestamp_bits=30 max_order=16 bucket_order=0
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
romfs: ROMFS MTD (C) 2007 Red Hat, Inc.
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
pl061_gpio 101e4000.gpio: PL061 GPIO chip @0x101e4000 registered
pl061_gpio 101e5000.gpio: PL061 GPIO chip @0x101e5000 registered
pl061_gpio 101e6000.gpio: PL061 GPIO chip @0x101e6000 registered
pl061_gpio 101e7000.gpio: PL061 GPIO chip @0x101e7000 registered
versatile-tft-panel 10000000.sysreg:display@0: no panel detected
drm-clcd-pl111 dev:20: set up callbacks for Versatile PL110
drm-clcd-pl111 dev:20: found bridge on endpoint 1
drm-clcd-pl111 dev:20: Using non-panel bridge
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] No driver support for vblank timestamp query.
drm-clcd-pl111 dev:20: enable Versatile CLCD connectors
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_atomic_helper.c:1405 drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268
[CRTC:29:crtc-0] vblank wait timed out
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.19.184 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001bfec>] (unwind_backtrace) from [<c0018ee0>] (show_stack+0x10/0x14)
[<c0018ee0>] (show_stack) from [<c03efc0c>] (__warn+0xc4/0xf0)
[<c03efc0c>] (__warn) from [<c002425c>] (warn_slowpath_fmt+0x44/0x6c)
[<c002425c>] (warn_slowpath_fmt) from [<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268)
[<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1) from [<c0233b3c>] (drm_atomic_helper_commit_tail+0x5c/0x6c)
[<c0233b3c>] (drm_atomic_helper_commit_tail) from [<c0233bb4>] (commit_tail+0x68/0x6c)
[<c0233bb4>] (commit_tail) from [<c0233c78>] (drm_atomic_helper_commit+0xb8/0x128)
[<c0233c78>] (drm_atomic_helper_commit) from [<c0236140>] (restore_fbdev_mode_atomic+0x15c/0x1b4)
[<c0236140>] (restore_fbdev_mode_atomic) from [<c0239740>] (drm_fb_helper_restore_fbdev_mode_unlocked+0x50/0xa4)
[<c0239740>] (drm_fb_helper_restore_fbdev_mode_unlocked) from [<c02397c0>] (drm_fb_helper_set_par+0x2c/0x54)
[<c02397c0>] (drm_fb_helper_set_par) from [<c01f050c>] (fbcon_init+0x428/0x590)
[<c01f050c>] (fbcon_init) from [<c02165f0>] (visual_init+0xb8/0x100)
[<c02165f0>] (visual_init) from [<c0218684>] (do_bind_con_driver+0x1f4/0x3cc)
[<c0218684>] (do_bind_con_driver) from [<c0218c08>] (do_take_over_console+0x138/0x1f0)
[<c0218c08>] (do_take_over_console) from [<c01f06d8>] (do_fbcon_takeover+0x64/0xc4)
[<c01f06d8>] (do_fbcon_takeover) from [<c003e990>] (notifier_call_chain+0x48/0x80)
[<c003e990>] (notifier_call_chain) from [<c003f13c>] (blocking_notifier_call_chain+0x50/0x68)
[<c003f13c>] (blocking_notifier_call_chain) from [<c01e7090>] (register_framebuffer+0x1fc/0x304)
[<c01e7090>] (register_framebuffer) from [<c02393d8>] (__drm_fb_helper_initial_config_and_unlock+0x214/0x458)
[<c02393d8>] (__drm_fb_helper_initial_config_and_unlock) from [<c0239c54>] (drm_fb_helper_fbdev_setup+0x138/0x200)
[<c0239c54>] (drm_fb_helper_fbdev_setup) from [<c0239df8>] (drm_fbdev_cma_init+0x7c/0xbc)
[<c0239df8>] (drm_fbdev_cma_init) from [<c0239e40>] (drm_fb_cma_fbdev_init+0x8/0x14)
[<c0239e40>] (drm_fb_cma_fbdev_init) from [<c0264824>] (pl111_amba_probe+0x384/0x4a4)
[<c0264824>] (pl111_amba_probe) from [<c01f7270>] (amba_probe+0xd8/0x150)
[<c01f7270>] (amba_probe) from [<c026b1b4>] (really_probe+0x1fc/0x2a4)
[<c026b1b4>] (really_probe) from [<c026b3bc>] (driver_probe_device+0x5c/0x168)
[<c026b3bc>] (driver_probe_device) from [<c026b5b4>] (__driver_attach+0xec/0xf0)
[<c026b5b4>] (__driver_attach) from [<c02694b4>] (bus_for_each_dev+0x70/0xb4)
[<c02694b4>] (bus_for_each_dev) from [<c026a62c>] (bus_add_driver+0x194/0x1f8)
[<c026a62c>] (bus_add_driver) from [<c026bec0>] (driver_register+0x74/0x108)
[<c026bec0>] (driver_register) from [<c000abac>] (do_one_initcall+0x6c/0x1b4)
[<c000abac>] (do_one_initcall) from [<c0513dac>] (kernel_init_freeable+0x110/0x1cc)
[<c0513dac>] (kernel_init_freeable) from [<c03f1ccc>] (kernel_init+0x8/0xe8)
[<c03f1ccc>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace c53171776e6162fe ]---
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:29:crtc-0] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:31:VGA-1] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:28:plane-0] flip_done timed out
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_atomic_helper.c:1405 drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268
[CRTC:29:crtc-0] vblank wait timed out
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         4.19.184 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001bfec>] (unwind_backtrace) from [<c0018ee0>] (show_stack+0x10/0x14)
[<c0018ee0>] (show_stack) from [<c03efc0c>] (__warn+0xc4/0xf0)
[<c03efc0c>] (__warn) from [<c002425c>] (warn_slowpath_fmt+0x44/0x6c)
[<c002425c>] (warn_slowpath_fmt) from [<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268)
[<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1) from [<c0233b3c>] (drm_atomic_helper_commit_tail+0x5c/0x6c)
[<c0233b3c>] (drm_atomic_helper_commit_tail) from [<c0233bb4>] (commit_tail+0x68/0x6c)
[<c0233bb4>] (commit_tail) from [<c0233c78>] (drm_atomic_helper_commit+0xb8/0x128)
[<c0233c78>] (drm_atomic_helper_commit) from [<c0236140>] (restore_fbdev_mode_atomic+0x15c/0x1b4)
[<c0236140>] (restore_fbdev_mode_atomic) from [<c02362e0>] (drm_fb_helper_pan_display+0xb8/0x1cc)
[<c02362e0>] (drm_fb_helper_pan_display) from [<c01e5664>] (fb_pan_display+0x98/0x10c)
[<c01e5664>] (fb_pan_display) from [<c01f2e44>] (bit_update_start+0x14/0x30)
[<c01f2e44>] (bit_update_start) from [<c01ef298>] (fbcon_switch+0x398/0x4dc)
[<c01ef298>] (fbcon_switch) from [<c0217d4c>] (redraw_screen+0x144/0x278)
[<c0217d4c>] (redraw_screen) from [<c01f0020>] (fbcon_prepare_logo+0x3a0/0x464)
[<c01f0020>] (fbcon_prepare_logo) from [<c01f04b8>] (fbcon_init+0x3d4/0x590)
[<c01f04b8>] (fbcon_init) from [<c02165f0>] (visual_init+0xb8/0x100)
[<c02165f0>] (visual_init) from [<c0218684>] (do_bind_con_driver+0x1f4/0x3cc)
[<c0218684>] (do_bind_con_driver) from [<c0218c08>] (do_take_over_console+0x138/0x1f0)
[<c0218c08>] (do_take_over_console) from [<c01f06d8>] (do_fbcon_takeover+0x64/0xc4)
[<c01f06d8>] (do_fbcon_takeover) from [<c003e990>] (notifier_call_chain+0x48/0x80)
[<c003e990>] (notifier_call_chain) from [<c003f13c>] (blocking_notifier_call_chain+0x50/0x68)
[<c003f13c>] (blocking_notifier_call_chain) from [<c01e7090>] (register_framebuffer+0x1fc/0x304)
[<c01e7090>] (register_framebuffer) from [<c02393d8>] (__drm_fb_helper_initial_config_and_unlock+0x214/0x458)
[<c02393d8>] (__drm_fb_helper_initial_config_and_unlock) from [<c0239c54>] (drm_fb_helper_fbdev_setup+0x138/0x200)
[<c0239c54>] (drm_fb_helper_fbdev_setup) from [<c0239df8>] (drm_fbdev_cma_init+0x7c/0xbc)
[<c0239df8>] (drm_fbdev_cma_init) from [<c0239e40>] (drm_fb_cma_fbdev_init+0x8/0x14)
[<c0239e40>] (drm_fb_cma_fbdev_init) from [<c0264824>] (pl111_amba_probe+0x384/0x4a4)
[<c0264824>] (pl111_amba_probe) from [<c01f7270>] (amba_probe+0xd8/0x150)
[<c01f7270>] (amba_probe) from [<c026b1b4>] (really_probe+0x1fc/0x2a4)
[<c026b1b4>] (really_probe) from [<c026b3bc>] (driver_probe_device+0x5c/0x168)
[<c026b3bc>] (driver_probe_device) from [<c026b5b4>] (__driver_attach+0xec/0xf0)
[<c026b5b4>] (__driver_attach) from [<c02694b4>] (bus_for_each_dev+0x70/0xb4)
[<c02694b4>] (bus_for_each_dev) from [<c026a62c>] (bus_add_driver+0x194/0x1f8)
[<c026a62c>] (bus_add_driver) from [<c026bec0>] (driver_register+0x74/0x108)
[<c026bec0>] (driver_register) from [<c000abac>] (do_one_initcall+0x6c/0x1b4)
[<c000abac>] (do_one_initcall) from [<c0513dac>] (kernel_init_freeable+0x110/0x1cc)
[<c0513dac>] (kernel_init_freeable) from [<c03f1ccc>] (kernel_init+0x8/0xe8)
[<c03f1ccc>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace c53171776e6162ff ]---
Console: switching to colour frame buffer device 100x75
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CRTC:29:crtc-0] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [CONNECTOR:31:VGA-1] flip_done timed out
[drm:drm_atomic_helper_wait_for_dependencies] *ERROR* [PLANE:28:plane-0] flip_done timed out
------------[ cut here ]------------
WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/drm_atomic_helper.c:1405 drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268
[CRTC:29:crtc-0] vblank wait timed out
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         4.19.184 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001bfec>] (unwind_backtrace) from [<c0018ee0>] (show_stack+0x10/0x14)
[<c0018ee0>] (show_stack) from [<c03efc0c>] (__warn+0xc4/0xf0)
[<c03efc0c>] (__warn) from [<c002425c>] (warn_slowpath_fmt+0x44/0x6c)
[<c002425c>] (warn_slowpath_fmt) from [<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1+0x250/0x268)
[<c0232114>] (drm_atomic_helper_wait_for_vblanks.part.1) from [<c0233b3c>] (drm_atomic_helper_commit_tail+0x5c/0x6c)
[<c0233b3c>] (drm_atomic_helper_commit_tail) from [<c0233bb4>] (commit_tail+0x68/0x6c)
[<c0233bb4>] (commit_tail) from [<c0233c78>] (drm_atomic_helper_commit+0xb8/0x128)
[<c0233c78>] (drm_atomic_helper_commit) from [<c0236140>] (restore_fbdev_mode_atomic+0x15c/0x1b4)
[<c0236140>] (restore_fbdev_mode_atomic) from [<c02362e0>] (drm_fb_helper_pan_display+0xb8/0x1cc)
[<c02362e0>] (drm_fb_helper_pan_display) from [<c01e5664>] (fb_pan_display+0x98/0x10c)
[<c01e5664>] (fb_pan_display) from [<c01f2e44>] (bit_update_start+0x14/0x30)
[<c01f2e44>] (bit_update_start) from [<c01ef298>] (fbcon_switch+0x398/0x4dc)
[<c01ef298>] (fbcon_switch) from [<c0217d4c>] (redraw_screen+0x144/0x278)
[<c0217d4c>] (redraw_screen) from [<c02187d0>] (do_bind_con_driver+0x340/0x3cc)
[<c02187d0>] (do_bind_con_driver) from [<c0218c08>] (do_take_over_console+0x138/0x1f0)
[<c0218c08>] (do_take_over_console) from [<c01f06d8>] (do_fbcon_takeover+0x64/0xc4)
[<c01f06d8>] (do_fbcon_takeover) from [<c003e990>] (notifier_call_chain+0x48/0x80)
[<c003e990>] (notifier_call_chain) from [<c003f13c>] (blocking_notifier_call_chain+0x50/0x68)
[<c003f13c>] (blocking_notifier_call_chain) from [<c01e7090>] (register_framebuffer+0x1fc/0x304)
[<c01e7090>] (register_framebuffer) from [<c02393d8>] (__drm_fb_helper_initial_config_and_unlock+0x214/0x458)
[<c02393d8>] (__drm_fb_helper_initial_config_and_unlock) from [<c0239c54>] (drm_fb_helper_fbdev_setup+0x138/0x200)
[<c0239c54>] (drm_fb_helper_fbdev_setup) from [<c0239df8>] (drm_fbdev_cma_init+0x7c/0xbc)
[<c0239df8>] (drm_fbdev_cma_init) from [<c0239e40>] (drm_fb_cma_fbdev_init+0x8/0x14)
[<c0239e40>] (drm_fb_cma_fbdev_init) from [<c0264824>] (pl111_amba_probe+0x384/0x4a4)
[<c0264824>] (pl111_amba_probe) from [<c01f7270>] (amba_probe+0xd8/0x150)
[<c01f7270>] (amba_probe) from [<c026b1b4>] (really_probe+0x1fc/0x2a4)
[<c026b1b4>] (really_probe) from [<c026b3bc>] (driver_probe_device+0x5c/0x168)
[<c026b3bc>] (driver_probe_device) from [<c026b5b4>] (__driver_attach+0xec/0xf0)
[<c026b5b4>] (__driver_attach) from [<c02694b4>] (bus_for_each_dev+0x70/0xb4)
[<c02694b4>] (bus_for_each_dev) from [<c026a62c>] (bus_add_driver+0x194/0x1f8)
[<c026a62c>] (bus_add_driver) from [<c026bec0>] (driver_register+0x74/0x108)
[<c026bec0>] (driver_register) from [<c000abac>] (do_one_initcall+0x6c/0x1b4)
[<c000abac>] (do_one_initcall) from [<c0513dac>] (kernel_init_freeable+0x110/0x1cc)
[<c0513dac>] (kernel_init_freeable) from [<c03f1ccc>] (kernel_init+0x8/0xe8)
[<c03f1ccc>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end trace c53171776e616300 ]---
drm-clcd-pl111 dev:20: fb0: DRM emulated frame buffer device
[drm] Initialized pl111 1.0.0 20170317 for dev:20 on minor 0
brd: module loaded
of-flash 34000000.flash: versatile/realview flash protection
34000000.flash: Found 1 x32 devices at 0x0 in 32-bit bank. Manufacturer ID 0x000000 Chip ID 0x000000
Intel/Sharp Extended Query Table at 0x0031
Using buffer write method
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <nico@fluxnic.net>
smc91x 10010000.net eth0: SMC91C11xFD (rev 1) at (ptrval) IRQ 41
smc91x 10010000.net eth0: Ethernet addr: 52:54:00:12:34:56
rtc-ds1307 0-0068: registered as rtc0
versatile reboot driver registered
mmci-pl18x fpga:05: mmc0: PL181 manf 41 rev0 at 0x10005000 irq 59,60 (pio)
mmci-pl18x fpga:0b: mmc1: PL181 manf 41 rev0 at 0x1000b000 irq 49,50 (pio)
leds-syscon 10000000.core-module:led@08.0: registered LED versatile:0
leds-syscon 10000000.core-module:led@08.1: registered LED versatile:1
leds-syscon 10000000.core-module:led@08.2: registered LED versatile:2
leds-syscon 10000000.core-module:led@08.3: registered LED versatile:3
leds-syscon 10000000.core-module:led@08.4: registered LED versatile:4
leds-syscon 10000000.core-module:led@08.5: registered LED versatile:5
leds-syscon 10000000.core-module:led@08.6: registered LED versatile:6
leds-syscon 10000000.core-module:led@08.7: registered LED versatile:7
ledtrig-cpu: registered to indicate activity on CPUs
NET: Registered protocol family 17
rtc-ds1307 0-0068: setting system clock to 2021-04-22 10:44:46 UTC (1619088286)
Freeing unused kernel memory: 172K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
input: AT Raw Set 2 keyboard as /devices/platform/amba/amba:fpga/10006000.kmi/serio0/input/input0
Failed to execute /sbin/init (error -13)
Run /sbin/init as init process
Starting init: /sbin/init exists but couldn't execute it (error -13)
Run /etc/init as init process
Run /bin/init as init process
Run /bin/sh as init process
Starting init: /bin/sh exists but couldn't execute it (error -13)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         4.19.184 #1
Hardware name: ARM-Versatile (Device Tree Support)
[<c001bfec>] (unwind_backtrace) from [<c0018ee0>] (show_stack+0x10/0x14)
[<c0018ee0>] (show_stack) from [<c03ef9cc>] (panic+0xc8/0x244)
[<c03ef9cc>] (panic) from [<c03f1d7c>] (kernel_init+0xb8/0xe8)
[<c03f1d7c>] (kernel_init) from [<c00090e0>] (ret_from_fork+0x14/0x34)
Exception stack(0xcf823fb0 to 0xcf823ff8)
3fa0:                                     00000000 00000000 00000000 00000000
3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
3fe0: 00000000 00000000 00000000 00000000 00000013 00000000
---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---

arm
emulation
qemu
boot
firmware
asked on Stack Overflow Apr 22, 2021 by dev • edited Apr 28, 2021 by dev

1 Answer

0

The kernel is telling you that the /sbin/init process in your filesystem is not something it can execute. Unfortunately it doesn't give very many clues about why, but things you should check:

  • Is the file actually marked executable in the filesystem?
  • Is the file type one that your kernel has support compiled in for? (Usually the executable will be an ELF file and it's pretty unlikely you compiled a kernel without ELF support, but it's possible the file is something more exotic and it is possible to build kernels without ELF support.)
  • Is the file for the right guest architecture (in this case, Arm)?
  • Is the file capable of running on the CPU that the board model you're using has? The versatilepb has an arm926, which is a pretty old ARMv4 architecture. If the binary you're trying to run is built for something newer then it won't be able to run.

You can answer most of those questions by fishing the file out of the filesystem and examining it with (a multiarch-aware) objdump on the host.

answered on Stack Overflow Apr 22, 2021 by Peter Maydell

User contributions licensed under CC BY-SA 3.0