Booting woes with hard drive-based rootfs on ARM SBC board
This is a sort of followup to my previous thread here about the Firefly ITX-3588J super SBC board. I have still been fiddling with it and trying to make it work. The aim is to try and take the two stock-provided OS images - Android 12 _and_ Ubuntu 20.04 - and get a dual-boot setup working. The board also has an SSD hard drive connected to it which I'd like to use to store user data. And after determining that the provided U-Boot bootloader does not seem to be able to do a direct SATA boot (I recompiled it with the SATA support enabled and after typing "sata init" on the serial console the thing crashed instantaneously), I thought of a possible workaround being to try and get both OS kernels on the eMMC flash card together with GRUB, while putting the rootfs for each system on that hard drive and using GRUB as a next stage in the boot process after U-Boot.
Anyway, I used the Rockchip tools provided with the board SDK to lay out the basics of a custom ROM, and my x86 machine to format and lay out the SSD drive. I got everything flashed and the hard drive installed, and then tried to use U-Boot to launch the Ubuntu kernel. But it doesn't work. The kernel fires up alright, but then it gets caught in a "usb usb2-port1: Cannot enable. Maybe the USB cable is bad?" error looping forever and never coming to a console. Information about how the system is set up is as follows. On the eMMC, there are GPT partitions as follows (this is the "recipe" the Rockchip tools use to build the custom ROM): Code:
bootloader Image/MiniLoaderAll.bin On the hard drive, I have two partitions - one for the Android userdata, the other for the Ubuntu root file system, in that order, so the Ubuntu kernel identifies them as /dev/sda1 and /dev/sda2. The hard drive currently uses MBR instead of GPT because it does not have lots of partitions. The full boot output from the kernel is this: (KERNEL LOG REMOVED - too long for one post, will be included in subsequent posts) The commands used to boot the kernel via U-Boot are: Code:
setenv bootargs "ro rootwait earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 initrd=/boot/initrd-5.10.66 root=/dev/sda2 rootfstype=ext4 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1"; Note partition 0x0f (15) is the boot2 partition, so the Ubuntu kernel partition. It seems to me the error is arising because of a discrepancy between the boot line passed via U-Boot: Code:
ro rootwait earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 initrd=/boot/initrd-5.10.66 root=/dev/sda2 rootfstype=ext4 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1 Code:
storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal storagenode=/mmc@fe2e0000 androidboot.verifiedbootstate=orange ro rootwait earlycon=uart8250,mmio32,0xfeb50000 console=ttyFIQ0 irqchip.gicv3_pseudo_nmi=0 root=PARTLABEL=rootfs rootfstype=ext4 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 Note that "PARTLABEL=rootfs" will not work because I believe that wants to refer to the eMMC, and yet the rootfs _is not on the eMMC, but the SATA hard drive_. Presumably the kernels and/or boot stuff was configured like this in the packages shipped with the board because they were originally intended to be used one at a time, and I'm trying to build a novel, custom ROM out of them. I believe what is going on is it's either not loading rootfs, or else it's not loading the right initrd to get the system going. Other than that, I'm not sure what to do. So my question would be, then, how do you reconfigure this? The worst part is that a grep for where this bootargs line is coming from seems to suggest it is inside the device-tree blob (dtb) for the board itself! Does this mean there is no way to override or work around this command line? |
Code:
=> run sdf_boot_ubuntu; |
(2/4)
Code:
[ 112.723574] rockchip-csi2-dphy csi2-dphy0: csi2 dphy0 probe successfully! |
(3/4)
Code:
[ 113.383263] usbcore: registered new interface driver keyspan |
(4/4)
Code:
[ 113.695366] rk-pcie fe170000.pcie: PCI host bridge to bus 0002:20 |
ADD: I was able to find the .dts device tree source files in the board SDK package and remove the pre-baked command line arguments. However, this kernel is still ignoring the initrd= parameter. What's wrong?
|
SOLVED: The trick is not to try booting the kernel manually. Instead one should use U-Boot's syslinux functionality via the sysboot command:
Code:
sysboot mmc 0:0f any ${scriptaddr} /extlinux/extlinux.conf |
All times are GMT -5. The time now is 02:19 AM. |