Hi Guix! When generating a VisionFive2 system image via $ guix system image gnu/system/images/visionfive2.scm --no-grafts --target=riscv64-linux-gnu and attempting to boot from MMC2, the SD card U-boot fails to boot Linux.
(Pretty sure --target= is gratuitous but I kept it.) This occurs despite setting and saving the ftdfile variable as described in the instructions: --8<---------------cut here---------------start------------->8--- ;;; Commentary: ;;; ;;; VisionFive2 can boot from MMC1 (SPI flash) or MMC2 (SD card) selected ;;; by DIP switches MSEL[1:0], you may want boot from MMC2 to use the ;;; U-Boot from Guix System instead of the vendor U-Boot in MMC1. Before ;;; doing so, make sure you have a correct 'fdtfile' in the environment: ;;; ;;; uboot> setenv fdtfile starfive/jh7110-starfive-visionfive-2-v1.3b.dtb ;;; uboot> saveenv --8<---------------cut here---------------end--------------->8--- --8<---------------cut here---------------start------------->8--- # Confirming the variable is set after reboot using the U-boot console: StarFive # printenv fdtfile fdtfile=starfive/jh7110-starfive-visionfive-2-v1.3b.dtb --8<---------------cut here---------------end--------------->8--- The system /does/ boot into Linux if SPI Flash is selected as a boot source, although since the onboard bootloader is outdated the system only sees 4 GiB of RAM [1]. Attached is the full failing boot log. Here are the highlights: --8<---------------cut here---------------start------------->8--- U-Boot SPL 2024.01 (Jan 01 1970 - 00:00:01 +0000) DDR version: dc2e84f0. Trying to boot from MMC2 OpenSBI v1.3 ################ SNIP ################ U-Boot 2024.01 (Jan 01 1970 - 00:00:01 +0000) CPU: rv64imafdc_zba_zbb Model: StarFive VisionFive 2 v1.3B DRAM: 8 GiB Core: 134 devices, 26 uclasses, devicetree: board WDT: Not starting watchdog@13070000 MMC: mmc@16010000: 0, mmc@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 ################ SNIP ################ starfive_7110_pcie pcie@2b000000: Starfive PCIe bus probed. starfive_7110_pcie pcie@2c000000: Starfive PCIe bus probed. In: serial@10000000 Out: serial@10000000 Err: serial@10000000 Net: eth0: ethernet@16030000, eth1: ethernet@16040000 libfdt fdt_check_header(): FDT_ERR_BADMAGIC Card did not respond to voltage select! : -110 Card did not respond to voltage select! : -110 bootmode flash device 0 Card did not respond to voltage select! : -110 Hit any key to stop autoboot: 0 Card did not respond to voltage select! : -110 ** Bad device specification mmc 0 ** Couldn't find partition mmc 0:3 Can't set block device Importing environment from mmc0 ... ## Warning: Input data exceeds 1048576 bytes - truncated ## Info: input data size = 1048578 = 0x100002 Can't set block device ## Warning: defaulting to text format ## Error: "boot2" not defined Card did not respond to voltage select! : -110 ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110StarFive # StarFive # --8<---------------cut here---------------end--------------->8--- Guix Describe: --8<---------------cut here---------------start------------->8--- Generation 77 May 24 2024 00:15:41 (current) guix 9901416 repository URL: https://git.savannah.gnu.org/git/guix.git branch: master commit: 9901416233867233192b63fde7f616751127b189 --8<---------------cut here---------------end--------------->8---
U-Boot SPL 2024.01 (Jan 01 1970 - 00:00:01 +0000) DDR version: dc2e84f0. Trying to boot from MMC2 OpenSBI v1.3 ____ _____ ____ _____ / __ \ / ____| _ \_ _| | | | |_ __ ___ _ __ | (___ | |_) || | | | | | '_ \ / _ \ '_ \ \___ \| _ < | | | |__| | |_) | __/ | | |____) | |_) || |_ \____/| .__/ \___|_| |_|_____/|___/_____| | | |_| Platform Name : StarFive VisionFive 2 v1.3B 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 : --- Platform Shutdown Device : --- Platform Suspend Device : --- Platform CPPC Device : --- Firmware Base : 0x40000000 Firmware Size : 234 KB Firmware RW Offset : 0x20000 Firmware RW Size : 106 KB Firmware Heap Offset : 0x30000 Firmware Heap Size : 42 KB (total), 2 KB (reserved), 9 KB (used), 30 KB (free) Firmware Scratch Size : 4096 B (total), 760 B (used), 3336 B (free) Runtime SBI Version : 1.0 Domain0 Name : root Domain0 Boot HART : 3 Domain0 HARTs : 0*,1*,2*,3*,4* Domain0 Region00 : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: () Domain0 Region01 : 0x0000000040000000-0x000000004001ffff M: (R,X) S/U: () Domain0 Region02 : 0x0000000040020000-0x000000004003ffff 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 : 0x0000000040400000 Domain0 Next Mode : S-mode Domain0 SysReset : yes Domain0 SysSuspend : yes Boot HART ID : 3 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 2024.01 (Jan 01 1970 - 00:00:01 +0000) CPU: rv64imafdc_zba_zbb Model: StarFive VisionFive 2 v1.3B DRAM: 8 GiB Core: 134 devices, 26 uclasses, devicetree: board WDT: Not starting watchdog@13070000 MMC: mmc@16010000: 0, mmc@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: VF7110B1-2253-D008E000-00004582 data version: 0x2 PCB revision: 0xb2 BOM revision: A Ethernet MAC0 address: 6c:cf:39:00:47:28 Ethernet MAC1 address: 6c:cf:39:00:47:29 --------EEPROM INFO-------- starfive_7110_pcie pcie@2b000000: Starfive PCIe bus probed. starfive_7110_pcie pcie@2c000000: Starfive PCIe bus probed. In: serial@10000000 Out: serial@10000000 Err: serial@10000000 Net: eth0: ethernet@16030000, eth1: ethernet@16040000 libfdt fdt_check_header(): FDT_ERR_BADMAGIC Card did not respond to voltage select! : -110 Card did not respond to voltage select! : -110 bootmode flash device 0 Card did not respond to voltage select! : -110 Hit any key to stop autoboot: 0 Card did not respond to voltage select! : -110 ** Bad device specification mmc 0 ** Couldn't find partition mmc 0:3 Can't set block device Importing environment from mmc0 ... ## Warning: Input data exceeds 1048576 bytes - truncated ## Info: input data size = 1048578 = 0x100002 Can't set block device ## Warning: defaulting to text format ## Error: "boot2" not defined Card did not respond to voltage select! : -110 ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16030000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110ethernet@16040000 Waiting for PHY auto negotiation to complete......... TIMEOUT ! phy_startup() failed: -110FAILED: -110StarFive # StarFive #
[1]: https://github.com/starfive-tech/VisionFive2/issues/20 -- Take it easy, Richard Sent Making my computer weirder one commit at a time.