OSF/LinuxBoot - Linux as a direct payload to OpenSBI

I am trying to directly load the kernel from OpenSBI, As Linux kernel image is embedded in the OpenSBI firmware binary with the below command.

$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- PLATFORM=generic FW_PAYLOAD_PATH=linux/arch/riscv/boot/Image FW_FDT_PATH=starfive_visionfive2.dtb FW_TEXT_START=0x40000000

Boot flow has to be OpenSBI-> Kernel → u-root on VisionFive2.

But visionfive2_fw_payload.img generated with huge size(26 MB).
Is there any other possibility to build OpenSBI payload image with kernel and boot it from Visionfive2?

1 Like

maybe look at oreboot? oreboot + linux + uroot to work on the vision five 2 so maybe give that a try?

Not tried it yet but it does look interesting.

1 Like

Your only way is to boot a compressed Image (Image.gz or better Image.xz). I’m in doubt OpenSBI supports compression.

I used to boot Image.xz from U-Boot directly off QSPI at the time there was no NVMe boot available. You may try that, with U-Boot layer severely minimized. I don’t know if OpenSBI can run compressed binaries.

Don’t the compressed kernels bundle their own decompressor?

Not in case of non-x86 platforms: usually, it is just a compressed Image without any decompressor attached. Decompression is performed by something else. Some platforms also have zImage which attaches decompressor to kernel image, but now it’s not there in RV.

Implementing stub decompressor shall be easy, one might also try looking at UPX where several RISC stubs for vmlinux exist (but no RV port yet) as starting point.

3 Likes

Thanks for the input @strlcat!
I tried to boot from compressed image (Image.gz and Image.xz) but opensbi not supporting.

I am working on another below approach as well,

u-boot SPL  --> OpenSBI --> Kernel --> u-root

OpenSBI is booted from SPL payload but it’s not proceeding to next stage (Image.gz or Image)

u-boot SPL built with OpenSBI
$ make ARCH=riscv CROSS_COMPILE=riscv64-unknown-linux-gnu- OPENSBI=~/risc-v/opensbi/build/platform/generic/firmware/fw_dynamic.bin -j16

linuxboot_kernel_payload.log (2.3 KB)

sdcard image partitions:

Device        Start    End Sectors Size Type
/dev/loop39p1  4096   8191    4096   2M HiFive BBL
/dev/loop39p2  8192  63487   55296  27M HiFive FSBL
/dev/loop39p3 63488 245726  182239  89M EFI System

p1 - u-boot-spl.bin.normal.out
p2 - fw_payload.bin
p3 - initramfs.linux_riscv64.cpio.xz (u-root)

Well, it’s how it’s implemented as of today. OpenSBI will not decompress kimage for you. You still need a decompressor stub or another way of booting.

1 Like

OpenSBI should boot the uncompressed kernel image. But that too not booting as you can see in logs which attached in previous thread.

Ok I see I am wrong. Today between OpenSBI and kernel there’s main U-Boot layer.

Do you have XIP or Fixed Address options enabled during kernel build?
EDIT: CONFIG_PHYS_RAM_BASE_FIXED on 5.15.0 SF kernel is actually a noop, it does nothing. You might try to build XIP kernel but your only limitation is that you can run it from QSPI which is mapped at 0x21000000 at boot time, but QSPI size max is 16M, you get maximum 15M to fit an uncompressed image into, which is not going to happen unless you’ll build a heavily stripped down kernel for a simple embedded version which you won’t do anyway.

3 Likes

I tried to replicate your approach but ultimately I failed at it. First, SPL does not want to copy more than 8M of data from second partition:

DDR version: dc2e84f0.
Could not get FIT buffer of 32847872 bytes
	check CONFIG_SYS_SPL_MALLOC_SIZE

OpenSBI v1.2
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|___/_____|
        | |
        |_|

Platform Name             : StarFive VisionFive V2
Platform Features         : medeleg
Platform HART Count       : 5
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : pm-reset
Platform Shutdown Device  : pm-reset
Platform Suspend Device   : ---
Firmware Base             : 0x40000000
Firmware Size             : 392 KB
Firmware RW Offset        : 0x40000
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 1
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region02          : 0x0000000040040000-0x000000004007ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000042200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 1
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count      : 2
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109

[hangs]

The size is controlled by CONFIG_SYS_SPL_MALLOC_SIZE which is not even a configurable, but rather is a #define coming from JH7110_u-boot/include/configs/starfive-visionfive2.h. (I increased it to 0x03000000 or 48M and rebuilt everything)

After that it simply bails out with cryptic

mmc_load_image_raw_sector: mmc block read error
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

After enabling all possible DEBUG settings and bloating SPL binary by additional 60K, I’ve got more cryptic thing:

[snip]
hdr read sector 1000, count=1
Found FIT
blk_find_device: if_type=6, devnum=1: sdio0@16010000.blk, 6, 0
blk_find_device: if_type=6, devnum=1: sdio1@16020000.blk, 6, 1
Sending CMD16
Unaligned buffer address 800000b0
fit read sector 1000, sectors=60574, dst=800000b0, count=0, size=0x1d93a98
mmc_load_image_raw_sector: mmc block read error
spl: mmc boot mode: fs
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

I’m out with solutions. U-Boot middleware is more convenient there.

3 Likes

I am able to bring up the Linuxboot flow with SDIO mode on VisionFive2.
I did not modify any source code.

u-boot SPL  --> OpenSBI --> Kernel --> u-root
  1. Build kernel with u-root initramfs embedded (Image)
  2. Build OpenSBI with Kernel payload (fw_payload.bin)
  3. Build u-boot spl with openSBI fw_dynamic.bin (spl/u-boot-spl.bin)
  4. Create SPL file (u-boot-spl.bin.normal.out)
  5. Create payload image using mkimage (visionfive2_fw_payload.img)

Flash the u-boot-spl.bin.normal.out and visionfive2_fw_payload.img into SD card and boot into it

U-Boot SPL 2021.10-dirty (Sep 01 2023 - 10:59:29 +0530)
DDR version: dc2e84f0.
U-boot SPL Trying to boot from MMC2
Could not get FIT buffer of 28357120 bytes
        check CONFIG_SYS_SPL_MALLOC_SIZE

OpenSBI VF2_v3.4.5
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|___/_____|
        | |
        |_|

fdt_reset_driver_init: gpio-restart init failed, -3
Platform Name             : StarFive VisionFive V2
Platform Features         : medeleg
Platform HART Count       : 4
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : pm-reset
Platform Shutdown Device  : pm-reset
Platform Suspend Device   : ---
Firmware Base             : 0x40000000
Firmware Size             : 384 KB
Firmware RW Offset        : 0x40000
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 4
Domain0 HARTs             : 1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01          : 0x0000000040040000-0x000000004005ffff M: (R,W) S/U: ()
Domain0 Region02          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000082200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 4
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count      : 2
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109
[    0.000000] Linux version 5.15.0 (kavipriya@hawking) (riscv64-unknown-linux-gnu-gcc (g2ee5e430018) 12.2.0, GNU ld (GNU Binutils) 2.39) #10 SMP Thu Aug 31 14:39:44 I3
[    0.000000] OF: fdt: Ignoring memory range 0x40000000 - 0x40200000
[    0.000000] Machine model: StarFive VisionFive V2
[    0.000000] efi: UEFI not found.
[    0.000000] OF: reserved mem: failed to allocate memory for node 'linux,cma'
[    0.000000] cma: Reserved 16 MiB at 0x00000000bf000000
[    0.000000] Zone ranges:
[    0.000000]   DMA32    [mem 0x0000000040200000-0x00000000ffffffff]
[    0.000000]   Normal   [mem 0x0000000100000000-0x000000013fffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040200000-0x00000000c010ffff]
[    0.000000]   node   0: [mem 0x00000000c0110000-0x00000000c01fffff]
[    0.000000]   node   0: [mem 0x00000000c0200000-0x000000013fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040200000-0x000000013fffffff]
[    0.000000] SBI specification v1.0 detected
[    0.000000] SBI implementation ID=0x1 Version=0x10002
[    0.000000] SBI TIME extension detected
[    0.000000] SBI IPI extension detected
[    0.000000] SBI RFENCE extension detected
[    0.000000] SBI SRST extension detected
[    0.000000] SBI v0.2 HSM extension detected
[    0.000000] CPU with hartid=0 is not available
[    0.000000] CPU with hartid=0 is not available
[    0.000000] riscv: base ISA extensions acdfim
[    0.000000] riscv: ELF capabilities acdfim
[    0.000000] percpu: Embedded 18 pages/cpu s33960 r8192 d31576 u73728
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 1033735
[    0.000000] Kernel command line:  root=/dev/mmcblk1p3
[    0.000000] Dentry cache hash table entries: 524288 (order: 10, 4194304 bytes, linear)
[    0.000000] Inode-cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] mem auto-init: stack:all(zero), heap alloc:off, heap free:off
[    0.000000] software IO TLB: mapped [mem 0x00000000fb000000-0x00000000ff000000] (64MB)
[    0.000000] Memory: 3850952K/4192256K available (10410K kernel code, 3388K rwdata, 4096K rodata, 5869K init, 412K bss, 324920K reserved, 16384K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000] rcu:     RCU restricting CPUs from NR_CPUS=8 to nr_cpu_ids=4.
[    0.000000] rcu:     RCU debug extended QS entry/exit.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    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=4
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] CPU with hartid=0 is not available
[    0.000000] riscv-intc: unable to find hart id for /cpus/cpu@0/interrupt-controller
[    0.000000] riscv-intc: 64 local interrupts mapped
[    0.000000] plic: plic@c000000: mapped 136 interrupts with 4 handlers for 9 contexts.
[    0.000000] random: get_random_bytes called from start_kernel+0x4cc/0x6e6 with crng_init=0
[    0.000000] riscv_timer_init_dt: Registering clocksource cpuid [0] hartid [4]
[    0.000000] clocksource: riscv_clocksource: mask: 0xffffffffffffffff max_cycles: 0x1d854df40, max_idle_ns: 881590404240 ns
[    0.000001] sched_clock: 64 bits at 4MHz, resolution 250ns, wraps every 2199023255500ns
[    0.000330] clocksource: timer@13050000.ch0: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000451] clocksource: timer@13050000.ch1: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000566] clocksource: timer@13050000.ch2: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.000685] clocksource: timer@13050000.ch3: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 79635851949 ns
[    0.001119] Console: colour dummy device 80x25
[    0.002512] printk: console [tty0] enabled
[    0.002595] Calibrating delay loop (skipped), value calculated using timer frequency.. 8.00 BogoMIPS (lpj=40000)
[    0.002667] pid_max: default: 32768 minimum: 301
[    0.003016] Mount-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.003246] Mountpoint-cache hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.005988] ASID allocator disabled
[    0.006250] rcu: Hierarchical SRCU implementation.
[    0.006689] EFI services will not be available.
[    0.007605] smp: Bringing up secondary CPUs ...
[    0.011374] smp: Brought up 1 node, 4 CPUs
[    0.012935] devtmpfs: initialized
[    0.023810] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.023908] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.025457] pinctrl core: initialized pinctrl subsystem
[    0.026834] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.027922] thermal_sys: Registered thermal governor 'step_wise'
[    0.028388] cpuidle: using governor menu
[    0.062444] platform soc:dsi-output: Fixing up cyclic dependency with 29400000.dc8200
[    0.063400] platform 295d0000.mipi: Fixing up cyclic dependency with soc:dsi-output
[    0.064188] platform 29590000.hdmi: Fixing up cyclic dependency with 29400000.dc8200
[    0.083084] HugeTLB registered 1.00 GiB page size, pre-allocated 0 pages
[    0.083149] HugeTLB registered 2.00 MiB page size, pre-allocated 0 pages
[    0.091475] vgaarb: loaded
[    0.091932] SCSI subsystem initialized
[    0.092668] usbcore: registered new interface driver usbfs
[    0.092790] usbcore: registered new interface driver hub
[    0.092889] usbcore: registered new device driver usb
[    0.093352] mc: Linux media interface: v0.10
[    0.093441] videodev: Linux video capture interface: v2.00
[    0.093849] Advanced Linux Sound Architecture Driver Initialized.
[    0.094485] Bluetooth: Core ver 2.22
[    0.094588] NET: Registered PF_BLUETOOTH protocol family
[    0.094629] Bluetooth: HCI device and connection manager initialized
[    0.094676] Bluetooth: HCI socket layer initialized
[    0.094730] Bluetooth: L2CAP socket layer initialized
[    0.094787] Bluetooth: SCO socket layer initialized
[    0.095420] clocksource: Switched to clocksource riscv_clocksource
[    0.112020] NET: Registered PF_INET protocol family
[    0.113708] IP idents hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.118657] tcp_listen_portaddr_hash hash table entries: 2048 (order: 4, 81920 bytes, linear)
[    0.119033] TCP established hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.120114] TCP bind hash table entries: 32768 (order: 8, 1048576 bytes, linear)
[    0.123565] TCP: Hash tables configured (established 32768 bind 32768)
[    0.124174] UDP hash table entries: 2048 (order: 5, 196608 bytes, linear)
[    0.124918] UDP-Lite hash table entries: 2048 (order: 5, 196608 bytes, linear)
[    0.125974] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.127295] RPC: Registered named UNIX socket transport module.
[    0.127361] RPC: Registered udp transport module.
[    0.127392] RPC: Registered tcp transport module.
[    0.127420] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.128455] PCI: CLS 0 bytes, default 64
[    0.130195] Initialise system trusted keyrings
[    0.146055] workingset: timestamp_bits=62 max_order=20 bucket_order=0
[    0.163057] NFS: Registering the id_resolver key type
[    0.163151] Key type id_resolver registered
[    0.163204] Key type id_legacy registered
[    0.163432] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.163484] nfs4flexfilelayout_init: NFSv4 Flexfile Layout Driver Registering...
[    0.163579] ntfs: driver 2.1.32 [Flags: R/W].
[    0.164177] jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
[    0.165277] fuse: init (API version 7.34)
[    0.206454] NET: Registered PF_ALG protocol family
[    0.206537] Key type asymmetric registered
[    0.206578] Asymmetric key parser 'x509' registered
[    0.206752] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    0.206816] io scheduler mq-deadline registered
[    0.206855] io scheduler kyber registered
[    0.485217] clk-starfive-jh7110 13020000.clock-controller: starfive JH7110 clkgen init successfully.
[    0.487774] L2CACHE: DataError @ 0x00000000.080400F8
[    0.487914] L2CACHE: DataFail @ 0x00000000.0804005B
[    0.488073] L2CACHE: No. of Banks in the cache: 8
[    0.488127] L2CACHE: No. of ways per bank: 16
[    0.488166] L2CACHE: Sets per bank: 256
[    0.488210] L2CACHE: Bytes per cache block: 64
[    0.488255] L2CACHE: Index of the largest way enabled: 0
[    0.488740] jh7110-pmu 17030000.power-controller: registered 8 power domains
[    0.669891] Serial: 8250/16550 driver, 6 ports, IRQ sharing disabled
[    0.677204] @@#########################@@
[    0.690647] @@ dev ptr:ffffffe0bfeda800/1500/1
[    0.691086] PVR_K:  1: Read BVNC 36.50.54.182 from HW device registers
[    0.691268] PVR_K:  1: RGX Device registered BVNC 36.50.54.182 with 1 core in the system
[    2.274740] Unpacking initramfs...
[    2.274820] Initramfs unpacking failed: invalid magic at start of compressed archive
[    2.607527] Freeing initrd memory: 97280K
[    2.607804] pvrsrvkm 18000000.gpu: Direct firmware load for rgx.fw.36.50.54.182 failed with error -2
[    2.607976] pvrsrvkm 18000000.gpu: Direct firmware load for rgx.fw.36.50p.54.182 failed with error -2
[    2.608134] pvrsrvkm 18000000.gpu: Direct firmware load for rgx.fw failed with error -2
[    2.608228] PVR_K:(Fatal):     1: All RGX Firmware image loads failed for 'rgx.fw.36.50.54.182' (PVRSRV_ERROR_NOT_FOUND) [1599]
[    2.608336] PVR_K:(Error):     1: RGXInit: InitFirmware failed (275) [1556]
[    2.608400] PVR_K:(Error):     1: RGXInit() failed (PVRSRV_ERROR_NOT_FOUND) in PVRSRVCommonDeviceInitialise() [2156]
[    2.608479] PVR_K:(Error):     1: PVRSRVDeviceFinalise() failed (PVRSRV_ERROR_NOT_INITIALISED) in PVRSRVCommonDeviceInitialise() [2170]
[    2.608587] [drm:pvr_drm_load] *ERROR* device (____ptrval____) initialisation failed (err=-19)
[    2.625225] loop: module loaded
[    2.629093] spi-nor spi0.0: gd25lq128d (16384 Kbytes)
[    2.630160] 3 fixed-partitions partitions found on MTD device 13010000.spi.0
[    2.630241] Creating 3 MTD partitions on "13010000.spi.0":
[    2.630302] 0x000000000000-0x000000040000 : "spl"
[    2.633200] 0x000000100000-0x000000400000 : "uboot"
[    2.636081] 0x000000f00000-0x000001000000 : "data"
[    2.640397] libphy: Fixed MDIO Bus: probed
[    2.642871] CAN device driver interface
[    2.643860] starfive-eth-plat 16030000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
[    2.644563] starfive-eth-plat 16030000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[    2.644655] starfive-eth-plat 16030000.ethernet:     DWMAC4/5
[    2.644707] starfive-eth-plat 16030000.ethernet: DMA HW capability register supported
[    2.644762] starfive-eth-plat 16030000.ethernet: RX Checksum Offload Engine supported
[    2.644817] starfive-eth-plat 16030000.ethernet: Wake-Up On Lan supported
[    2.644985] starfive-eth-plat 16030000.ethernet: TSO supported
[    2.645047] starfive-eth-plat 16030000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.645123] starfive-eth-plat 16030000.ethernet: device MAC address 7a:85:6d:3e:0b:b2
[    2.645184] starfive-eth-plat 16030000.ethernet: Enabled Flow TC (entries=1)
[    2.645233] starfive-eth-plat 16030000.ethernet: TSO feature enabled
[    2.645278] starfive-eth-plat 16030000.ethernet: Using 40 bits DMA width
[    2.906506] libphy: stmmac: probed
[    2.906582] YT8531 Gigabit Ethernet stmmac-0:00: attached PHY driver (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
[    2.906651] YT8531 Gigabit Ethernet stmmac-0:01: attached PHY driver (mii_bus:phy_addr=stmmac-0:01, irq=POLL)
[    2.908505] starfive-eth-plat 16040000.ethernet: force_sf_dma_mode is ignored if force_thresh_dma_mode is set.
[    2.909254] starfive-eth-plat 16040000.ethernet: User ID: 0x41, Synopsys ID: 0x52
[    2.909348] starfive-eth-plat 16040000.ethernet:     DWMAC4/5
[    2.909400] starfive-eth-plat 16040000.ethernet: DMA HW capability register supported
[    2.909456] starfive-eth-plat 16040000.ethernet: RX Checksum Offload Engine supported
[    2.909512] starfive-eth-plat 16040000.ethernet: Wake-Up On Lan supported
[    2.909672] starfive-eth-plat 16040000.ethernet: TSO supported
[    2.909733] starfive-eth-plat 16040000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.909809] starfive-eth-plat 16040000.ethernet: device MAC address aa:e7:72:48:89:d5
[    2.909870] starfive-eth-plat 16040000.ethernet: Enabled Flow TC (entries=1)
[    2.909919] starfive-eth-plat 16040000.ethernet: TSO feature enabled
[    2.909962] starfive-eth-plat 16040000.ethernet: Using 40 bits DMA width
[    3.170996] libphy: stmmac: probed
[    3.171071] YT8531 Gigabit Ethernet stmmac-1:00: attached PHY driver (mii_bus:phy_addr=stmmac-1:00, irq=POLL)
[    3.171141] YT8531 Gigabit Ethernet stmmac-1:01: attached PHY driver (mii_bus:phy_addr=stmmac-1:01, irq=POLL)
[    3.173261] Intel(R) Wireless WiFi driver for Linux
[    3.176664] cdns3-starfive 10210000.usbdrd: usb mode 2 2.0 probe success
[    3.178077] usbcore: registered new interface driver uas
[    3.178226] usbcore: registered new interface driver usb-storage
[    3.196210] starfive-rtc 17040000.rtc: registered as rtc0
[    3.196306] starfive-rtc 17040000.rtc: setting system clock to 2001-01-01T00:00:00 UTC (978307200)
[    3.196659] i2c_dev: i2c /dev entries driver
[    3.197139] usbcore: registered new interface driver uvcvideo
[    3.215466] thermal thermal_zone0: failed to read out thermal zone (-110)
[    3.216127] starfive-wdt 13070000.wdog: Heartbeat: timeout=15, count/2=180000000 (0aba9500)
[    3.217258] Bluetooth: HCI UART driver ver 2.3
[    3.217329] Bluetooth: HCI UART protocol H4 registered
[    3.218390] cpu cpu0: cpufreq_init: failed to get clk: -2
[    3.218550] cpu cpu0: cpufreq_init: failed to get clk: -2
[    3.218681] cpu cpu0: cpufreq_init: failed to get clk: -2
[    3.218814] cpu cpu0: cpufreq_init: failed to get clk: -2
[    3.218900] cpufreq-dt cpufreq-dt: failed register driver: -19
[    3.220709] sdhci: Secure Digital Host Controller Interface driver
[    3.220786] sdhci: Copyright(c) Pierre Ossman
[    3.220884] Synopsys Designware Multimedia Card Interface Driver
[    3.221479] sdhci-pltfm: SDHCI platform and OF driver helper
[    3.223055] jh7110-sec 16000000.crypto: Unable to request sec_m dma channel in DMA channel
[    3.223153] jh7110-sec 16000000.crypto: Cannot initial dma chan
[    3.223746] usbcore: registered new interface driver usbhid
[    3.223823] usbhid: USB HID core driver
[    3.224241] riscv-pmu-sbi: SBI PMU extension is available
[    3.224344] riscv-pmu-sbi: 16 firmware and 4 hardware counters
[    3.224404] riscv-pmu-sbi: Perf sampling/filtering is not supported as sscof extension is not available
[    3.225136] usbcore: registered new interface driver snd-usb-audio
[    3.234463] NET: Registered PF_INET6 protocol family
[    3.236891] Segment Routing with IPv6
[    3.236996] In-situ OAM (IOAM) with IPv6
[    3.237231] sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
[    3.238213] NET: Registered PF_PACKET protocol family
[    3.238300] can: controller area network core
[    3.238550] NET: Registered PF_CAN protocol family
[    3.238615] can: raw protocol
[    3.238657] can: broadcast manager protocol
[    3.238714] can: netlink gateway - max_hops=1
[    3.239324] Bluetooth: RFCOMM TTY layer initialized
[    3.239415] Bluetooth: RFCOMM socket layer initialized
[    3.239492] Bluetooth: RFCOMM ver 1.11
[    3.239549] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    3.239596] Bluetooth: BNEP filters: protocol multicast
[    3.239651] Bluetooth: BNEP socket layer initialized
[    3.239774] lib80211: common routines for IEEE802.11 drivers
[    3.240070] 9pnet: Installing 9P2000 support
[    3.240213] Key type dns_resolver registered
[    3.241408] Loading compiled-in X.509 certificates
[    3.295548] starfive_jh7110-pinctrl 13040000.gpio: SiFive GPIO chip registered 64 GPIOs
[    3.297026] starfive_jh7110-pinctrl 17020000.gpio: SiFive GPIO chip registered 4 GPIOs
[    3.297470] pl08xdmac 16008000.sec_dma: initialized 8 virtual memcpy channels
[    3.297578] pl08xdmac 16008000.sec_dma: initialized 16 virtual slave channels
[    3.300696] debugfs: Directory '16008000.sec_dma' with parent 'dmaengine' already present!
[    3.300835] pl08xdmac 16008000.sec_dma: DMA: PL080 rev0 at 0x16008000 irq 23
[    3.301276] ssp-pl022 10060000.spi: ARM PL022 driver for StarFive SoC platform, device ID: 0x00041022
[    3.301397] ssp-pl022 10060000.spi: mapped registers from 0x0000000010060000 to (____ptrval____)
[    3.302197] ssp-pl022 10060000.spi: Requested frequency: 10000000 Hz is unsupported,select by default 8250000 Hz
[    3.303019] ssp-pl022 10060000.spi: will use autosuspend for runtime pm, delay 100ms
[    3.305704] i2c 2-0045: Fixing up cyclic dependency with 295d0000.mipi
[    3.306227] seeed_panel 2-0045: Unknown Atmel firmware revision: 0x00
[    3.306689] tinker_ft5406 2-0038: Address = 0x38
[    3.306747] tinker_ft5406 2-0038: width = 800, height = 480, reverse = 1
[    3.306991] tinker_ft5406 2-0038: i2c read error, -121
[    3.307053] tinker_ft5406 2-0038: Checking touch ic failed
[    3.307104] tinker_ft5406: probe of 2-0038 failed with error -121
[    3.307530] i2c 2-0019: Fixing up cyclic dependency with 295d0000.mipi
[    3.309153] Goodix-TS 2-0014: supply AVDD28 not found, using dummy regulator
[    3.309504] Goodix-TS 2-0014: supply VDDIO not found, using dummy regulator
[    3.425659] Goodix-TS 2-0014: i2c test failed attempt 1: -121
[    3.465652] Goodix-TS 2-0014: i2c test failed attempt 2: -121
[    3.505461] Goodix-TS 2-0014: I2C communication failure: -121
[    3.505861] Goodix-TS: probe of 2-0014 failed with error -121
[    3.507726] at24 5-0050: supply vcc not found, using dummy regulator
[    3.508955] at24 5-0050: 512 byte 24c04 EEPROM, writable, 16 bytes/write
[    3.511550] axp15060-regulator 5-0036: Register mipi_0p9 done! vol range:900 ~ 900 mV
[    3.513369] axp15060-regulator 5-0036: Register hdmi_1p8 done! vol range:1800 ~ 1800 mV
[    3.515235] axp15060-regulator 5-0036: Register hdmi_0p9 done! vol range:900 ~ 900 mV
[    3.517176] axp15060-regulator 5-0036: Register cpu_vdd done! vol range:500 ~ 1540 mV
[    3.518815] i2c 6-0010: Fixing up cyclic dependency with 19800000.vin_sysctl
[    3.519652] imx219 6-0010: supply VANA not found, using dummy regulator
[    3.519950] imx219 6-0010: supply VDIG not found, using dummy regulator
[    3.520183] imx219 6-0010: supply VDDL not found, using dummy regulator
[    3.527902] imx219 6-0010: failed to read chip id 219
[    3.528349] imx219: probe of 6-0010 failed with error -5
[    3.533100] pcie_plda 2b000000.pcie: host bridge /soc/pcie@2B000000 ranges:
[    3.533243] pcie_plda 2b000000.pcie:      MEM 0x0030000000..0x0037ffffff -> 0x0030000000
[    3.533328] pcie_plda 2b000000.pcie:      MEM 0x0900000000..0x093fffffff -> 0x0900000000
[    3.533468] ATR entry: 0x0940000000 -> 0x0000000000 [0x0010000000] (param: 0x000001)
[    3.533545] ATR entry: 0x0030000000 -> 0x0030000000 [0x0008000000] (param: 0x000000)
[    3.533610] ATR entry: 0x0900000000 -> 0x0900000000 [0x0040000000] (param: 0x000000)
[    3.875639] pcie_plda 2b000000.pcie: Port link up.
[    3.876001] pcie_plda 2b000000.pcie: PCI host bridge to bus 0000:00
[    3.876076] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.876132] pci_bus 0000:00: root bus resource [mem 0x30000000-0x37ffffff]
[    3.876194] pci_bus 0000:00: root bus resource [mem 0x900000000-0x93fffffff pref]
[    3.876296] pci 0000:00:00.0: [1556:1111] type 01 class 0x060400
[    3.876362] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0xffffffff 64bit pref]
[    3.876503] pci 0000:00:00.0: supports D1 D2
[    3.876548] pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold
[    3.883080] pci 0000:00:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.883453] pci 0000:01:00.0: [1106:3483] type 00 class 0x0c0330
[    3.883539] pci 0000:01:00.0: reg 0x10: [mem 0x00000000-0x00000fff 64bit]
[    3.883701] pci 0000:01:00.0: PME# supported from D0 D3cold
[    3.890125] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    3.890246] pci 0000:00:00.0: BAR 0: no space for [mem size 0x100000000 64bit pref]
[    3.890322] pci 0000:00:00.0: BAR 0: failed to assign [mem size 0x100000000 64bit pref]
[    3.890395] pci 0000:00:00.0: BAR 8: assigned [mem 0x30000000-0x300fffff]
[    3.890453] pci 0000:01:00.0: BAR 0: assigned [mem 0x30000000-0x30000fff 64bit]
[    3.890538] pci 0000:00:00.0: PCI bridge to [bus 01]
[    3.890586] pci 0000:00:00.0:   bridge window [mem 0x30000000-0x300fffff]
[    3.890857] pci 0000:00:00.0: enabling device (0000 -> 0002)
[    3.890927] pci 0000:01:00.0: enabling device (0000 -> 0002)
[    3.891407] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.891509] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 1
[    3.892357] xhci_hcd 0000:01:00.0: hcc params 0x002841eb hci version 0x100 quirks 0x0000040000000890
[    3.892565] pcie_plda 2b000000.pcie: msi#0 address_hi 0x0 address_lo 0x190
[    3.893422] xhci_hcd 0000:01:00.0: xHCI Host Controller
[    3.893510] xhci_hcd 0000:01:00.0: new USB bus registered, assigned bus number 2
[    3.893589] xhci_hcd 0000:01:00.0: Host supports USB 3.0 SuperSpeed
[    3.894955] hub 1-0:1.0: USB hub found
[    3.895099] hub 1-0:1.0: 1 port detected
[    3.897394] hub 2-0:1.0: USB hub found
[    3.897540] hub 2-0:1.0: 4 ports detected
[    3.902875] pcie_plda 2c000000.pcie: host bridge /soc/pcie@2C000000 ranges:
[    3.903016] pcie_plda 2c000000.pcie:      MEM 0x0038000000..0x003fffffff -> 0x0038000000
[    3.903100] pcie_plda 2c000000.pcie:      MEM 0x0980000000..0x09bfffffff -> 0x0980000000
[    3.903233] ATR entry: 0x09c0000000 -> 0x0000000000 [0x0010000000] (param: 0x000001)
[    3.903306] ATR entry: 0x0038000000 -> 0x0038000000 [0x0008000000] (param: 0x000000)
[    3.903370] ATR entry: 0x0980000000 -> 0x0980000000 [0x0040000000] (param: 0x000000)
[    4.085518] usb usb2-port2: over-current condition
[    4.185463] usb 1-1: new high-speed USB device number 2 using xhci_hcd
[    4.245498] usb usb2-port4: over-current condition
[    4.315793] pcie_plda 2c000000.pcie: Port link down, exit.
[    4.354266] clk-starfive-jh7110-vout 295c0000.clock-controller: starfive JH7110 clk_vout init successfully.
[    4.370271] hub 1-1:1.0: USB hub found
[    4.370585] hub 1-1:1.0: 4 ports detected
[    4.387096] clk-starfive-jh7110-isp 19810000.clock-controller: starfive JH7110 clk_isp init successfully.
[    4.388290] dw_axi_dmac_platform 16050000.dma-controller: DesignWare AXI DMA Controller, 4 channels
[    4.410145] 10000000.serial: ttyS0 at MMIO 0x10000000 (irq = 17, base_baud = 1500000) is a 16550A
[    6.455100] printk: console [ttyS0] enabled
[    6.460315] jh7110-vin 19800000.vin_sysctl: stfcamss probe enter!
[    6.469897] jh7110-vin 19800000.vin_sysctl: stfcamss probe success!
[    6.478053] dwmmc_starfive 16010000.sdio0: IDMAC supports 32-bit address mode.
[    6.479485] dwmmc_starfive 16020000.sdio1: IDMAC supports 32-bit address mode.
[    6.485518] dwmmc_starfive 16010000.sdio0: Using internal DMA controller.
[    6.492770] dwmmc_starfive 16020000.sdio1: Using internal DMA controller.
[    6.499581] dwmmc_starfive 16010000.sdio0: Version ID is 290a
[    6.506450] dwmmc_starfive 16020000.sdio1: Version ID is 290a
[    6.512249] dwmmc_starfive 16010000.sdio0: DW MMC controller at irq 29,32 bit host data width,32 deep fifo
[    6.518083] dwmmc_starfive 16020000.sdio1: DW MMC controller at irq 30,32 bit host data width,32 deep fifo
[    6.528081] mmc_host mmc0: card is non-removable.
[    6.537918] mmc_host mmc1: card is polling.
[    6.547446] jh7110-sec 16000000.crypto: will run requests pump with realtime priority
[    6.563287] jh7110-sec 16000000.crypto: Initialized
[    6.569879] starfive-i2s 120b0000.i2stx_4ch0:  designware: play supported
[    6.576760] starfive-i2s 120b0000.i2stx_4ch0: designware: i2s master mode supported
[    6.584787] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe begin
[    6.591166] sf-mipi-dphy-tx 295e0000.mipi-dphy: ===> sf_dphy_probe enter, 445 
[    6.598721] sf-mipi-dphy-tx 295e0000.mipi-dphy: control ECO
[    6.604377] sf-mipi-dphy-tx 295e0000.mipi-dphy: supply mipi_1p8 not found, using dummy regulator
[    6.613789] sf-mipi-dphy-tx 295e0000.mipi-dphy: sf_dphy_probe end
[    6.620329] cdns-dsi 295d0000.mipi: dsi_sys_clk = 297000000
[    6.626428] cdns-dsi 295d0000.mipi: starfive dsi bind end
[    6.635678] of_cfs_init
[    6.638217] of_cfs_init: OK
[    6.641872] starfive-pwmdac 100b0000.pwmdac: clk_apb0 = 49500000, clk_pwmdac_apb = 49500000, clk_pwmdac_core = 4068493
[    6.653793] cfg80211: Loading compiled-in X.509 certificates for regulatory database
[    6.765464] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 400000Hz, actual 399193HZ div = 248)
[    6.765484] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 400000Hz, actual 399193HZ div = 248)
[    6.765937] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
[    6.791763] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[    6.800516] cfg80211: failed to load regulatory.db
[    6.992567] starfive soc:display-subsystem: bound 29400000.dc8200 (ops 0xffffffff81275330)
[    7.001090] innohdmi-starfive 29590000.hdmi: inno hdmi bind begin
[    7.009954] innohdmi-starfive 29590000.hdmi: [drm:inno_hdmi_bind] registered Inno HDMI I2C bus driver success
[    7.020670] innohdmi-starfive 29590000.hdmi: HDMI&AUDIO register done.
[    7.027437] innohdmi-starfive 29590000.hdmi: inno hdmi bind end
[    7.033491] starfive soc:display-subsystem: bound 29590000.hdmi (ops 0xffffffff812760c8)
[    7.041768] vs-simple-encoder soc:dsi-output: encoder_bind begin
[    7.048001] no panel, -517
[    7.050816] vs-simple-encoder soc:dsi-output: encoder_bind error
[    7.056972] starfive soc:display-subsystem: bound soc:dsi-output (ops 0xffffffff81275d10)
[    7.067061] [drm] Initialized starfive 1.0.0 20191101 for soc:display-subsystem on minor 0
[    7.075704] starfive soc:display-subsystem: [drm] Cannot find any crtc or sizes
[    7.083688] starfive soc:display-subsystem: [drm] Cannot find any crtc or sizes
[    7.091190] mmc_host mmc1: Bus speed (slot 0) = 198000000Hz (slot req 50000000Hz, actual 49500000HZ div = 2)
[    7.091224] starfive soc:display-subsystem: [drm] Cannot find any crtc or sizes
[    7.108793] mmc1: new high speed SDXC card at address 59b4
[    7.116913] mmcblk1: mmc1:59b4 SD64G 59.4 GiB 
[    7.134385] GPT:Primary header thinks Alt. header is not at the end of the disk.
[    7.141911] GPT:247807 != 124669951
[    7.145464] GPT:Alternate GPT header not at the end of the disk.
[    7.151508] GPT:247807 != 124669951
[    7.155027] GPT: Use GNU Parted to correct GPT errors.
[    7.160323]  mmcblk1: p1 p2 p3
[    7.265456] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 300000Hz, actual 300000HZ div = 330)
[    7.491494] random: fast init done
[    7.715450] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 200000Hz, actual 200000HZ div = 495)
[    8.165495] mmc_host mmc0: Bus speed (slot 0) = 198000000Hz (slot req 100000Hz, actual 100000HZ div = 990)
[    9.115486] ALSA device list:
[    9.118507]   #0: Starfive-PWMDAC-Sound-Card
[    9.122807]   #1: Starfive-HDMI-Sound-Card
[    9.148130] Freeing unused kernel image (initmem) memory: 5868K
[    9.154271] Run /init as init process
2001/01/01 00:00:06 Welcome to u-root!
                              _
   _   _      _ __ ___ [    9.250325] cgroup: Unknown subsys name 'memory'
  ___ | |_
  | [    9.256408] cgroup: Unknown subsys name 'freezer'
| | |____| '__/ [    9.262582] cgroup: Unknown subsys name 'devices'
_ \ / _ \| __|
[    9.268667] cgroup: Unknown subsys name 'cpuacct'
  | |_| |____| |[    9.274692] cgroup: Unknown subsys name 'blkio'
 | (_) | (_) | |[    9.280873] cgroup: Unknown subsys name 'cpuset'
_
   \__,_|    [    9.286728] cgroup: Unknown subsys name 'pids'
|_|  \___/ \___/[    9.292515] cgroup: Unknown subsys name 'net_cls'
 \__|

[    9.298870] cgroup: Unknown subsys name 'hugetlb'
[    9.304215] cgroup: Unknown subsys name 'perf_event'
/# ls
2 Likes

u-boot sets up drivers for hardware to be accessed, usb and nvme both need pci to be running, maybe a bit more than opensbi can manage.