[PATCH v2 2/3] X86: Add support for distro boot

Simon Glass sjg at chromium.org
Tue May 2 19:12:16 CEST 2023


Hi,

On Tue, 2 May 2023 at 09:41, Heinrich Schuchardt <xypron.glpk at gmx.de> wrote:
>
>
>
> Am 2. Mai 2023 17:21:29 MESZ schrieb thomas.mittelstaedt at de.bosch.com:
> >From: Thomas Mittelstaedt <thomas.mittelstaedt at de.bosch.com>
> >
> >Enable distro boot feature for U-Boot at VirtualBox described at
> >https://source.denx.de/u-boot/u-boot/-/blob/master/doc/develop/distro.rst
> >
> >Signed-off-by: Thomas Mittelstaedt <thomas.mittelstaedt at bosch.com>
> >---
> > configs/efi-x86_payload64_defconfig | 12 +-----------
> > include/configs/efi-x86_payload.h   | 11 +++++++++++
> > 2 files changed, 12 insertions(+), 11 deletions(-)
> >
> >diff --git a/configs/efi-x86_payload64_defconfig b/configs/efi-x86_payload64_defconfig
> >index 30a7f31dac..a4cfe95890 100644
> >--- a/configs/efi-x86_payload64_defconfig
> >+++ b/configs/efi-x86_payload64_defconfig
> >@@ -8,33 +8,23 @@ CONFIG_TARGET_EFI_PAYLOAD=y
> > CONFIG_FIT=y
> > CONFIG_FIT_SIGNATURE=y
> > CONFIG_LEGACY_IMAGE_FORMAT=y
> >+CONFIG_DISTRO_DEFAULTS=y
> > CONFIG_SHOW_BOOT_PROGRESS=y
> > CONFIG_USE_BOOTARGS=y
> > CONFIG_BOOTARGS="root=/dev/sdb3 init=/sbin/init rootwait ro"
> >-CONFIG_USE_BOOTCOMMAND=y
> > CONFIG_PRE_CONSOLE_BUFFER=y
> > CONFIG_SYS_CONSOLE_INFO_QUIET=y
> > CONFIG_DISPLAY_BOARDINFO_LATE=y
> > CONFIG_LAST_STAGE_INIT=y
> >-CONFIG_HUSH_PARSER=y
> > CONFIG_SYS_PBSIZE=532
> > CONFIG_CMD_IDE=y
> > CONFIG_CMD_MMC=y
> >-CONFIG_CMD_PART=y
> > CONFIG_CMD_USB=y
> >-CONFIG_CMD_DHCP=y
> > CONFIG_BOOTP_BOOTFILESIZE=y
> > # CONFIG_CMD_NFS is not set
> >-CONFIG_CMD_PING=y
> > CONFIG_CMD_TIME=y
> >-CONFIG_CMD_EXT2=y
> >-CONFIG_CMD_EXT4=y
> > CONFIG_CMD_EXT4_WRITE=y
> >-CONFIG_CMD_FAT=y
> >-CONFIG_CMD_FS_GENERIC=y
> > CONFIG_MAC_PARTITION=y
> >-CONFIG_ISO_PARTITION=y
> >-CONFIG_EFI_PARTITION=y
> > CONFIG_ENV_OVERWRITE=y
> > CONFIG_ENV_IS_IN_FAT=y
> > CONFIG_ENV_FAT_INTERFACE="scsi"
> >diff --git a/include/configs/efi-x86_payload.h b/include/configs/efi-x86_payload.h
> >index c72b067c36..e1cd8eb316 100644
> >--- a/include/configs/efi-x86_payload.h
> >+++ b/include/configs/efi-x86_payload.h
> >@@ -6,6 +6,17 @@
> > /*
> >  * board/config.h - configuration options, board specific
> >  */
> >+#ifndef CONFIG_SPL_BUILD
> >+
> >+#define BOOT_TARGET_SCSI(func) \
>
> Shouldn't NVMe be added here too?

This is automatic if you use bootstd.

>
> Best regards
>
> Heinrich
>
> >+              func(SCSI, scsi, 0)
> >+
> >+#define BOOT_TARGET_DEVICES(func) \
> >+      BOOT_TARGET_SCSI(func)
> >+
> >+#include <config_distro_bootcmd.h>
> >+
> >+#endif
> >
> > #ifndef __CONFIG_H
> > #define __CONFIG_H

Please can we use bootstd instead?

You should just need to enable BOOTSTD_DEFAULTS and it will work. If
not, please let me know.

Please also see the various improvements in[1] available at [2]. There
is also a new video driver [2].

Regards,
Simon

[1] https://patchwork.ozlabs.org/project/uboot/list/?series=351440
[2] https://source.denx.de/u-boot/custodians/u-boot-dm/-/tree/bryc-working
[3] https://patchwork.ozlabs.org/project/uboot/list/?series=352929


More information about the U-Boot mailing list