I am trying to manually build a mainline kernel and boot in Pine64_Plus board.
Linux kernel unable to mount the boot partition. And wierdly it doesn't display any partition under available partition in boot log.
I did the below steps.
Cloned the linux mainline git repo
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git --depth=1
Installed the cross compiler tool chain.
and then..
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make defconfig
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j4 Image
Generated the dtb
ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- make -j4 dtbs
Generated the kernel modules
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- make -j4 modules
ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- INSTALL_MOD_PATH=ker_mod_temp_dir make modules modules_install
Partitioned the SD card like below
I kept the MLO, Uboot and firmware files in the boot partition.
I downloaded the ArchLinux rootfs from here
I copied the downloaded rootfs to the ROOTFS partition of my SD card.
sudo cp -rT <path-to-downloaded-rootfs> /media/user/ROOTFS
I copied the linux image and dts folder from /arch/arm64/boot to boot folder in the rootfs.
I copied the kernel modules to roots
sudo cp -rT ker_mod_temp_dir /media/user/ROOTFS/lib
I tried to boot the board with the SD card.
Uboot successfully boots up. I gave the below commands in Uboot to load the kernel.
setenv kernel_addr_r 0x42000000
setenv dtb_addr_r 0x48000000
ext4load mmc 0:2 $kernel_addr_r /boot/Image
ext4load mmc 0:2 $dtb_addr_r /boot/dts/allwinner/sun50i-a64-pine64-plus.dtb
setenv bootargs console=ttyS0,115200 earlyprintk ignore_loglevel root=/dev/mmcblk0p2 rootfstype=ext4 rw
booti $kernel_addr_r - $dtb_addr_r
Linux kernel boots but it ends with error - [ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
Boot log
sunxi#booti $kernel_addr_r - $dtb_addr_r
## Flattened Device Tree blob at 48000000
Booting using the fdt blob at 0x48000000
Loading Device Tree to 44ff7000, end 44fffba9 ... OK
Starting kernel ...
[mmc]: MMC Device 2 not found
[mmc]: mmc 2 not find, so not exit
INFO: BL3-1: Next image address = 0x41080000
INFO: BL3-1: Next image spsr = 0x3c9
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[ 0.000000] Linux version 5.4.0-rc3 (janani#janani-Vostro-2520) (gcc version 7.4.0 (Ubuntu/Linaro 7.4.0-1ubuntu1~18.04.1)) #2 SMP PREEMPT Fri Nov 1 13:01:35 IST 2019
[ 0.000000] Machine model: Pine64+
[ 0.000000] printk: debug: ignoring loglevel setting.
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000041000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7dde6800-0x7dde7fff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000041000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000041000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000041000000-0x000000007fffffff]
[ 0.000000] On node 0 totalpages: 258048
[ 0.000000] DMA32 zone: 4032 pages used for memmap
[ 0.000000] DMA32 zone: 0 pages reserved
[ 0.000000] DMA32 zone: 258048 pages, LIFO batch:63
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv0.2 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] percpu: Embedded 22 pages/cpu s52952 r8192 d28968 u90112
[ 0.000000] pcpu-alloc: s52952 r8192 d28968 u90112 alloc=22*4096
[ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
[ 0.000000] Detected VIPT I-cache on CPU0
[ 0.000000] CPU features: detected: ARM erratum 845719
[ 0.000000] CPU features: detected: ARM erratum 843419
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 254016
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: console=ttyS0,115200 earlyprintk ignore_loglevel root=/dev/mmcblk0p2 rootfstype=ext4 rw
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 952956K/1032192K available (12156K kernel code, 1860K rwdata, 6420K rodata, 5056K init, 452K bss, 46468K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=256 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GIC: Using split EOI/Deactivate mode
[ 0.000000] random: get_random_bytes called from start_kernel+0x2b8/0x458 with crng_init=0
[ 0.000000] arch_timer: Enabling global workaround for Allwinner erratum UNKNOWN1
[ 0.000000] arch_timer: CPU0: Trapping CNTVCT access
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (phys).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000004] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000656] Console: colour dummy device 80x25
[ 0.000738] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=96000)
[ 0.000748] pid_max: default: 32768 minimum: 301
[ 0.000829] LSM: Security Framework initializing
[ 0.000889] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.000903] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[ 0.024021] ASID allocator initialised with 32768 entries
[ 0.032014] rcu: Hierarchical SRCU implementation.
[ 0.041639] EFI services will not be available.
[ 0.048045] smp: Bringing up secondary CPUs ...
[ 5.092138] CPU1: failed to come online
[ 5.092145] CPU1: failed in unknown state : 0x0
[ 10.216301] CPU2: failed to come online
[ 10.216308] CPU2: failed in unknown state : 0x0
[ 15.340451] CPU3: failed to come online
[ 15.340457] CPU3: failed in unknown state : 0x0
[ 15.340505] smp: Brought up 1 node, 1 CPU
[ 15.340510] SMP: Total of 1 processors activated.
[ 15.340521] CPU features: detected: 32-bit EL0 Support
[ 15.340531] CPU features: detected: CRC32 instructions
[ 15.346286] CPU: All CPU(s) started at EL2
[ 15.346311] alternatives: patching kernel code
[ 15.347526] devtmpfs: initialized
[ 15.353004] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 15.353025] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[ 15.354219] pinctrl core: initialized pinctrl subsystem
[ 15.355443] DMI not present or invalid.
[ 15.355817] NET: Registered protocol family 16
[ 15.357162] DMA: preallocated 256 KiB pool for atomic allocations
[ 15.357176] audit: initializing netlink subsys (disabled)
[ 15.358361] cpuidle: using governor menu
[ 15.358626] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 15.359812] Serial: AMBA PL011 UART driver
[ 15.364601] audit: type=2000 audit(15.344:1): state=initialized audit_enabled=0 res=1
[ 15.380908] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[ 15.380920] HugeTLB registered 32.0 MiB page size, pre-allocated 0 pages
[ 15.380926] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[ 15.380933] HugeTLB registered 64.0 KiB page size, pre-allocated 0 pages
[ 15.388682] cryptd: max_cpu_qlen set to 1000
[ 15.401330] ACPI: Interpreter disabled.
[ 15.404770] iommu: Default domain type: Translated
[ 15.404955] vgaarb: loaded
[ 15.405266] SCSI subsystem initialized
[ 15.408762] libata version 3.00 loaded.
[ 15.409025] usbcore: registered new interface driver usbfs
[ 15.409065] usbcore: registered new interface driver hub
[ 15.409108] usbcore: registered new device driver usb
[ 15.409680] pps_core: LinuxPPS API ver. 1 registered
[ 15.409686] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti#linux.it>
[ 15.409701] PTP clock support registered
[ 15.409802] EDAC MC: Ver: 3.0.0
[ 15.416828] FPGA manager framework
[ 15.416910] Advanced Linux Sound Architecture Driver Initialized.
[ 15.417650] clocksource: Switched to clocksource arch_sys_counter
[ 15.417813] VFS: Disk quotas dquot_6.6.0
[ 15.417869] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[ 15.418051] pnp: PnP ACPI: disabled
[ 15.423643] thermal_sys: Registered thermal governor 'step_wise'
[ 15.423647] thermal_sys: Registered thermal governor 'power_allocator'
[ 15.423942] NET: Registered protocol family 2
[ 15.424316] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[ 15.424342] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[ 15.424417] TCP bind hash table entries: 8192 (order: 5, 131072 bytes, linear)
[ 15.424565] TCP: Hash tables configured (established 8192 bind 8192)
[ 15.424669] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 15.424699] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[ 15.424834] NET: Registered protocol family 1
[ 15.437311] RPC: Registered named UNIX socket transport module.
[ 15.437317] RPC: Registered udp transport module.
[ 15.437322] RPC: Registered tcp transport module.
[ 15.437326] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 15.437338] PCI: CLS 0 bytes, default 64
[ 15.438134] hw perfevents: enabled with armv8_cortex_a53 PMU driver, 7 counters available
[ 15.438351] kvm [1]: IPA Size Limit: 40bits
[ 15.439050] kvm [1]: vgic interrupt IRQ1
[ 15.439134] kvm [1]: Hyp mode initialized successfully
[ 15.445931] Initialise system trusted keyrings
[ 15.446070] workingset: timestamp_bits=44 max_order=18 bucket_order=0
[ 15.453479] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[ 15.458294] NFS: Registering the id_resolver key type
[ 15.458319] Key type id_resolver registered
[ 15.458323] Key type id_legacy registered
[ 15.458335] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 15.458518] 9p: Installing v9fs 9p2000 file system support
[ 15.474148] Key type asymmetric registered
[ 15.474156] Asymmetric key parser 'x509' registered
[ 15.474191] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 245)
[ 15.474198] io scheduler mq-deadline registered
[ 15.474204] io scheduler kyber registered
[ 15.475689] sun50i-de2-bus 1000000.bus: Error couldn't map SRAM to device
[ 15.476383] sun4i-usb-phy 1c19400.phy: failed to get clock usb0_phy
[ 15.482035] sun50i-a64-r-pinctrl 1f02c00.pinctrl: initialized sunXi PIO driver
[ 15.489405] EINJ: ACPI disabled.
[ 15.502212] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[ 15.504391] SuperH (H)SCI(F) driver initialized
[ 15.504889] msm_serial: driver initialized
[ 15.513007] loop: module loaded
[ 15.517237] libphy: Fixed MDIO Bus: probed
[ 15.517519] tun: Universal TUN/TAP device driver, 1.6
[ 15.518323] thunder_xcv, ver 1.0
[ 15.518361] thunder_bgx, ver 1.0
[ 15.518396] nicpf, ver 1.0
[ 15.518923] hclge is initializing
[ 15.518930] hns3: Hisilicon Ethernet Network Driver for Hip08 Family - version
[ 15.518935] hns3: Copyright (c) 2017 Huawei Corporation.
[ 15.518990] e1000e: Intel(R) PRO/1000 Network Driver - 3.2.6-k
[ 15.518994] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[ 15.519031] igb: Intel(R) Gigabit Ethernet Network Driver - version 5.6.0-k
[ 15.519036] igb: Copyright (c) 2007-2014 Intel Corporation.
[ 15.519073] igbvf: Intel(R) Gigabit Virtual Function Network Driver - version 2.4.0-k
[ 15.519079] igbvf: Copyright (c) 2009 - 2012 Intel Corporation.
[ 15.519367] sky2: driver version 1.30
[ 15.519963] VFIO - User Level meta-driver version: 0.3
[ 15.525385] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 15.525393] ehci-pci: EHCI PCI platform driver
[ 15.525431] ehci-platform: EHCI generic platform driver
[ 15.525709] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 15.525733] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 15.525833] ehci-platform 1c1a000.usb: irq 17, io mem 0x01c1a000
[ 15.541660] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 15.542245] hub 1-0:1.0: USB hub found
[ 15.542273] hub 1-0:1.0: 1 port detected
[ 15.542788] ehci-orion: EHCI orion driver
[ 15.542933] ehci-exynos: EHCI EXYNOS driver
[ 15.543017] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 15.543039] ohci-pci: OHCI PCI platform driver
[ 15.543101] ohci-platform: OHCI generic platform driver
[ 15.543243] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 15.543262] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 15.543356] ohci-platform 1c1a400.usb: irq 18, io mem 0x01c1a400
[ 15.606146] hub 2-0:1.0: USB hub found
[ 15.606173] hub 2-0:1.0: 1 port detected
[ 15.606637] ohci-exynos: OHCI EXYNOS driver
[ 15.607181] usbcore: registered new interface driver usb-storage
[ 15.610102] sun6i-rtc 1f00000.rtc: registered as rtc0
[ 15.610111] sun6i-rtc 1f00000.rtc: RTC enabled
[ 15.610335] i2c /dev entries driver
[ 15.614705] sdhci: Secure Digital Host Controller Interface driver
[ 15.614711] sdhci: Copyright(c) Pierre Ossman
[ 15.615069] Synopsys Designware Multimedia Card Interface Driver
[ 15.615953] sdhci-pltfm: SDHCI platform and OF driver helper
[ 15.617242] ledtrig-cpu: registered to indicate activity on CPUs
[ 15.618422] usbcore: registered new interface driver usbhid
[ 15.618428] usbhid: USB HID core driver
[ 15.624090] NET: Registered protocol family 17
[ 15.624260] 9pnet: Installing 9P2000 support
[ 15.624313] Key type dns_resolver registered
[ 15.624694] registered taskstats version 1
[ 15.624700] Loading compiled-in X.509 certificates
[ 15.637906] sun50i-a64-r-pinctrl 1f02c00.pinctrl: 1f02c00.pinctrl supply vcc-pl not found, using dummy regulator
[ 15.638123] sunxi-rsb 1f03400.rsb: RSB running at 3030303 Hz
[ 15.638499] axp20x-rsb sunxi-rsb-3a3: AXP20x variant AXP803 found
[ 15.650253] dcdc1: supplied by regulator-dummy
[ 15.650589] dcdc2: supplied by regulator-dummy
[ 15.650808] dcdc4: supplied by regulator-dummy
[ 15.651048] dcdc5: supplied by regulator-dummy
[ 15.651111] vcc-dram: Bringing 1500000uV into 1360000-1360000uV
[ 15.651308] dcdc6: supplied by regulator-dummy
[ 15.651509] dc1sw: supplied by regulator-dummy
[ 15.651697] aldo1: supplied by regulator-dummy
[ 15.651903] aldo2: supplied by regulator-dummy
[ 15.652139] aldo3: supplied by regulator-dummy
[ 15.652380] dldo1: supplied by regulator-dummy
[ 15.652598] dldo2: supplied by regulator-dummy
[ 15.652814] dldo3: supplied by regulator-dummy
[ 15.653048] dldo4: supplied by regulator-dummy
[ 15.653277] eldo1: supplied by regulator-dummy
[ 15.653506] eldo2: supplied by regulator-dummy
[ 15.653768] eldo3: supplied by regulator-dummy
[ 15.653995] fldo1: supplied by regulator-dummy
[ 15.654231] fldo2: supplied by regulator-dummy
[ 15.654484] rtc-ldo: supplied by regulator-dummy
[ 15.654666] ldo-io0: supplied by regulator-dummy
[ 15.654876] ldo-io1: supplied by regulator-dummy
[ 15.655073] axp20x-rsb sunxi-rsb-3a3: AXP20X driver loaded
[ 15.659737] sun50i-a64-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 15.660680] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pb not found, using dummy regulator
[ 15.661132] printk: console [ttyS0] disabled
[ 15.681709] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 26, base_baud = 1500000) is a U6_16550A
[ 16.928325] printk: console [ttyS0] enabled
[ 16.934096] ehci-platform 1c1b000.usb: EHCI Host Controller
[ 16.939689] ehci-platform 1c1b000.usb: new USB bus registered, assigned bus number 3
[ 16.947533] ehci-platform 1c1b000.usb: irq 19, io mem 0x01c1b000
[ 16.965665] ehci-platform 1c1b000.usb: USB 2.0 started, EHCI 1.00
[ 16.972292] hub 3-0:1.0: USB hub found
[ 16.976092] hub 3-0:1.0: 1 port detected
[ 16.981558] ohci-platform 1c1b400.usb: Generic Platform OHCI controller
[ 16.988223] ohci-platform 1c1b400.usb: new USB bus registered, assigned bus number 4
[ 16.996091] ohci-platform 1c1b400.usb: irq 20, io mem 0x01c1b400
[ 17.066206] hub 4-0:1.0: USB hub found
[ 17.069997] hub 4-0:1.0: 1 port detected
[ 17.075561] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 17.086998] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 17.092774] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 5
[ 17.101105] hub 5-0:1.0: USB hub found
[ 17.104901] hub 5-0:1.0: 1 port detected
[ 17.111036] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-ph not found, using dummy regulator
[ 17.123109] sun50i-a64-pinctrl 1c20800.pinctrl: 1c20800.pinctrl supply vcc-pf not found, using dummy regulator
[ 17.133728] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[ 17.163428] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB, uses new timings mode
[ 17.172748] sun6i-rtc 1f00000.rtc: setting system clock to 1970-01-01T00:01:49 UTC (109)
[ 17.181341] ALSA device list:
[ 17.184340] No soundcards found.
[ 17.188171] VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
[ 17.195947] Please append a correct "root=" boot option; here are the available partitions:
[ 17.204326] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
[ 17.212579] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc3 #2
[ 17.218748] Hardware name: Pine64+ (DT)
[ 17.222577] Call trace:
[ 17.225026] dump_backtrace+0x0/0x150
[ 17.228685] show_stack+0x14/0x20
[ 17.231997] dump_stack+0xb0/0xf8
[ 17.235308] panic+0x16c/0x37c
[ 17.238360] mount_block_root+0x1b0/0x2a8
[ 17.242362] mount_root+0x144/0x178
[ 17.245845] prepare_namespace+0x138/0x19c
[ 17.249935] kernel_init_freeable+0x22c/0x24c
[ 17.254287] kernel_init+0x10/0x108
[ 17.257772] ret_from_fork+0x10/0x18
[ 17.261348] Kernel Offset: disabled
[ 17.264831] CPU features: 0x0002,24002004
[ 17.268832] Memory Limit: none
[ 17.271888] ---[ end Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0) ]---
The below line
Please append a correct "root=" boot option; here are the available partitions:
doesn't display any partition. What could be the reason?
mmc drivers are selected in the config as below
CONFIG_MMC_BLOCK=y and CONFIG_MMC_SUNXI=y
What am i doing wrong?
Try adding the kernel command line option rootwait to bootargs so that the kernel does not immediately give-up and instead waits forever hoping the root filesystem appears. It might be that kernel did not wait long enough during boot-up for the SD card to appear.
[mmc]: MMC Device 2 not found
[mmc]: mmc 2 not find, so not exit
...
Kernel command line: console=ttyS0,115200 earlyprintk ignore_loglevel root=/dev/mmcblk0p2 rootfstype=ext4 rw
...
VFS: Cannot open root device "mmcblk0p2" or unknown-block(0,0): error -6
It is possible that you need to delay and rootwait may solve it. However, this is the exact situation that initramfs is attempting to solve and is at least a 'debug' path for you. If you create an initramfs image and attach it to the Linux binary you can use a shell to probe Linux's partition layout and/or delay mounting the rootfs until it is ready. You can do other things in the initramfs like add a splash screen, parallel the USB infrastructure like module loading of detected devices with the rootfs mounting. This will make your boot faster as well as giving you a tool to diagnose booting.
It also look like u-boot can not see the /dev/mmcblk0p2 either. The fact that both u-boot and Linux seem to be complaining could indicate that something went wrong with the partition generation. It is definitely useful to compare boot logs versus a know working version as suggested by sawdust. For instance, timing/clocks, supplies or pinmux may not be set for the MMC and this can prevent the device from being recognized. It seems you have the driver, but not the device from the logs. Ie, no mmcblk0 anything. See: DTS mmc entries for some values that you may need to define for your board. The fact that Linux is found would seem to contradict this, but it would be useful to add the MMC device entries that the system is using. I would expect some output in the kernel logs. Another possibility is that something was built as a module and is expected to load to make the MMC accessible.
Getting a minimal initramfs will give you some shell tools to diagnose. You can use klibc or buildroot, etc to make a small initramfs that will let you look around the Linux device nodes, proc and sysfs value to diagnose things. Unfortunately, there are many things that may go wrong here. However, since you have Linux booting adding an initramfs is usually straight forward, even if you don't keep it for the final system.
Related
thank you for reading and appreciated for reply!
I followed this doc and successfully ran xen 4.12.0 on qemu 3.1.0 with Linux 4.20.11 as Dom0.
Then I tried to use higher version of qemu(qemu 5.1.0 && 6.0.0) to do the same thing, but the process got stuck in the step of running xen with linux.
Here is how I download and build the Qemu 6.0.0:
wget -nd https://download.qemu.org/qemu-6.0.0.tar.xz
tar xvf qemu-6.0.0.tar.xz
cd qemu-6.0.0
mkdir build
cd build
../configure --target-list=aarch64-softmmu
make -j8
./aarch64-softmmu/qemu-system-aarch64 --version
# QEMU emulator version 6.0.0
# Copyright (c) 2003-2021 Fabrice Bellard and the QEMU Project developers
Then I used this newly built qemu to run with XEN, but got Linux kernel panic error on booting. Here is the log output:
$ uname -a
Linux Cooper-VirtualBox 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU_Linux
$ ls
Image Image.gz rootfs.cpio.gz u-boot.bin virt-gicv3.dtb xen
$ qemu-system-aarch64-600 \
-machine virt,gic-version=3 -machine virtualization=true \
-cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -bios u-boot.bin \
-device loader,file=xen,force-raw=on,addr=0x49000000 \
-device loader,file=Image.gz,addr=0x47000000 \
-device loader,file=virt-gicv3.dtb,addr=0x44000000 \
-nographic -no-reboot -chardev socket,id=qemu-monitor,host=localhost,port=7777,server,nowait,telnet -mon qemu-monitor,mode=readline
U-Boot 2019.01 (Jul 14 2021 - 11:02:43 +0800)
DRAM: 4 GiB
Flash: 128 MiB
*** Warning - bad CRC, using default environment
In: pl011#9000000
Out: pl011#9000000
Err: pl011#9000000
Net: No ethernet found.
Hit any key to stop autoboot: 0
scanning bus for devices...
Device 0: unknown device
Device 0: unknown device
starting USB...
No controllers found
No ethernet found.
No ethernet found.
=> fdt addr 0x44000000
=> fdt set /chosen \#address-cells <1>
=> fdt set /chosen \#size-cells <1>
=> fdt mknod /chosen module#0
=> fdt set /chosen/module#0 compatible "xen,linux-zimage" "xen,multiboot-module"
=> fdt set /chosen/module#0 reg <0x47000000
Unexpected character '
'
=> fdt set /chosen/module#0 reg <0x47000000 0x7ccfb8>
=> fdt set /chosen/module#0 bootargs "earlyprintk=serial,ttyAMA0
> console=ttyAMA0,115200n8 earlycon=xenboot"
=> fdt resize
=> booti 0x49000000 - 0x44000000
## Flattened Device Tree blob at 44000000
Booting using the fdt blob at 0x44000000
reserving fdt memory region: addr=44000000 size=2000
Loading Device Tree to 00000000ffffa000, end 00000000ffffefff ... OK
Starting kernel ...
Xen 4.12.0
(XEN) Xen version 4.12.0 (Cooper#) (aarch64-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0) debug=n Wed Jul 14 11:05:52 CST 2021
(XEN) Latest ChangeSet:
(XEN) Processor: 411fd070: "ARM Limited", variant: 0x1, part 0xd07, rev 0x0
(XEN) 64-bit Execution:
(XEN) Processor Features: 0000000001000222 0000000000000000
(XEN) Exception Levels: EL3:No EL2:64+32 EL1:64+32 EL0:64+32
(XEN) Extensions: FloatingPoint AdvancedSIMD GICv3-SysReg
(XEN) Debug Features: 0000000010305106 0000000000000000
(XEN) Auxiliary Features: 0000000000000000 0000000000000000
(XEN) Memory Model Features: 0000000000001124 0000000000000000
(XEN) ISA Features: 0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN) Processor Features: 00000131:10011001
(XEN) Instruction Sets: AArch32 A32 Thumb Thumb-2 Jazelle
(XEN) Extensions: GenericTimer
(XEN) Debug Features: 03010066
(XEN) Auxiliary Features: 00000000
(XEN) Memory Model Features: 10101105 40000000 01260000 02102211
(XEN) ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 62500 KHz
(XEN) GICv3 initialization:
(XEN) gic_dist_addr=0x00000008000000
(XEN) gic_maintenance_irq=25
(XEN) gic_rdist_stride=0
(XEN) gic_rdist_regions=1
(XEN) redistributor regions:
(XEN) - region 0: 0x000000080a0000 - 0x00000009000000
(XEN) GICv3: 256 lines, (IID 0000043b).
(XEN) GICv3: CPU0: Found redistributor in region 0 #000000004001c000
(XEN) Using scheduler: SMP Credit Scheduler rev2 (credit2)
(XEN) Initializing Credit2 scheduler
(XEN) Allocated console ring of 16 KiB.
(XEN) Bringing up CPU1
(XEN) GICv3: CPU1: Found redistributor in region 0 #000000004003c000
(XEN) Bringing up CPU2
(XEN) GICv3: CPU2: Found redistributor in region 0 #000000004005c000
(XEN) Bringing up CPU3
(XEN) GICv3: CPU3: Found redistributor in region 0 #000000004007c000
(XEN) Adding cpu 3 to runqueue 0
(XEN) CPU 3 booted.
(XEN) Brought up 4 CPUs
(XEN) P2M: 44-bit IPA with 44-bit PA and 8-bit VMID
(XEN) P2M: 4 levels with order-0 root, VTCR 0x80043594
(XEN) I/O virtualisation disabled
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading Domd0 kernel from boot module # 0000000047000000
(XEN) Allocating 1:1 mappings totalling 512MB for dom0:
(XEN) BANK[0] 0x00000060000000-0x00000080000000 (512MB)
(XEN) Grant table range: 0x00000049000000-0x00000049040000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000138000000 to 0000000060080000-00000000612c1200
(XEN) Loading dom0 DTB to 0x0000000068000000-0x0000000068001d0c
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Scrubbing Free RAM in background
(XEN) Std. Loglevel: Errors and warnings
(XEN) Guest Loglevel: Nothing (Rate-limited: Errors and warnings)
(XEN) ***************************************************
(XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1.
(XEN) Please update your firmware.
(XEN) ***************************************************
(XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1.
(XEN) Please update your firmware.
(XEN) ***************************************************
(XEN) No support for ARM_SMCCC_ARCH_WORKAROUND_1.
(XEN) Please update your firmware.
(XEN) ***************************************************
(XEN) PLEASE SPECIFY dom0_mem PARAMETER - USING 512M FOR NOW
(XEN) ***************************************************
(XEN) 3... 2... 1...
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) Freed 312kB init memory.
[ 0.000000] Booting Linux on physical CPU 0x0000000000 [0x411fd070]
[ 0.000000] Linux version 4.20.11 (Cooper#Cooper-VirtualBox) (gcc version 9.3.0 (Ubuntu 9.3.0-17ubuntu1~20.04)) #1 SMP PREEMPT Wed Jul 14 10:53:34 CST 2021
[ 0.000000] Machine model: linux,dummy-virt
[ 0.000000] earlycon: xenboot0 at I/O port 0x0 (options '')
[ 0.000000] printk: bootconsole [xenboot0] enabled
[ 0.000000] Xen 4.12 support found
[ 0.000000] efi: Getting EFI parameters from FDT:
[ 0.000000] efi: UEFI not found.
[ 0.000000] cma: Reserved 32 MiB at 0x000000007e000000
[ 0.000000] NUMA: No NUMA configuration found
[ 0.000000] NUMA: Faking a node at [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] NUMA: NODE_DATA [mem 0x7dfea840-0x7dfebfff]
[ 0.000000] Zone ranges:
[ 0.000000] DMA32 [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000060000000-0x000000007fffffff]
[ 0.000000] psci: probing for conduit method from DT.
[ 0.000000] psci: PSCIv1.1 detected in firmware.
[ 0.000000] psci: Using standard PSCI v0.2 function IDs
[ 0.000000] psci: Trusted OS migration not required
[ 0.000000] psci: SMC Calling Convention v1.1
[ 0.000000] random: get_random_bytes called from start_kernel+0x94/0x40c with crng_init=0
[ 0.000000] percpu: Embedded 23 pages/cpu #(____ptrval____) s55704 r8192 d30312 u94208
[ 0.000000] Detected PIPT I-cache on CPU0
[ 0.000000] CPU features: enabling workaround for ARM erratum 832075
[ 0.000000] CPU features: enabling workaround for ARM erratum 834220
[ 0.000000] CPU features: enabling workaround for EL2 vector hardening
[ 0.000000] CPU features: enabling workaround for Speculative Store Bypass Disable
[ 0.000000] CPU features: detected: Kernel page table isolation (KPTI)
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 129024
[ 0.000000] Policy zone: DMA32
[ 0.000000] Kernel command line: earlyprintk=serial,ttyAMA0
[ 0.000000] console=ttyAMA0,115200n8 earlycon=xenboot
[ 0.000000] Memory: 455476K/524288K available (10748K kernel code, 1412K rwdata, 5112K rodata, 1344K init, 380K bss, 36044K reserved, 32768K cma-reserved)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[ 0.000000] rcu: Preemptible hierarchical RCU implementation.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=64 to nr_cpu_ids=4.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 25 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[ 0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[ 0.000000] GICv3: Distributor has no Range Selector support
[ 0.000000] GICv3: no VLPI support, no direct LPI support
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER4
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER8
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER12
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER16
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER20
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER24
(XEN) d0v0: vGICD: unhandled word write 0xffffffff to ICACTIVER28
[ 0.000000] GICv3: CPU0: found redistributor 0 region 0:0x00000000080a0000
(XEN) d0v0: vGICR: SGI: unhandled word write 0xffffffff to ICACTIVER0
[ 0.000000] arch_timer: cp15 timer(s) running at 62.50MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x1cd42e208c, max_idle_ns: 881590405314 ns
[ 0.000108] sched_clock: 56 bits at 62MHz, resolution 16ns, wraps every 4398046511096ns
[ 0.017243] Console: colour dummy device 80x25
[ 0.020478] Calibrating delay loop (skipped), value calculated using timer frequency.. 125.00 BogoMIPS (lpj=250000)
[ 0.021062] pid_max: default: 32768 minimum: 301
[ 0.031104] LSM: Security Framework initializing
[ 0.032772] Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
[ 0.033612] Inode-cache hash table entries: 32768 (order: 6, 262144 bytes)
[ 0.034046] Mount-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.034320] Mountpoint-cache hash table entries: 1024 (order: 1, 8192 bytes)
[ 0.121936] ASID allocator initialised with 32768 entries
[ 0.130646] xen:grant_table: Grant tables using version 1 layout
[ 0.131832] Grant table initialized
[ 0.145062] xen:events: Using FIFO-based ABI
[ 0.147228] Xen: initializing cpu0
[ 0.174809] rcu: Hierarchical SRCU implementation.
[ 0.194598] EFI services will not be available.
[ 0.215474] smp: Bringing up secondary CPUs ...
(XEN) d0v1: vGICR: SGI: unhandled word write 0xffffffff to ICACTIVER0
(XEN) d0v2: vGICR: SGI: unhandled word write 0xffffffff to ICACTIVER0
[ 0.273655] Detected PIPT I-cache on CPU1
[ 0.274338] GICv3: CPU1: found redistributor 1 region 0:0x00000000080c0000
[ 0.275368] Xen: initializing cpu1
[ 0.275561] CPU1: Booted secondary processor 0x0000000001 [0x411fd070]
[ 0.339645] Detected PIPT I-cache on CPU2
[ 0.339831] GICv3: CPU2: found redistributor 2 region 0:0x00000000080e0000
[ 0.340694] Xen: initializing cpu2
[ 0.340845] CPU2: Booted secondary processor 0x0000000002 [0x411fd070]
[ 0.400734] Detected PIPT I-cache on CPU3
[ 0.400925] GICv3: CPU3: found redistributor 3 region 0:0x0000000008100000
[ 0.401355] Xen: initializing cpu3
[ 0.401498] CPU3: Booted secondary processor 0x0000000003 [0x411fd070]
[ 0.574444] smp: Brought up 1 node, 4 CPUs
[ 0.703442] SMP: Total of 4 processors activated.
[ 0.703908] CPU features: detected: GIC system register CPU interface
[ 0.704393] CPU features: detected: 32-bit EL0 Support
[ 0.704796] CPU features: detected: CRC32 instructions
[ 1.039745] CPU: All CPU(s) started at EL1
[ 1.046203] alternatives: patching kernel code
[ 1.380096] devtmpfs: initialized
[ 1.662983] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 7645041785100000 ns
[ 1.667044] futex hash table entries: 1024 (order: 4, 65536 bytes)
[ 1.709743] pinctrl core: initialized pinctrl subsystem
[ 1.904352] DMI not present or invalid.
[ 1.934684] NET: Registered protocol family 16
[ 2.083444] audit: initializing netlink subsys (disabled)
[ 2.327780] audit: type=2000 audit(0.476:1): state=initialized audit_enabled=0 res=1
[ 2.434832] vdso: 2 pages (1 code # (____ptrval____), 1 data # (____ptrval____))
[ 2.437256] hw-breakpoint: found 6 breakpoint and 4 watchpoint registers.
[ 2.625009] DMA: preallocated 256 KiB pool for atomic allocations
[ 2.628185] xen:swiotlb_xen: Warning: only able to allocate 4 MB for software IO TLB
[ 2.643167] software IO TLB: mapped [mem 0x7bc00000-0x7c000000] (4MB)
[ 2.666593] Serial: AMBA PL011 UART driver
[ 2.781142] Internal error: synchronous external abort: 96000010 [#1] PREEMPT SMP
[ 2.784420] Modules linked in:
[ 2.785879] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.20.11 #1
[ 2.787890] Hardware name: linux,dummy-virt (DT)
[ 2.789880] pstate: 40000005 (nZcv daif -PAN -UAO)
[ 2.796098] pc : amba_device_try_add+0x150/0x2a8
[ 2.797158] lr : amba_device_try_add+0x13c/0x2a8
[ 2.798292] sp : ffff00000807bc30
[ 2.799045] x29: ffff00000807bc30 x28: 0000000000000000
[ 2.800351] x27: 0000000000000001 x26: ffff000009272740
[ 2.801523] x25: ffff80003dff3238 x24: ffff00000800d000
[ 2.802827] x23: 0000000000000000 x22: 0000000000001000
[ 2.818140] x21: ffff80003c1256f0 x20: 0000000000000000
[ 2.821090] x19: ffff80003c125400 x18: ffff0000091696c8
[ 2.822412] x17: 0000000000000000 x16: 0000000000000000
[ 2.823657] x15: 0000000000000001 x14: ffffffffffffffff
[ 2.824826] x13: 0000000000000000 x12: 0101010101010101
[ 2.826219] x11: 0000000000000020 x10: 0101010101010101
[ 2.828012] x9 : 0000000000000000 x8 : ffff80003c108c80
[ 2.829810] x7 : 0000000000000000 x6 : 0000000000000004
[ 2.849524] x5 : 0000000000000001 x4 : ffff80003c920000
[ 2.850898] x3 : 0000000000000000 x2 : ffff00000800dfe0
[ 2.854982] x1 : ffff80003c920000 x0 : 0000000000000000
[ 2.856240] Process swapper/0 (pid: 1, stack limit = 0x(____ptrval____))
[ 2.857992] Call trace:
[ 2.858729] amba_device_try_add+0x150/0x2a8
[ 2.859697] amba_device_add+0x18/0xd0
[ 2.860546] of_platform_bus_create+0x2e8/0x370
[ 2.861588] of_platform_populate+0x50/0xc8
[ 2.862639] of_platform_default_populate_init+0xac/0xc8
[ 2.864555] do_one_initcall+0x54/0x158
[ 2.865771] kernel_init_freeable+0x188/0x224
[ 2.881225] kernel_init+0x10/0x100
[ 2.882137] ret_from_fork+0x10/0x18
[ 2.883266] Code: 35000940 d10082c2 52800000 8b020302 (88dffc41)
[ 2.885516] ---[ end trace fccca99c319bfe50 ]---
[ 2.889573] Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b
[ 2.895687] SMP: stopping secondary CPUs
[ 2.944175] ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x0000000b ]---
It seems that something happens in the procedure of loading AMBA. The kernel booted smoothly when I simply run Qemu 6.0.0 and busybox:
qemu-system-aarch64 -machine virt,gic-version=3 -machine virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -kernel Image.gz -nographic -no-reboot -initrd rootfs.cpio.gz -append "rw root=/dev/ram rdinit=/sbin/init earlyprintk=serial,ttyAMA0 console=ttyAMA0"
So I think the kernel and rootfs is OK. And with U-boot, it could also boot until loading VFS (AMBA loaded). Then I tried to regenerate the device tree blob file:
qemu-system-aarch64-600 -machine virt,gic-version=3 -machine virtualization=true -cpu cortex-a57 -machine type=virt -m 4096 -smp 4 -display none -machine dumpdtb=virt-gicv3.dtb
# qemu-system-aarch64: info: dtb dumped to virt-gicv3.dtb. Exiting.
But the same problem happens. Could someone help me with this problem?
You have to disable ARM PL061.
PL061 is an Advanced Microcontroller Bus Architecture (AMBA) compliant controller.
# XXX disable pl061 to avoid Linux crash
dtc -I dtb -O dts virt-gicv3.dtb > virt-gicv3.dts
sed 's/compatible = "arm,pl061.*/status = "disabled";/g' virt-gicv3.dts > virt-gicv3-edited.dts
dtc -I dts -O dtb virt-gicv3-edited.dts > virt-gicv3.dtb
At least that's what Xen tests do.
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
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).
I have a RT5350F router device (Hardware is almost the same as Nexx WT1520). It used to run Zyxel Keenetic 4G II firmware, and now I decided to reflash OpenWRT to it.
I tried a lot of versions, and all of them don't boot any further than this:
U-Boot 1.1.3 (Apr 11 2013 - 00:10:51)
Board: Ralink APSoC DRAM: 16 MB
relocate_code Pointer at: 80fb4000
spi_wait_nsec: 42
spi device id: c2 20 16 c2 20 (2016c220)
find flash: MX25L3205D
raspi_read: from:30000 len:1000
.*** Warning - bad CRC, using default environment
============================================
Ralink UBoot Version: 3.6.0.0
--------------------------------------------
ASIC 5350_MP (Port5<->None)
DRAM_CONF_FROM: Boot-Strapping
DRAM_TYPE: SDRAM
DRAM_SIZE: 128 Mbits
DRAM_WIDTH: 16 bits
DRAM_TOTAL_WIDTH: 16 bits
TOTAL_MEMORY_SIZE: 16 MBytes
Flash component: SPI Flash
Date:Apr 11 2013 Time:00:10:51
============================================
icache: sets:256, ways:4, linesz:32 ,total:32768
dcache: sets:128, ways:4, linesz:32 ,total:16384
##### The CPU freq = 360 MHZ ####
estimate memory size =16 Mbytes
Please choose the operation:
1: Load system code to SDRAM via TFTP.
2: Load system code then write to Flash via TFTP.
3: Boot system code via Flash (default).
4: Entr boot command line interface.
7: Load Boot Loader code then write to Flash via Serial.
9: Load Boot Loader code then write to Flash via TFTP. 0
3: System Boot system code via Flash.
## Booting image at bc050000 ...
raspi_read: from:50000 len:40
. Image Name: MIPS OpenWrt Linux-3.18.45
Created: 2017-03-05 12:30:01 UTC
Image Type: MIPS Linux Kernel Image (lzma compressed)
Data Size: 1087633 Bytes = 1 MB
Load Address: 80000000
Entry Point: 80000000
raspi_read: from:50040 len:109891
................. Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
No initrd
## Transferring control to Linux (at address 80000000) ...
## Giving linux memsize in MB, 16
Starting kernel ...
[ 0.000000] Linux version 3.18.45 (wayfarer#VirtualBox) (gcc version 4.8.3 (O penWrt/Linaro GCC 4.8-2014.04 r49389) ) #3 Sun Mar 5 14:29:13 EET 2017
[ 0.000000] SoC Type: Ralink RT5350 id:1 rev:3
[ 0.000000] bootconsole [early0] enabled
[ 0.000000] CPU0 revision is: 0001964c (MIPS 24KEc)
[ 0.000000] MIPS: machine is Nexx WT1520
[ 0.000000] Determined physical RAM map:
[ 0.000000] memory: 02000000 # 00000000 (usable)
[ 0.000000] Initrd not found or empty - disabling initrd
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x00000000-0x01ffffff]
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x00000000-0x01ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x00000000-0x01ffffff]
I reflashed U-boot as well, which didn't really help.
Some other OpenWRT firmwares boot, but crash right away, saying "Not enough RAM".
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