AW: [PATCH 1/1] Documentation extended with specific information for VirtualBox

Mittelstaedt Thomas (XC-CT/EBV3) Thomas.Mittelstaedt at de.bosch.com
Tue Aug 22 14:45:22 CEST 2023


Hello,

I am reworking the patch. Some comments below.

Mit freundlichen Grüßen / Best regards

Thomas Mittelstaedt

Cross-Domain Computing Solutions, Engineering BBM Vehicle Computer 3 (XC-CT/EBV3)
Robert Bosch GmbH | Postfach 10 02 61 | 31102 Hildesheim | GERMANY | www.bosch.com
Tel. +49 5121 49-2965 | Mobil +49 160 90418883 | Telefax +49 711 811-5052965 | Thomas.Mittelstaedt at de.bosch.com

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Prof. Dr. Stefan Asenkerschbaumer; Geschäftsführung: Dr. Stefan Hartung, 
Dr. Christian Fischer, Dr. Markus Forschner, Stefan Grosch, Dr. Markus Heyn, Dr. Tanja Rückert

> -----Ursprüngliche Nachricht-----
> Von: Heinrich Schuchardt <xypron.glpk at gmx.de>
> Gesendet: Freitag, 18. August 2023 10:34
> An: Mittelstaedt Thomas (XC-CT/EBV3) <thomas.mittelstaedt at de.bosch.com>
> Cc: Simon Glass <sjg at chromium.org>; Ilias Apalodimas
> <ilias.apalodimas at linaro.org>; u-boot at lists.denx.de
> Betreff: Re: [PATCH 1/1] Documentation extended with specific information for
> VirtualBox
> 
> On 17.08.23 15:46, thomas.mittelstaedt at de.bosch.com wrote:
> > From: Thomas Mittelstaedt <thomas.mittelstaedt at de.bosch.com>
> >
> > Signed-off-by: Thomas Mittelstaedt <thomas.mittelstaedt at de.bosch.com>
> > ---
> >   doc/develop/uefi/u-boot_on_efi.rst | 76 ++++++++++++++++++++++++++++++
> >   1 file changed, 76 insertions(+)
> >
> > diff --git a/doc/develop/uefi/u-boot_on_efi.rst
> > b/doc/develop/uefi/u-boot_on_efi.rst
> > index acad6397e8..927e1dc266 100644
> > --- a/doc/develop/uefi/u-boot_on_efi.rst
> > +++ b/doc/develop/uefi/u-boot_on_efi.rst
> > @@ -254,6 +254,82 @@ This shows running with serial enabled (see
> `include/configs/efi-x86_app.h`)::
> >
> >      => QEMU: Terminated
> >
> > +Run at VirtualBox (x86)
> 
> %s/at/on/
> 
OK. Will do.
> Below you assume a 64bit machine: %s/x86/x86_64/
OK. Will do.
> 
> > +--------------------------
> 
> The line length must match the heading.
> 
> > +
> > +Enable EFI
> > +~~~~~~~~~~~~
> 
> ditto
OK. Will do.
> 
> > +At settings for virtual machine the flag at **System->Motherboard->Enable EFI
> (special OSes only)** has to be enabled.
> 
> Limit lines to 80 characters.
> 
OK. Will do.
> > +
> > +Installation
> > +~~~~~~~~~~~~
> > +Install the needed system at a VDI disk and connect this to SATA
> > +controller (type AHCI) at settings
> 
> Provide the preinstalled Linux system as a Virtual Disk Image (VDI) and assign it
> to a SATA controller (type AHCI) using the settings for the virtual machine at
> menu item **System->Storage->Controller:SATA**.
> 
> > +for virtual machine at **System->Storage->Controller:SATA**.
> > +
> > +For the following description 3 partitions are assumed:
> 
> three GPT partitions
> 
OK. Will do.
> > +
> > +- Partition 1: formatted as **vfat**, used for U-Boot and and its
> > +environment filesenvironment, flag **boot** set
> 
> formatted as FAT file-system and marked as EFI system partition (partition type
> 0xEF00) used for the U-Boot EFI binary.
> 
> (If VirtualBox is UEFI compliant, it should recognize the ESP as the boot partition.)
> 
> > +- Partition 2: formatted as **ext2/ext4**, used for Linux image and
> > +boot configuration, flag **boot** set
> 
> ext2 or ext4
> 
> 
OK. Will do.
> > +- Partition 3: formatted as **ext4**, used for root file system
> > +
> > +Create an extlinux.conf or a boot script
> > +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > +
> > +Following files are assumed to be located at system for boot configuration::
> > +
> > + Partition  File                    Comment
> > + 1          EFI/BOOT/BOOTX64.efi    # renamed U-Boot EFI image
> 
> EFI/BOOT/BOOTX64.EFI
> 
> Please, tell the reader which defconfig to use and which U-Boot file to copy.
> 
OK. Will add some description.
> > + 2          Image                   # Linux image
> 
> Please, remove the blank space at the end of line.
> 
> > + 2          Initrd                  # Initramfs of Linux
> > +
> > +Boot script
> > +~~~~~~~~~~~
> > +
> > +The boot script **boot.scr** is assumed to be located at::
> > +
> > + Partition  File        Comment
> > + 2          boot.scr    # Boot script, generated with mkimage from template
> 
> Please, remove the blank space at the end of line.
> 
OK. Will do.
> > +
> > +Content of **boot.scr**:
> > +
> > +.. code-block:: bash
> > +
> > +  ext4load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r}
> > + ${prefix}Image  setenv kernel_size ${filesize}  ext4load ${devtype}
> > + ${devnum}:${distro_bootpart} ${ramdisk_addr_r} ${prefix}Initrd
> > + setenv initrd_size ${filesize}  zboot  ${kernel_addr_r}
> > + ${kernel_size} ${ramdisk_addr_r} ${initrd_size}
> 
> Doesn't U-Boot need this file on the boot partition i.e. the ESP?
> 
I'll change to a setup of 2 partitions, because I'm always separate board specific partitions from generic boot partitions. At our Debian images we always have a separation boot partition with boot scripts, exlinux.conf, Linux images, device trees etc. But for this description I don't need it.

> Best regards
> 
> Heinrich
> 
> > +
> > +Extlinux configuration
> > +~~~~~~~~~~~~~~~~~~~~~~
> > +
> > +Alternatively a configuration **extlinux.conf** can be used. **extlinux.conf** is
> assumed to be located at::
> > +
> > + Partition  File                        Comment
> > + 2          extlinux/extlinux.conf      # Extlinux boot configuration
> > +
> > +Content of **extlinux.conf**:
> > +
> > +.. code-block:: bash
> > +
> > +  default l0
> > +  menu title U-Boot menu
> > +  prompt 0
> > +  timeout 50
> > +
> > +  label l0
> > +    menu label Linux
> > +    linux /Image
> > +    initrd /Initrd
> > +
> > +
> > +Additionally something like (sda is assumed as disk device):
> > +
> > +.. code-block:: bash
> > +
> > +	append  root=/dev/sda3 console=tty0 console=ttyS0,115200n8 rootwait
> > +rw
> > +
> > +
> >
> >   Future work
> >   -----------



More information about the U-Boot mailing list