0

I am developing a system for BeagleBone Black. I am using Yocto Project to generate U-Boot, kernel and RFS.

In order to reduce boot time of this system, I am trying to set up U-Boot Falcon Mode. I am using this link as an instruction manual:

https://embexus.com/2017/05/07/fast-boot-linux-with-u-boot-falcon-mode/

In order to achieve this, first I downloaded the U-Boot version specified by this manual and did the required configuration changes. Afterwards, I used Yocto's toolchain (generated earlier by populate_sdk) to compile U-Boot, which went without problems.

Afterwards, I rebuilt the whole system (both kernel and RFS) with Yocto so it builds uImage instead of zImage, because Falcon Mode only supports uImage.

I am copying required files to BeagleBone Black using SD card. First 16 MiB of the card are unformatted and the rest is formatted as ext4 with label ROOT (/dev/mmcblk0p1). Using DD I copied the am335x-boneblack.dtb, MLO, u-boot.img and uImage to their respective areas in the first 16 MiB on SD card, then I mounted the ROOT partition at /mnt and extracted the RFS archive there.

After plugging in and turning the BeagleBone Black on, it boots from the SD card and I enter U-Boot to set up Falcon Mode. I use the following sequence of commands:

=> setenv bootcmd "setenv bootargs console=ttyO0,115200n8 consoleblank=0 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait init=/usr/bin/run-qtdemo.sh lpj=4980736; mmc read 83000000 80 180; mmc read 82000000 900 3000; bootm 82000000 - 83000000"

=> saveenv

=> mmc read 82000000 900 3000

=> mmc read 83000000 80 180

=> spl export fdt 82000000 - 83000000

=> mmc write 83000000 80 180

=> setenv boot_os 1

=> saveenv

=> reset

After the system restarts, SPL skips U-Boot and starts running the kernel, but kernel can't mount RFS which results in kernel panic. Here is the log file grabbed with Grabserial:

[0.000001 0.000001] 

[0.000397 0.000396] U-Boot SPL 2017.05-rc3-dirty (Apr 07 2019 - 18:01:50)

[0.096303 0.096303] Trying to boot from MMC1

[1.628782 1.532479] [    0.000000] Booting Linux on physical CPU 0x0

[1.633051 0.004269] [    0.000000] Linux version 4.10.17-yocto-standard (oe-user@oe-host) (gcc version 6.4.0 (GCC) ) #8 PREEMPT Thu Apr 11 14:47:37 CEST 2019

[1.645767 0.012716] [    0.000000] CPU: ARMv7 Processor [413fc082] revision 2 (ARMv7), cr=10c5387d

[1.653299 0.007532] [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache

[1.661486 0.008187] [    0.000000] OF: fdt:Machine model: TI AM335x BeagleBone Black

[1.667507 0.006021] [    0.000000] cma: Reserved 16 MiB at 0x8e800000

[1.672140 0.004633] [    0.000000] Memory policy: Data cache writeback

[1.676907 0.004767] [    0.000000] CPU: All CPU(s) started in SVC mode.

[1.681718 0.004811] [    0.000000] AM335X ES2.1 (sgx neon)

[1.685356 0.003638] [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 64704

[1.693911 0.008555] [    0.000000] Kernel command line: 

[1.697114 0.003203] [    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)

[1.703286 0.006172] [    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)

[1.710582 0.007296] [    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)

[1.717670 0.007088] [    0.000000] Memory: 230608K/261120K available (6144K kernel code, 517K rwdata, 2216K rodata, 1024K init, 607K bss, 14128K reserved, 16384K cma-reserved, 0K highmem)

[1.733082 0.015412] [    0.000000] Virtual kernel memory layout:

[1.737264 0.004182] [    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)

[1.743266 0.006002] [    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)

[1.749241 0.005975] [    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)

[1.755347 0.006106] [    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)

[1.761236 0.005889] [    0.000000]     pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)

[1.767210 0.005974] [    0.000000]     modules : 0xbf000000 - 0xbfe00000   (  14 MB)

[1.773212 0.006002] [    0.000000]       .text : 0xc0008000 - 0xc0700000   (7136 kB)

[1.779217 0.006005] [    0.000000]       .init : 0xc0a00000 - 0xc0b00000   (1024 kB)

[1.785208 0.005991] [    0.000000]       .data : 0xc0b00000 - 0xc0b814e4   ( 518 kB)

[1.791293 0.006085] [    0.000000]        .bss : 0xc0b83000 - 0xc0c1acb0   ( 608 kB)

[1.797201 0.005908] [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1

[1.804013 0.006812] [    0.000000] Preemptible hierarchical RCU implementation.

[1.809575 0.005562] [    0.000000]  Build-time adjustment of leaf fanout to 32.

[1.815127 0.005552] [    0.000000] NR_IRQS:16 nr_irqs:16 16

[1.818937 0.003810] [    0.000000] IRQ: Found an INTC at 0xfa200000 (revision 5.0) with 128 interrupts

[1.826555 0.007618] [    0.000000] OMAP clockevent source: timer2 at 24000000 Hz

[1.832174 0.005619] [    0.000012] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 89478484971ns

[1.840346 0.008172] [    0.000030] clocksource: timer1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns

[1.849981 0.009635] [    0.000042] OMAP clocksource: timer1 at 24000000 Hz

[1.855065 0.005084] [    0.000475] clocksource_probe: no matching clocksources found

[1.861101 0.006036] [    0.000689] Console: colour dummy device 80x30

[1.865725 0.004624] [    0.001911] console [tty0] enabled

[1.869290 0.003565] [    0.001958] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)

[1.875808 0.006518] [    0.089006] pid_max: default: 32768 minimum: 301

[1.880669 0.004861] [    0.089171] Security Framework initialized

[1.884996 0.004327] [    0.089393] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)

[1.891937 0.006941] [    0.089447] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)

[1.899212 0.007275] [    0.090451] CPU: Testing write buffer coherency: ok

[1.904399 0.005187] [    0.090568] ftrace: allocating 22859 entries in 68 pages

[1.909914 0.005515] [    0.156899] Setting up static identity map for 0x80100000 - 0x80100058

[1.916699 0.006785] [    0.158796] devtmpfs: initialized

[1.920157 0.003458] [    0.168460] VFP support v0.3: implementor 41 architecture 3 part 30 variant c rev 3

[1.928166 0.008009] [    0.168880] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns

[1.939199 0.011033] [    0.169033] futex hash table entries: 256 (order: -1, 3072 bytes)

[1.944809 0.005610] [    0.170429] pinctrl core: initialized pinctrl subsystem

[1.950257 0.005448] [    0.171577] NET: Registered protocol family 16

[1.954909 0.004652] [    0.173421] DMA: preallocated 256 KiB pool for atomic coherent allocations

[1.962088 0.007179] [    0.189224] omap_hwmod: debugss: _wait_target_disable failed

[1.968037 0.005949] [    0.268956] cpuidle: using governor ladder

[1.972304 0.004267] [    0.298941] cpuidle: using governor menu

[1.976395 0.004091] [    0.304595] OMAP GPIO hardware version 0.1

[1.980664 0.004269] [    0.319164] hw-breakpoint: debug architecture 0x4 unsupported.

[1.986764 0.006100] [    0.356613] edma 49000000.edma: TI EDMA DMA engine driver

[1.992418 0.005654] [    0.360115] SCSI subsystem initialized

[1.996323 0.003905] [    0.360524] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe

[2.009942 0.013619] [    0.361843] clocksource: Switched to clocksource timer1

[2.015323 0.005381] [    0.418927] NET: Registered protocol family 2

[2.019914 0.004591] [    0.419806] TCP established hash table entries: 2048 (order: 1, 8192 bytes)

[2.027148 0.007234] [    0.419875] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)

[2.033788 0.006640] [    0.419924] TCP: Hash tables configured (established 2048 bind 2048)

[2.040457 0.006669] [    0.420031] UDP hash table entries: 256 (order: 0, 4096 bytes)

[2.046548 0.006091] [    0.420073] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)

[2.053084 0.006536] [    0.420256] NET: Registered protocol family 1

[2.057633 0.004549] [    0.420915] hw perfevents: enabled with armv7_cortex_a8 PMU driver, 5 counters available

[2.066084 0.008451] [    0.423845] workingset: timestamp_bits=14 max_order=16 bucket_order=2

[2.072920 0.006836] [    0.439649] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)

[2.080576 0.007656] [    0.439734] io scheduler noop registered

[2.084665 0.004089] [    0.439761] io scheduler deadline registered

[2.089118 0.004453] [    0.439820] io scheduler cfq registered (default)

[2.094047 0.004929] [    0.440857] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568

[2.101416 0.007369] [    0.443580] omap_uart 44e09000.serial: no wakeirq for uart0

[2.107256 0.005840] [    0.443838] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 158, base_baud = 3000000) is a OMAP UART0

[2.117028 0.009772] [    0.932508] console [ttyO0] enabled

[2.121283 0.004255] [    0.936761] [drm] Initialized

[2.139157 0.017874] [    0.954612] brd: module loaded

[2.143134 0.003977] [    0.958557] mtdoops: mtd device (mtddev=name/number) must be supplied

[2.150543 0.007409] [    0.965981] libphy: Fixed MDIO Bus: probed

[2.155208 0.004665] [    0.970701] mousedev: PS/2 mouse device common for all mice

[2.161919 0.006711] [    0.977377] omap_rtc 44e3e000.rtc: already running

[2.167438 0.005519] [    0.982894] omap_rtc 44e3e000.rtc: rtc core: registered 44e3e000.rtc as rtc0

[2.175388 0.007950] [    0.990840] i2c /dev entries driver

[2.180034 0.004646] [    0.995447] omap_hsmmc 48060000.mmc: Got CD GPIO

[2.283928 0.103894] [    1.099232] mmc0: host does not support reading read-only switch, assuming write-enable

[2.294222 0.010294] [    1.109707] mmc0: new high speed SDHC card at address 59b4

[2.303282 0.009060] [    1.116858] oprofile: using arm/armv7

[2.309948 0.006666] [    1.117008] u32 classifier

[2.313163 0.003215] [    1.117010]     Actions configured

[2.317326 0.004163] [    1.117950] NET: Registered protocol family 10

[2.322162 0.004836] [    1.123153] Segment Routing with IPv6

[2.325826 0.003664] [    1.123227] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver

[2.337296 0.011470] [    1.124014] NET: Registered protocol family 17

[2.341983 0.004687] [    1.124062] Key type dns_resolver registered

[2.346677 0.004694] [    1.124074] omap_voltage_late_init: Voltage driver support not added

[2.353365 0.006688] [    1.124224] ThumbEE CPU extension supported.

[2.357928 0.004563] [    1.148163] Key type encrypted registered

[2.362951 0.005023] [    1.178445] mmcblk0: mmc0:59b4 SD    7.23 GiB 

[2.369681 0.006730] [    1.185172]  mmcblk0: p1

[2.412548 0.042867] [    1.227821] random: fast init done

[2.420917 0.008369] [    1.236301] tps65217 0-0024: TPS65217 ID 0xe version 1.2

[2.453160 0.032243] [    1.268553] mmc1: switch to bus width 8 failed

[2.460255 0.007095] [    1.275597] mmc1: new high speed MMC card at address 0001

[2.466603 0.006348] [    1.282097] mmcblk1: mmc1:0001 M62704 3.56 GiB 

[2.471676 0.005073] [    1.287174] mmcblk1boot0: mmc1:0001 M62704 partition 1 2.00 MiB

[2.478235 0.006559] [    1.293723] mmcblk1boot1: mmc1:0001 M62704 partition 2 2.00 MiB

[2.485966 0.007731] [    1.301413]  mmcblk1: p1

[2.569127 0.083161] [    1.384356] tda998x 0-0070: found TDA19988

[2.574350 0.005223] [    1.389814] tilcdc 4830e000.lcdc: bound 0-0070 (ops tda998x_ops)

[2.580708 0.006358] [    1.396185] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).

[2.587651 0.006943] [    1.403143] [drm] No driver support for vblank timestamp query.

[2.594200 0.006549] [    1.409684] [drm] Cannot find any crtc or sizes - going 1024x768

[2.615149 0.020949] [    1.425004] Console: switching to colour frame buffer device 128x48

[2.621760 0.006611] [    1.437276] tilcdc 4830e000.lcdc: fb0:  frame buffer device

[2.657146 0.035386] [    1.472514] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz

[2.663349 0.006203] [    1.478830] console [netcon0] enabled

[2.667345 0.003996] [    1.482846] netconsole: network logging started

[2.672191 0.004846] [    1.487700] omap_rtc 44e3e000.rtc: setting system clock to 2000-01-01 00:00:47 UTC (946684847)

[2.682637 0.010446] [    1.498110] VFS: Cannot open root device "(null)" or unknown-block(0,0): error -6

[2.690693 0.008056] [    1.506199] Please append a correct "root=" boot option; here are the available partitions:

[2.699671 0.008978] [    1.515180] 0100            4096 ram0 

[2.703664 0.003993] [    1.515185]  (driver?)

[2.706178 0.002514] [    1.521661] 0101            4096 ram1 

[2.710182 0.004004] [    1.521665]  (driver?)

[2.712678 0.002496] [    1.528199] 0102            4096 ram2 

[2.716703 0.004025] [    1.528202]  (driver?)

[2.719194 0.002491] [    1.534715] 0103            4096 ram3 

[2.723162 0.003968] [    1.534719]  (driver?)

[2.725684 0.002522] [    1.541183] 0104            4096 ram4 

[2.729650 0.003966] [    1.541186]  (driver?)

[2.732162 0.002512] [    1.547675] 0105            4096 ram5

[2.738608 0.006446] [    1.547679]  (driver?)

[2.743034 0.004426] [    1.558524] 0106            4096 ram6 

[2.749129 0.006095] [    1.558528]  (driver?)

[2.753662 0.004533] [    1.569171] 0107            4096 ram7 

[2.759692 0.006030] [    1.569175]  (driver?)

[2.764272 0.004580] [    1.579769] 0108            4096 ram8 

[2.770397 0.006125] [    1.579773]  (driver?)

[2.775025 0.004628] [    1.590351] 0109            4096 ram9

[2.780838 0.005813] [    1.590355]  (driver?)

[2.785335 0.004497] [    1.600824] 010a            4096 ram10 

[2.791363 0.006028] [    1.600827]  (driver?)

[2.795817 0.004454] [    1.611308] 010b            4096 ram11 

[2.801780 0.005963] [    1.611312]  (driver?)

[2.806241 0.004461] [    1.621706] 010c            4096 ram12 

[2.812267 0.006026] [    1.621709]  (driver?)

[2.816625 0.004358] [    1.632123] 010d            4096 ram13 

[2.822554 0.005929] [    1.632127]  (driver?)

[2.826947 0.004393] [    1.642430] 010e            4096 ram14 

[2.832813 0.005866] [    1.642433]  (driver?)

[2.837177 0.004364] [    1.652655] 010f            4096 ram15 

[2.843025 0.005848] [    1.652658]  (driver?)

[2.847390 0.004365] [    1.662806] b300         7584768 mmcblk0 

[2.853348 0.005958] [    1.662811]  driver: mmcblk

[2.858089 0.004741] [    1.673590]   b301         7568384 mmcblk0p1 fe2505fb-01

[2.865468 0.007379] [    1.673594] 

[2.868861 0.003393] [    1.684355] b308         3735552 mmcblk1 

[2.874841 0.005980] [    1.684359]  driver: mmcblk

[2.879528 0.004687] [    1.695009]   b309         3734528 mmcblk1p1 00000000-01

[2.886829 0.007301] [    1.695012] 

[2.890104 0.003275] [    1.705617] b318            2048 mmcblk1boot1 

[2.896510 0.006406] [    1.705621]  (driver?)

[2.900640 0.004130] [    1.716144] b310            2048 mmcblk1boot0 

[2.906998 0.006358] [    1.716147]  (driver?)

[2.911117 0.004119] [    1.726599] VFS: Unable to mount root fs on unknown-block(0,0)

[2.918851 0.007734] [    1.734375] User configuration error - no valid root filesystem found

[2.927263 0.008412] [    1.742775] Kernel panic - not syncing: Invalid configuration from end user prevents continuing

[2.938023 0.010760] [    1.753547] CPU: 0 PID: 1 Comm: swapper Not tainted 4.10.17-yocto-standard #8

[2.947238 0.009215] [    1.762660] Hardware name: Generic AM33XX (Flattened Device Tree)

[2.955222 0.007984] [    1.770748] [<c010f250>] (unwind_backtrace) from [<c010c0cc>] (show_stack+0x20/0x24)

[2.965067 0.009845] [    1.780595] [<c010c0cc>] (show_stack) from [<c039d94c>] (dump_stack+0x20/0x28)

[2.974413 0.009346] [    1.789938] [<c039d94c>] (dump_stack) from [<c01f76f8>] (panic+0xc0/0x234)

[2.983431 0.009018] [    1.798938] [<c01f76f8>] (panic) from [<c0a013c4>] (mount_block_root+0x22c/0x2d0)

[2.993078 0.009647] [    1.808606] [<c0a013c4>] (mount_block_root) from [<c0a015b0>] (mount_root+0x60/0x78)

[3.003082 0.010004] [    1.818584] [<c0a015b0>] (mount_root) from [<c0a01748>] (prepare_namespace+0x180/0x1c0)

[3.013416 0.010334] [    1.828880] [<c0a01748>] (prepare_namespace) from [<c0a00f54>] (kernel_init_freeable+0x220/0x27c)

[3.024639 0.011223] [    1.840145] [<c0a00f54>] (kernel_init_freeable) from [<c06a9674>] (kernel_init+0x18/0x11c)

[3.035327 0.010688] [    1.850825] [<c06a9674>] (kernel_init) from [<c0107798>] (ret_from_fork+0x14/0x3c)

[3.045294 0.009967] [    1.860793] ---[ end Kernel panic - not syncing: Invalid configuration from end user prevents continuing

Based on the log file, either:

1) Kernel doesn't want to boot RFS from SD card for some reason.

2) U-boot environment variable bootargs is not saved properly and the kernel does not recognize root=/dev/mmcblk0p1 as a value for root parameter.

Could anyone shed some ideas about how I could fix this?

Regards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.