[PATCH v2 0/3] Enable U-Boot at Virtualbox to boot images

From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
The changes are needed to get U-Boot to be started at VirtualBox images supporting distro boot capability. Atm the patch "pci: coreboot: Don't read regions when booting" from Simon Glass is not integrated yet. So AHCI and IDE devices are not handled correctly without this patch. (https://patchwork.ozlabs.org/project/uboot/patch/20230220194927.476708-8-sjg...)
Changes since v1: - Remove prompt change commit - Add details in commit messages - defconfig now handled with savedefconfig option at make - Unneccessary option CONFIG_CMD_SETEXPR no more set - First patch was set with mtt2hi and thomas.mittelstaedt@bosch.com. Now set with my usual id Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
Thomas Mittelstaedt (3): X86: Add support for SCSI devices X86: Add support for distro boot X86: pxeboot: bugfix: Set variable for size of initrd
boot/pxe_utils.c | 2 +- configs/efi-x86_payload64_defconfig | 18 +++++------------- include/configs/efi-x86_payload.h | 11 +++++++++++ 3 files changed, 17 insertions(+), 14 deletions(-)

From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
U-Boot at VirtualBox must load Linux and boot configuration from disk devices. Here the discs at AHCI (scsi) bus are used to load the need boot data.
Signed-off-by: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com --- configs/efi-x86_payload64_defconfig | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/configs/efi-x86_payload64_defconfig b/configs/efi-x86_payload64_defconfig index 5cde04a5ac..30a7f31dac 100644 --- a/configs/efi-x86_payload64_defconfig +++ b/configs/efi-x86_payload64_defconfig @@ -7,11 +7,11 @@ CONFIG_VENDOR_EFI=y CONFIG_TARGET_EFI_PAYLOAD=y CONFIG_FIT=y CONFIG_FIT_SIGNATURE=y +CONFIG_LEGACY_IMAGE_FORMAT=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_BOOTCOMMAND="ext2load scsi 0:3 01000000 /boot/vmlinuz; zboot 01000000" CONFIG_PRE_CONSOLE_BUFFER=y CONFIG_SYS_CONSOLE_INFO_QUIET=y CONFIG_DISPLAY_BOARDINFO_LATE=y @@ -22,7 +22,6 @@ CONFIG_CMD_IDE=y CONFIG_CMD_MMC=y CONFIG_CMD_PART=y CONFIG_CMD_USB=y -# CONFIG_CMD_SETEXPR is not set CONFIG_CMD_DHCP=y CONFIG_BOOTP_BOOTFILESIZE=y # CONFIG_CMD_NFS is not set @@ -37,6 +36,9 @@ 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" +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="bzImage"

From: Thomas Mittelstaedt thomas.mittelstaedt@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@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) \ + 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

Am 2. Mai 2023 17:21:29 MESZ schrieb thomas.mittelstaedt@de.bosch.com:
From: Thomas Mittelstaedt thomas.mittelstaedt@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@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?
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

Hi,
On Tue, 2 May 2023 at 09:41, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Am 2. Mai 2023 17:21:29 MESZ schrieb thomas.mittelstaedt@de.bosch.com:
From: Thomas Mittelstaedt thomas.mittelstaedt@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@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

Hello Simon,
I've tried out successfully the option (with BOOTSTD_FULL, with BOOTSTD_DEFAULT it's not possible to boot) and will provide a changed patch set soon.
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Dienstag, 2. Mai 2023 19:12 An: Heinrich Schuchardt xypron.glpk@gmx.de Cc: Mittelstaedt Thomas (XC-CT/EBV3) thomas.mittelstaedt@de.bosch.com; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi,
On Tue, 2 May 2023 at 09:41, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Am 2. Mai 2023 17:21:29 MESZ schrieb thomas.mittelstaedt@de.bosch.com:
From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
Enable distro boot feature for U-Boot at VirtualBox described at https://sou/ rce.denx.de%2Fu-boot%2Fu-boot%2F-
%2Fblob%2Fmaster%2Fdoc%2Fdevelop%2Fd
istro.rst&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180e
e6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%
7C0%
7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
MDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata
=4TSv
yIZMiz4Tt7Wt36NxQR576tg%2F9cS%2FVyZS83xwN50%3D&reserved=0
Signed-off-by: Thomas Mittelstaedt thomas.mittelstaedt@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.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D351440&data=05%7C01 %7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b306 953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553 78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yjqyizWXqb YZmSuzfvqq4EfYvJYqXUf6irbLYhLo4qk%3D&reserved=0 [2] https://source.denx/ .de%2Fu-boot%2Fcustodians%2Fu-boot-dm%2F-%2Ftree%2Fbryc- working&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee 6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C 0%7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C %7C&sdata=5OF%2Bmc%2FVOSFFTzLp3JLrWBxvuZCfqwQDb3GzDZGlvws%3 D&reserved=0 [3] https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D352929&data=05%7C01 %7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b306 953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553 78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VthFwiSeQt 7c%2B%2F0twxRZTYu4smkJJDL18CkrST4mhiQ%3D&reserved=0

Hi Mittelstaedt,
On Wed, 3 May 2023 at 23:40, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hello Simon,
I've tried out successfully the option (with BOOTSTD_FULL, with BOOTSTD_DEFAULT it's not possible to boot) and will provide a changed patch set soon.
Thank you for testing. What goes wrong without BOOTSTD_FULL?
Regards, Simon
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Dienstag, 2. Mai 2023 19:12 An: Heinrich Schuchardt xypron.glpk@gmx.de Cc: Mittelstaedt Thomas (XC-CT/EBV3) thomas.mittelstaedt@de.bosch.com; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi,
On Tue, 2 May 2023 at 09:41, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Am 2. Mai 2023 17:21:29 MESZ schrieb thomas.mittelstaedt@de.bosch.com:
From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
Enable distro boot feature for U-Boot at VirtualBox described at https://sou/ rce.denx.de%2Fu-boot%2Fu-boot%2F-
%2Fblob%2Fmaster%2Fdoc%2Fdevelop%2Fd
istro.rst&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180e
e6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%
7C0%
7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
MDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata
=4TSv
yIZMiz4Tt7Wt36NxQR576tg%2F9cS%2FVyZS83xwN50%3D&reserved=0
Signed-off-by: Thomas Mittelstaedt thomas.mittelstaedt@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.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D351440&data=05%7C01 %7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b306 953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553 78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yjqyizWXqb YZmSuzfvqq4EfYvJYqXUf6irbLYhLo4qk%3D&reserved=0 [2] https://source.denx/ .de%2Fu-boot%2Fcustodians%2Fu-boot-dm%2F-%2Ftree%2Fbryc- working&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee 6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C 0%7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C %7C&sdata=5OF%2Bmc%2FVOSFFTzLp3JLrWBxvuZCfqwQDb3GzDZGlvws%3 D&reserved=0 [3] https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D352929&data=05%7C01 %7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b306 953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553 78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VthFwiSeQt 7c%2B%2F0twxRZTYu4smkJJDL18CkrST4mhiQ%3D&reserved=0

Hi Simon,
U-Boot can't start with boot script boot.scr, if BOOTSTD_DEFAULT is set. With this setting "bootflow scan -lb" is not supported. Booting with extlinux.conf works somehow.
= Bootlog ======================================================= U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Bus xhci_pci: scanning bus xhci_pci for devices... Device not responding to set address.
USB device not accepting new address (error=80000000) failed, error -71
=> printenv bootcmd bootcmd=bootflow scan => bootflow scan -lb Flags not supported: enable CONFIG_BOOTFLOW_FULL bootflow - Boot flows
Usage: bootflow scan - boot first available bootflow
===============================================================
With BOOTSTD_FULL it's so far fine, but I'm missing the handling of U-Boot-Menu compared to U-Boot (2023.01) at Apertis. I could not find a real difference but version. But also with DISTROBOOT enabled at earlier patch sets I see following differences:
The U-Boot image created with this patch set - doesn't provide any output toTTY screen at Virtualbox, only at serial console - doesn't provide U-Boot-Menu at screen (U-Boot of Apertis provides it also at serial console) But I'll proceed investigating these differences. Perhaps they are caused by Debian patches not upstreamed yet. Atm it's not critical.
= Bootlog ======================================================= U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 5.6 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: No ethernet found. No working controllers found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) ** Booting bootflow 'ahci_scsi.id0lun0.bootdev.part_2' with distro 1: Apertis pro v2022 5.15.0-trunk-amd64 Retrieving file: /boot/vmlinuz-5.15.0-trunk-amd64 Retrieving file: /boot/initrd.img-5.15.0-trunk-amd64 append: root=UUID=8ab7a6d1-a3fa-4fff-8de0-e381551b7cc4 console=tty0 console=ttyS0,115200n8 rootwait ro quiet splash plymouth.ignor e-serial-consoles fsck.mode=auto fsck.repair=yes Valid Boot Flag ===================================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Freitag, 5. Mai 2023 02:41 An: Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com Cc: Heinrich Schuchardt xypron.glpk@gmx.de; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi Mittelstaedt,
On Wed, 3 May 2023 at 23:40, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hello Simon,
I've tried out successfully the option (with BOOTSTD_FULL, with
BOOTSTD_DEFAULT it's not possible to boot) and will provide a changed patch set soon.
Thank you for testing. What goes wrong without BOOTSTD_FULL?
Regards, Simon
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Dienstag, 2. Mai 2023 19:12 An: Heinrich Schuchardt xypron.glpk@gmx.de Cc: Mittelstaedt Thomas (XC-CT/EBV3) thomas.mittelstaedt@de.bosch.com; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi,
On Tue, 2 May 2023 at 09:41, Heinrich Schuchardt xypron.glpk@gmx.de
wrote:
Am 2. Mai 2023 17:21:29 MESZ schrieb
thomas.mittelstaedt@de.bosch.com:
From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
Enable distro boot feature for U-Boot at VirtualBox described at https://sou/ rce.denx.de%2Fu-boot%2Fu-boot%2F-
%2Fblob%2Fmaster%2Fdoc%2Fdevelop%2Fd
istro.rst&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca5218
0e
e6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%
7C0%
7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw
MDAiLCJQ
IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata
=4TSv
yIZMiz4Tt7Wt36NxQR576tg%2F9cS%2FVyZS83xwN50%3D&reserved=0
Signed-off-by: Thomas Mittelstaedt
thomas.mittelstaedt@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://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpa
tchwork.o%2F&data=05%7C01%7CThomas.Mittelstaedt%40de.bosch.com%7Cdd 1
98494e5884e04641108db4d0173cf%7C0ae51e1907c84e4bbb6d648ee58410f4%7C 0
%7C0%7C638188440850258811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C &sda
ta=k74yTJw7JS%2BVkeiplptv1jbqn6MwHgZC%2FJgdZRhmwFg%3D&reserved=0
zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D351440&data=05%7C01
%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b30
6
953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553
78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yjqyizWXqb
YZmSuzfvqq4EfYvJYqXUf6irbLYhLo4qk%3D&reserved=0 [2] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fso
urce.denx%2F&data=05%7C01%7CThomas.Mittelstaedt%40de.bosch.com%7Cdd 1
98494e5884e04641108db4d0173cf%7C0ae51e1907c84e4bbb6d648ee58410f4%7C 0
%7C0%7C638188440850258811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C &sda
ta=LxyUK%2B4AYjpIDZXHEpawlAO2kd2B%2F9Rh0pvaVgcq5oQ%3D&reserved= 0
.de%2Fu-boot%2Fcustodians%2Fu-boot-dm%2F-%2Ftree%2Fbryc-
working&data=05%7C01%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee
6e8f4087da4d08db4b306953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C
0%7C638186443515155378%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA
wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C
%7C&sdata=5OF%2Bmc%2FVOSFFTzLp3JLrWBxvuZCfqwQDb3GzDZGlvws%3
D&reserved=0 [3] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpa
tchwork.o%2F&data=05%7C01%7CThomas.Mittelstaedt%40de.bosch.com%7Cdd 1
98494e5884e04641108db4d0173cf%7C0ae51e1907c84e4bbb6d648ee58410f4%7C 0
%7C0%7C638188440850258811%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4 wLjAwMD
AiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C &sda
ta=k74yTJw7JS%2BVkeiplptv1jbqn6MwHgZC%2FJgdZRhmwFg%3D&reserved=0
zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D352929&data=05%7C01
%7Cthomas.mittelstaedt%40de.bosch.com%7Ca52180ee6e8f4087da4d08db4b30
6
953%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381864435151553
78%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL
CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=VthFwiSeQt
7c%2B%2F0twxRZTYu4smkJJDL18CkrST4mhiQ%3D&reserved=0

Hi,
On Fri, 5 May 2023 at 02:23, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hi Simon,
U-Boot can't start with boot script boot.scr, if BOOTSTD_DEFAULT is set. With this setting "bootflow scan -lb" is not supported. Booting with extlinux.conf works somehow.
= Bootlog ======================================================= U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Bus xhci_pci: scanning bus xhci_pci for devices... Device not responding to set address.
USB device not accepting new address (error=80000000)
failed, error -71
=> printenv bootcmd bootcmd=bootflow scan => bootflow scan -lb Flags not supported: enable CONFIG_BOOTFLOW_FULL bootflow - Boot flows
Usage: bootflow scan - boot first available bootflow
===============================================================
With BOOTSTD_FULL it's so far fine, but I'm missing the handling of U-Boot-Menu compared to U-Boot (2023.01) at Apertis. I could not find a real difference but version. But also with DISTROBOOT enabled at earlier patch sets I see following differences:
The U-Boot image created with this patch set
- doesn't provide any output toTTY screen at Virtualbox, only at serial console
- doesn't provide U-Boot-Menu at screen (U-Boot of Apertis provides it also at serial console)
But I'll proceed investigating these differences. Perhaps they are caused by Debian patches not upstreamed yet. Atm it's not critical.
= Bootlog ======================================================= U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 5.6 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: No ethernet found. No working controllers found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) ** Booting bootflow 'ahci_scsi.id0lun0.bootdev.part_2' with distro 1: Apertis pro v2022 5.15.0-trunk-amd64 Retrieving file: /boot/vmlinuz-5.15.0-trunk-amd64 Retrieving file: /boot/initrd.img-5.15.0-trunk-amd64 append: root=UUID=8ab7a6d1-a3fa-4fff-8de0-e381551b7cc4 console=tty0 console=ttyS0,115200n8 rootwait ro quiet splash plymouth.ignor e-serial-consoles fsck.mode=auto fsck.repair=yes Valid Boot Flag ===================================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
Can you please try these four patches?
https://patchwork.ozlabs.org/project/uboot/list/?series=353761 https://patchwork.ozlabs.org/project/uboot/patch/20230506142709.1382495-1-sj...
Regards, Simon

Hello Simon,
I've integrated your patches (1-3-usb-Tidy-up-the-usb_start-flag.patch, bootstd-Correct-default-boot-command.patch)
The system with CONFIG_BOOTSTD_DEFAULT instead of CONFIG_BOOTSTD_FULL doesn't start like before with boot script. The extlinux configuration still works.
=== Bootlog at scenario with boot script ============================================================= U-Boot 2023.04-01138-g210b6bbad7-dirty (May 09 2023 - 09:26:08 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) OK No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 =>
===============================================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Montag, 8. Mai 2023 23:23 An: Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com Cc: Heinrich Schuchardt xypron.glpk@gmx.de; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi,
On Fri, 5 May 2023 at 02:23, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hi Simon,
U-Boot can't start with boot script boot.scr, if BOOTSTD_DEFAULT is set. With
this setting "bootflow scan -lb" is not supported.
Booting with extlinux.conf works somehow.
= Bootlog
=======================================================
U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Bus xhci_pci: scanning bus xhci_pci for devices... Device not responding to set address.
USB device not accepting new address (error=80000000) failed,
error -71
=> printenv bootcmd bootcmd=bootflow scan => bootflow scan -lb Flags not supported: enable CONFIG_BOOTFLOW_FULL bootflow - Boot flows
Usage: bootflow scan - boot first available bootflow
=============================================================
With BOOTSTD_FULL it's so far fine, but I'm missing the handling of U-Boot-
Menu compared to U-Boot (2023.01) at Apertis.
I could not find a real difference but version. But also with DISTROBOOT enabled at earlier patch sets I see following
differences:
The U-Boot image created with this patch set
- doesn't provide any output toTTY screen at Virtualbox, only at
serial console
- doesn't provide U-Boot-Menu at screen (U-Boot of Apertis provides it
also at serial console) But I'll proceed investigating these differences. Perhaps
they are caused by Debian patches not upstreamed yet. Atm it's not critical.
= Bootlog
=======================================================
U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 5.6 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: No ethernet found. No working controllers found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) ** Booting bootflow 'ahci_scsi.id0lun0.bootdev.part_2' with distro 1: Apertis pro v2022 5.15.0-trunk-amd64 Retrieving file: /boot/vmlinuz-5.15.0-trunk-amd64 Retrieving file: /boot/initrd.img-5.15.0-trunk-amd64 append: root=UUID=8ab7a6d1-a3fa-4fff-8de0-e381551b7cc4 console=tty0 console=ttyS0,115200n8 rootwait ro quiet splash plymouth.ignor e-serial-consoles fsck.mode=auto fsck.repair=yes Valid Boot Flag
=============================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
Can you please try these four patches?
https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D353761&data=05%7C01 %7CThomas.Mittelstaedt%40de.bosch.com%7Cb5efcb062456457b4bef08db500a7 7ee%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381917781085662 36%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6XKQYOEP hHW0tJ2GT7Ve2zxnWh3y%2Fyw6Dqj91lfuuVU%3D&reserved=0 https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Fpatch%2F20230506142709.1382495-1- sjg%40chromium.org%2F&data=05%7C01%7CThomas.Mittelstaedt%40de.bosch. com%7Cb5efcb062456457b4bef08db500a77ee%7C0ae51e1907c84e4bbb6d648ee 58410f4%7C0%7C0%7C638191778108566236%7CUnknown%7CTWFpbGZsb3d8 eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D %7C3000%7C%7C%7C&sdata=%2FKpNG5Mtdtl72uX197u8dTFQSzbmdRHNslp9 p27cXm0%3D&reserved=0
Regards, Simon

Hi Thomas,
On Wed, 10 May 2023 at 07:40, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hello Simon,
I've integrated your patches (1-3-usb-Tidy-up-the-usb_start-flag.patch, bootstd-Correct-default-boot-command.patch)
The system with CONFIG_BOOTSTD_DEFAULT instead of CONFIG_BOOTSTD_FULL doesn't start like before with boot script. The extlinux configuration still works.
=== Bootlog at scenario with boot script ============================================================= U-Boot 2023.04-01138-g210b6bbad7-dirty (May 09 2023 - 09:26:08 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) OK No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 =>
===============================================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
-----Ursprüngliche Nachricht----- Von: Simon Glass sjg@chromium.org Gesendet: Montag, 8. Mai 2023 23:23 An: Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com Cc: Heinrich Schuchardt xypron.glpk@gmx.de; u-boot@lists.denx.de; Niel Armstrong neil.armstrong@linaro.org; Patrick Delaunay patrick.delaunay@foss.st.com; Ramon Fried rfried.dev@gmail.com; Marek Vasut marex@denx.de; Manuel Traut manuel.traut@mt.com; Bin Meng bmeng.cn@gmail.com Betreff: Re: [PATCH v2 2/3] X86: Add support for distro boot
Hi,
On Fri, 5 May 2023 at 02:23, Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt@de.bosch.com wrote:
Hi Simon,
U-Boot can't start with boot script boot.scr, if BOOTSTD_DEFAULT is set. With
this setting "bootflow scan -lb" is not supported.
Booting with extlinux.conf works somehow.
= Bootlog
=======================================================
U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 8 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: e1000: 08:00:27:1c:36:6f
Warning: e1000#0 failed to set MAC address eth0: e1000#0 Bus xhci_pci: Register e000820 NbrPorts 14 Starting the controller USB XHCI 1.00 scanning bus xhci_pci for devices... 2 USB Device(s) found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 32768.0 MB = 32.0 GB (67108864 x 512) Bus 0: OK Bus 1: not available Device 0: Model: VBOX Firm: 1.0 Ser#: CD-ROM Type: Removable CD ROM Capacity: 50.5 MB = 0.0 GB (25902 x 2048) Device 1: not available Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Error (no IRQ) dev 0 blk 10: status 0x11 Error (no IRQ) dev 0 blk 0: status 0x11 Bus xhci_pci: scanning bus xhci_pci for devices... Device not responding to set address.
USB device not accepting new address (error=80000000) failed,
error -71
=> printenv bootcmd bootcmd=bootflow scan => bootflow scan -lb Flags not supported: enable CONFIG_BOOTFLOW_FULL bootflow - Boot flows
Usage: bootflow scan - boot first available bootflow
=============================================================
With BOOTSTD_FULL it's so far fine, but I'm missing the handling of U-Boot-
Menu compared to U-Boot (2023.01) at Apertis.
I could not find a real difference but version. But also with DISTROBOOT enabled at earlier patch sets I see following
differences:
The U-Boot image created with this patch set
- doesn't provide any output toTTY screen at Virtualbox, only at
serial console
- doesn't provide U-Boot-Menu at screen (U-Boot of Apertis provides it
also at serial console) But I'll proceed investigating these differences. Perhaps
they are caused by Debian patches not upstreamed yet. Atm it's not critical.
= Bootlog
=======================================================
U-Boot 2023.04-01135-g4ea415461d-dirty (May 05 2023 - 05:56:36 +0000)
CPU: x86_64, vendor Intel, device a0652h DRAM: 5.6 GiB Core: 12 devices, 11 uclasses, devicetree: separate MMC: Loading Environment from FAT... scanning bus for devices... Target spinup took 0 ms. AHCI 0001.0100 32 slots 1 ports 3 Gbps 0x1 impl SATA mode flags: 64bit ncq stag only ccc Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) Unable to read "uboot.env" from scsi0:1... No video mode configured in EFI! No video mode configured in EFI! Model: EFI x86 Payload Net: No ethernet found. No working controllers found Hit any key to stop autoboot: 0 scanning bus for devices... Device 0: (0:0) Vendor: ATA Prod.: VBOX HARDDISK Rev: 1.0 Type: Hard Disk Capacity: 33792.0 MB = 33.0 GB (69206016 x 512) ** Booting bootflow 'ahci_scsi.id0lun0.bootdev.part_2' with distro 1: Apertis pro v2022 5.15.0-trunk-amd64 Retrieving file: /boot/vmlinuz-5.15.0-trunk-amd64 Retrieving file: /boot/initrd.img-5.15.0-trunk-amd64 append: root=UUID=8ab7a6d1-a3fa-4fff-8de0-e381551b7cc4 console=tty0 console=ttyS0,115200n8 rootwait ro quiet splash plymouth.ignor e-serial-consoles fsck.mode=auto fsck.repair=yes Valid Boot Flag
=============================================================
Mit freundlichen Grüßen / Best regards
Thomas Mittelstaedt
Cross-Domain Computing Solutions
Can you please try these four patches?
https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Flist%2F%3Fseries%3D353761&data=05%7C01 %7CThomas.Mittelstaedt%40de.bosch.com%7Cb5efcb062456457b4bef08db500a7 7ee%7C0ae51e1907c84e4bbb6d648ee58410f4%7C0%7C0%7C6381917781085662 36%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiL CJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6XKQYOEP hHW0tJ2GT7Ve2zxnWh3y%2Fyw6Dqj91lfuuVU%3D&reserved=0 https://patchwork.o/ zlabs.org%2Fproject%2Fuboot%2Fpatch%2F20230506142709.1382495-1- sjg%40chromium.org%2F&data=05%7C01%7CThomas.Mittelstaedt%40de.bosch. com%7Cb5efcb062456457b4bef08db500a77ee%7C0ae51e1907c84e4bbb6d648ee 58410f4%7C0%7C0%7C638191778108566236%7CUnknown%7CTWFpbGZsb3d8 eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D %7C3000%7C%7C%7C&sdata=%2FKpNG5Mtdtl72uX197u8dTFQSzbmdRHNslp9 p27cXm0%3D&reserved=0
Regards, Simon
Thanks for the report. I believe this is fixed in mainline now. I sent an updated version of the qemu series also.
Regards, Simon

From: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com
The problem was, that zboot() didn't work because of missing ramdisc size.
Signed-off-by: Thomas Mittelstaedt thomas.mittelstaedt@de.bosch.com --- boot/pxe_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/boot/pxe_utils.c b/boot/pxe_utils.c index 3a1e50f2b1..87c32b6e62 100644 --- a/boot/pxe_utils.c +++ b/boot/pxe_utils.c @@ -554,7 +554,7 @@ static int label_boot(struct pxe_context *ctx, struct pxe_label *label) label->name); goto cleanup; } - + strcpy(initrd_filesize, simple_xtoa(size)); initrd_addr_str = env_get("ramdisk_addr_r"); size = snprintf(initrd_str, sizeof(initrd_str), "%s:%lx", initrd_addr_str, size);
participants (4)
-
Heinrich Schuchardt
-
Mittelstaedt Thomas (XC-CT/EBV3)
-
Simon Glass
-
thomas.mittelstaedt@de.bosch.com