diff mbox series

config/sifive_unmatched: add preboot commands

Message ID 20210815152701.117472-1-kallisti5@unixzen.com
State Changes Requested
Delegated to: Andes
Headers show
Series config/sifive_unmatched: add preboot commands | expand

Commit Message

Alexander von Gluck IV Aug. 15, 2021, 3:27 p.m. UTC
* Opens up u-boot to properly search through USB media
  for a valid boot media
* The MMC on the unmatched is slow, so a model of running
  the OS from USB or NVMe is a compelling one. (putting just
  u-boot on the sd card)
---
 configs/sifive_unmatched_defconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

David Abdurachmanov Sept. 3, 2021, 7:47 a.m. UTC | #1
On Sun, Aug 15, 2021 at 6:27 PM Alexander von Gluck IV
<kallisti5@unixzen.com> wrote:
>
> * Opens up u-boot to properly search through USB media
>   for a valid boot media
> * The MMC on the unmatched is slow, so a model of running
>   the OS from USB or NVMe is a compelling one. (putting just
>   u-boot on the sd card)
> ---
>  configs/sifive_unmatched_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
> index 38b7acd536..0e02d46f72 100644
> --- a/configs/sifive_unmatched_defconfig
> +++ b/configs/sifive_unmatched_defconfig
> @@ -11,6 +11,7 @@ CONFIG_TARGET_SIFIVE_UNMATCHED=y
>  CONFIG_ARCH_RV64I=y
>  CONFIG_RISCV_SMODE=y
>  # CONFIG_SPL_USE_ARCH_MEMMOVE is not set
> +CONFIG_PREBOOT="pci enum; usb start;"

I don't think you need it.

Looking at the include/config_distro_bootcmd.h and in particular at
CONFIG_CMD_USB I don't see BOOTENV_RUN_PCI_ENUM listed.

It is listed for NVMe, VirtIO, DHCP stuff. In other words the current
code in bootcmd does not expect USB to be connected via PCIe. Thus I
suggest adding BOOTENV_RUN_PCI_ENUM (one line) to CONFIG_CMD_USB
config as in other boot options. That seems to be the correct
approach.

david

>  CONFIG_DISTRO_DEFAULTS=y
>  CONFIG_FIT=y
>  CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000
> --
> 2.32.0
>
diff mbox series

Patch

diff --git a/configs/sifive_unmatched_defconfig b/configs/sifive_unmatched_defconfig
index 38b7acd536..0e02d46f72 100644
--- a/configs/sifive_unmatched_defconfig
+++ b/configs/sifive_unmatched_defconfig
@@ -11,6 +11,7 @@  CONFIG_TARGET_SIFIVE_UNMATCHED=y
 CONFIG_ARCH_RV64I=y
 CONFIG_RISCV_SMODE=y
 # CONFIG_SPL_USE_ARCH_MEMMOVE is not set
+CONFIG_PREBOOT="pci enum; usb start;"
 CONFIG_DISTRO_DEFAULTS=y
 CONFIG_FIT=y
 CONFIG_SPL_LOAD_FIT_ADDRESS=0x84000000