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

Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt at de.bosch.com
Fri May 5 10:23:11 CEST 2023


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 at chromium.org>
> Gesendet: Freitag, 5. Mai 2023 02:41
> An: Mittelstaedt Thomas (XC-CT/EBV3) <Thomas.Mittelstaedt at de.bosch.com>
> Cc: Heinrich Schuchardt <xypron.glpk at gmx.de>; u-boot at lists.denx.de; Niel
> Armstrong <neil.armstrong at linaro.org>; Patrick Delaunay
> <patrick.delaunay at foss.st.com>; Ramon Fried <rfried.dev at gmail.com>; Marek
> Vasut <marex at denx.de>; Manuel Traut <manuel.traut at mt.com>; Bin Meng
> <bmeng.cn at 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 at 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 at chromium.org>
> > > Gesendet: Dienstag, 2. Mai 2023 19:12
> > > An: Heinrich Schuchardt <xypron.glpk at gmx.de>
> > > Cc: Mittelstaedt Thomas (XC-CT/EBV3)
> > > <thomas.mittelstaedt at de.bosch.com>;
> > > u-boot at lists.denx.de; Niel Armstrong <neil.armstrong at linaro.org>;
> > > Patrick Delaunay <patrick.delaunay at foss.st.com>; Ramon Fried
> > > <rfried.dev at gmail.com>; Marek Vasut <marex at denx.de>; Manuel Traut
> > > <manuel.traut at mt.com>; Bin Meng <bmeng.cn at 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 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://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 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://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


More information about the U-Boot mailing list