LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 09-11-2016, 03:40 PM   #1
olaoni
LQ Newbie
 
Registered: Feb 2016
Posts: 19

Rep: Reputation: Disabled
Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b


I am trying to build a root file system for the kernel and seems to be having
problem getting the kernel to load.

I developing on beaglebone black for learning purposes and so far I have
managed to build the following four elements.

(1) Toolchain using cross-ng (arm-cortex_a8-linux-gnueabihf- )
(2) u-boot.img
(3) Linux kernel (v4.1.10) omap2plus_defconfig
(4) Busybox (1_25_stable) [built as static]

For testing I am using NFS to mount the root file system. The puzzling bit for
me is that I when I use an already built rootfile system that I obtained from
www.free-electrons.com "Embedded Linux kernel and driver development training"
I can boot the kernel without any problem.

The process I am using to load the kernel is as follows. I copy both the
zImage and am335x-boneblack.dtb to my sdcard and load that using u-boot console
as shown below.

The sdcard has been partitioned into two parts with partition 1 named boot
being a Fat 16 and parition 2 an ext4 (currently not used). The first partition
contains the following files MLO,u-boot.img,zImage and am335x-boneblack.dtb.

I start the kernel as follows..
--------------------------------------------------
USE CASE 1 (using free-electrons root file system)
Code:
U-Boot# fatload mmc 0:1 0x81000000 zImage <enter>
U-Boot# fatload mmc 0:1 0x82000000 am335-boneblack.dtb <enter>

setenv bootargs root=/dev/nfs rw ip=dhcp console=ttyO0 \
    nfsroot=192.168.1.4:/home/onio/linux-kernel-labs/modules/nfsroot

bootz 0x81000000 - 0x82000000 <enter>

Kernel image @ 0x81000000 [ 0x000000 - 0x5ccd70 ]
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   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) ) #2 SMP Wed Sep 7 16:50:58 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 0x9b800000
[    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: root=/dev/nfs rw ip=dhcp console=ttyO0 nfsroot=192.168.1.2:/home/onio/linux-kernel-labs/modules/nfsroot
[    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: 439196K/523264K available (7957K kernel code, 940K rwdata, 3492K rodata, 888K init, 345K bss, 18532K 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 - 0xc0d3758c   (11454 kB)
[    0.000000]       .init : 0xc0d38000 - 0xc0e16000   ( 888 kB)
[    0.000000]       .data : 0xc0e16000 - 0xc0f01320   ( 941 kB)
[    0.000000]        .bss : 0xc0f04000 - 0xc0f5a78c   ( 346 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.000011] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000028] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000039] OMAP clocksource: timer1 at 24000000 Hz
[    0.000212] Console: colour dummy device 80x30
[    0.000244] Calibrating delay loop... 997.78 BogoMIPS (lpj=2494464)
[    0.059404] pid_max: default: 32768 minimum: 301
[    0.059533] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.059544] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.060191] CPU: Testing write buffer coherency: ok
[    0.060488] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.060577] Setting up static identity map for 0x80209000 - 0x80209098
[    0.062589] Brought up 1 CPUs
[    0.062608] SMP: Total of 1 processors activated (997.78 BogoMIPS).
[    0.062616] CPU: All CPU(s) started in SVC mode.
[    0.063163] devtmpfs: initialized
[    0.071726] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.081448] omap_hwmod: tptc0 using broken dt data from edma
[    0.081568] omap_hwmod: tptc1 using broken dt data from edma
[    0.081680] omap_hwmod: tptc2 using broken dt data from edma
[    0.086145] omap_hwmod: debugss: _wait_target_disable failed
[    0.140791] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302231375000 ns
[    0.145006] pinctrl core: initialized pinctrl subsystem
[    0.147004] NET: Registered protocol family 16
[    0.149072] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.151022] cpuidle: using governor ladder
[    0.151044] cpuidle: using governor menu
[    0.154508] OMAP GPIO hardware version 0.1
[    0.162759] No ATAGs?
[    0.162787] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.166354] Serial: AMBA PL011 UART driver
[    0.183829] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.186648] vgaarb: loaded
[    0.187370] SCSI subsystem initialized
[    0.187972] usbcore: registered new interface driver usbfs
[    0.188038] usbcore: registered new interface driver hub
[    0.188094] usbcore: registered new device driver usb
[    0.188779] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.189282] media: Linux media interface: v0.10
[    0.189347] Linux video capture interface: v2.00
[    0.189474] pps_core: LinuxPPS API ver. 1 registered
[    0.189482] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.189510] PTP clock support registered
[    0.189722] EDAC MC: Ver: 3.0.0
[    0.192046] Switched to clocksource timer1
[    0.202128] NET: Registered protocol family 2
[    0.202785] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.202834] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    0.202894] TCP: Hash tables configured (established 4096 bind 4096)
[    0.202963] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.202982] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.203144] NET: Registered protocol family 1
[    0.203511] RPC: Registered named UNIX socket transport module.
[    0.203523] RPC: Registered udp transport module.
[    0.203529] RPC: Registered tcp transport module.
[    0.203535] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.204380] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
[    0.204430] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.206235] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.218309] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.219300] NFS: Registering the id_resolver key type
[    0.219364] Key type id_resolver registered
[    0.219372] Key type id_legacy registered
[    0.219445] ntfs: driver 2.1.32 [Flags: R/O].
[    0.219840] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.221579] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 248)
[    0.221602] io scheduler noop registered
[    0.221613] io scheduler deadline registered
[    0.221796] io scheduler cfq registered (default)
[    0.224855] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.286261] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    0.288673] SuperH (H)SCI(F) driver initialized
[    0.289212] msm_serial: driver initialized
[    0.289712] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.289879] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 154, base_baud = 3000000) is a OMAP UART0
[    0.954508] console [ttyO0] enabled
[    0.958699] STMicroelectronics ASC driver initialized
[    0.965186] [drm] Initialized drm 1.1.0 20060810
[    0.981384] brd: module loaded
[    0.989505] loop: module loaded
[    0.998410] CAN device driver interface
[    1.003280] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.2.15-k
[    1.010707] igb: Copyright (c) 2007-2014 Intel Corporation.
[    1.018017] pegasus: v0.9.3 (2013/04/25), Pegasus/Pegasus II USB Ethernet driver
[    1.025893] usbcore: registered new interface driver pegasus
[    1.031913] usbcore: registered new interface driver asix
[    1.037652] usbcore: registered new interface driver ax88179_178a
[    1.044109] usbcore: registered new interface driver cdc_ether
[    1.050331] usbcore: registered new interface driver smsc75xx
[    1.056440] usbcore: registered new interface driver smsc95xx
[    1.062531] usbcore: registered new interface driver net1080
[    1.068526] usbcore: registered new interface driver cdc_subset
[    1.074793] usbcore: registered new interface driver zaurus
[    1.080753] usbcore: registered new interface driver cdc_ncm
[    1.088126] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.095019] ehci-pci: EHCI PCI platform driver
[    1.099758] ehci-platform: EHCI generic platform driver
[    1.105396] ehci-omap: OMAP-EHCI Host Controller driver
[    1.110997] ehci-orion: EHCI orion driver
[    1.115310] SPEAr-ehci: EHCI SPEAr driver
[    1.119627] ehci-st: EHCI STMicroelectronics driver
[    1.124854] ehci-exynos: EHCI EXYNOS driver
[    1.129364] tegra-ehci: Tegra EHCI driver
[    1.133700] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    1.140229] ohci-pci: OHCI PCI platform driver
[    1.144967] ohci-platform: OHCI generic platform driver
[    1.150590] ohci-omap3: OHCI OMAP3 driver
[    1.154925] SPEAr-ohci: OHCI SPEAr driver
[    1.159249] ohci-st: OHCI STMicroelectronics driver
[    1.164557] usbcore: registered new interface driver usb-storage
[    1.172177] mousedev: PS/2 mouse device common for all mice
[    1.181005] i2c /dev entries driver
[    1.186210] usbcore: registered new interface driver uvcvideo
[    1.192288] USB Video Class driver (1.1.1)
[    1.196589] gspca_main: v2.14.0 registered
[    1.203974] sdhci: Secure Digital Host Controller Interface driver
[    1.210501] sdhci: Copyright(c) Pierre Ossman
[    1.215928] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.277747] Synopsys Designware Multimedia Card Interface Driver
[    1.284868] sdhci-pltfm: SDHCI platform and OF driver helper
[    1.292790] ledtrig-cpu: registered to indicate activity on CPUs
[    1.299409] usbcore: registered new interface driver usbhid
[    1.305284] usbhid: USB HID core driver
[    1.311814] NET: Registered protocol family 17
[    1.316568] can: controller area network core (rev 20120528 abi 9)
[    1.323163] NET: Registered protocol family 29
[    1.327851] can: raw protocol (rev 20120528)
[    1.332352] can: broadcast manager protocol (rev 20120528 t)
[    1.338328] can: netlink gateway (rev 20130117) max_hops=1
[    1.344590] Key type dns_resolver registered
[    1.349286] omap_voltage_late_init: Voltage driver support not added
[    1.356873] ThumbEE CPU extension supported.
[    1.361441] Registering SWP/SWPB emulation handler
[    1.369968] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.403880] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.417912] mmc0: new high speed SDHC card at address aaaa
[    1.424181] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    1.432087] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.438539] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    1.445433]  mmcblk0: p1 p2
[    1.450497] libphy: 4a101000.mdio: probed
[    1.454807] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.465781] cpsw 4a100000.ethernet: Detected MACID = 7c:66:9d:55:a1:05
[    1.474030] hctosys: unable to open rtc device (rtc0)
[    1.483882] net eth0: initializing cpsw version 1.12 (0)
[    1.491863] net eth0: phy found : id is : 0x7c0f1
[    1.496882] libphy: PHY 4a101000.mdio:01 not found
[    1.501929] net eth0: phy 4a101000.mdio:01 not found on slave 1
[    1.550646] mmc1: MAN_BKOPS_EN bit is not set
[    1.559677] mmc1: new high speed MMC card at address 0001
[    1.565857] mmcblk1: mmc1:0001 MMC04G 3.60 GiB 
[    1.570804] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB
[    1.577190] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB
[    1.584445]  mmcblk1: p1 p2
[    4.557683] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    4.577064] Sending DHCP requests ., OK
[    4.632523] IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.7
[    4.640641] IP-Config: Complete:
[    4.644058]      device=eth0, hwaddr=7c:66:9d:55:a1:05, ipaddr=192.168.1.7, mask=255.255.255.0, gw=192.168.1.1
[    4.654563]      host=192.168.1.7, domain=lan, nis-domain=(none)
[    4.660871]      bootserver=0.0.0.0, rootserver=192.168.1.2, rootpath=
[    4.667546]      nameserver0=192.168.1.1, nameserver1=192.168.1.1
[    4.788882] VFS: Mounted root (nfs filesystem) on device 0:13.
[    4.801925] devtmpfs: mounted
[    4.805966] Freeing unused kernel memory: 888K (c0d38000 - c0e16000)
Starting logging: OK
Initializing random number generator... [    8.833908] random: dd urandom read with 81 bits of entropy available
done.
Starting network...
ip: RTNETLINK answers: File exists
Starting dropbear sshd: OK


Welcome to Buildroot

buildroot login:
--------------------------------------------------
USE CASE 2 ( using my built file system )
Code:
U-Boot# fatload mmc 0:1 0x81000000 zImage <enter>
U-Boot# fatload mmc 0:1 0x82000000 am335-boneblack.dtb <enter>

setenv bootargs root=/dev/nfs rw ip=dhcp console=ttyO0 \
    nfsroot=192.168.1.4:/home/onio/rootfs

bootz 0x81000000 - 0x82000000 <enter>
## Flattened Device Tree blob at 82000000
   Booting using the fdt blob at 0x82000000
   Using Device Tree in place at 82000000, end 8200a5c4

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.1.10 (onio@genesis) (gcc version 5.2.0 (crosstool-NG crosstool-ng-1.22.0) ) #1 SMP Sat Sep 10 16:22:04 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 16 MiB at 0x9e800000
[    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 13 pages/cpu @dfa19000 s22976 r8192 d22080 u53248
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 129664
[    0.000000] Kernel command line: ip=dhcp console=ttyO0 root=/dev/nfs rw nfsroot=192.168.1.4:/home/onio/rootfs
[    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: 483616K/523264K available (6229K kernel code, 739K rwdata, 2172K rodata, 436K init, 8220K bss, 23264K reserved, 16384K 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 : 0xc0008000 - 0xc083c86c   (8403 kB)
[    0.000000]       .init : 0xc083d000 - 0xc08aa000   ( 436 kB)
[    0.000000]       .data : 0xc08aa000 - 0xc0962c00   ( 739 kB)
[    0.000000]        .bss : 0xc0965000 - 0xc116c2b4   (8221 kB)
[    0.000000] Running RCU self tests
[    0.000000] Hierarchical RCU implementation.
[    0.000000] 	RCU lockdep checking is enabled.
[    0.000000] 	Additional per-CPU info printed with stalls.
[    0.000000] 	RCU restricting CPUs from NR_CPUS=2 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.000014] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns
[    0.000036] clocksource timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000085] OMAP clocksource: timer1 at 24000000 Hz
[    0.000918] Console: colour dummy device 80x30
[    0.000974] Lock dependency validator: Copyright (c) 2006 Red Hat, Inc., Ingo Molnar
[    0.000984] ... MAX_LOCKDEP_SUBCLASSES:  8
[    0.000991] ... MAX_LOCK_DEPTH:          48
[    0.000999] ... MAX_LOCKDEP_KEYS:        8191
[    0.001006] ... CLASSHASH_SIZE:          4096
[    0.001014] ... MAX_LOCKDEP_ENTRIES:     32768
[    0.001021] ... MAX_LOCKDEP_CHAINS:      65536
[    0.001029] ... CHAINHASH_SIZE:          32768
[    0.001036]  memory used by lock dependency info: 5167 kB
[    0.001044]  per task-struct memory footprint: 1152 bytes
[    0.001068] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.078923] pid_max: default: 32768 minimum: 301
[    0.079272] Security Framework initialized
[    0.079436] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.079451] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.082430] Initializing cgroup subsys blkio
[    0.082473] Initializing cgroup subsys memory
[    0.082569] Initializing cgroup subsys devices
[    0.082670] Initializing cgroup subsys freezer
[    0.082795] Initializing cgroup subsys perf_event
[    0.082857] CPU: Testing write buffer coherency: ok
[    0.084309] CPU0: thread -1, cpu 0, socket -1, mpidr 0
[    0.084431] Setting up static identity map for 0x80008280 - 0x800082f0
[    0.088585] Brought up 1 CPUs
[    0.088611] SMP: Total of 1 processors activated (996.14 BogoMIPS).
[    0.088621] CPU: All CPU(s) started in SVC mode.
[    0.092344] devtmpfs: initialized
[    0.121346] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3
[    0.159919] omap_hwmod: tptc0 using broken dt data from edma
[    0.160350] omap_hwmod: tptc1 using broken dt data from edma
[    0.160762] omap_hwmod: tptc2 using broken dt data from edma
[    0.168940] omap_hwmod: debugss: _wait_target_disable failed
[    0.224195] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.226781] pinctrl core: initialized pinctrl subsystem
[    0.231967] NET: Registered protocol family 16
[    0.237714] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.240029] cpuidle: using governor ladder
[    0.240057] cpuidle: using governor menu
[    0.248216] OMAP GPIO hardware version 0.1
[    0.267047] No ATAGs?
[    0.267084] hw-breakpoint: debug architecture 0x4 unsupported.
[    0.307207] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
[    0.311402] SCSI subsystem initialized
[    0.313363] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.317532] Switched to clocksource timer1
[    0.462610] NET: Registered protocol family 2
[    0.464560] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.464737] TCP bind hash table entries: 4096 (order: 5, 147456 bytes)
[    0.465933] TCP: Hash tables configured (established 4096 bind 4096)
[    0.466168] UDP hash table entries: 256 (order: 2, 20480 bytes)
[    0.466341] UDP-Lite hash table entries: 256 (order: 2, 20480 bytes)
[    0.467240] NET: Registered protocol family 1
[    0.469137] RPC: Registered named UNIX socket transport module.
[    0.469162] RPC: Registered udp transport module.
[    0.469172] RPC: Registered tcp transport module.
[    0.469182] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.471270] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
[    0.471366] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available
[    0.475657] futex hash table entries: 256 (order: 2, 16384 bytes)
[    0.475956] audit: initializing netlink subsys (disabled)
[    0.476229] audit: type=2000 audit(0.460:1): initialized
[    0.481265] VFS: Disk quotas dquot_6.6.0
[    0.481415] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.483790] NFS: Registering the id_resolver key type
[    0.484237] Key type id_resolver registered
[    0.484252] Key type id_legacy registered
[    0.484444] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.489632] io scheduler noop registered
[    0.489666] io scheduler deadline registered
[    0.489720] io scheduler cfq registered (default)
[    0.491673] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[    0.493972] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    0.499937] omap_uart 44e09000.serial: no wakeirq for uart0
[    0.500612] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 154, base_baud = 3000000) is a OMAP UART0
[    1.196402] console [ttyO0] enabled
[    1.229600] brd: module loaded
[    1.250128] loop: module loaded
[    1.255808] mtdoops: mtd device (mtddev=name/number) must be supplied
[    1.268230] mousedev: PS/2 mouse device common for all mice
[    1.274082] i2c /dev entries driver
[    1.279477] omap_hsmmc 48060000.mmc: Got CD GPIO
[    1.357815] ledtrig-cpu: registered to indicate activity on CPUs
[    1.365200] oprofile: using arm/armv7
[    1.369981] Initializing XFRM netlink socket
[    1.374596] NET: Registered protocol family 17
[    1.379398] NET: Registered protocol family 15
[    1.384416] Key type dns_resolver registered
[    1.389139] omap_voltage_late_init: Voltage driver support not added
[    1.395793] sr_dev_init: No voltage domain specified for smartreflex0. Cannot initialize
[    1.404284] sr_dev_init: No voltage domain specified for smartreflex1. Cannot initialize
[    1.413853] ThumbEE CPU extension supported.
[    1.418436] Registering SWP/SWPB emulation handler
[    1.423459] SmartReflex Class3 initialized
[    1.461193] mmc0: host does not support reading read-only switch, assuming write-enable
[    1.476728] mmc0: new high speed SDHC card at address aaaa
[    1.485091] mmcblk0: mmc0:aaaa SL16G 14.8 GiB 
[    1.499248] tps65217 0-0024: TPS65217 ID 0xe version 1.2
[    1.505024] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.511566]  mmcblk0: p1 p2
[    1.577432] davinci_mdio 4a101000.mdio: davinci mdio revision 1.6
[    1.583871] davinci_mdio 4a101000.mdio: detected phy mask fffffffe
[    1.591303] mmc1: MAN_BKOPS_EN bit is not set
[    1.599753] libphy: 4a101000.mdio: probed
[    1.603974] davinci_mdio 4a101000.mdio: phy[0]: device 4a101000.mdio:00, driver SMSC LAN8710/LAN8720
[    1.614849] cpsw 4a100000.ethernet: Detected MACID = 7c:66:9d:55:a1:05
[    1.624610] hctosys: unable to open rtc device (rtc0)
[    1.630005] sr_init: No PMIC hook to init smartreflex
[    1.635546] sr_init: platform driver register failed for SR
[    1.661481] net eth0: initializing cpsw version 1.12 (0)
[    1.669588] net eth0: phy found : id is : 0x7c0f1
[    1.674634] libphy: PHY 4a101000.mdio:01 not found
[    1.679687] net eth0: phy 4a101000.mdio:01 not found on slave 1
[    1.694277] mmc1: new high speed MMC card at address 0001
[    1.701538] mmcblk1: mmc1:0001 MMC04G 3.60 GiB 
[    1.706847] mmcblk1boot0: mmc1:0001 MMC04G partition 1 2.00 MiB
[    1.713791] mmcblk1boot1: mmc1:0001 MMC04G partition 2 2.00 MiB
[    1.722568]  mmcblk1: p1 p2
[    4.748116] cpsw 4a100000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[    4.777436] Sending DHCP requests ., OK
[    4.827953] IP-Config: Got DHCP answer from 192.168.1.1, my address is 192.168.1.7
[    4.836528] IP-Config: Complete:
[    4.840007]      device=eth0, hwaddr=7c:66:9d:55:a1:05, ipaddr=192.168.1.7, mask=255.255.255.0, gw=192.168.1.1
[    4.850480]      host=192.168.1.7, domain=home, nis-domain=(none)
[    4.856842]      bootserver=0.0.0.0, rootserver=192.168.1.4, rootpath=
[    4.863498]      nameserver0=192.168.1.1, nameserver1=192.168.1.1
[    5.080397] VFS: Mounted root (nfs filesystem) on device 0:15.
[    5.092822] devtmpfs: mounted
[    5.096717] Freeing unused kernel memory: 436K (c083d000 - c08aa000)
[    5.570625] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    5.570625] 
[    5.580321] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[    5.580321] 
[   75.767538] random: nonblocking pool is initialized
-----------------------------------------------
Based on the googling and reading I have done. I am expecting the kernel to boot
and stop at a command prompt '#' until I start populating things like "inittab",
and the other directory and nodes.

I am have re-built busybox more that 20 times both as static library and
static library. Obviously when I created as dynamic library I copy libraries
from the tool chain library directory to the rootfs library directory but I
keep getting the same result.
So far for this exercise I am using the bare minimum folders that busybox
generates as shown below
Code:
onio@host:rootfs $ tree -d
.
├── bin
├── dev
├── lib
├── sbin
└── usr
    ├── bin
    ├── lib
    └── sbin
Any help would be highly appreciated as I am completely stuck on this one.
Many thanks in advance.

onio
 
Old 09-12-2016, 03:12 PM   #2
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by olaoni View Post
I am completely stuck on this one.
Your stuck condition seems to be based on two misconceptions.
First you seem to equate Busybox with a root filesystem.
No, building Busybox (by itself) is not sufficient for a rootfs.

Quote:
Originally Posted by olaoni View Post
Based on the googling and reading I have done. I am expecting the kernel to boot
and stop at a command prompt '#' until I start populating things like "inittab",
and the other directory and nodes.
Please list these web sites and reading materials that led you to this expectation.

You have a bogus expectation. The Linux kernel will definitely not interact with the user through a CLI.
There's no shell prompt until kernel initialization is complete and userspace is active.

It's possible to build a rootfs around Busybox by hand (I used to do it a long time ago), but now there are tools such as Buildroot.
Just like you used crosstool-NG to build a toolchain instead of compiling the binutils, gcc, etc. packages, Buildroot is an analogous tool for the rootfs.

Regards
 
Old 09-12-2016, 04:35 PM   #3
olaoni
LQ Newbie
 
Registered: Feb 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi blue_z,

Thanks for your reply.

Quote:
Originally Posted by blue_z View Post
Your stuck condition seems to be based on two misconceptions.
First you seem to equate Busybox with a root filesystem.
No, building Busybox (by itself) is not sufficient for a rootfs.
I am fully aware that Busybox is not a root filesystem. However it is used to create the core components which are symbolically linked to the actual busybox exectuable.

I understand that other directories (etc, dev, tmp, sys and nodes (dev/null and dev/console) need to be created.

Quote:
Originally Posted by blue_z View Post
Your stuck condition seems to be based on two misconceptions.
Please list these web sites and reading materials that led you to this expectation.
Booting the system
First, boot the board to the U-Boot prompt. Before booting the kernel, we need to tell it that
the root filesystem should be mounted over NFS, by setting some kernel parameters.
Use the following U-Boot command to do so, in just 1 line
setenv bootargs console=ttyS0,115200 root=/dev/nfs ip=192.168.0.100:::::eth0
nfsroot=192.168.0.1:/home/<user>/embedded-linux-labs/tinysystem/nfsroot rw
Of course, you need to adapt the IP addresses to your exact network setup. Save the environment
variables (with saveenv).
You will later need to make changes to the bootargs value. Don’t forget you can do this with
the editenv command.
Now, boot your system. The kernel should be able to mount the root filesystem over NFS:
VFS: Mounted root (nfs filesystem) on device 0:13.
If the kernel fails to mount the NFS filesystem, look carefully at the error messages in the console.
If this doesn’t give any clue, you can also have a look at the NFS server logs in /var/log/syslog.
However, at this stage, the kernel should stop because of the below issue:
[
7.476715] devtmpfs: error mounting -2
This happens because the kernel is trying to mount the devtmpfs filesystem in /dev/ in the root
filesystem. To address this, create a dev directory under nfsroot and reboot.
Now, the kernel should complain for the last time, saying that it can’t find an init application:
Kernel panic - not syncing: No working init found. Try passing init= option to kernel.
See Linux Documentation/init.txt for guidance.
Obviously, our root filesystem being mostly empty, there isn’t such an application yet. In the
next paragraph, you will add Busybox to your root filesystem and finally make it usable.


Root filesystem with Busybox
Download the sources of the latest BusyBox 1.23.x release.
To configure BusyBox, we won’t be able to use make xconfig, which is currently broken for
BusyBox in Ubuntu 14.04, because of Qt library dependencies.
We are going to use make gconfig this time. Before doing this, install the required packages:
sudo apt-get install libglade2-dev
Now, configure BusyBox with the configuration file provided in the data/ directory (remember
that the Busybox configuration file is .config in the Busybox sources).
If you don’t use the BusyBox configuration file that we provide, at least, make sure you build
BusyBox statically! Compiling Busybox statically in the first place makes it easy to set up the
system, because there are no dependencies on libraries. Later on, we will set up shared libraries
and recompile Busybox.
Build BusyBox using the toolchain that you used to build the kernel.
Going back to the BusyBox configuration interface specify the installation directory for Busy-
Box 5 . It should be the path to your nfsroot directory.
Now run make install to install BusyBox in this directory.
Try to boot your new system on the board. You should now reach a command line prompt,
allowing you to execute the commands of your choice.


Quote:
You have a bogus expectation. The Linux kernel will definitely not interact with the user through a CLI.
There's no shell prompt until kernel initialization is complete and userspace is active.

It's possible to build a rootfs around Busybox by hand (I used to do it a long time ago), but now there are tools such as Buildroot.
I am aware of Buildroot and Yocto as build system. I am also aware that instead of using Crosstool-NG I could have used

Code:
sudo apt-get install gcc-arm-linux-gnueabihf
to get a working compiler. This is a learning exercise so I want it to be as manual as possible in order to have fully appreciation of what the build system is doing for me. I have tinkered around Yocto receipes in the past but I want to learn the manual process.

Once again thanks for your response.


Regards
 
Old 09-12-2016, 09:27 PM   #4
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by olaoni View Post
So far for this exercise I am using the bare minimum folders that busybox
generates as shown below
Code:
onio@host:rootfs $ tree -d
.
├── bin
├── dev
├── lib
├── sbin
└── usr
    ├── bin
    ├── lib
    └── sbin
Quote:
Originally Posted by olaoni View Post
I understand that other directories (etc, dev, tmp, sys and nodes (dev/null and dev/console) need to be created.
So you understand one thing, but do something else?

Quote:
Originally Posted by olaoni View Post
Booting the system
[I]First, boot the board to the U-Boot prompt. Before booting the kernel, we need to tell it that
the root filesystem should be mounted over NFS, ...
If you're going to quote something, it's proper (if not expected) to cite the source and credit the author.
So exactly where is this quotation from?

Quote:
Originally Posted by olaoni View Post
Try to boot your new system on the board. You should now reach a command line prompt,
allowing you to execute the commands of your choice.
You're misinterpreting this quotation.
This does not state as you wrote, that "the kernel ...[will]... stop at a command prompt '#' until I start populating things like "inittab", and the other directory and nodes."
The command line prompt that the quote refers to is surely a (root) shell prompt (executing in userspace).
The kernel panic that you're seeing is a clear indicator that userspace (i.e. the init process) is not active.
The failure of the init process is usually an indicator that something is wrong with the rootfs.

You have created your own chicken-and-egg problem. The init process probably needs some files in a rootfs, but you (incorrectly) expect a shell prompt so that you can populate the rootfs.


Quote:
Originally Posted by olaoni View Post
This is a learning exercise so I want it to be as manual as possible in order to have fully appreciation of what the build system is doing for me.
Then using crosstool-NG as you did does not fulfill this goal at all.
You could have manually built the individual binutils, gcc, glibC etc packages.

IMO you put too much effort claiming what you do is correct and valid. You're the one with the kernel panic, and yet you never asked a question in this thread or seem to doubt your actions.

Regards

Last edited by blue_z; 09-12-2016 at 09:33 PM.
 
Old 09-13-2016, 11:41 AM   #5
olaoni
LQ Newbie
 
Registered: Feb 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by blue_z View Post
So you understand one thing, but do something else?

IMO you put too much effort claiming what you do is correct and valid. You're the one with the kernel panic, and yet you never asked a question in this thread or seem to doubt your actions.

Regards
Hey blue_z if my last email came across arrogant,defensive or rude I apologise. I was just a bit frustrated with the time I have spent trying to resolve and all the pressure I was getting from my day job.

I am following a book titled "Mastering Embedded Linux Programming" by Chis Simmonds The book goes through the stages of building Toolchain(hence my choice of croostool-Ng) followed by building bootloader (u-boot), followed by kernel and lastly file system (busybox).

I followed the book through the creation of the following directories bin,dev,etc,lib,proc,sbin,sys,tmp,usr,usr/bin and usr,lib and at the end of creating the /etc/inittab , /init.d/rcS file and the /dev/null and /dev/console the kernel didn't boot up, but kept coming up with one form or panic or another. So I started messing around with static builds and then dynamic builds all which also failed.

I came across www.free-electrons.com tutorial on building linux-kernel and thought the tutorial was going through a process of starting from a blank directory and then start populating with busybox files and later on other relevant directories. But as you pointed out there was a misconception on my part which I accept and has helped me to take a step back which is always a good things when confronted with issues like this.

I think I understand the process much clearer now, and should be able proceed much better and with fresh pair of eyes.

Thanks for the time and effort you have spent on responding to my questions.

Regards
 
Old 09-13-2016, 07:05 PM   #6
blue_z
Member
 
Registered: Jul 2015
Location: USA
Distribution: Ubuntu, Lubuntu, Mint, custom embedded
Posts: 104

Rep: Reputation: Disabled
Quote:
Originally Posted by olaoni View Post
... should be able proceed much better and with fresh pair of eyes.
Your `tree` command output does not show /etc, /tmp and /sys directories, so that's where you might want to start.

Regards

Last edited by blue_z; 09-13-2016 at 07:08 PM.
 
Old 09-14-2016, 05:04 PM   #7
olaoni
LQ Newbie
 
Registered: Feb 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi blue_z,

Thanks for your comment. Sorry for late acknowledgement, It has been another hectic day. Yes regarding the tree command output that was the output from one of my many iterations of trying to solve the kernel panic issue.
I believe, I now have adequate information to tackle the problem. Once again thanks.

Regards
 
Old 02-06-2017, 10:02 PM   #8
eziya
LQ Newbie
 
Registered: Feb 2017
Posts: 2

Rep: Reputation: Disabled
Hi olaoni,

I had same kernel panic message when I followed the instruction matrial from free-electrons.
I solved it by changing toolchain.

At first I built toolchain with glibc and met a problem.
but after I changed it as uclibc, problem was solved smoothly.

FYI
 
Old 02-07-2017, 03:54 PM   #9
olaoni
LQ Newbie
 
Registered: Feb 2016
Posts: 19

Original Poster
Rep: Reputation: Disabled
Hi eziya,

Thanks for the reply. Did you follow the steps from "Mastering Embedded Linux Programming" by Chis Simmonds book as well? Were you building with busybox as well or did you use a build system such as buildroot.

I am currently using buildroot for creating file system and kernel image for beagleoboard-xm but at some point in the future I would like to be able to do things manually as I initially attempted.

Many thank.
 
Old 02-07-2017, 11:26 PM   #10
eziya
LQ Newbie
 
Registered: Feb 2017
Posts: 2

Rep: Reputation: Disabled
Dear olaoni,

Yes, I mainly followed steps from matrials from "Free-Electorns" but also referred to "Mastering Embedded Linux Programming"
I didn't use buildroot or yocto for my "minimal root filesystem".

I had same problem at first as you did but it was solved atfer I changed my toolchain and recompiled kernel and busybox.
Only thing I had changed was toolchain option:
Crosstool-NG => C library => C library (glibc => uClibc)

I hope my experience solve your issue too.

Best regards,
Jihoon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] LFS 7.3 - kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b Luc1f3r Linux From Scratch 9 06-08-2016 02:39 AM
Kernel panic - not syncing: Attempted to kill init! Saúl Ortega Linux - Server 1 03-11-2013 11:32 AM
Kernel panic - not syncing: Attempted to kill init, Pid: 1, comm: init Not tainted 2. morriset Linux - Kernel 3 07-02-2011 08:04 AM
/sbin/init: Kernel panic - not syncing: Attempted to kill init! jalejo08 Linux - Kernel 7 07-02-2009 01:16 PM
Kernel panic - not syncing: Attempted to kill init! Wocky Linux - Kernel 6 01-26-2007 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 05:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration