Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to boot from eMMC on VisionFive 2 #48

Open
pinkavaj opened this issue Apr 29, 2023 · 2 comments
Open

Failed to boot from eMMC on VisionFive 2 #48

pinkavaj opened this issue Apr 29, 2023 · 2 comments

Comments

@pinkavaj
Copy link

Boot from eMMc fails on on VisionFive 2. On eMMc is writen the the Debian Image (1) with modifications necessary to boot from eMMc. After running the command bellow in U-Boot the system boots fine.

U-Boot command to fix the boot

setenv fatbootpart 0:3
# saveenv  # - uncomment to save the configuration
boot

It looks like for some reason the fatbootpart partition number is not set from $devnum but mey-be hardcoded to 1:3?

Error

Card did not respond to voltage select! : -110
Couldn't find partition mmc 1:3
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
Card did not respond to voltage select! : -110
Couldn't find partition mmc 1:3
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
Card did not respond to voltage select! : -110
Couldn't find partition mmc 1:3
Retrieving file: /extlinux/extlinux.conf
Card did not respond to voltage select! : -110
Couldn't find partition mmc 1:3
Can't set block device
Error reading config file
  1. Debian image: https://drive.google.com/drive/folders/1cctIVdCfbPhKpyQ0PcmCQ92KCQjJ8JI5
  2. The U-Boot/SLP were updated to the ones provided by release: VisionFive2 Software v2.11.5
@pinkavaj
Copy link
Author

pinkavaj commented Apr 29, 2023

I'm kind of suspecting this part of the code

"fatbootpart=1:3\0" \
"distroloadaddr=0xb0000000\0" \
"load_distro_uenv=" \
"fatload mmc ${devnum}:3 ${distroloadaddr} /${bootenv}; " \
"setenv fatbootpart ${devnum}:3; " \

I would expect the fatbootpart will be set correctly, but for some reason it probably does not work as-expected.

@MichaIng
Copy link
Contributor

MichaIng commented Apr 29, 2023

Indeed too many things are hardcoded, including the fact that it is fatbootpart and not just generic bootpart using load instead of fatload to be compatible with any filesystem type.

When not following the 4 partitions layout, so that bootcmd_distro fails, bootcmd_mmc0 is used next which has a generic partitions scanning for first extlinux>boot.scr>EFI on the SD card, which I would usually expect right from the start. But there is no mmc1 boot target defined to do the same for the eMMC.

Using an all generic method however makes it more complicated to do the as well hardcoded starfive_visionfive2.dtb rewrite on every boot to enable 8 GiB RAM support and Ethernet for the A1.2 variant. Doing all this properly with this vendor U-Boot seems to be a too large rewrite to be realistic. I hope the upstream implementation comes with a sane generic ordered boot partition detection across all storage devices, partition numbers and filesystem types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants