Debian Image 69 Failed to load

用BalenaEtcher制作完sd卡后
在uboot加载出现了如下问题

--------EEPROM INFO--------

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Model: StarFive VisionFive V2
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
Can't set block device
Failed to load '/boot/uEnv.txt'
Hit any key to stop autoboot:  0
Can't set block device
Importing environment from mmc1 ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:2...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
823 bytes read in 4 ms (200.2 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: /boot/initrd.img-5.15.0-starfive
9684953 bytes read in 410 ms (22.5 MiB/s)
Retrieving file: /boot/vmlinuz-5.15.0-starfive
8015200 bytes read in 339 ms (22.5 MiB/s)
append: root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
Retrieving file: /boot/dtbs/starfive/starfive_visionfive2.dtb
Failed to load '/boot/dtbs/starfive/starfive_visionfive2.dtb'
kernel_comp_addr_r or kernel_comp_size is not provided!
2:      Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
Retrieving file: /boot/initrd.img-5.15.0-starfive
9684953 bytes read in 411 ms (22.5 MiB/s)
Retrieving file: /boot/vmlinuz-5.15.0-starfive
8015200 bytes read in 339 ms (22.5 MiB/s)
append: root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single
Retrieving file: /boot/dtbs/starfive/starfive_visionfive2.dtb
Failed to load '/boot/dtbs/starfive/starfive_visionfive2.dtb'
kernel_comp_addr_r or kernel_comp_size is not provided!
SCRIPT FAILED: continuing...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
** Unable to read file ubootefi.var **
Failed to load EFI variables
Scanning mmc 1:3...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
ethernet@16040000 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1

我尝试在uboot中输入该命令去测试这个问题

load mmc 1:2 0xa0000000 boot/dtbs/starfive/starfive_visionfive2.dtb

结果和上面的log是一样的。
但是我用fatls命令是能看到该文件的

StarFive # fatls mmc 1:2 boot/dtbs/starfive/
            ./
            ../
    64747   jh7110-evb-can-pdm-pwmdac.dtb
    64147   jh7110-evb-dvp-rgb2hdmi.dtb
    64611   jh7110-evb-i2s-ac108.dtb
    65042   jh7110-evb-pcie-i2s-sd.dtb
    64267   jh7110-evb-spi-uart2.dtb
    64303   jh7110-evb-uart1-rgb2hdmi.dtb
    64805   jh7110-evb-uart4-emmc-spdif.dtb
    64903   jh7110-evb-uart5-pwm-i2c-tdm.dtb
    64251   jh7110-evb-usbdevice.dtb
    64564   jh7110-evb.dtb
    63408   jh7110-fpga.dtb
    47118   jh7110-visionfive-v2-A10.dtb
    47294   jh7110-visionfive-v2-A11.dtb
    48184   jh7110-visionfive-v2-ac108.dtb
    48247   jh7110-visionfive-v2-wm8960.dtb
    47546   jh7110-visionfive-v2.dtb
            evb-overlay/
            vf2-overlay/

16 file(s), 4 dir(s)

这种问题需要怎么解决?已经升级了论坛里的新固件

fb4dabdefecd21ebcd8b0c3c84174aea,visionfive2_fw_payload.img
1a8e399f270982acc6de88bb21bc9070,u-boot-spl.bin.normal.out

image 55是没有这个问题的

请更新下uboot和spl,因为这个版本解决了eth0网络不同以及ddr容量不对的问题;

具体更新办法详见更新SPL和U-Boot 通过在uboot环境下输入tftpboot命令,教程里只举例在ubuntu下面通过tftpd传输文件至开发板,如果你是windows PC,请下载tftpd32再传输,其他类似;

最新的uboot和spl请从这里下载昉·星光 2 Debian Image 69工程版本推出

可否有完整的log,我看下哪里出问题了

已经更新了这个uboot和spl

U-Boot SPL 2021.10 (Dec 25 2022 - 20:59:18 +0800)
DDR version: dc2e84f0.
Trying to boot from SPI

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

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 Reboot Device    : ---
Platform Shutdown Device  : ---
Firmware Base             : 0x40000000
Firmware Size             : 360 KB
Runtime SBI Version       : 0.3

Domain0 Name              : root
Domain0 Boot HART         : 1
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff (I)
Domain0 Region01          : 0x0000000040000000-0x000000004007ffff ()
Domain0 Region02          : 0x0000000000000000-0xffffffffffffffff (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000042200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : 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 (Dec 25 2022 - 20:59:18 +0800), Build: jenkins-github_visionfive2-4

CPU:   rv64imacu
Model: StarFive VisionFive V2
DRAM:  4 GiB
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
OK
StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110A1-2249-D004E000-xxxxxxxx
data version: 0x2
PCB revision: 0xa1
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:xxxxx
Ethernet MAC1 address: 6c:cf:39:00:xxxxx
--------EEPROM INFO--------

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Model: StarFive VisionFive V2
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
Can't set block device
Failed to load '/boot/uEnv.txt'
Hit any key to stop autoboot:  0
Can't set block device
Importing environment from mmc1 ...
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:2...
Found /boot/extlinux/extlinux.conf
Retrieving file: /boot/extlinux/extlinux.conf
823 bytes read in 4 ms (200.2 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: /boot/initrd.img-5.15.0-starfive
9684953 bytes read in 410 ms (22.5 MiB/s)
Retrieving file: /boot/vmlinuz-5.15.0-starfive
8015200 bytes read in 339 ms (22.5 MiB/s)
append: root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0
Retrieving file: /boot/dtbs/starfive/starfive_visionfive2.dtb
Failed to load '/boot/dtbs/starfive/starfive_visionfive2.dtb'
kernel_comp_addr_r or kernel_comp_size is not provided!
2:      Debian GNU/Linux bookworm/sid 5.15.0-starfive (rescue target)
Retrieving file: /boot/initrd.img-5.15.0-starfive
9684953 bytes read in 411 ms (22.5 MiB/s)
Retrieving file: /boot/vmlinuz-5.15.0-starfive
8015200 bytes read in 339 ms (22.5 MiB/s)
append: root=/dev/mmcblk1p3 rw console=tty0 console=ttyS0,115200 earlycon rootwait stmmaceth=chain_mode:1 selinux=0 single
Retrieving file: /boot/dtbs/starfive/starfive_visionfive2.dtb
Failed to load '/boot/dtbs/starfive/starfive_visionfive2.dtb'
kernel_comp_addr_r or kernel_comp_size is not provided!
SCRIPT FAILED: continuing...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
** Unable to read file ubootefi.var **
Failed to load EFI variables
Scanning mmc 1:3...
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
ethernet@16040000 Waiting for PHY auto negotiation to complete.... done
BOOTP broadcast 1
BOOTP broadcast 2
BOOTP broadcast 3
BOOTP broadcast 4
BOOTP broadcast 5
BOOTP broadcast 6
BOOTP broadcast 7
DHCP client bound to address 192.168.xxx.xxx (7781 ms)
Using ethernet@16040000 device
TFTP from server 192.168.xxx.xxx; our IP address is 192.168.xxx.xxx; sending through gateway 192.168.xxx.1
Filename 'boot.scr.uimg'.
Load address: 0x88100000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...
BOOTP broadcast 1
DHCP client bound to address 192.168.xxx.xxx (21 ms)
Using ethernet@16040000 device
TFTP from server 192.168.xxx.xxx; our IP address is 192.168.xxx.xxx; sending through gateway 192.168.xxx.1
Filename 'boot.scr.uimg'.
Load address: 0x44000000
Loading: *
TFTP error: 'File not found' (1)
Not retrying...

你改过环境变量吗?请清除下uboot下的环境变量eraseenv,再重启试试

谢谢,已经ok了

怎么解决的

I can confirm that for me, updating u-boot and SBI helped.

What’s awkward is needing to do tftpboot setup. Instead, I just copied in the files onto the EFI partition (FAT filesystem) on the SD card, and loaded from there. It might be a good enhancement of both the image contents by always having it included, and the instructions to make it easier. Could even do an alias in u-boot for it so it’s a one-command thing.

2 Likes

Hello,

Agree with @olofj, I have written information on how I reflashed SPL and u-Boot without tftboot here: VisionFive 2 Debian Image Released - #73 by kesmik

May be usefull for someone IDK