From 175e4b01beed25dedbd17a082786ec2e6739f1b3 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 22 Aug 2023 12:21:13 +0200 Subject: [PATCH 01/16] cmd: setexpr: fix printf_str() If vsnprintf() returns a negative number, (i >= remaining) will possibly be true: 'i' is of type signed int and 'remaining' is of the unsigned type size_t. The C language will convert i to an unsigned type before the comparison. This can result in the wrong error type being indicated. Checking for negative i should be done first. Fixes: f4f8d8bb1abc ("cmd: setexpr: add format string handling") Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass --- cmd/printf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/printf.c b/cmd/printf.c index e024676743..0c6887e0d6 100644 --- a/cmd/printf.c +++ b/cmd/printf.c @@ -144,10 +144,10 @@ static void printf_str(struct print_inf *inf, char *format, ...) i = vsnprintf(inf->str + inf->offset, remaining, format, args); va_end(args); - if (i >= remaining) - inf->error |= PRINT_TRUNCATED_ERROR; - else if (i < 0) + if (i < 0) inf->error |= PRINT_CONVERSION_ERROR; + else if ((unsigned int)i >= remaining) + inf->error |= PRINT_TRUNCATED_ERROR; else inf->offset += i; } From 7f62928a8919eb19543ec72ca7c824ae71347666 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 22 Aug 2023 11:40:55 -0500 Subject: [PATCH 02/16] doc: board: ti: k3: image alt texts Provide alternative texts for images. Fixes: 6e8fa0611f19 ("board: ti: k3: Convert boot flow ascii flow to svg") Signed-off-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/k3.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index f4576c54cb..5be8fa2300 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -47,6 +47,7 @@ including a 32bit U-Boot SPL, (called the wakup SPL) that ROM will jump to after it has finished loading everything into internal SRAM. .. image:: img/boot_flow_01.svg + :alt: Boot flow up to wakeup domain SPL The wakeup SPL, running on a wakeup domain core, will initialize DDR and any peripherals needed load the larger binaries inside the `tispl.bin` @@ -56,6 +57,7 @@ starting with Trusted Firmware-A (TF-A), before moving on to start OP-TEE and the main domain's U-Boot SPL. .. image:: img/boot_flow_02.svg + :alt: Boot flow up to main domain SPL The main domain's SPL, running on a 64bit application core, has virtually unlimited space (billions of bytes now that DDR is working) to @@ -64,6 +66,7 @@ which loads more firmware into the micro-controller & wakeup domains and finally prepare the main domain to run Linux. .. image:: img/boot_flow_03.svg + :alt: Complete boot flow up to Linux This is the typical boot flow for all K3 based SoCs, however this flow offers quite a lot in the terms of flexibility, especially on High From c6df52892ebf5bcb67424c8457676ab796ab53bf Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:40:56 -0500 Subject: [PATCH 03/16] doc: board: ti: k3: Fixup alt text for openocd sequence Fix up OpenOCD setup sequence Fixes: effe50854a69 ("doc: board: ti: k3: Add a guide to debugging with OpenOCD") Reported-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/k3.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 5be8fa2300..445c0f5e15 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -488,6 +488,7 @@ generation device. The overall structure of this setup is in the following figure. .. image:: img/openocd-overview.svg + :alt: Overview of OpenOCD setup. .. note:: From f5a578e77e3598a830483f539e5ddd03b2e08eea Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 22 Aug 2023 11:40:57 -0500 Subject: [PATCH 04/16] doc: board: ti: am62x: provide image alt texts Provide alternative texts for images. Fixes: 34f76921d801 ("doc: board: ti: am62x: Convert the image format to svg") Signed-off-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/am62x_sk.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 5ed17c0a3a..42b37f9c76 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -47,6 +47,7 @@ Boot Flow: Below is the pictorial representation of boot flow: .. image:: img/boot_diagram_k3_current.svg + :alt: Boot flow diagram - Here TIFS acts as master and provides all the critical services. R5/A53 requests TIFS to get these services done as shown in the above diagram. @@ -141,10 +142,12 @@ Image formats: - tiboot3.bin .. image:: img/multi_cert_tiboot3.bin.svg + :alt: tiboot3.bin image format - tispl.bin .. image:: img/dm_tispl.bin.svg + :alt: tispl.bin image format A53 SPL DDR Memory Layout ------------------------- From dfd299a6964145877e5dbaed9486c5dab31d1510 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 22 Aug 2023 11:40:59 -0500 Subject: [PATCH 05/16] doc: board: ti: am65x: provide image alt text Provide alternative text for image. Fixes: fd358121bdb8 ("doc: board: ti: am65x: Update with boot flow diagram") Signed-off-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/am65x_evm.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 5f3c46cf9f..10e30f45cf 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -46,6 +46,7 @@ applications. This should happen before running Linux. instead use Falcon boot flow to reduce boot time. .. image:: img/boot_diagram_am65.svg + :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A53 requests DMSC to get these services done as shown in the above diagram. @@ -136,14 +137,17 @@ Image formats: - tiboot3.bin .. image:: img/no_multi_cert_tiboot3.bin.svg + :alt: tiboot3.bin image format - tispl.bin .. image:: img/nodm_tispl.bin.svg + :alt: tispl.bin image format - sysfw.itb .. image:: img/sysfw.itb.svg + :alt: sysfw.itb image format eMMC: ----- @@ -185,6 +189,7 @@ used: eMMC layout: .. image:: img/emmc_am65x_evm_boot0.svg + :alt: emmc boot partition layout Kernel image and DT are expected to be present in the /boot folder of rootfs. To boot kernel from eMMC, use the following commands: @@ -220,6 +225,7 @@ addresses. Flash layout for OSPI: .. image:: img/ospi_sysfw.svg + :alt: OSPI flash partition layout Kernel Image and DT are expected to be present in the /boot folder of UBIFS ospi.rootfs just like in SD card case. U-Boot looks for UBI volume named From 49509dfec83d24a45af11a5e451fd2cbb03659ad Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:00 -0500 Subject: [PATCH 06/16] doc: board: ti: j7200: provide image alt text Provide alternative text for image. Fixes: f4ade09a1e76 ("doc: board: ti: j7200: Convert the image format to svg") Reported-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/j7200_evm.rst | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 2e60e22ba1..2bf680cda2 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -35,6 +35,7 @@ Boot Flow: Below is the pictorial representation of boot flow: .. image:: img/boot_diagram_k3_current.svg + :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72 requests DMSC to get these services done as shown in the above diagram. @@ -130,12 +131,12 @@ Image formats: - tiboot3.bin .. image:: img/j7200_tiboot3.bin.svg + :alt: tiboot3.bin image format - tispl.bin .. image:: img/dm_tispl.bin.svg - - + :alt: tispl.bin image format Switch Setting for Boot Mode ---------------------------- @@ -191,6 +192,7 @@ Size of u-boot.img is taken 4MB for refernece, But this is subject to change depending upon atf, optee size .. image:: img/emmc_j7200_evm_boot01.svg + :alt: Traditional eMMC boot partition layout In case of UDA FS mode booting, following is layout. @@ -198,6 +200,7 @@ All boot images tiboot3.bin, tispl and u-boot should be written to fat formatted UDA FS as file. .. image:: img/emmc_j7200_evm_udafs.svg + :alt: eMMC UDA boot partition layout In case of booting from eMMC, write above images into raw or UDA FS. and set mmc partconf accordingly. From e21a2ed33fb84ab9d202d430b41f2e4fe348db4c Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:01 -0500 Subject: [PATCH 07/16] doc: board: ti: j721e: provide image alt text Provide alternative text for image. Fixes: 3b83dff183b5 ("doc: board: ti: j721e: Convert the image format to svg") Reported-by: Heinrich Schuchardt Signed-off-by: Nishanth Menon --- doc/board/ti/j721e_evm.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index d2a214fb33..a4c464707c 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -40,6 +40,7 @@ Boot flow is similar to that of AM65x SoC and extending it with remoteproc support. Below is the pictorial representation of boot flow: .. image:: img/boot_diagram_j721e.svg + :alt: Boot flow diagram - Here DMSC acts as master and provides all the critical services. R5/A72 requests DMSC to get these services done as shown in the above diagram. @@ -136,14 +137,17 @@ Image formats: - tiboot3.bin .. image:: img/no_multi_cert_tiboot3.bin.svg + :alt: tiboot3.bin image format - tispl.bin .. image:: img/dm_tispl.bin.svg + :alt: tispl.bin image format - sysfw.itb .. image:: img/sysfw.itb.svg + :alt: sysfw.itb image format R5 Memory Map: -------------- @@ -213,6 +217,7 @@ addresses. Flash layout for OSPI: .. image:: img/ospi_sysfw.svg + :alt: OSPI flash partition layout Firmwares: ---------- From bfffc81b4c2b49666ece620ee3bc65fada9ed6eb Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:02 -0500 Subject: [PATCH 08/16] doc: board: ti: am62x: Fix build step numbering Fix up build step numbering. Fixes: c727b81d6530 ("doc: board: ti: k3: Reuse build instructions") Signed-off-by: Nishanth Menon Revieed-by: Heinrich Schuchardt --- doc/board/ti/am62x_sk.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/board/ti/am62x_sk.rst b/doc/board/ti/am62x_sk.rst index 42b37f9c76..d7437c6d22 100644 --- a/doc/board/ti/am62x_sk.rst +++ b/doc/board/ti/am62x_sk.rst @@ -103,13 +103,13 @@ Set the variables corresponding to this platform: 3. U-Boot: -* 4.1 R5: +* 3.1 R5: .. include:: ../ti/k3.rst :start-after: .. k3_rst_include_start_build_steps_spl_r5 :end-before: .. k3_rst_include_end_build_steps_spl_r5 -* 4.2 A53: +* 3.2 A53: .. include:: ../ti/k3.rst :start-after: .. k3_rst_include_start_build_steps_uboot From c8612e2f495b2b7679f7974289a686a1c059d893 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:04 -0500 Subject: [PATCH 09/16] doc: board: ti: am65x: Fix build step numbering Fix up build step numbering. Fixes: c727b81d6530 ("doc: board: ti: k3: Reuse build instructions") Signed-off-by: Nishanth Menon Reviewed-by: Heinrich Schuchardt --- doc/board/ti/am65x_evm.rst | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/board/ti/am65x_evm.rst b/doc/board/ti/am65x_evm.rst index 10e30f45cf..7cebb1ca62 100644 --- a/doc/board/ti/am65x_evm.rst +++ b/doc/board/ti/am65x_evm.rst @@ -103,13 +103,13 @@ Set the variables corresponding to this platform: 3. U-Boot: -* 4.1 R5: +* 3.1 R5: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_spl_r5 :end-before: .. k3_rst_include_end_build_steps_spl_r5 -* 4.2 A53: +* 3.2 A53: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_uboot @@ -123,13 +123,13 @@ Each SoC variant (GP and HS) requires a different source for these files. - GP - * tiboot3-am65x_sr2-gp-evm.bin, sysfw-am65x_sr2-gp-evm.itb from step 4.1 - * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2 + * tiboot3-am65x_sr2-gp-evm.bin, sysfw-am65x_sr2-gp-evm.itb from step 3.1 + * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 - HS - * tiboot3-am65x_sr2-hs-evm.bin, sysfw-am65x_sr2-hs-evm.itb from step 4.1 - * tispl.bin, u-boot.img from step 4.2 + * tiboot3-am65x_sr2-hs-evm.bin, sysfw-am65x_sr2-hs-evm.itb from step 3.1 + * tispl.bin, u-boot.img from step 3.2 Image formats: -------------- From 7af00a79574f999e94cad77a3278d537a4a06592 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:05 -0500 Subject: [PATCH 10/16] doc: board: ti: j7200: Fix build step numbering Fix up build step numbering. Fixes: c727b81d6530 ("doc: board: ti: k3: Reuse build instructions") Signed-off-by: Nishanth Menon Reviewed-by: Heinrich Schuchardt --- doc/board/ti/j7200_evm.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/board/ti/j7200_evm.rst b/doc/board/ti/j7200_evm.rst index 2bf680cda2..bcf8dc1c5f 100644 --- a/doc/board/ti/j7200_evm.rst +++ b/doc/board/ti/j7200_evm.rst @@ -92,13 +92,13 @@ Set the variables corresponding to this platform: 3. U-Boot: -* 4.1 R5: +* 3.1 R5: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_spl_r5 :end-before: .. k3_rst_include_end_build_steps_spl_r5 -* 4.2 A72: +* 3.2 A72: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_uboot @@ -112,18 +112,18 @@ variant (GP, HS-FS, HS-SE) requires a different source for these files. - GP - * tiboot3-j7200-gp-evm.bin from step 4.1 - * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2 + * tiboot3-j7200-gp-evm.bin from step 3.1 + * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 - HS-FS - * tiboot3-j7200_sr2-hs-fs-evm.bin from step 4.1 - * tispl.bin, u-boot.img from step 4.2 + * tiboot3-j7200_sr2-hs-fs-evm.bin from step 3.1 + * tispl.bin, u-boot.img from step 3.2 - HS-SE - * tiboot3-j7200_sr2-hs-evm.bin from step 4.1 - * tispl.bin, u-boot.img from step 4.2 + * tiboot3-j7200_sr2-hs-evm.bin from step 3.1 + * tispl.bin, u-boot.img from step 3.2 Image formats: -------------- From f340a162fbf2b4f71c01ab430c2c1ef875d4741e Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:06 -0500 Subject: [PATCH 11/16] doc: board: ti: j721e: Fix build step numbering Fix up build step numbering. Fixes: c727b81d6530 ("doc: board: ti: k3: Reuse build instructions") Signed-off-by: Nishanth Menon Reviewed-by: Heinrich Schuchardt --- doc/board/ti/j721e_evm.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/doc/board/ti/j721e_evm.rst b/doc/board/ti/j721e_evm.rst index a4c464707c..cadaac0178 100644 --- a/doc/board/ti/j721e_evm.rst +++ b/doc/board/ti/j721e_evm.rst @@ -97,13 +97,13 @@ Set the variables corresponding to this platform: 3. U-Boot: -* 4.1 R5: +* 3.1 R5: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_spl_r5 :end-before: .. k3_rst_include_end_build_steps_spl_r5 -* 4.2 A72: +* 3.2 A72: .. include:: k3.rst :start-after: .. k3_rst_include_start_build_steps_uboot @@ -118,18 +118,18 @@ files. - GP - * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 4.1 - * tispl.bin_unsigned, u-boot.img_unsigned from step 4.2 + * tiboot3-j721e-gp-evm.bin, sysfw-j721e-gp-evm.itb from step 3.1 + * tispl.bin_unsigned, u-boot.img_unsigned from step 3.2 - HS-FS - * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 4.1 - * tispl.bin, u-boot.img from step 4.2 + * tiboot3-j721e_sr2-hs-fs-evm.bin, sysfw-j721e_sr2-hs-fs-evm.itb from step 3.1 + * tispl.bin, u-boot.img from step 3.2 - HS-SE - * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 4.1 - * tispl.bin, u-boot.img from step 4.2 + * tiboot3-j721e_sr2-hs-evm.bin, sysfw-j721e_sr2-hs-evm.itb from step 3.1 + * tispl.bin, u-boot.img from step 3.2 Image formats: -------------- From 4e4f344e7d68b350dbb2ff27d992c66d54deeffb Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 22 Aug 2023 11:41:07 -0500 Subject: [PATCH 12/16] doc: board: ti: k3: Elaborate on various firmware Add elaboration text for the various firmware involved for system management. Signed-off-by: Nishanth Menon --- doc/board/ti/k3.rst | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 445c0f5e15..2b7a22a4ca 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -123,11 +123,30 @@ online | **source:** https://github.com/OP-TEE/optee_os.git | **branch:** master -* **TI Firmware (TIFS, DM, DSMC)** +* **TI Firmware (TIFS, DM, SYSFW)** | **source:** https://git.ti.com/git/processor-firmware/ti-linux-firmware.git | **branch:** ti-linux-firmware +.. note:: + + The TI Firmware required for functionality of the system can be + one of the following combination (see platform specific boot diagram for + further information as to which component runs on which processor): + + * **TIFS** - TI Foundational Security Firmware - Consists of purely firmware + meant to run on the security enclave. + * **DM** - Device Management firmware also called TI System Control Interface + server (TISCI Server) - This component purely plays the role of managing + device resources such as power, clock, interrupts, dma etc. This firmware + runs on a dedicated or multi-use microcontroller outside the security + enclave. + + OR + + * **SYSFW** - System firmware - consists of both TIFS and DM both running on + the security enclave. + .. k3_rst_include_end_boot_sources Build Procedure From 975103f1ac92b0702e42e314c9dd556f71008035 Mon Sep 17 00:00:00 2001 From: Jonathan Humphreys Date: Tue, 22 Aug 2023 13:49:03 -0500 Subject: [PATCH 13/16] doc: board: ti: k3: Fix up OpenOCD references and debug info Fix minor path and config macro name updates to sync with latest OpenOCD and U-Boot configurations. Fixes: effe50854a69 ("doc: board: ti: k3: Add a guide to debugging with OpenOCD") Signed-off-by: Jonathan Humphreys Signed-off-by: Nishanth Menon Reviewed-by: Heinrich Schuchardt --- doc/board/ti/k3.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/board/ti/k3.rst b/doc/board/ti/k3.rst index 2b7a22a4ca..1175b776ad 100644 --- a/doc/board/ti/k3.rst +++ b/doc/board/ti/k3.rst @@ -600,7 +600,7 @@ correctly to ensure a sane system. $ cd openocd # Copy the udev rules to the correct system location $ sudo cp ./contrib/60-openocd.rules \ - ./src/JTAG/drivers/libjaylink/contrib/99-libjaylink.rules \ + ./src/jtag/drivers/libjaylink/contrib/99-libjaylink.rules \ /etc/udev/rules.d/ # Get Udev to load the new rules up $ sudo udevadm control --reload-rules @@ -791,7 +791,7 @@ Code modification In this example, we will debug ``board_init_f`` inside ``arch/arm/mach-k3/{soc}_init.c``. Since some sections of U-Boot will be executed multiple times during the bootup process of K3 - devices, we will need to include either ``CONFIG_CPU_ARM64`` or + devices, we will need to include either ``CONFIG_ARM64`` or ``CONFIG_CPU_V7R`` to catch the CPU at the desired place during the bootup process (Main or Wakeup domains). For example, modify the file as follows (depending on need): @@ -809,7 +809,7 @@ Code modification } ... /* Code to run on the ARMV8 (Main Domain) */ - if (IS_ENABLED(CONFIG_CPU_ARM64)) { + if (IS_ENABLED(CONFIG_ARM64)) { volatile int x = 1; while(x) {}; } From d737e9efcfc6c4afe207d82ae81bde57ba9f41a4 Mon Sep 17 00:00:00 2001 From: Thomas Mittelstaedt Date: Tue, 22 Aug 2023 13:49:02 +0000 Subject: [PATCH 14/16] Documentation extended with specific information for VirtualBox The configuration for EFI is enhanced to start U-Boot at VirtualBox (x86_64) with all features like booting with help of boot scripts and extended linux. This documentation describes how to use U-Boot at VirtualBox to boot Linux systems with a some simple example. Signed-off-by: Thomas Mittelstaedt --- doc/develop/uefi/u-boot_on_efi.rst | 84 ++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) diff --git a/doc/develop/uefi/u-boot_on_efi.rst b/doc/develop/uefi/u-boot_on_efi.rst index acad6397e8..0d4927807c 100644 --- a/doc/develop/uefi/u-boot_on_efi.rst +++ b/doc/develop/uefi/u-boot_on_efi.rst @@ -254,6 +254,90 @@ This shows running with serial enabled (see `include/configs/efi-x86_app.h`):: => QEMU: Terminated +Run on VirtualBox (x86_64) +-------------------------- + +Enable EFI +~~~~~~~~~~ +At settings for virtual machine the flag at **System->Motherboard->Enable EFI +(special OSes only)** has to be enabled. + +Installation +~~~~~~~~~~~~ +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 the following description three GPT partitions are assumed: + +- Partition 1: 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 **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 + 1 Image # Linux image + 1 Initrd # Initramfs of Linux + +**EFI/BOOT/BOOTX64.efi** is a renamed build result **u-boot-payload.efi**, built with +**efi-x86_payload64_defconfig** configuration. + +Boot script +~~~~~~~~~~~ + +The boot script **boot.scr** is assumed to be located at:: + + Partition File Comment + 1 boot.scr # Boot script, generated with mkimage from template + +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} + +Extlinux configuration +~~~~~~~~~~~~~~~~~~~~~~ + +Alternatively a configuration **extlinux.conf** can be used. **extlinux.conf** +is assumed to be located at:: + + Partition File Comment + 1 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/sda2 console=tty0 console=ttyS0,115200n8 rootwait rw + + Future work ----------- From 2a3c0680e60eea6591b6c43671d0eef4eac35681 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Tue, 22 Aug 2023 19:53:58 +0100 Subject: [PATCH 15/16] doc: Explicitly list build dependencies for docs Highlight the packages which need to be installed in order to build the docs. Signed-off-by: Paul Barker --- doc/build/documentation.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/build/documentation.rst b/doc/build/documentation.rst index 011cd34a57..20b0fefa2d 100644 --- a/doc/build/documentation.rst +++ b/doc/build/documentation.rst @@ -5,6 +5,17 @@ Building documentation The U-Boot documentation is based on the Sphinx documentation generator. +In addition to the Python packages listed in ``doc/sphinx/requirements.txt``, +the following dependencies are needed to build the documentation: + +* fontconfig + +* graphviz + +* imagemagick + +* texinfo (if building the `Infodoc documentation`_) + HTML documentation ------------------ From 4e73b0153cce064e10dee4722cb2b6833361c227 Mon Sep 17 00:00:00 2001 From: Paul Barker Date: Tue, 22 Aug 2023 19:53:59 +0100 Subject: [PATCH 16/16] doc: Highlight the most relevant u-boot talks The list of u-boot talks on elinux.org is quite long, so let's highlight the talks which are likely most relevant for newcomers. Signed-off-by: Paul Barker Reviewed-by: Simon Glass --- doc/learn/talks.rst | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/doc/learn/talks.rst b/doc/learn/talks.rst index 33bac483e1..0bb44aeabe 100644 --- a/doc/learn/talks.rst +++ b/doc/learn/talks.rst @@ -3,9 +3,18 @@ U-Boot Talks ============ -U-Boot is a topic at various conferences each year. These talkes might help you -learn a bit about U-Boot. +U-Boot is a topic at various conferences each year. These talks might help you +learn a bit about U-Boot: -See elinux_talks_ for a list. +* `Tutorial: Introduction to the Embedded Boot Loader U-boot - Behan Webster, + Converse in Code `__ + from Embedded Linux Conference 2020 + (`slides `__). + +* `Recent Advances in U-Boot - Simon Glass, Google Inc. + `__ + from Embedded Linux Conference 2023. + +See elinux_talks_ for a more comprehensive list. .. _elinux_talks: https://elinux.org/Boot_Loaders#U-Boot