Unable to boot from NVME

I “flashed” the nvme with balenaetch (with NVME image)

this is the serial log of the initial boot phase

U-Boot SPL 2021.10 (Aug 31 2023 - 12:55:45 +0800)
LPDDR4: 8G version: g8ad50857.
Trying to boot from SPI

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


U-Boot 2021.10 (Aug 31 2023 - 12:55:45 +0800), Build: jenkins-github_visionfive2-17

CPU:   rv64imacu_zba_zbb
Model: StarFive VisionFive V2
DRAM:  8 GiB
cdns3_bind: unsupported dr_mode
MMC:   sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110A1-2250-D008E000-00000926
data version: 0x2
PCB revision: 0xa1
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:1a:bb
Ethernet MAC1 address: 6c:cf:39:00:1a:bc
--------EEPROM INFO--------

In:    serial
Out:   serial
Err:   serial
Model: StarFive VisionFive V2
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
Failed to load 'vf2_uEnv.txt'
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
Card did not respond to voltage select! : -110
starfive_pcie pcie@2B000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10

Device 0: Vendor: 0x1e4b Rev: HS11795  Prod: P300EDBB23061700977
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
... is now current device
Try booting from NVME0 ...
Failed to load 'vf2_uEnv.txt'
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined

Device 0: Vendor: 0x1e4b Rev: HS11795  Prod: P300EDBB23061700977
            Type: Hard Disk
            Capacity: 122104.3 MB = 119.2 GB (250069680 x 512)
... is now current device
Try booting from NVME0 ...
Failed to load 'vf2_uEnv.txt'
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
Tring booting distro ...
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
406 bytes read in 5 ms (79.1 KiB/s)
## Warning: defaulting to text format
52677 bytes read in 9 ms (5.6 MiB/s)
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
52677 bytes written in 30 ms (1.7 MiB/s)
Retrieving file: /extlinux/extlinux.conf
792 bytes read in 5 ms (154.3 KiB/s)
U-Boot menu
1:      Debian GNU/Linux bookworm/sid 5.15.0-starfive
2:      Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
Enter choice: 1:        Debian GNU/Linux bookworm/sid 5.15.0-starfive
Retrieving file: /initrd.img-5.15.0-starfive
9272042 bytes read in 409 ms (21.6 MiB/s)
Retrieving file: /vmlinuz-5.15.0-starfive
8588858 bytes read in 380 ms (21.6 MiB/s)
append: root=/dev/mmcblk1p4 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
Retrieving file: /dtbs/starfive/jh7110-visionfive-v2.dtb
52677 bytes read in 9 ms (5.6 MiB/s)
   Uncompressing Kernel Image
Moving Image from 0x44000000 to 0x40200000, end=419b5000
## Flattened Device Tree blob at 48000000
   Booting using the fdt blob at 0x48000000
   Using Device Tree in place at 0000000048000000, end 000000004800fdc4

Starting kernel ...

NVME seems in working order


user@starfive:~$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
mtdblock0    31:0    0   256K  0 disk
mtdblock1    31:1    0     3M  0 disk
mtdblock2    31:2    0     1M  0 disk
mmcblk1     179:0    0  58.3G  0 disk
|-mmcblk1p1 179:1    0     2M  0 part
|-mmcblk1p2 179:2    0     4M  0 part
|-mmcblk1p3 179:3    0   100M  0 part
`-mmcblk1p4 179:4    0  58.1G  0 part /
nvme0n1     259:0    0 119.2G  0 disk
|-nvme0n1p1 259:1    0     2M  0 part
|-nvme0n1p2 259:2    0     4M  0 part
|-nvme0n1p3 259:3    0   100M  0 part
`-nvme0n1p4 259:4    0   3.8G  0 part
user@starfive:~$
1 Like

After reading this post and this document. Did you try booting with only the NVMe connected (Power off the board “sudo poweroff”, then unplug the MicroSD and/or eMMC).

2 Likes

Funny thing is that if it wasn’t for that Try booting from NVME0 I would have probably reached for some doc and got there on my own.

Anyway, it works like a charm,

Thanks

2 Likes