all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Richard Sent <richard@freakingpenguin.com>
To: 71197@debbugs.gnu.org
Cc: zhengjunjie@iscas.ac.cn
Subject: bug#71197: visionfive2-barebones-os fails to boot Linux from MMC2
Date: Sat, 25 May 2024 09:13:22 -0400	[thread overview]
Message-ID: <874jamt4p9.fsf@freakingpenguin.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 3910 bytes --]

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---


[-- Attachment #2: VisionFive2 U-boot failure --]
[-- Type: text/plain, Size: 4333 bytes --]

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 # 

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]


[1]: https://github.com/starfive-tech/VisionFive2/issues/20

-- 
Take it easy,
Richard Sent
Making my computer weirder one commit at a time.

             reply	other threads:[~2024-05-25 13:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-25 13:13 Richard Sent [this message]
2024-05-25 14:11 ` bug#71197: visionfive2-barebones-os fails to boot Linux from MMC2 Z572
2024-05-25 15:59   ` Richard Sent

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jamt4p9.fsf@freakingpenguin.com \
    --to=richard@freakingpenguin.com \
    --cc=71197@debbugs.gnu.org \
    --cc=zhengjunjie@iscas.ac.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.