unexpected crash of embedded-linux on Zynq-Device (Zybo) - linux

We have created, following the instruction on wiki-xilinx-linux web page, a system Zybo + embedded linux kernel (I want to remark that we didn't use PetaLinux but we have built all the file with the Xilinx tools).
When we turn on the system everything works fine and this is the output at the boot time:
U-Boot 2016.07-03720-g95e11f6-dirty (Oct 17 2016 - 02:56:48 -0700)
Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
I2C: ready
DRAM: ECC disabled 512 MiB
MMC: sdhci#e0100000: 0
SF: Detected S25FL128S_64K with page size 256 Bytes, erase size 64 KiB, total 16 MiB
*** Warning - bad CRC, using default environment
In: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Zynq ZYBO Development Board
Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
I2C EEPROM MAC address read failed
eth0: ethernet#e000b000
Hit any key to stop autoboot: 0
Device: sdhci#e0100000
Manufacturer ID: 3
OEM: 8368
Name: NCard
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
** Unable to read file uEnv.txt **
Copying Linux from SD to RAM...
reading uImage
3843104 bytes read in 367 ms (10 MiB/s)
reading devicetree.dtb
10331 bytes read in 17 ms (592.8 KiB/s)
reading uramdisk.image.gz
5310018 bytes read in 504 ms (10 MiB/s)
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.6.0-xilinx-22285-g0e4e40
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3843040 Bytes = 3.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 04000000 ...
Image Name:
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 5309954 Bytes = 5.1 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02000000
Booting using the fdt blob at 0x2000000
Loading Kernel Image ... OK
Loading Ramdisk to 1e601000, end 1eb11602 ... OK
Loading Device Tree to 1e5fb000, end 1e60085a ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-22285-g0e4e407-dirty (leonardo#ubuntu) (gcc version 4.9.2 (Sourcery CodeBench Lite 2015.05-17) ) #1 SMP PREEMPT Mon Oct 17 03:54:44 PDT 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: xlnx,zynq-7000
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
percpu: Embedded 12 pages/cpu #debcc000 s19776 r8192 d21184 u49152
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyPS0,115200 root=/dev/mmcblk0p2 rw earlyprintk rootfstype=ext4 rootwait devtmpfs.mount=1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 489332K/524288K available (5304K kernel code, 230K rwdata, 1844K rodata, 1024K init, 222K bss, 18572K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc07fb004 (8141 kB)
.init : 0xc0800000 - 0xc0900000 (1024 kB)
.data : 0xc0900000 - 0xc0939b60 ( 231 kB)
.bss : 0xc0939b60 - 0xc09714e8 ( 223 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 325MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4af477f6aa, max_idle_ns: 440795207830 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 551318127 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 650.00 BogoMIPS (lpj=3250000)
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
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1300.00 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB # 0xe0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 5188K (de601000 - deb12000)
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
e0001000.serial: ttyPS0 at MMIO 0xe0001000 (irq = 143, base_baud = 6250000) is a xuartps
�console [ttyPS0] enabled
console [ttyPS0] enabled
bootconsole [earlycon0] disabled
bootconsole [earlycon0] disabled
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
CAN device driver interface
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:01:22)
RTL8211E Gigabit Ethernet e000b000.etherne:00: attached PHY driver [RTL8211E Gigabit Ethernet] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
can: broadcast manager protocol (rev 20120528 t)
can: netlink gateway (rev 20130117) max_hops=1
Registering SWP/SWPB emulation handler
hctosys: unable to open rtc device (rtc0)
ALSA device list:
mmc0: new high speed SDHC card at address b368
No soundcards found.
mmcblk0: mmc0:b368 NCard 3.72 GiB
mmcblk0: p1 p2
RAMDISK: gzip image found at block 0
EXT4-fs warning (device ram0): ext4_update_dynamic_rev:746: updating to rev 1 because of new feature flag, running e2fsck is recommended
EXT4-fs (ram0): mounted filesystem without journal. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 1:0.
Starting rcS...
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
++ Setting up mdev
++ Starting telnet daemon
++ Starting http daemon
++ Starting ftp daemon
++ Starting ssh daemon
random: sshd urandom read with 1 bits of entropy available
rcS Complete
zynq>
zynq>
zynq>
The problem is that, after some instructions, the system crash with this output:
zynq> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
Trying to move old root to /initrd ... /initrd does not exist. Ignored.
Unmounting old root
Trying to free ramdisk memory ... failed
devtmpfs: error mounting -2
Unable to handle kernel NULL pointer dereference at virtual address 00000020
pgd = c0004000
[00000020] *pgd=00000000
Internal error: Oops - BUG: 17 [#1] PREEMPT SMP ARM
Modules linked in:
CPU: 0 PID: 10 Comm: migration/0 Not tainted 4.6.0-xilinx-22285-g0e4e407-dirty #1
Hardware name: Xilinx Zynq Platform
task: de060040 ti: de06a000 task.ti: de06a000
PC is at set_section_perms+0x8c/0x110
LR is at set_section_perms+0x18/0x110
pc : [<c0113404>] lr : [<c0113390>] psr: 80000093
sp : de06bec0 ip : dc4f3018 fp : 00000600
r10: 00000000 r9 : 00000000 r8 : 00000001
r7 : 00000003 r6 : c0902468 r5 : 00000000 r4 : c0908508
r3 : 00000000 r2 : c0000000 r1 : 00000003 r0 : 00000009
Flags: Nzcv IRQs off FIQs on Mode SVC_32 ISA ARM Segment none
Control: 18c5387d Table: 1c4f804a DAC: 00000051
Process migration/0 (pid: 10, stack limit = 0xde06a210)
Stack: (0xde06bec0 to 0xde06c000)
bec0: c0908508 00000003 00000001 de0db780 de0db780 de0db998 00000003 c0908508
bee0: c09065c0 00000000 00000000 c01134f4 de04df70 00000001 a0000013 de04df84
bf00: 00000003 00000000 00000000 c011355c c011354c c017c420 de04df30 debccf64
bf20: de06a000 debccf68 00000000 c017c4f8 c017c478 de06a000 de02db40 c090cd94
bf40: 00000001 c0135454 de060040 de02d9c0 00000000 de02db40 c0135218 00000000
bf60: 00000000 c0132a40 4dff1176 00000001 00000000 de02db40 00000000 00030003
bf80: de06bf80 de06bf80 00000000 00000000 de06bf90 de06bf90 de06bfac de02d9c0
bfa0: c0132968 00000000 00000000 c0106ef8 00000000 00000000 00000000 00000000
bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
bfe0: 00000000 00000000 00000000 00000000 00000013 00000000 dfefe0f2 77e519c8
[<c0113404>] (set_section_perms) from [<c01134f4>] (update_sections_early+0x6c/0xc4)
[<c01134f4>] (update_sections_early) from [<c011355c>] (__fix_kernmem_perms+0x10/0x1c)
[<c011355c>] (__fix_kernmem_perms) from [<c017c420>] (multi_cpu_stop+0xb0/0x108)
[<c017c420>] (multi_cpu_stop) from [<c017c4f8>] (cpu_stopper_thread+0x80/0xb0)
[<c017c4f8>] (cpu_stopper_thread) from [<c0135454>] (smpboot_thread_fn+0x23c/0x254)
[<c0135454>] (smpboot_thread_fn) from [<c0132a40>] (kthread+0xd8/0xec)
[<c0132a40>] (kthread) from [<c0106ef8>] (ret_from_fork+0x14/0x3c)
Code: e1520003 2a00001b e5943014 e1a0baa2 (e599a020)
---[ end trace 07a0838423ee7708 ]---
note: migration/0[10] exited with preempt_count 2
It is clear that there is an error with the "mounted filesystem":
zynq> EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
Trying to move old root to /initrd ... /initrd does not exist. Ignored.
Unmounting old root
Trying to free ramdisk memory ... failed
devtmpfs: error mounting -2
Why does this happen? Why before I can do everything with the system and, suddenly, I have a crash? Yes, the system crashes when I am doing nothing on it and not when I am working with it.
Are there some advice to solve this? to not to have anymore these crashes?

From the Linux Kernel Command line I can see "root=/dev/mmcblk0p2" and also the target is started with initial ramdisk image "uramdisk.image.gz". So the init process or scripts inside ramdisk image should be responsible to mount the real file system from SD i.e. from /dev/mmcblk0p2 and remove the used memory of ramdisk. To narrow down the problem, you need to analyze the steps taken in ramdisk image to mount the real filesystem and make sure you have the proper RFS flashed inside SD in /dev/mmcblk0p2. I can also seen some missing directories to mount the /dev/mmcblk0p1 and /dev/mmcblk0.
++ Mounting filesystem
mount: mounting /dev/mmcblk0p1 on /mnt failed: No such file or directory
mount: mounting /dev/mmcblk0 on /mnt failed: No such file or directory
In simple words, check the init scripts inside the ramdisk image and make sure the RFS is mounted properly.

Related

UBI layout volume not found

I am following Bootlin's embedded Linux training which aims to put an embedded Linux system on an Atmel SAMA5D4 Xplained board (theory slides, practical lab instructions) and I am stuck a putting the whole system on the NAND flash.
They ask me to put the DTB, the kernel, the root filesystem and a data filesystem in a UBI image to be written to the flash but I cannot access the UBI partitions once I flashed it (the access fails with error code 22, or -22 in an embedded Linux environment).
Detailed description
(to see my actual questions, go to the end of the question)
In U-Boot, the partitions are defined by mtdparts:
device nand0 <atmel_nand>, # parts = 8
#: name size offset mask_flags
0: bootstrap 0x00040000 0x00000000 1
1: uboot 0x00080000 0x00040000 1
2: env 0x00040000 0x000c0000 1
3: envbackup 0x00040000 0x00100000 1
4: dtb 0x00020000 0x00140000 0
5: kernel 0x00500000 0x00160000 0
6: rootfs 0x01000000 0x00660000 0
7: datafs 0x01000000 0x01660000 0
active partition: nand0,0 - (bootstrap) 0x00040000 # 0x00000000
defaults:
mtdids :
mtdparts:
With printenv mtdparts, I get:
mtdparts=mtdparts=atmel_nand:256k(bootstrap)ro,512k(uboot)ro,256k(env)ro,256k(envbackup)ro,128k(dtb),5M(kernel),16M(rootfs),16M(datafs)
and printenv mtdids
mtdids=nand0=atmel_nand
The UBI image was created with ubinize and the following configuration:
[dtb]
peb=0x20000
min_io_size=0x800
mode=ubi
image=dtb.img
vol_id=0
vol_size=128KiB
vol_type=static
vol_name=dtb
vol_alignment=1
[kernel]
peb=0x20000
min_io_size=0x800
mode=ubi
image=zImage
vol_id=1
vol_size=5MiB
vol_type=static
vol_name=kernel
vol_alignment=1
[rootfs]
peb=0x20000
min_io_size=0x800
mode=ubi
image=root.img
vol_id=2
vol_size=16MiB
vol_type=static
vol_name=rootfs
vol_alignment=1
[datafs]
peb=0x20000
min_io_size=0x800
mode=ubi
image=files.img
vol_id=3
vol_size=16MiB
vol_type=static
vol_name=datafs
vol_alignment=1
and this command (the sama5-ubinize.cfg is the above configuration)
ubinize -o ubi.img -p 128KiB -m 2KiB sama5-ubinize.cfg
The PEB is indeed 128KB (0x2000) and the page size is 2048B (0x800). I added those parameters based on this answer.
Both UBI partitions have been make with the following commands:
mkfs.ubifs -e 124KiB -c 132 -m 2KiB -r nfsroot/ root.img
mkfs.ubifs -e 124KiB -c 132 -m 2KiB -r nfsroot/www/upload/files data.img
I then write the UBI image to the flash with the following commands (in U-Boot):
nand erase 0x140000 0xfec0000
tftp 0x21000000 ubi.img
nand write.trimffs 0x21000000 0x140000 0x880000
When trying to access the partitions from U-Boot with ubi part rootfs, I get the following error:
ubi0: attaching mtd1
ubi0: scanning is finished
UBI init error 22
For now I am booting Linux from a SD card. The Linux boot arguments are (from printenv bootargs):
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
When booting Linux, I get the following log:
resetting ...
RomBOOT
AT91Bootstrap 3.8.9 (Mi Dez 12 21:06:49 CET 2018)
NAND: ONFI flash detected
NAND: Manufacturer ID: 0x2c Chip ID: 0xda
NAND: Page Bytes: 2048, Spare Bytes: 64
NAND: ECC Correctability Bits: 4, ECC Sector Bytes: 512
NAND: Disable On-Die ECC
NAND: Initialize PMECC params, cap: 4, sector: 512
NAND: Image: Copy 0xa0000 bytes from 0x40000 to 0x26f00000
NAND: Done to load image
<debug_uart>
U-Boot 2017.09 (Dec 12 2018 - 23:16:12 +0100)
CPU: SAMA5D36
Crystal frequency: 12 MHz
CPU clock : 528 MHz
Master clock : 132 MHz
DRAM: 256 MiB
NAND: 256 MiB
MMC: Atmel mci: 0, Atmel mci: 1
In: serial#ffffee00
Out: serial#ffffee00
Err: serial#ffffee00
Net: eth0: ethernet#f0028000
Error: ethernet#f802c000 address not set.
Hit any key to stop autoboot: 0
reading zImage
4279056 bytes read in 281 ms (14.5 MiB/s)
reading at91-sama5d3_xplained.dtb
34404 bytes read in 7 ms (4.7 MiB/s)
## Flattened Device Tree blob at 22000000
Booting using the fdt blob at 0x22000000
Loading Device Tree to 2fb39000, end 2fb44663 ... OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Linux version 4.18.20 (dopsi#dopsi-ThinkPad-T430) (gcc version 8.1.0 (crosstool-NG 1.23.0.435-eb65)) #4 Sat Dec 15 14:07:41 CET 2018
CPU: ARMv7 Processor [410fc051] revision 1 (ARMv7), cr=10c53c7d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
OF: fdt: Machine model: SAMA5D3 Xplained
Memory policy: Data cache writeback
CPU: All CPU(s) started in SVC mode.
random: get_random_bytes called from start_kernel+0x9c/0x3d8 with crng_init=0
Built 1 zonelists, mobility grouping on. Total pages: 65024
Kernel command line: console=ttyS0,115200 root=/dev/mmcblk0p2 rw rootwait
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 250120K/262144K available (6144K kernel code, 237K rwdata, 1588K rodata, 1024K init, 124K bss, 12024K 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) (7136 kB)
.init : 0x(ptrval) - 0x(ptrval) (1024 kB)
.data : 0x(ptrval) - 0x(ptrval) ( 238 kB)
.bss : 0x(ptrval) - 0x(ptrval) ( 125 kB)
NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
clocksource: pit: mask: 0xfffffff max_cycles: 0xfffffff, max_idle_ns: 14479245754 ns
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
Calibrating delay loop... 351.43 BogoMIPS (lpj=1757184)
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 0x20100000 - 0x20100060
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 5 rev 1
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 256 (order: -1, 3072 bytes)
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
AT91: PM: standby: standby, suspend: ulp0
No ATAGs?
gpio-at91 fffff200.gpio: at address (ptrval)
gpio-at91 fffff400.gpio: at address (ptrval)
gpio-at91 fffff600.gpio: at address (ptrval)
gpio-at91 fffff800.gpio: at address (ptrval)
gpio-at91 fffffa00.gpio: at address (ptrval)
pinctrl-at91 ahb:apb:pinctrl#fffff200: initialized AT91 pinctrl driver
clocksource: tcb_clksrc: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 115833966437 ns
at_hdmac ffffe600.dma-controller: Atmel AHB DMA Controller ( cpy set slave ), 8 channels
at_hdmac ffffe800.dma-controller: Atmel AHB DMA Controller ( cpy set slave ), 8 channels
AT91: Detected SoC family: sama5d3
AT91: Detected SoC: sama5d36, revision 2
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
at91_i2c f0014000.i2c: using dma0chan0 (tx) and dma0chan1 (rx) for DMA transfers
at91_i2c f0014000.i2c: AT91 i2c bus driver (hw version: 0x402).
at91_i2c f0018000.i2c: using dma0chan2 (tx) and dma0chan3 (rx) for DMA transfers
at91_i2c f0018000.i2c: AT91 i2c bus driver (hw version: 0x402).
at91_i2c f801c000.i2c: can't get DMA channel, continue without DMA support
at91_i2c f801c000.i2c: AT91 i2c bus driver (hw version: 0x402).
videodev: Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource tcb_clksrc
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.
Initialise system trusted keyrings
workingset: timestamp_bits=30 max_order=16 bucket_order=0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Key type asymmetric registered
Asymmetric key parser 'x509' registered
io scheduler noop registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
f001c000.serial: ttyS1 at MMIO 0xf001c000 (irq = 23, base_baud = 4125000) is a ATMEL_SERIAL
f0020000.serial: ttyS2 at MMIO 0xf0020000 (irq = 24, base_baud = 4125000) is a ATMEL_SERIAL
f0024000.serial: ttyS5 at MMIO 0xf0024000 (irq = 25, base_baud = 4125000) is a ATMEL_SERIAL
ffffee00.serial: ttyS0 at MMIO 0xffffee00 (irq = 38, base_baud = 8250000) is a ATMEL_SERIAL
console [ttyS0] enabled
brd: module loaded
loop: module loaded
atmel_spi f0004000.spi: Using dma0chan4 (tx) and dma0chan5 (rx) for DMA transfers
atmel_spi f0004000.spi: Atmel SPI Controller version 0x213 at 0xf0004000 (irq 19)
atmel_spi f8008000.spi: Using dma1chan0 (tx) and dma1chan1 (rx) for DMA transfers
atmel_spi f8008000.spi: Atmel SPI Controller version 0x213 at 0xf8008000 (irq 28)
libphy: Fixed MDIO Bus: probed
CAN device driver interface
at91_can f000c000.can: device registered (reg_base=(ptrval), irq=45)
libphy: MACB_mii_bus: probed
Micrel KSZ9031 Gigabit PHY f0028000.ethernet-ffffffff:07: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=f0028000.ethernet-ffffffff:07, irq=POLL)
macb f0028000.ethernet eth0: Cadence GEM rev 0x00020119 at 0xf0028000 irq 46 (12:34:56:ab:cd:ef)
macb f802c000.ethernet: invalid hw address, using random
libphy: MACB_mii_bus: probed
Micrel KSZ8081 or KSZ8091 f802c000.ethernet-ffffffff:01: attached PHY driver [Micrel KSZ8081 or KSZ8091] (mii_bus:phy_addr=f802c000.ethernet-ffffffff:01, irq=POLL)
macb f802c000.ethernet eth1: Cadence MACB rev 0x0001010c at 0xf802c000 irq 47 (62:aa:eb:b7:c1:48)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-atmel: EHCI Atmel driver
atmel-ehci 700000.ehci: EHCI Host Controller
atmel-ehci 700000.ehci: new USB bus registered, assigned bus number 1
atmel-ehci 700000.ehci: irq 50, io mem 0x00700000
atmel-ehci 700000.ehci: USB 2.0 started, EHCI 1.00
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 4.18
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: EHCI Host Controller
usb usb1: Manufacturer: Linux 4.18.20 ehci_hcd
usb usb1: SerialNumber: 700000.ehci
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-atmel: OHCI Atmel driver
at91_ohci 600000.ohci: USB Host Controller
at91_ohci 600000.ohci: new USB bus registered, assigned bus number 2
at91_ohci 600000.ohci: irq 50, io mem 0x00600000
usb usb2: New USB device found, idVendor=1d6b, idProduct=0001, bcdDevice= 4.18
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: USB Host Controller
usb usb2: Manufacturer: Linux 4.18.20 ohci_hcd
usb usb2: SerialNumber: at91
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 3 ports detected
usbcore: registered new interface driver cdc_acm
cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
usbcore: registered new interface driver pl2303
usbserial: USB Serial support registered for pl2303
atmel_usba_udc 500000.gadget: MMIO registers at [mem 0xf8030000-0xf8033fff] mapped at (ptrval)
atmel_usba_udc 500000.gadget: FIFO at [mem 0x00500000-0x005fffff] mapped at (ptrval)
g_serial gadget: Gadget Serial v2.4
g_serial gadget: g_serial ready
at91_rtc fffffeb0.rtc: registered as rtc0
at91_rtc fffffeb0.rtc: AT91 Real Time Clock driver.
i2c /dev entries driver
at91-reset fffffe00.rstc: Starting after software reset
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
atmel_mci f0000000.mmc: version: 0x505
atmel_mci f0000000.mmc: using dma0chan6 for DMA transfers
atmel_mci f0000000.mmc: Atmel MCI controller at 0xf0000000 irq 18, 1 slots
atmel_mci f8000000.mmc: version: 0x505
atmel_mci f8000000.mmc: using dma1chan2 for DMA transfers
atmel_mci f8000000.mmc: Atmel MCI controller at 0xf8000000 irq 27, 1 slots
sdhci-pltfm: SDHCI platform and OF driver helper
atmel_aes f8038000.aes: version: 0x135
atmel_aes f8038000.aes: Atmel AES - Using dma1chan3, dma1chan4 for DMA transfers
atmel_sha f8034000.sha: version: 0x410
atmel_sha f8034000.sha: using dma1chan5 for DMA transfers
atmel_sha f8034000.sha: Atmel SHA1/SHA256/SHA224/SHA384/SHA512
atmel_tdes f803c000.tdes: version: 0x701
atmel_tdes f803c000.tdes: using dma1chan6, dma1chan7 for DMA transfers
mmc0: host does not support reading read-only switch, assuming write-enable
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 SD4GB 3.74 GiB
mmcblk0: p1 p2 p3
atmel_tdes f803c000.tdes: Atmel DES/TDES
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda
nand: Micron MT29F2G08ABAEAWP
nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
nand_read_bbt: bad block at 0x000000c80000
nand_read_bbt: bad block at 0x000000ca0000
6 fixed-partitions partitions found on MTD device atmel_nand
Creating 6 MTD partitions on "atmel_nand":
0x000000000000-0x000000040000 : "at91bootstrap"
0x000000040000-0x0000000c0000 : "bootloader"
0x0000000c0000-0x000000180000 : "bootloader env"
0x000000180000-0x000000200000 : "device tree"
0x000000200000-0x000000800000 : "kernel"
0x000000800000-0x000010000000 : "rootfs"
iio iio:device0: Resolution used: 12 bits
iio iio:device0: ADC Touch screen is disabled.
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20170425 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20170425)
can: broadcast manager protocol (rev 20170425 t)
can: netlink gateway (rev 20170425) max_hops=1
Loading compiled-in X.509 certificates
input: gpio_keys as /devices/platform/gpio_keys/input/input0
at91_rtc fffffeb0.rtc: setting system clock to 2007-01-01 01:05:49 UTC (1167613549)
cfg80211: Loading compiled-in X.509 certificates for regulatory database
cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
ALSA device list:
No soundcards found.
platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
g_serial gadget: high-speed config #2: CDC ACM config
random: fast init done
cfg80211: failed to load regulatory.db
VFS: Mounted root (squashfs filesystem) readonly on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
starting pid 761, tty '': '/etc/init.d/rcS'
EXT4-fs (mmcblk0p3): recovery complete
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
starting pid 768, tty '/dev/ttyS0': '/bin/sh'
BusyBox v1.29.3 (2018-12-15 12:27:14 CET) built-in shell (ash)
Enter 'help' for a list of built-in commands.
It detects all but one partition, but I cannot access them either. When trying to attach any of them (with ubiattach -m 5 /dev/ubi_ctrl), I get the following error (the error stays the same for all partition numbers):
ubi0: attaching mtd5
ubi0: scanning is finished
ubi0 error: ubi_read_volume_table: the layout volume was not found
ubi0 error: ubi_attach_mtd_dev: failed to attach mtd5, error -22
ubiattach: UBI_IOCATT: Invalid argument
My questions
What exactly goes wrong my setup?
Should there be any preparation for the DTB and the Linux kernel before I put them in the UBI image?
Used tools and versions
U-Boot 2017.09
Linux 4.18
busybox 1.29.3
an Xubuntu 18.04 VM for development
Thanks for the very well described problem and questions. It's a pleasure to help you in such conditions :)
There are a few things don't seem right, or which at least are not in the spirit of Bootlin's lab.
You don't have the mtdparts settings in the kernel command line. As a consequence, you're working with the default partitions.
You're flashing your UBI image into the 5th MTD partition (from the offset you're using) but are trying to attach UBI to the 6th partition. No surprise that you have UBI attach issues.
When erasing and flashing the UBI images, you should use partition names instead of offsets. This will clarify things and reduce the risks of errors.
You should group the dtb, kernel, rootfs and datafs partitions into a single MTD partition called "ubi", which you will use to flash the UBI image and then to attach UBI. So instead of MTD partitions, you will have 4 UBI volumes, as described by your ubinize configuration file.
This should definitely help. Don't hesitate to come back if you're still facing issues after doing this.
Happy hacking and learning
Michael (from Bootlin)
I raised another thread as a followup
bootlin kernel doesn't boot from UBIFS
hope Michael can review it too

Qemu x86 and Linux 3.12.17 Kernel panic when booting

I have an issue regarding the execution of a custom Openwrt system with Linux 3.12.17 in Qemu 2.0.0. During the boot process, I have a message telling me that the bootloader cannot find my root partition device, which is /dev/sda as you can see in the following image :
Shell:~$ sudo fdisk -l
[sudo] password for :
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000f25bd
Device Boot Start End Blocks Id System
/dev/sda1 * 16065 1028159 506047+ 83 Linux
/dev/sda2 1028160 41592284 20282062+ 83 Linux
/dev/sda3 41592285 976773167 467590441+ f W95 Ext'd (LBA)
/dev/sda5 41608350 45608534 2000092+ 82 Linux swap / Solaris
/dev/sda6 45620266 976773167 465576451 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 256.1 GB, 256060514304 bytes
255 heads, 63 sectors/track, 31130 cylinders, total 500118192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 500118191 250059095+ ee GPT
Here is the command that I use to launch the Qemu emulator :
qemu-system-x86_64 -m 512 \
-kernel bin/x86/openwrt-x86-sgc_qemu-vmlinuz \
--append "root=/dev/sda rw" \
-nographic -usb \
-hda bin/x86/openwrt-x86-sgc_qemu-rootfs-ext4.img
Here is the full boot log :
Initializing cgroup subsys cpuset
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 3.12.17 (g602882#rmm-p1303101) (gcc version 4.5.2 (GCC) ) #4 SMP PREEMPT Wed Mar 8 15:47:13 CET 2017
e820: BIOS-provided physical RAM map:
BIOS-e820: [mem 0x0000000000000000-0x000000000009fbff] usable
BIOS-e820: [mem 0x000000000009fc00-0x000000000009ffff] reserved
BIOS-e820: [mem 0x00000000000f0000-0x00000000000fffff] reserved
BIOS-e820: [mem 0x0000000000100000-0x000000001fffdfff] usable
BIOS-e820: [mem 0x000000001fffe000-0x000000001fffffff] reserved
BIOS-e820: [mem 0x00000000feffc000-0x00000000feffffff] reserved
BIOS-e820: [mem 0x00000000fffc0000-0x00000000ffffffff] reserved
Notice: NX (Execute Disable) protection cannot be enabled: non-PAE kernel!
SMBIOS 2.4 present.
e820: last_pfn = 0x1fffe max_arch_pfn = 0x100000
PAT not supported by CPU.
found SMP MP-table at [mem 0x000f0b30-0x000f0b3f] mapped at [c00f0b30]
init_memory_mapping: [mem 0x00000000-0x000fffff]
init_memory_mapping: [mem 0x1f800000-0x1fbfffff]
init_memory_mapping: [mem 0x18000000-0x1f7fffff]
init_memory_mapping: [mem 0x00100000-0x17ffffff]
init_memory_mapping: [mem 0x1fc00000-0x1fffdfff]
ACPI: RSDP 000f09a0 00014 (v00 BOCHS )
ACPI: RSDT 1ffffbc1 00034 (v01 BOCHS BXPCRSDT 00000001 BXPC 00000001)
ACPI: FACP 1ffff1c0 00074 (v01 BOCHS BXPCFACP 00000001 BXPC 00000001)
ACPI: DSDT 1fffe040 01180 (v01 BOCHS BXPCDSDT 00000001 BXPC 00000001)
ACPI: FACS 1fffe000 00040
ACPI: SSDT 1ffff234 008DD (v01 BOCHS BXPCSSDT 00000001 BXPC 00000001)
ACPI: APIC 1ffffb11 00078 (v01 BOCHS BXPCAPIC 00000001 BXPC 00000001)
ACPI: HPET 1ffffb89 00038 (v01 BOCHS BXPCHPET 00000001 BXPC 00000001)
511MB LOWMEM available.
mapped low ram: 0 - 1fffe000
low ram: 0 - 1fffe000
Zone ranges:
DMA [mem 0x00001000-0x00ffffff]
Normal [mem 0x01000000-0x1fffdfff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x00001000-0x0009efff]
node 0: [mem 0x00100000-0x1fffdfff]
Using APIC driver default
ACPI: PM-Timer IO Port: 0xb008
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
ACPI: LAPIC_NMI (acpi_id[0xff] dfl dfl lint[0x1])
ACPI: IOAPIC (id[0x00] address[0xfec00000] gsi_base[0])
IOAPIC[0]: apic_id 0, version 17, address 0xfec00000, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 5 global_irq 5 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 10 global_irq 10 high level)
ACPI: INT_SRC_OVR (bus 0 bus_irq 11 global_irq 11 high level)
Using ACPI (MADT) for SMP configuration information
ACPI: HPET id: 0x8086a201 base: 0xfed00000
smpboot: Allowing 1 CPUs, 0 hotplug CPUs
e820: [mem 0x20000000-0xfeffbfff] available for PCI devices
setup_percpu: NR_CPUS:8 nr_cpumask_bits:8 nr_cpu_ids:1 nr_node_ids:1
PERCPU: Embedded 13 pages/cpu #dfbed000 s30592 r0 d22656 u53248
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 129948
Kernel command line: root=/dev/sda rw
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Initializing CPU#0
allocated 1048552 bytes of page_cgroup
please try 'cgroup_disable=memory' option if you don't want memory cgroups
Memory: 509692K/523888K available (4990K kernel code, 415K rwdata, 1928K rodata, 576K init, 452K bss, 14196K reserved)
virtual kernel memory layout:
fixmap : 0xfff16000 - 0xfffff000 ( 932 kB)
vmalloc : 0xe07fe000 - 0xfff14000 ( 503 MB)
lowmem : 0xc0000000 - 0xdfffe000 ( 511 MB)
.init : 0xc172b000 - 0xc17bb000 ( 576 kB)
.data : 0xc14dfc22 - 0xc172ae00 (2348 kB)
.text : 0xc1000000 - 0xc14dfc22 (4991 kB)
Checking if this processor honours the WP bit even in supervisor mode...Ok.
Preemptible hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
NR_IRQS:2304 nr_irqs:256 16
console [ttyS0] enabled
tsc: Fast TSC calibration using PIT
tsc: Detected 3092.840 MHz processor
Calibrating delay loop (skipped), value calculated using timer frequency.. 6185.68 BogoMIPS (lpj=12371360)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
Initializing cgroup subsys memory
Initializing cgroup subsys devices
Initializing cgroup subsys freezer
Initializing cgroup subsys blkio
Initializing cgroup subsys perf_event
mce: CPU supports 10 MCE banks
Last level iTLB entries: 4KB 0, 2MB 0, 4MB 0
Last level dTLB entries: 4KB 0, 2MB 0, 4MB 0
tlb_flushall_shift: 6
Freeing SMP alternatives memory: 24K (c17bb000 - c17c1000)
ACPI: Core revision 20130725
ACPI: All ACPI Tables successfully acquired
ftrace: allocating 25039 entries in 49 pages
Enabling APIC mode: Flat. Using 1 I/O APICs
..TIMER: vector=0x30 apic1=0 pin1=2 apic2=-1 pin2=-1
smpboot: CPU0: Intel QEMU Virtual CPU version 2.0.0 (fam: 06, model: 06, stepping: 03)
Performance Events: Broken PMU hardware detected, using software events only.
Failed to access perfctr msr (MSR c1 is 0)
Brought up 1 CPUs
smpboot: Total of 1 processors activated (6185.68 BogoMIPS)
devtmpfs: initialized
NET: Registered protocol family 16
cpuidle: using governor ladder
cpuidle: using governor menu
ACPI: bus type PCI registered
PCI: PCI BIOS revision 2.10 entry at 0xfd3c2, last bus=0
PCI: Using configuration type 1 for base access
pcimode=0x0
bio: create slab <bio-0> at 0
ACPI: Added _OSI(Module Device)
ACPI: Added _OSI(Processor Device)
ACPI: Added _OSI(3.0 _SCP Extensions)
ACPI: Added _OSI(Processor Aggregator Device)
ACPI: Interpreter enabled
ACPI: (supports S0 S5)
ACPI: Using IOAPIC for interrupt routing
PCI: Ignoring host bridge windows from ACPI; if necessary, use "pci=use_crs" and report a bug
ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-ff])
acpi PNP0A03:00: ACPI _OSC support notification failed, disabling PCIe ASPM
acpi PNP0A03:00: Unable to request _OSC control (_OSC support mask: 0x08)
acpi PNP0A03:00: fail to add MMCONFIG information, can't access extended PCI configuration space under this bridge.
PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [bus 00-ff]
pci_bus 0000:00: root bus resource [io 0x0000-0xffff]
pci_bus 0000:00: root bus resource [mem 0x00000000-0xffffffff]
pci 0000:00:01.3: quirk: [io 0xb000-0xb03f] claimed by PIIX4 ACPI
pci 0000:00:01.3: quirk: [io 0xb100-0xb10f] claimed by PIIX4 SMB
ACPI: PCI Interrupt Link [LNKA] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKB] (IRQs 5 *10 11)
ACPI: PCI Interrupt Link [LNKC] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKD] (IRQs 5 10 *11)
ACPI: PCI Interrupt Link [LNKS] (IRQs *9)
ACPI: Enabled 16 GPEs in block 00 to 0F
vgaarb: device added: PCI:0000:00:02.0,decodes=io+mem,owns=io+mem,locks=none
vgaarb: loaded
vgaarb: bridge control possible 0000:00:02.0
SCSI subsystem initialized
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
PCI: Using ACPI for IRQ routing
NET: Registered protocol family 8
NET: Registered protocol family 20
HPET: 3 timers in total, 0 timers will be used for per-cpu timer
hpet0: at MMIO 0xfed00000, IRQs 2, 8, 0
hpet0: 3 comparators, 64-bit 100.000000 MHz counter
Switched to clocksource hpet
pnp: PnP ACPI init
ACPI: bus type PNP registered
pnp: PnP ACPI: found 8 devices
ACPI: bus type PNP unregistered
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
pci 0000:00:00.0: Limiting direct PCI/PCI transfers
pci 0000:00:01.0: PIIX3: Enabling Passive Release
pci 0000:00:01.0: Activating ISA DMA hang workarounds
ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 11
NatSemi SCx200 Driver
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering unionfs 2.6 (for 3.12.26)
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
Installing knfsd (copyright (C) 1996 okir#monad.swb.de).
NTFS driver 2.1.30 [Flags: R/W].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
fuse init (API version 7.22)
msgmni has been set to 995
alg: No test for stdrng (krng)
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at I/O 0x3f8 (irq = 38, base_baud = 921600) is a 16550A
Linux agpgart interface v0.103
[drm] Initialized drm 1.1.0 20060810
SCSI Media Changer driver v0.25
physmap platform flash device: 08000000 at c0000000
physmap-flash physmap-flash.0: map_probe failed
Intel(R) SPI FLASH CONTROLLER Driver built on Mar 8 2017 # 15:45:49
tun: Universal TUN/TAP device driver, 1.6
tun: (C) 1999-2004 Max Krasnyansky <maxk#qualcomm.com>
Intel (R) UDMA Driver - 1.0.0
Copyright (c) 2012 Intel Corperation.
UDMA Network Device Driver init
e100: Intel(R) PRO/100 Network Driver, 3.5.24-k2-NAPI
e100: Copyright(c) 1999-2006 Intel Corporation
e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI
e1000: Copyright (c) 1999-2006 Intel Corporation.
ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 10
GBE working in Real Phy Mode
e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56
e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection
GBE working in Real Phy Mode
e1000 0000:00:04.0 eth1: (PCI:33MHz:32-bit) 52:54:00:12:34:57
e1000 0000:00:04.0 eth1: Intel(R) PRO/1000 Network Connection
ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 10
GBE working in Real Phy Mode
tsc: Refined TSC clocksource calibration: 3092.828 MHz
Switched to clocksource tsc
e1000 0000:00:05.0 eth2: (PCI:33MHz:32-bit) 52:54:00:12:34:58
e1000 0000:00:05.0 eth2: Intel(R) PRO/1000 Network Connection
ACPI: PCI Interrupt Link [LNKB] enabled at IRQ 11
GBE working in Real Phy Mode
e1000 0000:00:06.0 eth3: (PCI:33MHz:32-bit) 52:54:00:12:34:59
e1000 0000:00:06.0 eth3: Intel(R) PRO/1000 Network Connection
GBE working in Real Phy Mode
e1000 0000:00:07.0 eth4: (PCI:33MHz:32-bit) 52:54:00:12:34:5a
e1000 0000:00:07.0 eth4: Intel(R) PRO/1000 Network Connection
GBE working in Real Phy Mode
e1000 0000:00:08.0 eth5: (PCI:33MHz:32-bit) 52:54:00:12:34:5b
e1000 0000:00:08.0 eth5: Intel(R) PRO/1000 Network Connection
GBE working in Real Phy Mode
e1000 0000:00:09.0 eth6: (PCI:33MHz:32-bit) 52:54:00:12:34:5c
e1000 0000:00:09.0 eth6: Intel(R) PRO/1000 Network Connection
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2013 Intel Corporation.
ixgbe: Intel(R) 10 Gigabit PCI Express Network Driver - version 3.15.1-k
ixgbe: Copyright (c) 1999-2013 Intel Corporation.
ixgb: Intel(R) PRO/10GbE Network Driver - version 1.0.135-k2-NAPI
ixgb: Copyright (c) 1999-2008 Intel Corporation.
PPP generic driver version 2.4.2
NET: Registered protocol family 24
i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
serio: i8042 KBD port at 0x60,0x64 irq 1
serio: i8042 AUX port at 0x60,0x64 irq 12
mousedev: PS/2 mouse device common for all mice
input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input0
input: ImExPS/2 Generic Explorer Mouse as /devices/platform/i8042/serio1/input/input2
rtc_cmos 00:00: RTC can wake from S4
rtc_cmos 00:00: rtc core: registered rtc_cmos as rtc0
rtc_cmos 00:00: alarms up to one day, 114 bytes nvram, hpet irqs
softdog: Software Watchdog Timer: 0.08 initialized. soft_noboot=0 soft_margin=60 sec soft_panic=0 (nowayout=0)
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
oprofile: using NMI interrupt.
IPv4 over IPSec tunneling driver
TCP: cubic registered
Initializing XFRM netlink socket
NET: Registered protocol family 10
mip6: Mobile IPv6
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
sctp: Hash tables configured (established 16384 bind 16384)
lib80211: common routines for IEEE802.11 drivers
Key type dns_resolver registered
Using IPI No-Shortcut mode
registered taskstats version 1
rtc_cmos 00:00: setting system clock to 2017-03-08 14:51:21 UTC (1488984681)
VFS: Cannot open root device "sda" or unknown-block(0,0): error -6
Please append a correct "root=" boot option; here are the available partitions:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.12.17 #4
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS Bochs 01/01/2011
00000000 00000000 df45beec c14da955 df45bf34 df45bf04 c14da68e 00000000
df45bf34 fffffffa df75e000 df45bf60 c172bd4e c1605306 df45bf34 c16052b5
c1605282 c176906d df45bf34 fffffffa c16053a2 dffecbc0 00008000 6e6b6e75
Call Trace:
[<c14da955>] dump_stack+0x4b/0x7e
[<c14da68e>] panic+0x88/0x184
[<c172bd4e>] mount_block_root+0x17f/0x18f
[<c10e2a19>] ? SyS_mknod+0x1a/0x1c
[<c172be22>] mount_root+0xc4/0xce
[<c10e2b31>] ? SyS_unlink+0x15/0x17
[<c172bf3d>] prepare_namespace+0x111/0x142
[<c172ba87>] kernel_init_freeable+0x186/0x193
[<c14d7308>] kernel_init+0xd/0xb9
[<c14dea3b>] ret_from_kernel_thread+0x1b/0x30
[<c14d72fb>] ? rest_init+0x77/0x77
What is very weird is that I have the same version of OpenWRT system with a Linux 2.6.32 and it works well. Do I have additionnal kernel options to configure for linux 3.12.X for making it works with Qemu 2.0.0 ?
Thank you in advanced for your helps and comments.
There may be something wrong with your bin/x86/openwrt-x86-sgc_qemu-rootfs-ext4.img file. Where did you get that file from?
Also, you're specifying a disk device as the root filesystem for the kernel (root=/dev/sda) . This is wrong. You're suppose to specify a partition not a disk device. So you probably meant to say "root=/dev/sda1". It's safer to specify a UUID instead of a partition name (e.g. root=UUID=3552064b-7e4d-4e3a-ae48-943b333267d9 ) in case your root partition isn't actually /dev/sda1.
You can extract the UUID for your virtual root partition by creating loopback devices from your disk image:
losetup -P /dev/loop1 bin/x86/openwrt-x86-sgc_qemu-rootfs-ext4.img.
You should see new devices created called /dev/loop1p1 , /dev/loop1p2 , etc. Your virtual partition /dev/sda1 will be created as /dev/loop1p1, /dev/sda2 will be /dev/loop1p2 etc. You can then determine the UUID using parted or gparted on /dev/loop1
You may also need to specify something like "format=raw" in your qemu command, if the disk image is a raw disk image, or you may need to convert it first to a qcow2 image (qemu-image convert).

T4240RDB-64B - QoIQ SDK 2.0 - Kernel crashes

I built T4240rdb-64b with QorIQ-SDK-V2.0-20160527-yocto on Ubuntu Linux 16. LTS 64bit.
This is my commands to build it:
~/QorIQ-SDK-V2.0-20160527-yocto$ source ./fsl-setup-env -m t4240rdb-64b
Configuring for t4240rdb-64b ...
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b was created before.
Back to build project ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b.
Nothing is changed.
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$ bitbake fsl-image-minimal
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Loading cache: 100% |##########################################################################################################| ETA: 00:00:00
Loaded 6050 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.28.0"
BUILD_SYS = "x86_64-linux"
NATIVELSBSTRING = "Ubuntu-16.04"
TARGET_SYS = "powerpc64-fsl-linux"
MACHINE = "t4240rdb-64b"
DISTRO = "fsl-qoriq"
DISTRO_VERSION = "2.0"
TUNE_FEATURES = "m64 fpu-hard e6500 altivec"
TARGET_FPU = "hard"
meta
meta-yocto
meta-yocto-bsp = "HEAD:9a211a4a2c1bfcb292dc97d8dcac149bca9e3f1b"
meta-oe
meta-multimedia
meta-gnome
meta-networking
meta-perl
meta-python
meta-ruby
meta-filesystems
meta-webserver
meta-xfce = "HEAD:dc5634968b270dde250690609f0015f881db81f2"
meta-freescale = "HEAD:7facbdb726e2dda0515e084c2066a4b8dd99c6d2"
meta-freescale-internal = "HEAD:4829293f807e35a1111e79763294fc8b98b97810"
meta-freescale-extra = "HEAD:bee911b027e0480b034674d0ddee3fcb06d2e985"
meta-virtualization = "HEAD:042425c1d98bdd7e44a62789bd03b375045266f5"
meta-java = "HEAD:8b776ac68f9af4596be3824152bcf0bc6b67fa1d"
meta-openstack
meta-openstack-aio-deploy
meta-openstack-compute-deploy
meta-openstack-compute-test-config
meta-openstack-controller-deploy
meta-openstack-controller-test-config
meta-openstack-qemu
meta-openstack-swift-deploy
meta-cloud-services = "HEAD:d8bc0d92d0f741e2ea1e6d3d9bc6b7a091d03cfb"
meta-security = "HEAD:f9367e71f923fc7d2fb600208e2b97535ea41777"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
NOTE: Tasks Summary: Attempted 1499 tasks of which 1499 didn't need to be rerun and all succeeded.
Summary: There was 1 WARNING message shown.
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$
When I run QEMU with this command:
sudo ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/sysroots/x86_64-linux/usr/bin/qemu-system-ppc64 \
-cpu e5500 -nographic -m 1028 -M ppce500 \
-kernel ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/deploy/images/t4240rdb-64b/uImage \
-initrd ~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b/tmp/deploy/images/t4240rdb-64b/fsl-image-minimal-t4240rdb-64b.ext2.gz \
-append "root=/dev/ram rw console=ttyS0,115200 \
ip=26.26.26.2::26.26.26.1:255.255.255.0 mem=1028M" -serial tcp::4444,server,telnet -net nic,model=e1000 \
-net tap,ifname=tap0,script=no,downscript=no
It couldn't boot. This is boot massages:
~/QorIQ-SDK-V2.0-20160527-yocto/build_t4240rdb-64b$ telnet 26.26.26.1 4444
Trying 26.26.26.1...
Connected to 26.26.26.1.
Escape character is '^]'.
Using QEMU e500 machine description
MMU: Supported page sizes
4 KB as direct
4096 KB as direct
16384 KB as direct
65536 KB as direct
262144 KB as direct
1048576 KB as direct
MMU: Book3E HW tablewalk not supported
Found initrd at 0xc000000004000000:0xc000000004423e3b
bootconsole [udbg0] enabled
CPU maps initialized for 1 thread per core
Starting Linux PPC64 #1 SMP Sun Jan 8 12:42:09 ICT 2017
-----------------------------------------------------
ppc64_pft_size = 0x0
phys_mem_size = 0x40000000
dcache_line_size = 0x40
icache_line_size = 0x40
cpu_features = 0x00180400181802c0
possible = 0x00180480581802c8
always = 0x00180400581802c0
cpu_user_features = 0xcc008000 0x08000000
mmu_features = 0x000a0010
firmware_features = 0x0000000000000000
-----------------------------------------------------
<- setup_system()
Linux version 4.1.8-rt8+gbd51baf (hstan#server-06) (gcc version 4.9.2 (GCC) ) #1 SMP Sun Jan 8 12:42:09 ICT 2017
qemu_e500_setup_arch()
Zone ranges:
DMA [mem 0x0000000000000000-0x000000003fffffff]
DMA32 empty
Normal empty
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000000000000-0x000000003fffffff]
Initmem setup node 0 [mem 0x0000000000000000-0x000000003fffffff]
MMU: Allocated 2112 bytes of context maps for 255 contexts
PERCPU: Embedded 17 pages/cpu #c00000003f000000 s28824 r0 d40808 u1048576
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 258560
Kernel command line: root=/dev/ram rw console=ttyS0,115200 ip=26.26.26.2::26.26.26.1:255.255.255.0 mem=1028M
PID hash table entries: 4096 (order: 3, 32768 bytes)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode-cache hash table entries: 65536 (order: 7, 524288 bytes)
Sorting __ex_table...
Memory: 949036K/1048576K available (7856K kernel code, 1132K rwdata, 3008K rodata, 364K init, 764K bss, 99540K reserved, 0K cma-reserved)
Hierarchical RCU implementation.
RCU debugfs-based tracing is enabled.
CONFIG_RCU_FANOUT set to non-default value of 32
Additional per-CPU info printed with stalls.
RCU restricting CPUs from NR_CPUS=24 to nr_cpu_ids=1.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
NR_IRQS:512 nr_irqs:512 16
mpic: Setting up MPIC " OpenPIC " version 1.2 at fe0040000, max 1 CPUs
mpic: ISU size: 256, shift: 8, mask: ff
mpic: Initializing for 256 sources
clocksource timebase: mask: 0xffffffffffffffff max_cycles: 0x5c4093a7d1, max_idle_ns: 440795210635 ns
clocksource: timebase mult[2800000] shift[24] registered
Console: colour dummy device 80x25
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 2, 16384 bytes)
Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes)
e500 family performance monitor hardware support registered
Brought up 1 CPUs
devtmpfs: initialized
clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
xor: measuring software checksum speed
8regs : 1289.000 MB/sec
8regs_prefetch: 1079.000 MB/sec
32regs : 1745.000 MB/sec
32regs_prefetch: 1572.000 MB/sec
xor: using function: 32regs (1745.000 MB/sec)
NET: Registered protocol family 16
Found FSL PCI host bridge at 0x0000000fe0008000. Firmware bus number: 0->255
PCI host bridge /pci#fe0008000 (primary) ranges:
MEM 0x0000000c00000000..0x0000000c1fffffff -> 0x00000000e0000000
IO 0x0000000fe1000000..0x0000000fe100ffff -> 0x0000000000000000
/pci#fe0008000: PCICSRBAR # 0xdff00000
setup_pci_atmu: end of DRAM 40000000
EDAC PCI0: Giving out device to module MPC85xx_edac controller mpc85xx_pci_err: DEV fe0008000.pci (INTERRUPT)
MPC85xx_edac acquired irq 24 for PCI Err
MPC85xx_edac PCI err registered
fsl-pamu: fsl_pamu_init: could not find a PAMU node
PCI: Probing PCI hardware
fsl-pci fe0008000.pci: PCI host bridge to bus 0000:00
pci_bus 0000:00: root bus resource [io 0x10000-0x1ffff] (bus address [0x0000-0xffff])
pci_bus 0000:00: root bus resource [mem 0xc00000000-0xc1fffffff] (bus address [0xe0000000-0xffffffff])
pci_bus 0000:00: root bus resource [bus 00-ff]
pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
pci 0000:00:00.0: PCI bridge to [bus 01-ff]
PCI: Cannot allocate resource region 0 of device 0000:00:00.0, will remap
pci 0000:00:00.0: BAR 0: assigned [mem 0xc00000000-0xc000fffff]
pci 0000:00:00.0: BAR 8: assigned [mem 0xc00100000-0xc001fffff]
pci 0000:00:01.0: BAR 6: assigned [mem 0xc00200000-0xc0023ffff pref]
pci 0000:00:01.0: BAR 0: assigned [mem 0xc00240000-0xc0025ffff]
pci 0000:00:01.0: BAR 1: assigned [io 0x11000-0x1103f]
pci 0000:00:00.0: PCI bridge to [bus 01]
pci 0000:00:00.0: bridge window [io 0x10000-0x10fff]
pci 0000:00:00.0: bridge window [mem 0xc00100000-0xc001fffff]
raid6: int64x1 gen() 721 MB/s
raid6: int64x1 xor() 495 MB/s
raid6: int64x2 gen() 1018 MB/s
raid6: int64x2 xor() 370 MB/s
raid6: int64x4 gen() 1334 MB/s
raid6: int64x4 xor() 890 MB/s
raid6: int64x8 gen() 650 MB/s
raid6: int64x8 xor() 440 MB/s
raid6: using algorithm int64x4 gen() 1334 MB/s
raid6: .... xor() 890 MB/s, rmw enabled
raid6: using intx1 recovery algorithm
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
No BMan portals available!
QMan: Allocated lookup table at 8000000000002000, entry count 65537
No QMan portals available!
No USDPAA memory, no 'fsl,usdpaa-mem' in device-tree
Switched to clocksource timebase
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 4, 65536 bytes)
TCP bind hash table entries: 8192 (order: 5, 131072 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 2, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 2, 16384 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...
rootfs image is not initramfs (no cpio magic); looks like an initrd
Freeing initrd memory: 4236K (c000000004000000 - c000000004423000)
futex hash table entries: 256 (order: 2, 16384 bytes)
audit: initializing netlink subsys (disabled)
audit: type=2000 audit(0.952:1): initialized
HugeTLB registered 4 MB page size, pre-allocated 0 pages
HugeTLB registered 16 MB page size, pre-allocated 0 pages
HugeTLB registered 64 MB page size, pre-allocated 0 pages
HugeTLB registered 256 MB page size, pre-allocated 0 pages
HugeTLB registered 1 GB page size, pre-allocated 0 pages
NFS: Registering the id_resolver key type
Key type id_resolver registered
Key type id_legacy registered
ntfs: driver 2.1.32 [Flags: R/O].
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
async_tx: api initialized (async)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
console [ttyS0] disabled
serial8250.0: ttyS0 at MMIO 0xfe0004500 (irq = 42, base_baud = 115200) is a 16550A
console [ttyS0] enabled
console [ttyS0] enabled
bootconsole [udbg0] disabled
bootconsole [udbg0] disabled
ePAPR hypervisor byte channel driver
brd: module loaded
loop: module loaded
st: Version 20101219, fixed bufsize 32768, s/g segs 256
libphy: Fixed MDIO Bus: probed
Freescale FM module, FMD API version 21.1.0
Freescale FM Ports module
fsl_mac: fsl_mac: FSL FMan MAC API based driver
fsl_dpa: FSL DPAA Ethernet driver
fsl_advanced: FSL DPAA Advanced drivers:
fsl_proxy: FSL DPAA Proxy initialization driver
fsl_dpa_shared: FSL DPAA Shared Ethernet driver
fsl_dpa_macless: FSL DPAA MACless Ethernet driver
fsl_oh: FSL FMan Offline Parsing port driver
e1000e: Intel(R) PRO/1000 Network Driver - 2.3.2-k
e1000e: Copyright(c) 1999 - 2014 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
i2c /dev entries driver
md: raid6 personality registered for level 6
md: raid5 personality registered for level 5
md: raid4 personality registered for level 4
Freescale(R) MPC85xx EDAC driver, (C) 2006 Montavista Software
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
No fsl,qman node
Freescale USDPAA process driver
fsl-usdpaa: no region found
Freescale USDPAA process IRQ driver
dce_sys_init done!
No fsl,dce node
Freescale pme2 db driver
PME2: fsl_pme2_db_init: not on ctrl-plane
Freescale pme2 scan driver
fsl-pme2-scan: device pme_scan registered
Freescale hypervisor management driver
fsl-hv: no hypervisor found
ipip: IPv4 over IPv4 tunneling driver
Initializing XFRM netlink socket
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
NET: Registered protocol family 15
8021q: 802.1Q VLAN Support v1.8
Key type dns_resolver registered
fsl_generic: FSL DPAA Generic Ethernet driver
hctosys: unable to open rtc device (rtc0)
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
RAMDISK: gzip image found at block 0
VFS: Mounted root (ext2 filesystem) on device 1:0.
devtmpfs: mounted
Freeing unused kernel memory: 364K (c000000000aa3000 - c000000000afe000)
init[1]: unhandled signal 4 at 00003fff90c3c0fc nip 00003fff90c3c0fc lr 00003fff90c1dd94 code 30001
Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000004
CPU: 0 PID: 1 Comm: init Not tainted 4.1.8-rt8+gbd51baf #1
Call Trace:
[c0000000390538d0] [c0000000007a34fc] .dump_stack+0x8c/0xb8 (unreliable)
[c000000039053950] [c0000000007a0e34] .panic+0xf0/0x270
[c0000000390539f0] [c00000000003b520] .do_exit+0xa00/0xa04
[c000000039053ae0] [c00000000003c5a4] .do_group_exit+0x54/0xec
[c000000039053b70] [c000000000048640] .get_signal+0x2f8/0x674
[c000000039053c70] [c0000000000092bc] .do_signal+0x44/0x218
[c000000039053db0] [c00000000000959c] .do_notify_resume+0x64/0x78
[c000000039053e30] [c000000000000c4c] .ret_from_except_lite+0x78/0x7c
Rebooting in 180 seconds..
I've try boot from SD card on real T4240RDB board, it happen the same error.
Please help me.
Thanks in advance
Because the warning:
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
I have tryed build on Linux Ubuntu 14.04 LTS, but the same error when I boot the image and rootfs.

linux-xlnx: Kernel hangs at Registering SWP/SWPB emulation handler

I'm attempting to get a persistent distribution (Linaro) on an SD card, up and running on the ZedBoard. I built the kernel from the linux-xlnx source, and have run into a number of issues during startup. I've managed to overcome most of the kernel hangs I've been experiencing at bootup, but I'm stuck at "Registering SWP/SWPB emulation handler".
I've noticed an option in the .config file "CONFIG_SWP_EMULATE=y", but even if I comment this out (and I don't know if I should be doing this anyway, to be honest), when I go to rebuild the kernel with "make UIMAGE_LOADADDR=0x8000 uImage", this line just gets re-enabled in the .config file for whatever reason, and the problem persists.
The original configuration was created using "make xilinx_zynq_defconfig". I then used "make menuconfig" to enable earlyprintk and low-level debugging in the kernel hacking menu (displaying the output on UART1). From there, I directly edited the .config file each time the kernel got stuck at some point. The notable changes from the "xilinx_zynq_defconfig" thus far are:
CONFIG_DEBUG_LL=y
CONFIG_DEBUG_ZYNQ_UART1=y
CONFIG_EARLY_PRINTK=y
# CONFIG_SERIAL_XILINX_PS_UART is not set
# CONFIG_RTC_HCTOSYS is not set
CONFIG_ARM_THUMB=y
CONFIG_ARM_THUMBEE=y
Any suggestions on how to overcome this issue would be appreciated. Thank you in advance :)
U-Boot 2016.07-00057-g2931a7a-dirty (Nov 17 2016 - 02:58:29 -0500)
Model: Zynq Zed Development Board
Board: Xilinx Zynq
DRAM: ECC disabled 512 MiB
MMC: sdhci#e0100000: 0
SF: Detected S25FL256S_64K with page size 256 Bytes, erase size 64 KiB, total 32 MiB
*** Warning - bad CRC, using default environment
In: serial#e0001000
Out: serial#e0001000
Err: serial#e0001000
Model: Zynq Zed Development Board
Board: Xilinx Zynq
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet#e000b000
reading uEnv.txt
135 bytes read in 10 ms (12.7 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot: 0
Device: sdhci#e0100000
Manufacturer ID: 28
OEM: 4245
Name: 2$AGO
Tran Speed: 50000000
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 7.5 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
reading uEnv.txt
135 bytes read in 10 ms (12.7 KiB/s)
Loaded environment from uEnv.txt
Importing environment from SD ...
Copying Linux from SD to RAM...
## Booting kernel from Legacy Image at 02080000 ...
Image Name: Linux-4.6.0-xilinx-00040-g786228
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3828432 Bytes = 3.7 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 02020000
Booting using the fdt blob at 0x2020000
Loading Kernel Image ... OK
Loading Device Tree to 1eb0e000, end 1eb13595 ... OK
Starting kernel ...
Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x0
Linux version 4.6.0-xilinx-00040-g7862283 (steven#sjk) (gcc version 4.9.2 (Sourcery CodeBench Lite 2015.05-17) ) #1 SMP PREEMPT Thu Nov 17 20:58:49 EST 2016
CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=18c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Zynq Zed Development Board
bootconsole [earlycon0] enabled
cma: Reserved 16 MiB at 0x1f000000
Memory policy: Data cache writealloc
On node 0 totalpages: 131072
free_area_init_node: node 0, pgdat c0938a80, node_mem_map debef000
Normal zone: 1024 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 131072 pages, LIFO batch:31
percpu: Embedded 12 pages/cpu #debcd000 s19776 r8192 d21184 u49152
pcpu-alloc: s19776 r8192 d21184 u49152 alloc=12*4096
pcpu-alloc: [0] 0 [0] 1
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 130048
Kernel command line: console=ttyACM0,115200 debug root=/dev/mmcblk0p2 rw earlyprintk=serial,uart1,115200 rootfstype=ext4 rootwait devtmpfs.mount=0
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 494532K/524288K available (5303K kernel code, 229K rwdata, 1836K rodata, 1024K init, 221K bss, 13372K reserved, 16384K cma-reserved, 0K highmem)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xfff00000 (3072 kB)
vmalloc : 0xe0800000 - 0xff800000 ( 496 MB)
lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB)
modules : 0xbf000000 - 0xbfe00000 ( 14 MB)
.text : 0xc0008000 - 0xc07f8d68 (8132 kB)
.init : 0xc0800000 - 0xc0900000 (1024 kB)
.data : 0xc0900000 - 0xc09397e0 ( 230 kB)
.bss : 0xc09397e0 - 0xc0970ee8 ( 222 kB)
Preemptible hierarchical RCU implementation.
Build-time adjustment of leaf fanout to 32.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=32, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
efuse mapped to e0800000
slcr mapped to e0802000
L2C: platform modifies aux control register: 0x72360000 -> 0x72760000
L2C: DT/platform modifies aux control register: 0x72360000 -> 0x72760000
L2C-310 erratum 769419 enabled
L2C-310 enabling early BRESP for Cortex-A9
L2C-310 full line of zeros enabled for Cortex-A9
L2C-310 ID prefetch enabled, offset 1 lines
L2C-310 dynamic clock gating enabled, standby mode enabled
L2C-310 cache controller enabled, 8 ways, 512 kB
L2C-310: CACHE_ID 0x410000c8, AUX_CTRL 0x76760001
zynq_clock_init: clkc starts at e0802100
Zynq clock init
sched_clock: 64 bits at 333MHz, resolution 3ns, wraps every 4398046511103ns
clocksource: arm_global_timer: mask: 0xffffffffffffffff max_cycles: 0x4ce07af025, max_idle_ns: 440795209040 ns
Switching to timer-based delay loop, resolution 3ns
clocksource: ttc_clocksource: mask: 0xffff max_cycles: 0xffff, max_idle_ns: 537538477 ns
timer #0 at e080a000, irq=17
Console: colour dummy device 80x30
Calibrating delay loop (skipped), value calculated using timer frequency.. 666.66 BogoMIPS (lpj=3333333)
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
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x100000 - 0x100058
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (1333.33 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
pinctrl core: initialized pinctrl subsystem
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor menu
hw-breakpoint: found 5 (+1 reserved) breakpoint and 1 watchpoint registers.
hw-breakpoint: maximum watchpoint size is 4 bytes.
zynq-ocm f800c000.ocmc: ZYNQ OCM pool: 256 KiB # 0xe0880000
zynq-pinctrl 700.pinctrl: zynq pinctrl initialized
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
media: Linux media interface: v0.10
Linux video capture interface: v2.00
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
PTP clock support registered
EDAC MC: Ver: 3.0.0
Advanced Linux Sound Architecture Driver Initialized.
clocksource: Switched to clocksource arm_global_timer
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 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.
PCI: CLS 0 bytes, default 64
hw perfevents: enabled with armv7_cortex_a9 PMU driver, 7 counters available
futex hash table entries: 512 (order: 3, 32768 bytes)
workingset: timestamp_bits=28 max_order=17 bucket_order=0
jffs2: version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
dma-pl330 f8003000.dmac: Loaded driver for PL330 DMAC-241330
dma-pl330 f8003000.dmac: DBUFF-128x8bytes Num_Chans-8 Num_Peri-4 Num_Events-16
xdevcfg f8007000.devcfg: ioremap 0xf8007000 to e086c000
[drm] Initialized drm 1.1.0 20060810
brd: module loaded
loop: module loaded
m25p80 spi0.0: found s25fl256s1, expected n25q128a11
m25p80 spi0.0: s25fl256s1 (32768 Kbytes)
5 ofpart partitions found on MTD device spi0.0
Creating 5 MTD partitions on "spi0.0":
0x000000000000-0x000000100000 : "qspi-fsbl-uboot"
0x000000100000-0x000000600000 : "qspi-linux"
0x000000600000-0x000000620000 : "qspi-device-tree"
0x000000620000-0x000000c00000 : "qspi-rootfs"
0x000000c00000-0x000001000000 : "qspi-bitstream"
CAN device driver interface
gpiod_set_value: invalid GPIO
libphy: MACB_mii_bus: probed
macb e000b000.ethernet eth0: Cadence GEM rev 0x00020118 at 0xe000b000 irq 145 (00:0a:35:00:01:22)
Marvell 88E1510 e000b000.etherne:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.etherne:00, irq=-1)
e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
usbcore: registered new interface driver usb-storage
e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0451/0x1507
Found TI TUSB1210 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
EDAC MC: ECC not enabled
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.sdhci [e0100000.sdhci] using DMA
ledtrig-cpu: registered to indicate activity on CPUs
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
sit: IPv6 over IPv4 tunneling driver
NET: Registered protocol family 17
can: controller area network core (rev 20120528 abi 9)
NET: Registered protocol family 29
can: raw protocol (rev 20120528)
mmc0: new high speed SDHC card at address 59b4
can: broadcast manager protocol (rev 20120528 t)
mmcblk0: mmc0:59b4 2$AGO 7.46 GiB
mmcblk0: p1 p2
can: netlink gateway (rev 20130117) max_hops=1
ThumbEE CPU extension supported.
Registering SWP/SWPB emulation handler

Confusion regarding kernel version, device tree, and buildroot

I was provided with a 3.0.35 linux kernel for an arm i.mx6 board that uses the older "board file" format, as well as an older (2013.02) buildroot repo that has been used to generate the proper images and rootfs.
My goal is to use the latest buildroot public repo commit so that in the future it will be easier to keep packages up to date. Currently, I have to manually edit package files (OpenSSL, lighttpd, etc) to make the latest version available via buildroot.
I tried replicating my board configuration within the latest buildroot (post-2016.05). Everything remained more or less the same, except the toolchain had to change to support the newer systemd (Linaro 2013.01 -> CodeBench ARM 2014.05). Results:
Buildroot: build succeeds
U-boot: image works
Kernel: image causes a kernel panic
My questions really are:
Can I use my older kernel with the newer buildroot/toolchain, or is this an incompatibility? Do certain toolchains not support older kernels?
If it is an incompatiblity, is there an easier way to keep my older buildroot's packages up to date?
If both above are not options, is there any sort of tool to help migrate from a board file to device tree? Is it easy to convert to dts, or is this a long project?
EDIT:
Changed to Linaro 2014.09 toolchain. I was previously using systemd 202 as my init system. Since the newer buildroot requires a toolchain built against kernel headers >= 3.10 for systemd, I had to switch my init system to systemv. Here is the crash I'm receiving:
Starting kernel ...
Linux version 3.0.35 (eschumacher#ubuntu) (gcc version 4.9.2 20140904 (prerelease) (crosstool-NG linaro-1.13.1-4.9-2014.09 - Linaro GCC 4.9-2014.09) ) #1 SMP PREEMPT Tue Jun 21 11:01:40 PDT 2016
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: i.MX 6Quad/DualLite/Solo SMARC CPU Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6DL/SOLO, silicon rev 1.1
PERCPU: Embedded 7 pages/cpu #8bc06000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 84992
Kernel command line: console=ttymxc3,115200 root=/dev/mmcblk0p2 rootwait rw
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 336MB = 336MB total
Memory: 327580k/327580k available, 196708k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf4600000 - 0xffe00000 ( 184 MB)
vmalloc : 0xa0800000 - 0xf2000000 (1304 MB)
lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80039000 ( 196 kB)
.text : 0x80039000 - 0x80af9538 (11010 kB)
.data : 0x80afa000 - 0x80b53be0 ( 359 kB)
.bss : 0x80b53c04 - 0x80ba775c ( 335 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
Set periph_clk's parent to pll2_pfd_400M!
arm_max_freq=800MHz
MXC_Early serial console at MMIO 0x21f0000 (options '115200')
bootconsole [ttymxc3] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
Brought up 1 CPUs
SMP: Total of 1 processors activated (1581.05 BogoMIPS).
devtmpfs: initialized
print_constraints: dummy:
NET: Registered protocol family 16
print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal
print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal
print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal
print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02050000, Cache size: 524288 B
bio: create slab <bio-0> at 0
mxs-dma mxs-dma-apbh: initialized
print_constraints: vmmc: 3300 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Freescale USB OTG Driver loaded, $Revision: 1.55 $
imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Version 1.0.24.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
i2c-core: driver [max17135] using legacy suspend method
i2c-core: driver [max17135] using legacy resume method
Switching to clocksource mxc_timer1
cfg80211: Calling CRDA to update world regulatory domain
Unable to handle kernel NULL pointer dereference at virtual address 00000040
pgd = 80004000
[00000040] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted (3.0.35 #1)
PC is at kmem_cache_alloc+0xa4/0x108
LR is at con_insert_unipair+0xb8/0x104
pc : [<800f40c0>] lr : [<80299574>] psr: 60000093
sp : 9202fef0 ip : 9202e000 fp : 00000001
r10: 00000000 r9 : 0bbcf000 r8 : 20000013
r7 : 000000d0 r6 : 92002300 r5 : 00000040 r4 : 80b0fcc8
r3 : 8003a5a0 r2 : 80b0fcc8 r1 : 000024ac r0 : 00000001
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 1000404a DAC: 00000015
Process swapper (pid: 1, stack limit = 0x9202e2f0)
Stack: (0x9202fef0 to 0x92030000)
fee0: 00002665 921bcee4 920f4900 00000003
ff00: 80b2fee8 80b2fee6 00000003 80299574 00000000 00000001 920f4900 00000003
ff20: 80b2fee8 8029a1a4 00000000 80b30143 92003000 80b729d8 00000136 00000001
ff40: 00000014 80b72bfc 00000001 00000002 00000004 00000000 8001fce4 8001f214
ff60: 00000000 80b72ad8 00000001 8001f714 80a695d4 00000000 80b725d4 00000000
ff80: 8003fb04 00000013 00000000 00000000 00000000 8001eb68 80a37670 00000000
ffa0: 80b53c20 80b53c20 9202e030 800395c0 000001df 00000013 00000000 00000000
ffc0: 00000039 00000000 00000270 8002fb14 8002ffa0 8003fb04 00000013 00000000
ffe0: 00000000 00000000 00000000 8000898c 00000000 8003fb04 c38ac389 c38dc38b
[<800f40c0>] (kmem_cache_alloc+0xa4/0x108) from [<80299574>] (con_insert_unipair+0xb8/0x104)
[<80299574>] (con_insert_unipair+0xb8/0x104) from [<8029a1a4>] (con_set_default_unimap+0xe8/0x178)
[<8029a1a4>] (con_set_default_unimap+0xe8/0x178) from [<8001f214>] (console_map_init+0x44/0x50)
[<8001f214>] (console_map_init+0x44/0x50) from [<8001f714>] (vty_init+0x18c/0x19c)
[<8001f714>] (vty_init+0x18c/0x19c) from [<8001eb68>] (tty_init+0x12c/0x144)
[<8001eb68>] (tty_init+0x12c/0x144) from [<800395c0>] (do_one_initcall+0x114/0x16c)
[<800395c0>] (do_one_initcall+0x114/0x16c) from [<8000898c>] (kernel_init+0xc0/0x144)
[<8000898c>] (kernel_init+0xc0/0x144) from [<8003fb04>] (kernel_thread_exit+0x0/0x8)
Code: 1afffff3 e596a014 e2811004 e3a00001 (e795a00a)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill init!
[<8004631c>] (unwind_backtrace+0x0/0xec) from [<80569100>] (panic+0x80/0x19c)
[<80569100>] (panic+0x80/0x19c) from [<80075934>] (complete_and_exit+0x0/0x1c)
[<80075934>] (complete_and_exit+0x0/0x1c) from [<00000001>] (0x1)
EDIT 2:
I changed buildroot config to build my own toolchain using my kernel headers. I still receive a similar kernel panic. Output:
Starting kernel ...
Linux version 3.0.35 (eschumacher#ubuntu) (gcc version 4.9.3 (Buildroot 2016.08- git-00508-geba9c44-dirty) ) #1 SMP PREEMPT Tue Jun 21 16:41:35 PDT 2016
CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=10c53c7d
CPU: VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: i.MX 6Quad/DualLite/Solo SMARC CPU Board
Memory policy: ECC disabled, Data cache writealloc
CPU identified as i.MX6DL/SOLO, silicon rev 1.1
PERCPU: Embedded 7 pages/cpu #8bc06000 s5440 r8192 d15040 u32768
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 84992
Kernel command line: console=ttymxc3,115200 root=/dev/mmcblk0p2 rootwait rw
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 336MB = 336MB total
Memory: 327564k/327564k available, 196724k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
DMA : 0xf4600000 - 0xffe00000 ( 184 MB)
vmalloc : 0xa0800000 - 0xf2000000 (1304 MB)
lowmem : 0x80000000 - 0xa0000000 ( 512 MB)
pkmap : 0x7fe00000 - 0x80000000 ( 2 MB)
modules : 0x7f000000 - 0x7fe00000 ( 14 MB)
.init : 0x80008000 - 0x80039000 ( 196 kB)
.text : 0x80039000 - 0x80afd458 (11026 kB)
.data : 0x80afe000 - 0x80b57bc0 ( 359 kB)
.bss : 0x80b57be4 - 0x80bab73c ( 335 kB)
SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Preemptible hierarchical RCU implementation.
NR_IRQS:624
MXC GPIO hardware
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655ms
Set periph_clk's parent to pll2_pfd_400M!
arm_max_freq=800MHz
MXC_Early serial console at MMIO 0x21f0000 (options '115200')
bootconsole [ttymxc3] enabled
Console: colour dummy device 80x30
Calibrating delay loop... 1581.05 BogoMIPS (lpj=7905280)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
CPU: Testing write buffer coherency: ok
hw perfevents: enabled with ARMv7 Cortex-A9 PMU driver, 7 counters available
Brought up 1 CPUs
SMP: Total of 1 processors activated (1581.05 BogoMIPS).
devtmpfs: initialized
print_constraints: dummy:
NET: Registered protocol family 16
print_constraints: vddpu: 725 <--> 1300 mV at 700 mV fast normal
print_constraints: vddcore: 725 <--> 1300 mV at 1150 mV fast normal
print_constraints: vddsoc: 725 <--> 1300 mV at 1200 mV fast normal
print_constraints: vdd2p5: 2000 <--> 2775 mV at 2400 mV fast normal
print_constraints: vdd1p1: 800 <--> 1400 mV at 1100 mV fast normal
print_constraints: vdd3p0: 2625 <--> 3400 mV at 3000 mV fast normal
hw-breakpoint: found 6 breakpoint and 1 watchpoint registers.
hw-breakpoint: 1 breakpoint(s) reserved for watchpoint single-step.
hw-breakpoint: maximum watchpoint size is 4 bytes.
L310 cache controller enabled
l2x0: 16 ways, CACHE_ID 0x410000c8, AUX_CTRL 0x02050000, Cache size: 524288 B
bio: create slab <bio-0> at 0
mxs-dma mxs-dma-apbh: initialized
print_constraints: vmmc: 3300 mV
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Freescale USB OTG Driver loaded, $Revision: 1.55 $
imx-ipuv3 imx-ipuv3.0: IPU DMFC NORMAL mode: 1(0~1), 5B(4,5), 5F(6,7)
MIPI CSI2 driver module loaded
Advanced Linux Sound Architecture Driver Version 1.0.24.
Bluetooth: Core ver 2.16
NET: Registered protocol family 31
Bluetooth: HCI device and connection manager initialized
Bluetooth: HCI socket layer initialized
Bluetooth: L2CAP socket layer initialized
Bluetooth: SCO socket layer initialized
i2c-core: driver [max17135] using legacy suspend method
i2c-core: driver [max17135] using legacy resume method
Switching to clocksource mxc_timer1
cfg80211: Calling CRDA to update world regulatory domain
Unable to handle kernel NULL pointer dereference at virtual address 00000040
pgd = 80004000
[00000040] *pgd=00000000
Internal error: Oops: 5 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 Not tainted (3.0.35 #1)
PC is at kmem_cache_alloc+0xa4/0x108
LR is at con_insert_unipair+0xb8/0x104
pc : [<800f3bbc>] lr : [<80298a88>] psr: 60000093
sp : 9202fef8 ip : 9202e000 fp : 00000001
r10: 00000000 r9 : 0bbcf000 r8 : 20000013
r7 : 000000d0 r6 : 92002300 r5 : 00000040 r4 : 80b13cc8
r3 : 8003a5a0 r2 : 80b13cc8 r1 : 000024ac r0 : 00000001
Flags: nZCv IRQs off FIQs on Mode SVC_32 ISA ARM Segment kernel
Control: 10c53c7d Table: 1000404a DAC: 00000015
Process swapper (pid: 1, stack limit = 0x9202e2f0)
Stack: (0x9202fef8 to 0x92030000)
fee0: 00002665 921bcee4
ff00: 920f4900 00000003 80b33ec8 80b33ec6 00000003 80298a88 80b34123 00000000
ff20: 00000001 920f4900 00000003 802996b8 00000001 80b34123 92003000 80b769b8
ff40: 8001fc40 00000001 00000014 80b76bdc 00000002 00000004 00000000 00000000
ff60: 8001fc40 8001f168 00000000 80b76ab8 00000001 8001f668 80a684a4 8014768c
ff80: 80b765b4 00000000 8003fac4 00000013 00000000 8001eac4 80a36540 00000000
ffa0: 80b57c00 80b57c00 9202e030 800395b8 000001df 00000013 00000000 00000000
ffc0: 00000039 00000000 00000270 8002fa74 8002ff00 8003fac4 00000013 00000000
ffe0: 00000000 00000000 00000000 8000898c 00000000 8003fac4 e345c1eb e0c32c90
[<800f3bbc>] (kmem_cache_alloc+0xa4/0x108) from [<80298a88>] (con_insert_unipair +0xb8/0x104)
[<80298a88>] (con_insert_unipair+0xb8/0x104) from [<802996b8>] (con_set_default_ unimap+0xe8/0x178)
[<802996b8>] (con_set_default_unimap+0xe8/0x178) from [<8001f168>] (console_map_ init+0x44/0x50)
[<8001f168>] (console_map_init+0x44/0x50) from [<8001f668>] (vty_init+0x18c/0x19 c)
[<8001f668>] (vty_init+0x18c/0x19c) from [<8001eac4>] (tty_init+0x12c/0x144)
[<8001eac4>] (tty_init+0x12c/0x144) from [<800395b8>] (do_one_initcall+0x114/0x1 6c)
[<800395b8>] (do_one_initcall+0x114/0x16c) from [<8000898c>] (kernel_init+0xc0/0 x144)
[<8000898c>] (kernel_init+0xc0/0x144) from [<8003fac4>] (kernel_thread_exit+0x0/ 0x8)
Code: 1afffff3 e596a014 e2811004 e3a00001 (e795a00a)
---[ end trace 1b75b31a2719ed1c ]---
Kernel panic - not syncing: Attempted to kill init!
[<800462c8>] (unwind_backtrace+0x0/0xec) from [<80567fcc>] (panic+0x80/0x19c)
[<80567fcc>] (panic+0x80/0x19c) from [<800757e0>] (complete_and_exit+0x0/0x1c)
[<800757e0>] (complete_and_exit+0x0/0x1c) from [<00000001>] (0x1)
As I stated in a comment, the crash looks very similar to the one in Freescale 3.0.35 kernel crash. If so, the crash happens in memset.S. The top two commits in memset.S in upstream kernel whose SHA1 begins with c2459d3 and 1bd4678, respectively, should solve that issue.

Resources