starfive-tech / VisionFive2

438 stars 78 forks source link

VisionFive 2 with 8GB failing to boot after flashing v3.6.1 #79

Closed maxengel closed 10 months ago

maxengel commented 10 months ago

I was successfully running starfive-jh7110-VF2_515_v2.5.0-69.img on my new board via the SD Card slotr. I then used SCP to update SPL and U-Boot with version 3.6.1 via SCP. After successfully writing each file to the correct partition, the VisionFive 2 failed to boot.

I have replicated this issue with 2 differents brands of SD card: SanDisk and Samsung.

Is there a known issue with the 8GB model or anything else that could be causing this issue? If I reflash my SD card again with the Debian image everything works again.

martin-zs commented 10 months ago

The size of the SPL partition (128KiB) in the older VF2_515_v2.5.0-69 is smaller than the current firmware requires. So at a guess you have written a truncated SPL to the SPI NOR FLASH.

https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v2.5.0 u-boot-spl.bin.normal.out 125 KB Dec 26, 2022 visionfive2_fw_payload.img 2.66 MB Dec 26, 2022 $ cat /proc/mtd dev: size erasesize name mtd0: 00020000 00001000 “spl” mtd1: 00300000 00001000 “uboot” mtd2: 00100000 00001000 “data” https://github.com/starfive-tech/VisionFive2/releases/tag/VF2_v3.6.1 u-boot-spl.bin.normal.out 144 KB 2 days ago visionfive2_fw_payload.img 2.83 MB 2 days ago $ cat /proc/mtd dev: size erasesize name mtd0: 00040000 00001000 "spl" mtd1: 00300000 00001000 "uboot" mtd2: 00100000 00001000 "data"

maxengel commented 10 months ago

@martin-zs thanks for the info. I do get:

dev:    size   erasesize  name
mtd0: 00020000 00001000 "spl"
mtd1: 00300000 00001000 "uboot"
mtd2: 00100000 00001000 "data"

Is there a more recent Debian image I should be flashing, or should I just resize the SPL partition to 40000 from the 20000 I currently have?

ThomasKorimort commented 10 months ago

Simply flash the debian-202308 image. That uses kernel 5.15.0, but the kernel firewall does not work and till now i have not checked out successfully the kernel branch of 5.15.0 that would allow to compile a working kernel 5.15.0 with working nftables kernel firewall.

maxengel commented 10 months ago

This was user error on my part, since I am booting from the SD card. I needed to change the boot jumper config to use SDIO instead of QSPI and it worked fine.