Reputation: 11
I am trying to make u-boot to load rootfs from sd cards second partition while loading kernel and device tree from the first partition. Has anyone faced this situation before?
I've set the bootargs as shown below but it didn't work.
printenv bootargs
bootargs=console=ttyS0,115200 root=/dev/mmcblk0p2 rootwait
here are the logs:
U-Boot SPL 2021.04-rc3-ga8189655-dirty (Oct 16 2023 - 09:33:22 +0300)
DRAM DRIVE INFO: V0.7
DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3)
DRAM CLK = 672 MHz
DRAM zq value: 39bb
DRAM size = 128 MB
DRAM: 128 MiB
Trying to boot from MMC1
U-Boot 2021.04-rc3-ga8189655-dirty (Oct 16 2023 - 09:33:22 +0300) Allwinner Technology
CPU: Allwinner V3s (SUN8I 1681)
Model: DTSis dsmr
DRAM: 128 MiB
MMC: mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... OK
stdio_add_devices: Video device failed (ret=-19)
In: serial@1c28400
Out: serial@1c28400
Err: serial@1c28400
Net: phy interface0
eth0: ethernet@1c30000
starting USB...
No working controllers found
Hit any key to stop autoboot: 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
Found U-Boot script /boot/boot.scr
699 bytes read in 5 ms (135.7 KiB/s)
## Executing script at 41900000
6115824 bytes read in 270 ms (21.6 MiB/s)
16333 bytes read in 2 ms (7.8 MiB/s)
## Flattened Device Tree blob at 41800000
Booting using the fdt blob at 0x41800000
Loading Device Tree to 42df9000, end 42dfffcc ... OK
Using machid 0x1029 from environment
Starting kernel ...
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 5.11.6-g64616f45351e-dirty (zafer@zafer-G3-3579) (arm-linux-gnueabihf-gcc (Linaro GCC 7.4-2019.02) 7.4.1 20181213 [linaro-7.4-2019.02 revision 56ec6f6b99cc167ff0c2f8e1a2eed33b1edc85d4], GNU ld (Linaro_Binutils-2019.02) 2.28.2.20170706) #4 SMP Thu Oct 12 11:42:41 +03 2023
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: DTSis DSMR
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Reserved 4 MiB at 0x47c00000
[ 0.000000] Zone ranges:
[ 0.000000] Normal [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.000000] HighMem empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x0000000047ffffff]
[ 0.000000] On node 0 totalpages: 32768
[ 0.000000] Normal zone: 256 pages used for memmap
[ 0.000000] Normal zone: 0 pages reserved
[ 0.000000] Normal zone: 32768 pages, LIFO batch:7
[ 0.000000] percpu: Embedded 15 pages/cpu s31628 r8192 d21620 u61440
[ 0.000000] pcpu-alloc: s31628 r8192 d21620 u61440 alloc=15*4096
[ 0.000000] pcpu-alloc: [0] 0
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 32512
[ 0.000000] Kernel command line: rootwait root=PARTUUID=a545119e-01 rw r8152.mac_address=fe:81:1a:11:21:1c vt.global_cursor_default=0 console=ttyS1,115200 loglevel=8
[ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes, linear)
[ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes, linear)
[ 0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[ 0.000000] Memory: 111084K/131072K available (9216K kernel code, 1019K rwdata, 2364K rodata, 1024K init, 261K bss, 15892K reserved, 4096K cma-reserved, 0K highmem)
[ 0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[ 0.000000] rcu: Hierarchical RCU implementation.
[ 0.000000] rcu: RCU event tracing is enabled.
[ 0.000000] rcu: RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=1.
[ 0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[ 0.000000] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=1
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] random: get_random_bytes called from start_kernel+0x350/0x4f0 with crng_init=0
[ 0.000000] arch_timer: cp15 timer(s) running at 24.00MHz (virt).
[ 0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x588fe9dc0, max_idle_ns: 440795202592 ns
[ 0.000002] sched_clock: 56 bits at 24MHz, resolution 41ns, wraps every 4398046511097ns
[ 0.000022] Switching to timer-based delay loop, resolution 41ns
[ 0.000280] clocksource: timer: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[ 0.000618] Console: colour dummy device 80x30
[ 0.000687] Calibrating delay loop (skipped), value calculated using timer frequency.. 48.00 BogoMIPS (lpj=240000)
[ 0.000709] pid_max: default: 32768 minimum: 301
[ 0.000850] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.000879] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.001642] CPU: Testing write buffer coherency: ok
[ 0.001992] /cpus/cpu@0 missing clock-frequency property
[ 0.002039] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
[ 0.002768] Setting up static identity map for 0x40100000 - 0x40100060
[ 0.002979] rcu: Hierarchical SRCU implementation.
[ 0.003943] smp: Bringing up secondary CPUs ...
[ 0.003977] smp: Brought up 1 node, 1 CPU
[ 0.003992] SMP: Total of 1 processors activated (48.00 BogoMIPS).
[ 0.004004] CPU: All CPU(s) started in SVC mode.
[ 0.004633] devtmpfs: initialized
[ 0.008825] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
[ 0.009131] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.009174] futex hash table entries: 256 (order: 2, 16384 bytes, linear)
[ 0.009486] pinctrl core: initialized pinctrl subsystem
[ 0.010819] NET: Registered protocol family 16
[ 0.012213] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.013342] thermal_sys: Registered thermal governor 'step_wise'
[ 0.013694] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
[ 0.013734] hw-breakpoint: maximum watchpoint size is 8 bytes.
[ 0.036735] SCSI subsystem initialized
[ 0.037090] libata version 3.00 loaded.
[ 0.037381] usbcore: registered new interface driver usbfs
[ 0.037446] usbcore: registered new interface driver hub
[ 0.037508] usbcore: registered new device driver usb
[ 0.037727] mc: Linux media interface: v0.10
[ 0.037801] videodev: Linux video capture interface: v2.00
[ 0.037921] pps_core: LinuxPPS API ver. 1 registered
[ 0.037937] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <[email protected]>
[ 0.037963] PTP clock support registered
[ 0.038542] Advanced Linux Sound Architecture Driver Initialized.
[ 0.039151] Bluetooth: Core ver 2.22
[ 0.039245] NET: Registered protocol family 31
[ 0.039260] Bluetooth: HCI device and connection manager initialized
[ 0.039283] Bluetooth: HCI socket layer initialized
[ 0.039298] Bluetooth: L2CAP socket layer initialized
[ 0.039346] Bluetooth: SCO socket layer initialized
[ 0.039933] clocksource: Switched to clocksource arch_sys_counter
[ 0.050159] NET: Registered protocol family 2
[ 0.050924] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 6144 bytes, linear)
[ 0.050989] TCP established hash table entries: 1024 (order: 0, 4096 bytes, linear)
[ 0.051020] TCP bind hash table entries: 1024 (order: 1, 8192 bytes, linear)
[ 0.051049] TCP: Hash tables configured (established 1024 bind 1024)
[ 0.051171] UDP hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.051226] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes, linear)
[ 0.051486] NET: Registered protocol family 1
[ 0.052467] RPC: Registered named UNIX socket transport module.
[ 0.052506] RPC: Registered udp transport module.
[ 0.052514] RPC: Registered tcp transport module.
[ 0.052522] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.054991] Initialise system trusted keyrings
[ 0.055332] workingset: timestamp_bits=30 max_order=15 bucket_order=0
[ 0.062210] NFS: Registering the id_resolver key type
[ 0.062275] Key type id_resolver registered
[ 0.062287] Key type id_legacy registered
[ 0.159412] NET: Registered protocol family 38
[ 0.159483] Key type asymmetric registered
[ 0.159498] Asymmetric key parser 'x509' registered
[ 0.159583] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 246)
[ 0.159603] io scheduler mq-deadline registered
[ 0.159613] io scheduler kyber registered
[ 0.164832] sun8i-v3s-pinctrl 1c20800.pinctrl: initialized sunXi PIO driver
[ 0.228790] Serial: 8250/16550 driver, 8 ports, IRQ sharing disabled
[ 0.231251] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pb not found, using dummy regulator
[ 0.252613] 1c28000.serial: ttyS0 at MMIO 0x1c28000 (irq = 46, base_baud = 1500000) is a U6_16550A
[ 0.253407] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pg not found, using dummy regulator
[ 0.274845] 1c28400.serial: ttyS1 at MMIO 0x1c28400 (irq = 47, base_baud = 1500000) is a U6_16550A
[ 0.965913] printk: console [ttyS1] enabled
[ 0.991864] 1c28800.serial: ttyS2 at MMIO 0x1c28800 (irq = 48, base_baud = 1500000) is a U6_16550A
[ 1.006830] libphy: Fixed MDIO Bus: probed
[ 1.011939] CAN device driver interface
[ 1.016319] dwmac-sun8i 1c30000.ethernet: IRQ eth_wake_irq not found
[ 1.022793] dwmac-sun8i 1c30000.ethernet: IRQ eth_lpi not found
[ 1.028810] dwmac-sun8i 1c30000.ethernet: No regulator found
[ 1.034615] dwmac-sun8i 1c30000.ethernet: PTP uses main clock
[ 1.040417] dwmac-sun8i 1c30000.ethernet: Current syscon value is not the default 148000 (expect 38000)
[ 1.050202] dwmac-sun8i 1c30000.ethernet: No HW DMA feature register supported
[ 1.057442] dwmac-sun8i 1c30000.ethernet: RX Checksum Offload Engine supported
[ 1.064737] dwmac-sun8i 1c30000.ethernet: COE Type 2
[ 1.069705] dwmac-sun8i 1c30000.ethernet: TX Checksum insertion supported
[ 1.076525] dwmac-sun8i 1c30000.ethernet: Normal descriptors
[ 1.082198] dwmac-sun8i 1c30000.ethernet: Chain mode enabled
[ 1.088391] libphy: stmmac: probed
[ 1.092959] dwmac-sun8i 1c30000.ethernet: Found internal PHY node
[ 1.099526] libphy: mdio_mux: probed
[ 1.103209] dwmac-sun8i 1c30000.ethernet: Switch mux to internal PHY
[ 1.109574] dwmac-sun8i 1c30000.ethernet: Powering internal PHY
[ 1.117223] libphy: mdio_mux: probed
[ 1.121362] usbcore: registered new interface driver rtl8xxxu
[ 1.127124] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 1.133766] ehci-platform: EHCI generic platform driver
[ 1.139270] ehci-platform 1c1a000.usb: EHCI Host Controller
[ 1.144935] ehci-platform 1c1a000.usb: new USB bus registered, assigned bus number 1
[ 1.153129] ehci-platform 1c1a000.usb: irq 37, io mem 0x01c1a000
[ 1.179918] ehci-platform 1c1a000.usb: USB 2.0 started, EHCI 1.00
[ 1.187086] hub 1-0:1.0: USB hub found
[ 1.191016] hub 1-0:1.0: 1 port detected
[ 1.195578] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.201883] ohci-platform: OHCI generic platform driver
[ 1.207406] ohci-platform 1c1a400.usb: Generic Platform OHCI controller
[ 1.214142] ohci-platform 1c1a400.usb: new USB bus registered, assigned bus number 2
[ 1.222258] ohci-platform 1c1a400.usb: irq 38, io mem 0x01c1a400
[ 1.294912] hub 2-0:1.0: USB hub found
[ 1.298746] hub 2-0:1.0: 1 port detected
[ 1.305984] usbcore: registered new interface driver cdc_acm
[ 1.311754] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 1.319833] usbcore: registered new interface driver usblp
[ 1.325425] usbcore: registered new interface driver cdc_wdm
[ 1.331200] usbcore: registered new interface driver usb-storage
[ 1.337745] usb_phy_generic usb_phy_generic.0.auto: supply vcc not found, using dummy regulator
[ 1.347815] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.353687] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.362780] hub 3-0:1.0: USB hub found
[ 1.366635] hub 3-0:1.0: 1 port detected
[ 1.373620] sun6i-rtc 1c20400.rtc: registered as rtc0
[ 1.378703] sun6i-rtc 1c20400.rtc: RTC enabled
[ 1.383587] i2c /dev entries driver
[ 1.388109] i2c i2c-0: Not using recovery: no recover_bus() found
[ 1.396783] sunxi-wdt 1c20ca0.watchdog: Watchdog enabled (timeout=16 sec, nowayout=0)
[ 1.404935] usbcore: registered new interface driver btusb
[ 1.410822] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pe not found, using dummy regulator
[ 1.422160] sun4i-ss 1c15000.crypto: Die ID 0
[ 1.426902] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pf not found, using dummy regulator
[ 1.438260] sunxi-mmc 1c10000.mmc: allocated mmc-pwrseq
[ 1.444115] sun8i-v3s-pinctrl 1c20800.pinctrl: supply vcc-pc not found, using dummy regulator
[ 1.457256] usbcore: registered new interface driver usbhid
[ 1.462949] usbhid: USB HID core driver
[ 1.467755] cedrus 1c0e000.video-codec: Device registered as /dev/video0
[ 1.480038] sunxi-mmc 1c10000.mmc: initialized, max. request size: 16384 KB
[ 1.487302] sunxi-mmc 1c0f000.mmc: initialized, max. request size: 16384 KB
[ 1.494533] sunxi-mmc 1c11000.mmc: initialized, max. request size: 16384 KB
[ 1.508300] NET: Registered protocol family 10
[ 1.517567] Segment Routing with IPv6
[ 1.521489] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[ 1.528209] NET: Registered protocol family 17
[ 1.532785] can: controller area network core
[ 1.537258] NET: Registered protocol family 29
[ 1.541770] can: raw protocol
[ 1.544743] can: broadcast manager protocol
[ 1.548931] can: netlink gateway - max_hops=1
[ 1.553553] Key type dns_resolver registered
[ 1.558008] Registering SWP/SWPB emulation handler
[ 1.562966] Loading compiled-in X.509 certificates
[ 1.574655] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[ 1.586515] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[ 1.593300] ALSA device list:
[ 1.596285] No soundcards found.
[ 1.600499] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 1.609174] cfg80211: failed to load regulatory.db
[ 1.614462] Waiting for root device PARTUUID=a545119e-01...
[ 1.641179] mmc0: host does not support reading read-only switch, assuming write-enable
[ 1.649965] usb 1-1: new high-speed USB device number 2 using ehci-platform
[ 1.657265] mmc0: new high speed SDHC card at address aaaa
[ 1.664034] mmcblk0: mmc0:aaaa SU04G 3.69 GiB
[ 1.673295] mmcblk0: p1 p2 p3
[ 1.686937] EXT4-fs (mmcblk0p1): recovery complete
[ 1.691873] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
[ 1.702096] VFS: Mounted root (ext4 filesystem) on device 179:1.
[ 1.708993] mmc2: new DDR MMC card at address 0001
[ 1.714533] devtmpfs: error mounting -2
[ 1.719048] mmcblk2: mmc2:0001 M62704 3.53 GiB
[ 1.725089] Freeing unused kernel memory: 1024K
[ 1.729836] mmcblk2boot0: mmc2:0001 M62704 partition 1 2.00 MiB
[ 1.736420] Run /sbin/init as init process
[ 1.740644] with arguments:
[ 1.743622] /sbin/init
[ 1.746329] with environment:
[ 1.749467] HOME=/
[ 1.751852] TERM=linux
[ 1.754902] mmcblk2boot1: mmc2:0001 M62704 partition 2 2.00 MiB
[ 1.762431] Run /etc/init as init process
[ 1.766530] with arguments:
[ 1.769504] /etc/init
[ 1.772221] with environment:
[ 1.775367] HOME=/
[ 1.777726] TERM=linux
[ 1.784573] Run /bin/init as init process
[ 1.788617] with arguments:
[ 1.791687] /bin/init
[ 1.794314] with environment:
[ 1.797452] HOME=/
[ 1.799811] TERM=linux
[ 1.802801] Run /bin/sh as init process
[ 1.806656] with arguments:
[ 1.809624] /bin/sh
[ 1.812145] with environment:
[ 1.815290] HOME=/
[ 1.817650] TERM=linux
[ 1.820737] Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance.
[ 1.834908] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.11.6-g64616f45351e-dirty #4
[ 1.842561] Hardware name: Allwinner sun8i Family
[ 1.847275] [<c010ed50>] (unwind_backtrace) from [<c010b304>] (show_stack+0x10/0x14)
[ 1.855035] [<c010b304>] (show_stack) from [<c0983d84>] (dump_stack+0x9c/0xb0)
[ 1.862264] [<c0983d84>] (dump_stack) from [<c09829b0>] (panic+0x108/0x2f4)
[ 1.869228] [<c09829b0>] (panic) from [<c0987480>] (kernel_init+0x108/0x118)
[ 1.876281] [<c0987480>] (kernel_init) from [<c0100150>] (ret_from_fork+0x14/0x24)
[ 1.883853] Exception stack(0xc103bfb0 to 0xc103bff8)
[ 1.888905] bfa0: 00000000 00000000 00000000 00000000
[ 1.897076] bfc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
[ 1.905245] bfe0: 00000000 00000000 00000000 00000000 00000013 00000000
[ 1.911866] ---[ end Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/admin-guide/init.rst for guidance. ]---
Upvotes: 1
Views: 1775
Reputation: 103
OP answered his own question in the comments. As another user pointed out, that text is garbled. OP could provide the formatted text either by 1) editing his OP or 2) posting an answer to his own question. In the meantime I provide the formatted text below. This text helped me to progress on a similar problem that I am facing so I post it here in case someone else finds it useful.
setenv mmc_rootpart 2 part uuid mmc ${mmc_bootdev}:${mmc_rootpart} uuid
setenv loadkernel load mmc 0:1 ${kernel_addr_r} boot/zImage
setenv loaddtb load mmc 0:1 ${fdt_addr_r} boot/${fdtfile}
setenv bootargs rootwait root=/dev/mmcblk0p2 rw 8152.mac_address=fe:81:1a:11:21:1c vt.global_cursor_default=0 console=ttyS1,115200 loglevel=8
setenv bootcmd run loadkernel \&\& run loaddtb \&\& bootz ${kernel_addr_r} - ${fdt_addr_r}
saveenv
Upvotes: 2
Reputation: 2173
The issue is that per your logs:
[ 0.000000] Kernel command line: rootwait root=PARTUUID=a545119e-01 rw r8152.mac_address=fe:81:1a:11:21:1c vt.global_cursor_default=0 console=ttyS1,115200 loglevel=8
What you set as bootargs are not being kept, or used. So you need to look at and modify the boot.scr that you're using and so in turn whatever Linux distribution that you're using.
Upvotes: 1