This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

beaglebone black kernel panic - not syncing attempted to kill init



Hi Forum,

I am trying to boot my beaglebone black board using an initframfs that I built with busybox. I have been struggling with this for over 2 day so I thought to call for HELP. Using my built Kernel I can boot the beaglebone black board using NFS with an already built file system

However when I try to use the initramfs it does not work. When building the kernel I set the CONFIG_BLK_DEV_INITRD=y.

In order to create the root file system I started by downloading and compiled Busybox as a static binary. Below is the output of the "file" command on bin/busybox

ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), statically linked, for GNU/Linux 4.3.0, stripped

The directory I am using for building the file system is named in located in the home directory of my development machine titled rootfs. 

In the rootfs I have the following folders  [bin, dev, etc, home, lib, proc, sbin, sys, tmp, usr, var] and ind the usr I have [bin, lib, sbin]

I also did the following for the dev directory

$ cd ~/rootfs
$ sudo mknod -m 666 dev/null c 1 3
$ sudo mknod -m 600 dev/console c 5 1

I then proceeded to create the uRamdisk image with the following command

$ cd ~/rootfs
$ find . | cpio -H newc -ov --owner root:root > ../initramfs.cpio
$ cd ..
$ gzip initramfs.cpio
$ mkimage -A arm -O linux -T ramdisk -d initramfs.cpio.gz uRamdisk

I then loaded images using tftp as follows

tftp 0x81000000 zImage
tftp 0x82000000 am335x-boneblack.dtb
tftp 0x80f00000 uRamdisk
setenv bootargs console=ttyO0,115200 rdinit=/bin/sh
bootz 0x81000000 0x80f00000 0x82000000

Which produces the attached file screen.log file Many thanks in advance.

tftp 0x81000000 zImage
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.2; our IP address is 192.168.1.7
Filename 'zImage'.
Load address: 0x81000000
Loading: *#################################################################
	 ###############T ##################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 #################################################################
	 ###################
	 85 KiB/s
done
Bytes transferred = 5996512 (5b7fe0 hex)
U-Boot# tftp 0x82000000 am335x-boneblack.dtb
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.2; our IP address is 192.168.1.7
Filename 'am335x-boneblack.dtb'.
Load address: 0x82000000
Loading: *###
	 80.1 KiB/s
done
Bytes transferred = 30149 (75c5 hex)
U-Boot# tftp 0x80f00000 uRamdisk
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.1.2; our IP address is 192.168.1.7
Filename 'uRamdisk'.
Load address: 0x80f00000
Loading: *#################################################################
	 ######
	 91.8 KiB/s
done
Bytes transferred = 1030016 (fb780 hex)
U-Boot# setenv bootargs console=ttyO0,115200 rdinit=/init
U-Boot# bootz 0x81000000 0x80f00000 0x82000000
Kernel image @ 0x81000000 [ 0x000000 - 0x5b7fe0 ]
## Loading init Ramdisk from Legacy Image at 80f00000 ...
   Image Name:   
   Created:      2016-09-06  14:23:21 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1029952 Bytes = 1005.8 KiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Loading Ramdisk to 9ee39000, end 9ef34740 ... OK
   Using Device Tree in place at 82000000, end 8200a5c4

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.1.10 (onio@genesis) (gcc version 5.2.0 (crosstool-NG crosstool-ng-1.22.0) ) #1 SMP Tue Sep 6 00:44:13 BST 2016
[    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: TI AM335x BeagleBone Black
[    0.000000] cma: Reserved 64 MiB at 0x9a800000
[    0.000000] Memory policy: Data cache writeback
[    0.000000] CPU: All CPU(s) started in SVC mode.
[    0.000000] AM335X ES2.1 (sgx neon )
[    0.000000] PERCPU: Embedded 12 pages/cpu @dfaa5000 s16960 r8192 d24000 u49152
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129792
[    0.000000] Kernel command line: console=ttyO0,115200 rdinit=/init
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[    0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Memory: 438396K/523264K available (7831K kernel code, 929K rwdata, 3460K rodata, 880K init, 313K bss, 19332K reserved, 65536K cma-reserved, 0K highmem)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
[    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)
[    0.000000]       .text : 0xc0208000 - 0xc0d0fd60   (11296 kB)
[    0.000000]       .init : 0xc0d10000 - 0xc0dec000   ( 880 kB)
[    0.000000]       .data : 0xc0dec000 - 0xc0ed4460   ( 930 kB)
[    0.000000]        .bss : 0xc0ed7000 - 0xc0f2568c   ( 314 kB)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	Additional per-CPU info printed with stalls.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=16 to nr_cpu_ids=1.
[    0.000000] RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts
[    0.000000] OMAP clockevent source: timer2 at 24000000 Hz
[    0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000030] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000041] OMAP clocksource: timer1 at 24000000 Hz
[    0.000211] Console: colour dummy device 80x30
[    0.000242] Calibrating delay loop... 997.78 BogoMIPS (lpj=2494464)
[    0.059412] pid_max: default: 32768 minimum: 301
[    0.059540] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.059550] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060237] CPU: Testing write buffer coherency: ok
[    0.060539] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.060633] Setting up static identity map for 0x80209000 - 0x80209098
[    0.062671] Brought up 1 CPUs
[    0.062689] SMP: Total of 1 processors activated (997.78 BogoMIPS).
[    0.062697] CPU: All CPU(s) started in SVC mode.
[    0.063173] devtmpfs: initialized
[    0.071526] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.081232] omap_hwmod: tptc0 using broken dt data from edma
[    0.081353] omap_hwmod: tptc1 using broken dt data from edma
[    0.081465] omap_hwmod: tptc2 using broken dt data from edma
[    0.085918] omap_hwmod: debugss: _wait_target_disable failed
[    0.140549] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[    0.144768] pinctrl core: initialized pinctrl subsystem
[    0.146714] NET: Registered protocol family 16
[    0.148742] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.150674] cpuidle: using governor ladder
[    0.150694] cpuidle: using governor menu
[    0.154079] OMAP GPIO hardware version 0.1
[    0.162584] No ATAGs?
[    0.162614] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.166167] Serial: AMBA PL011 UART driver
[    0.183355] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.186160] vgaarb: loaded
[    0.186846] SCSI subsystem initialized
[    0.187451] usbcore: registered new interface driver usbfs
[    0.187518] usbcore: registered new interface driver hub
[    0.187579] usbcore: registered new device driver usb
[    0.188239] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.188739] media: Linux media interface: v0.10
[    0.188796] Linux video capture interface: v2.00
[    0.188849] pps_core: LinuxPPS API ver. 1 registered
[    0.188857] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.188882] PTP clock support registered
[    0.189071] EDAC MC: Ver: 3.0.0
[    0.191413] Switched to clocksource timer1
[    0.201286] NET: Registered protocol family 2
[    0.202027] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.202075] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.202134] TCP: Hash tables configured (established 4096 bind 4096)
[    0.202208] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.202228] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.202390] NET: Registered protocol family 1
[    0.202762] RPC: Registered named UNIX socket transport module.
[    0.202774] RPC: Registered udp transport module.
[    0.202781] RPC: Registered tcp transport module.
[    0.202787] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.203343] Unpacking initramfs...
[    0.269379] Freeing initrd memory: 1008K (dee39000 - def35000)
[    0.269779] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
[    0.269834] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.271845] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.283520] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.284496] NFS: Registering the id_resolver key type
[    0.284562] Key type id_resolver registered
[    0.284570] Key type id_legacy registered
[    0.284636] ntfs: driver 2.1.32 [Flags: R/O].
[    0.286115] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.286140] io scheduler noop registered
[    0.286152] io scheduler deadline registered
[    0.286356] io scheduler cfq registered (default)
[    0.289463] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.349965] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.352348] SuperH (H)SCI(F) driver initialized
[    0.352873] msm_serial: driver initialized
[    0.353368] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.353541] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 154, base_baud = 3000000) is a OMAP UART0
[    1.015098] console [ttyO0] enabled
[    1.019297] STMicroelectronics ASC driver initialized
[    1.025731] [drm] Initialized drm 1.1.0 20060810
[    1.037092] loop: module loaded
[    1.045822] CAN device driver interface
[    1.050715] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.2.15-k
[    1.058145] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.065391] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.073269] usbcore: registered new interface driver pegasus
[    1.079293] usbcore: registered new interface driver asix
[    1.085026] usbcore: registered new interface driver ax88179_178a
[    1.091483] usbcore: registered new interface driver cdc_ether
[    1.097683] usbcore: registered new interface driver smsc75xx
[    1.103789] usbcore: registered new interface driver smsc95xx
[    1.109874] usbcore: registered new interface driver net1080
[    1.115868] usbcore: registered new interface driver cdc_subset
[    1.122136] usbcore: registered new interface driver zaurus
[    1.128094] usbcore: registered new interface driver cdc_ncm
[    1.135392] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.142295] ehci-pci: EHCI PCI platform driver
[    1.147033] ehci-platform: EHCI generic platform driver
[    1.152675] ehci-omap: OMAP-EHCI Host Controller driver
[    1.158276] ehci-orion: EHCI orion driver
[    1.162592] SPEAr-ehci: EHCI SPEAr driver
[    1.166918] ehci-st: EHCI STMicroelectronics driver
[    1.172156] ehci-exynos: EHCI EXYNOS driver
[    1.176663] tegra-ehci: Tegra EHCI driver
[    1.180968] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.187497] ohci-pci: OHCI PCI platform driver
[    1.192233] ohci-platform: OHCI generic platform driver
[    1.197858] ohci-omap3: OHCI OMAP3 driver
[    1.202184] SPEAr-ohci: OHCI SPEAr driver
[    1.206501] ohci-st: OHCI STMicroelectronics driver
[    1.211822] usbcore: registered new interface driver usb-storage
[    1.219325] mousedev: PS/2 mouse device common for all mice
[    1.228154] i2c /dev entries driver
[    1.233223] usbcore: registered new interface driver uvcvideo
[    1.239290] USB Video Class driver (1.1.1)
[    1.243606] gspca_main: v2.14.0 registered
[    1.250754] sdhci: Secure Digital Host Controller Interface driver
[    1.257292] sdhci: Copyright(c) Pierre Ossman
[    1.262709] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.327120] Synopsys Designware Multimedia Card Interface Driver
[    1.334195] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.342082] ledtrig-cpu: registered to indicate activity on CPUs
[    1.348719] usbcore: registered new interface driver usbhid
[    1.354595] usbhid: USB HID core driver
[    1.361080] NET: Registered protocol family 17
[    1.365830] can: controller area network core (rev 20120528 abi 9)
[    1.372424] NET: Registered protocol family 29
[    1.377111] can: raw protocol (rev 20120528)
[    1.381610] can: broadcast manager protocol (rev 20120528 t)
[    1.387571] can: netlink gateway (rev 20130117) max_hops=1
[    1.393858] Key type dns_resolver registered
[    1.398518] omap_voltage_late_init: Voltage driver support not added
[    1.406146] ThumbEE CPU extension supported.
[    1.410722] Registering SWP/SWPB emulation handler
[    1.419184] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.453245] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.467969] mmc0: new high speed SDHC card at address aaaa
[    1.474229] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    1.481453] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.487903] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    1.494778]  mmcblk0: p1 p2
[    1.504562] libphy: 4a101000.mdio: probed
[    1.508890] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.519910] cpsw 4a100000.ethernet: Detected MACID = 7c:66:9d:55:a1:05
[    1.528148] hctosys: unable to open rtc device (rtc0)
[    1.540554] Freeing unused kernel memory: 880K (c0d10000 - c0dec000)
[    1.548865] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    1.548865] 
[    1.558461] CPU: 0 PID: 1 Comm: init Not tainted 4.1.10 #1
[    1.564210] Hardware name: Generic AM33XX (Flattened Device Tree)
[    1.570650] [<c02181a8>] (unwind_backtrace) from [<c0213b08>] (show_stack+0x10/0x14)
[    1.578787] [<c0213b08>] (show_stack) from [<c097112c>] (dump_stack+0x84/0x94)
[    1.586366] [<c097112c>] (dump_stack) from [<c097059c>] (panic+0x9c/0x214)
[    1.593582] [<c097059c>] (panic) from [<c024fcf8>] (do_exit+0x964/0x9a4)
[    1.600612] [<c024fcf8>] (do_exit) from [<c0250c44>] (do_group_exit+0x38/0xd0)
[    1.608198] [<c0250c44>] (do_group_exit) from [<c0259f88>] (get_signal+0x27c/0x5d0)
[    1.616232] [<c0259f88>] (get_signal) from [<c02132d0>] (do_signal+0xc8/0x3ac)
[    1.623810] [<c02132d0>] (do_signal) from [<c0213758>] (do_work_pending+0x94/0xa4)
[    1.631752] [<c0213758>] (do_work_pending) from [<c02106cc>] (work_pending+0xc/0x20)
[    1.639879] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    1.639879] 
[   41.386417] random: nonblocking pool is initialized

  • Kernel doesn't has enough args to boot from initramfs.

    setenv bootargs console=ttyO0,115200 rdinit=/bin/sh

    [ 0.000000] Kernel command line: console=ttyO0,115200 rdinit=/init

    Can you please try the following bootargs ?
    setenv bootargs console=ttyO0,115200 root=/dev/ram0 rw initrd=0x80f00000,8M

    Also try to build the kernel with ramfs filesystem.
    processors.wiki.ti.com/.../Sitara_Linux_Program_the_eMMC_on_Beaglebone_Black
  • Moved this thread over Linux forum. Thank you.
  • Hi Titus,

    Thanks for your response. 

    Your suggestions about the kernel bootargs did work

    setenv bootargs console=ttyO0,115200 root=/dev/ram0 rw initrd=0x80f00000,8M

    The first thing I would like to point out is that when I load uRamdisk to address 0x80f00000 it seems to corrupt the zImage loaded at address 0x81000000 so when I issue the following command

    U-Boot# setenv bootargs console=ttyO0,115200 root=/dev/ram0 rw initrd=0x80f00000,8M
    U-Boot# bootz 0x81000000 0x80f00000 0x82000000

    I get the following error message Bad Linux ARM zImage magic! However if I change the load address for uRamdisk to 0x83000000 it attempts to load the kernel but fails, here are the commands which I issued.

    tftp 0x81000000 zImage
    tftp 0x82000000 am335x-boneblack.dtb
    tftp 0x83000000 uRamdisk
    
    setenv bootargs console=ttyO0,115200 root=/dev/ram0 rw initrd=0x83000000,8M
    bootz 0x81000000 0x83000000 0x82000000

    Here is an extract from the kernel log

    [    1.458217] hctosys: unable to open rtc device (rtc0)
    [    1.471008] VFS: Cannot open root device "ram0" or unknown-block(0,0): error -6
    [    1.478781] Please append a correct "root=" boot option; here are the available partitions:
    [    1.487578] b300        15558144 mmcblk0  driver: mmcblk
    [    1.493176]   b301         1048576 mmcblk0p1 129798ac-01
    [    1.498764]   b302        14508544 mmcblk0p2 129798ac-02
    [    1.504360] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [    1.513032] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.1.10 #1
    [    1.519236] Hardware name: Generic AM33XX (Flattened Device Tree)
    [    1.525674] [<c02181a8>] (unwind_backtrace) from [<c0213b08>] (show_stack+0x10/0x14)
    [    1.533810] [<c0213b08>] (show_stack) from [<c097112c>] (dump_stack+0x84/0x94)
    [    1.541390] [<c097112c>] (dump_stack) from [<c097059c>] (panic+0x9c/0x214)
    [    1.548612] [<c097059c>] (panic) from [<c0d11218>] (mount_block_root+0x194/0x230)
    [    1.556467] [<c0d11218>] (mount_block_root) from [<c0d113bc>] (mount_root+0x108/0x110)
    [    1.564774] [<c0d113bc>] (mount_root) from [<c0d1151c>] (prepare_namespace+0x158/0x1a0)
    [    1.573171] [<c0d1151c>] (prepare_namespace) from [<c0d10e54>] (kernel_init_freeable+0x1d8/0x1e8)
    [    1.582480] [<c0d10e54>] (kernel_init_freeable) from [<c096e720>] (kernel_init+0x8/0xe8)
    [    1.590968] [<c096e720>] (kernel_init) from [<c0210728>] (ret_from_fork+0x14/0x2c)
    [    1.598916] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
    [   41.441294] random: nonblocking pool is initialized
    

    The link that you sent me was how to embedded the file system into the kernel. I have also tried this process but get the same result. So far I have not been able to load any initramfs on the beaglebone black. I have also tried using qemu-system-arm and I get the same result.

    Do you have any links that shows how to create an initramfs from scratch and load this into the kernel with u-boot.

    Many thanks in advance.

  • Please make sure that you have enabled the RAMFS support in kernel via make menuconfig.

    processors.wiki.ti.com/.../Initrd
    processors.wiki.ti.com/.../Creating_a_Root_File_System_for_Linux_on_OMAP35x


    Also please make sure that you are able to boot your busybox based "initramfs" via NFS, this will make sure that rootfs contents are good.