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

Distro Boot Broken #30

Open
zhaofengli opened this issue Feb 27, 2022 · 1 comment
Open

Distro Boot Broken #30

zhaofengli opened this issue Feb 27, 2022 · 1 comment

Comments

@zhaofengli
Copy link

In the U-Boot shipped with VisionFive boards, environment variables required for Distro Boot (scriptaddr, kernel_addr_r, etc.) are not defined, so the normal boot paths (extlinux.conf, boot.scr, EFI) are broken:

Scanning mmc 0:3...
Found U-Boot script /boot.scr
load - load binary file from a filesystem

Usage:
load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
    - Load binary file 'filename' from partition 'part' on device
       type 'interface' instance 'dev' to address 'addr' in memory.
      'bytes' gives the size to load in bytes.
      If 'bytes' is 0 or omitted, the file is read until the end.
      'pos' gives the file byte position to start reading from.
      If 'pos' is 0 or omitted, the file is read from the start.
## Executing script at 80200000
Wrong image format for "source" command
SCRIPT FAILED: continuing...
Found /boot/extlinux/extlinux.conf
Invalid pxefile address: /boot/extlinux/extlinux.conf
SCRIPT FAILED: continuing...

(boot_a_script does load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script} which doesn't work because scriptaddr is empty, same for boot_extlinux and boot_efi_binary)

The Fedora image works around this by having a uEnv.txt in mmc 0:3 (hardcoded here in U-Boot) which sets bootcmd along with platform-specific offsets, bypassing Distro Boot. This isn't ideal since it forces a specific partition layout and requires the build to be board-specific. In the (distant) future, we would like to have a shared SD image that boots via normal UEFI on multiple RISC-V platforms.

Please set the expected variables in CONFIG_EXTRA_ENV_SETTINGS (ex: HiFive Unmatched) so that normal distro boot works.


Version: U-Boot 2022.01-rc4-VisionFive-g0c08d335c5 (Dec 30 2021 - 08:30:15 +0800)StarFive

@zorun
Copy link

zorun commented May 30, 2022

I had the same issue, here is a fix: #31

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