[PATCH] mvebu: Enable preboot start for pci/usb/scsi/nvme

Igor Opaniuk igor.opaniuk at gmail.com
Tue Apr 2 11:07:05 CEST 2024


Hi Dennis,

On Tue, Apr 2, 2024 at 3:40 AM Dennis Gilmore <dennis at ausil.us> wrote:

> While preboot was enabled, it did not work as commands are needed to be
> run to enable some of the subsystems. This patch starts pci, USB, Sata,
> and nvme and makes sure that the system will boot no mater what storage
> is in use.
>
> Applogies for resending, I accidently left the u-boot list off
>
> Signed-off-by: Dennis Gilmore <dennis at ausil.us>
> ---
>  configs/mvebu_espressobin-88f3720_defconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/configs/mvebu_espressobin-88f3720_defconfig
> b/configs/mvebu_espressobin-88f3720_defconfig
> index 7ecf5ab0d64..f4f7a809609 100644
> --- a/configs/mvebu_espressobin-88f3720_defconfig
> +++ b/configs/mvebu_espressobin-88f3720_defconfig
> @@ -21,6 +21,7 @@ CONFIG_AHCI=y
>  CONFIG_DISTRO_DEFAULTS=y
>  CONFIG_OF_BOARD_SETUP=y
>  CONFIG_USE_PREBOOT=y
> +CONFIG_PREBOOT="pci enum; usb start; nvme scan; scsi scan;"
>  CONFIG_SYS_CONSOLE_INFO_QUIET=y
>  # CONFIG_DISPLAY_CPUINFO is not set
>  # CONFIG_DISPLAY_BOARDINFO is not set
> --
> 2.44.0
>
> The issue is in a different place. This board uses distroboot
approach (based on what I see in [1]), which is supposed to automatically
initialize boot media before trying to boot from it [2].
Initialization of media is forced when the CONFIG_<subsystem> symbol is
enabled, for example CONFIG_NVMEM=y (check BOOTENV_SET_NVME_NEED_INIT
define in [2]). In your final board config "# CONFIG_NVMEM is not set"
though.

IMO, with your proposed fix you'll drastically increase boot time
(by probing all buses regardless of what boot media is going to be used
next),
and hide side effects of misconfiguration.

Hope that helps

Regards,
Igor

[1] include/configs/mvebu_armada-37xx.h
[2] include/config_distro_bootcmd.h

-- 
Best regards - Atentamente - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
https://www.linkedin.com/in/iopaniuk <http://ua.linkedin.com/in/iopaniuk>


More information about the U-Boot mailing list