[bootlin/training-materials updates] master: embedded-linux: update QEMU bootloader lab (4d5c4dd8)

Michael Opdenacker michael.opdenacker at bootlin.com
Wed Jan 11 18:27:43 CET 2023


Repository : https://github.com/bootlin/training-materials
On branch  : master
Link       : https://github.com/bootlin/training-materials/commit/4d5c4dd850031f424e7d32116c44175bfa970ef4

>---------------------------------------------------------------

commit 4d5c4dd850031f424e7d32116c44175bfa970ef4
Author: Michael Opdenacker <michael.opdenacker at bootlin.com>
Date:   Wed Jan 11 18:27:43 2023 +0100

    embedded-linux: update QEMU bootloader lab
    
    To have a recent version of U-Boot that compiles fine with our gcc-11 toolchain.
    Errors were reported with U-Boot 2020.04.
    
    Signed-off-by: Michael Opdenacker <michael.opdenacker at bootlin.com>


>---------------------------------------------------------------

4d5c4dd850031f424e7d32116c44175bfa970ef4
 .../embedded-linux-qemu/bootloader/data/u-boot     | Bin 4928244 -> 4523348 bytes
 .../bootloader/data/vexpress_flags_reset.patch     |  12 ------------
 labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex     |  16 +++++++++-------
 3 files changed, 9 insertions(+), 19 deletions(-)

diff --git a/lab-data/embedded-linux-qemu/bootloader/data/u-boot b/lab-data/embedded-linux-qemu/bootloader/data/u-boot
index 7e2eadf3..08f78af7 100644
Binary files a/lab-data/embedded-linux-qemu/bootloader/data/u-boot and b/lab-data/embedded-linux-qemu/bootloader/data/u-boot differ
diff --git a/lab-data/embedded-linux-qemu/bootloader/data/vexpress_flags_reset.patch b/lab-data/embedded-linux-qemu/bootloader/data/vexpress_flags_reset.patch
deleted file mode 100644
index 488e9ab7..00000000
--- a/lab-data/embedded-linux-qemu/bootloader/data/vexpress_flags_reset.patch
+++ /dev/null
@@ -1,12 +0,0 @@
-diff --git a/board/armltd/vexpress/vexpress_common.c b/board/armltd/vexpress/vexpress_common.c
-index 70f6cd80d5..8fea8ff352 100644
---- a/board/armltd/vexpress/vexpress_common.c
-+++ b/board/armltd/vexpress/vexpress_common.c
-@@ -55,7 +55,6 @@ int board_init(void)
- {
- 	gd->bd->bi_boot_params = LINUX_BOOT_PARAM_ADDR;
- 	gd->bd->bi_arch_number = MACH_TYPE_VEXPRESS;
--	gd->flags = 0;
- 
- 	icache_enable();
- 	flash__init();
diff --git a/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex b/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
index 18bfedd6..52a55568 100644
--- a/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
+++ b/labs/sysdev-u-boot-qemu/sysdev-u-boot-qemu.tex
@@ -9,14 +9,14 @@ Go to the \code{$HOME/__SESSION_NAME__-labs/bootloader} directory.
 Install the \code{qemu-system-arm} package. In this lab and in the
 following ones, we will use a QEMU emulated ARM Vexpress Cortex A9 board.
 
-\section{Configuring U-Boot}
+\section{Configuring and building U-Boot}
 
-Download U-Boot v2020.04.
+Download U-Boot:
 
-First apply a patch that fixes the \code{editenv} command in U-Boot:
 \begin{bashinput}
-$ cd u-boot-2020.04
-$ cat ../data/vexpress_flags_reset.patch | patch -p1
+$ git clone https://gitlab.denx.de/u-boot/u-boot
+$ cd u-boot
+$ git checkout v2023.01
 \end{bashinput}
 
 Now configure U-Boot to support the ARM Vexpress Cortex A9 board
@@ -91,6 +91,8 @@ to see available commands. One of them is \code{[Ctrl][a]} followed by
 
 \section{SD card setup}
 
+Go back to the main \code{bootloader} directory.
+
 We now need to add an SD card image to the QEMU virtual machine,
 in particular to get a way to store U-Boot's environment.
 
@@ -170,7 +172,7 @@ Start QEMU again, but this time with the emulated SD card
 
 \begin{bashinput}
 $ qemu-system-arm -M vexpress-a9 -m 128M -nographic \
-		  -kernel u-boot-2020.04/u-boot \
+		  -kernel u-boot/u-boot \
 		  -sd sd.img
 \end{bashinput}
 
@@ -213,7 +215,7 @@ because of the need to bring up the network interface:
 
 \begin{bashinput}
 $ sudo qemu-system-arm -M vexpress-a9 -m 128M -nographic \
-	-kernel u-boot-2020.04/u-boot \
+	-kernel u-boot/u-boot \
 	-sd sd.img \
 	-net tap,script=./qemu-myifup -net nic
 \end{bashinput}




More information about the training-materials-updates mailing list