Introduce EDK2 firmware package
v3 cover Introduce EDK2 firmware package
Hi all,
Here is the third revision of the series introducing two hardware targets and not just virtual platforms. This latest revision also includes updates to bootarm-trusted-firmware as well as boot/mv-ddr-marvell both required to build properly with the latest stable release of EDK2.
This series is introducing the EDK2 bootloader package which can build firmware for five different platforms, on both x86-64 and AArch64.
* QEMU x86-64 pc machine
* QEMU aarch64 virt machine, booting directly from flash
* QEMU aarch64 virt machine, booting via kernel protocol
* QEMU aarch64 sbsa-ref machine
* ARM FVP vexpress machine
* Socionext Developerbox
* SolidRun MacchiatoBin
The EDK2 build system is very particular and includes different dependencies and a lot of custom scripting, which has lead to these design decisions when building these Buildroot packages:
* EDK2 needs to rely on Git submodules because its dependencies are not easy to build separately
* Each platform is a specific configuration option (instead of a string) because they require slightly different packages etc.
Dick Olsson (11):
boot/arm-trusted-firmware: Bump to version 2.4 boot/mv-ddr-marvell: Bump to HEAD as of 20201207 package/edk2-platforms: new package
boot/edk2: new package
configs/aarch64_efi_defconfig: build the EDK2 firmware from source configs/pc_x86_64_defconfig: build the EDK2 firmware from source boot/arm-trusted-firmware: add EDK2 as BL33 option configs/qemu_aarch64_sbsa_defconfig: new config for QEMU sbsa-ref configs/qemu_aarch64_virt_efi_defconfig: new config for QEMU Virt EFI configs/socionext_developerbox_defconfig: new config for Developerbox configs/solidrun_macchiatobin_efi_defconfig: EFI config for
MacchiatoBin
board/aarch64-efi/post-image.sh | 12 +- board/aarch64-efi/readme.txt | 9 +- board/pc/readme.txt | 9 +- board/qemu/aarch64-sbsa/genimage.cfg | 24 +++ board/qemu/aarch64-sbsa/linux.fragment | 1 + board/qemu/aarch64-sbsa/post-image.sh | 20 +++ board/qemu/aarch64-sbsa/readme.txt | 34 ++++ board/qemu/aarch64-virt-efi/genimage.cfg | 24 +++ board/qemu/aarch64-virt-efi/linux.fragment | 1 + board/qemu/aarch64-virt-efi/post-image.sh | 15 ++ board/qemu/aarch64-virt-efi/readme.txt | 27 +++ board/socionext/developerbox/genimage.cfg | 24 +++ board/socionext/developerbox/post-image.sh | 9 + board/socionext/developerbox/readme.txt | 14 ++ board/solidrun/macchiatobin-efi/genimage.cfg | 24 +++ .../solidrun/macchiatobin-efi/linux.fragment | 4 + board/solidrun/macchiatobin-efi/post-image.sh | 9 + board/solidrun/macchiatobin-efi/readme.txt | 14 ++ boot/Config.in | 1 + boot/arm-trusted-firmware/Config.in | 19 +- .../arm-trusted-firmware.hash | 2 +- .../arm-trusted-firmware.mk | 8 + ...GenFds-Compatibility-with-Python-3.9.patch | 35 ++++ boot/edk2/Config.in | 88 ++++++++++ boot/edk2/edk2.hash | 3 + boot/edk2/edk2.mk | 164 ++++++++++++++++++ ...raining_leveling.c-uninitialized-var.patch | 31 ---- boot/mv-ddr-marvell/mv-ddr-marvell.hash | 2 +- boot/mv-ddr-marvell/mv-ddr-marvell.mk | 4 +- configs/aarch64_efi_defconfig | 2 + configs/pc_x86_64_efi_defconfig | 2 + configs/qemu_aarch64_sbsa_defconfig | 44 +++++ configs/qemu_aarch64_virt_efi_defconfig | 46 +++++ configs/socionext_developerbox_defconfig | 21 +++ configs/solidrun_macchiatobin_efi_defconfig | 24 +++ package/Config.in.host | 1 + package/edk2-platforms/Config.in.host | 8 + package/edk2-platforms/edk2-platforms.hash | 3 + package/edk2-platforms/edk2-platforms.mk | 18 ++ 39 files changed, 751 insertions(+), 49 deletions(-) create mode 100644 board/qemu/aarch64-sbsa/genimage.cfg create mode 100644 board/qemu/aarch64-sbsa/linux.fragment create mode 100755 board/qemu/aarch64-sbsa/post-image.sh create mode 100644 board/qemu/aarch64-sbsa/readme.txt create mode 100644 board/qemu/aarch64-virt-efi/genimage.cfg create mode 100644 board/qemu/aarch64-virt-efi/linux.fragment create mode 100755 board/qemu/aarch64-virt-efi/post-image.sh create mode 100644 board/qemu/aarch64-virt-efi/readme.txt create mode 100644 board/socionext/developerbox/genimage.cfg create mode 100755 board/socionext/developerbox/post-image.sh create mode 100644 board/socionext/developerbox/readme.txt create mode 100644 board/solidrun/macchiatobin-efi/genimage.cfg create mode 100644 board/solidrun/macchiatobin-efi/linux.fragment create mode 100755 board/solidrun/macchiatobin-efi/post-image.sh create mode 100644 board/solidrun/macchiatobin-efi/readme.txt create mode 100644 boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch create mode 100644 boot/edk2/Config.in create mode 100644 boot/edk2/edk2.hash create mode 100644 boot/edk2/edk2.mk delete mode 100644 boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch create mode 100644 configs/qemu_aarch64_sbsa_defconfig create mode 100644 configs/qemu_aarch64_virt_efi_defconfig create mode 100644 configs/socionext_developerbox_defconfig create mode 100644 configs/solidrun_macchiatobin_efi_defconfig create mode 100644 package/edk2-platforms/Config.in.host create mode 100644 package/edk2-platforms/edk2-platforms.hash create mode 100644 package/edk2-platforms/edk2-platforms.mk
Signature · 1 line
2.25.1
PATCH v3 1/11 boot/arm-trusted-firmware: Bump to version 2.4
Required in order to build properly with the latest stable release of EDK2 UEFI firmware.
--- boot/arm-trusted-firmware/Config.in | 4 ++-- boot/arm-trusted-firmware/arm-trusted-firmware.hash | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
boot/arm-trusted-firmware/Config.in +2 -2
@@ -15,7 +15,7 @@ choice Select the specific ATF version you want to use config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION - bool "v2.2" + bool "v2.4" config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION bool "Custom version"
@@ -43,7 +43,7 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION string - default "v2.2" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION + default "v2.4" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \ if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GIT
boot/arm-trusted-firmware/arm-trusted-firmware.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 07e3c058ae2d95c7d516a46fc93565b797e912c3271ddbf29df523b1ab1ee911 arm-trusted-firmware-v2.2.tar.gz +sha256 4bfda9fdbe5022f2e88ad3344165f7d38a8ae4a0e2d91d44d9a1603425cc642d arm-trusted-firmware-v2.4.tar.gz sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164 license.rst
Signature · 1 line
2.25.1
Yann E. MORIN
AppliedPATCH v3 1/11 boot/arm-trusted-firmware: Bump to version 2.4
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 4 lines
Required in order to build properly with the latest stable release of EDK2 UEFI firmware.
Signed-off-by Dick Olsson <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 44 lines
--- boot/arm-trusted-firmware/Config.in | 4 ++-- boot/arm-trusted-firmware/arm-trusted-firmware.hash | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)boot/arm-trusted-firmware/Config.in +2
-2@@ -15,7 +15,7 @@ choice Select the specific ATF version you want to use config BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION - bool "v2.2" + bool "v2.4" config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION bool "Custom version"@@ -43,7 +43,7 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_VERSION_VALUE config BR2_TARGET_ARM_TRUSTED_FIRMWARE_VERSION string - default "v2.2" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION + default "v2.4" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_VERSION default "custom" if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_TARBALL default BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_REPO_VERSION \ if BR2_TARGET_ARM_TRUSTED_FIRMWARE_CUSTOM_GITboot/arm-trusted-firmware/arm-trusted-firmware.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 07e3c058ae2d95c7d516a46fc93565b797e912c3271ddbf29df523b1ab1ee911 arm-trusted-firmware-v2.2.tar.gz +sha256 4bfda9fdbe5022f2e88ad3344165f7d38a8ae4a0e2d91d44d9a1603425cc642d arm-trusted-firmware-v2.4.tar.gz sha256 487795b8023df866259fa159bab94706b747fb0d623b7913f1c4955c0ab5f164 license.rstSignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
In reply to Dick OlssonRebase on the mv-ddr-devel branch as the release branches are no longer maintained.
--- ...raining_leveling.c-uninitialized-var.patch | 31 ------------------- boot/mv-ddr-marvell/mv-ddr-marvell.hash | 2 +- boot/mv-ddr-marvell/mv-ddr-marvell.mk | 4 +-- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch
boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch deleted +0 -31
@@ -1,31 +0,0 @@ -From 5867fcad6e88af3d843bfa831648d84a53732d57 Mon Sep 17 00:00:00 2001 -From: Heinrich Schuchardt <[email protected]> -Date: Wed, 19 Dec 2018 17:17:13 +0100 -Subject: [PATCH] mv_ddr: mv_ddr4_training_leveling.c: uninitialized variable - -With GCC 8.2 uninitialized variables lead to a build error. - -Signed-off-by: Heinrich Schuchardt <[email protected]> -Signed-off-by: Baruch Siach <[email protected]> ---- -Upstream status: commit 5867fcad6e8 - - mv_ddr4_training_leveling.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mv_ddr4_training_leveling.c b/mv_ddr4_training_leveling.c -index 144e21a03c01..cb95389f5466 100644 ---- a/mv_ddr4_training_leveling.c -+++ b/mv_ddr4_training_leveling.c -@@ -368,7 +368,7 @@ static int mv_ddr4_dynamic_pb_wl_supp(u32 dev_num, enum mv_wl_supp_mode ecc_mode - u32 subphy_num = ddr3_tip_dev_attr_get(dev_num, MV_ATTR_OCTET_PER_INTERFACE); - u8 compare_result = 0; - u32 orig_phase; -- u32 rd_data, wr_data; -+ u32 rd_data, wr_data = 0; - u32 flag, step; - struct mv_ddr_topology_map *tm = mv_ddr_topology_map_get(); - u32 ecc_phy_access_id; --- -2.20.1 -
boot/mv-ddr-marvell/mv-ddr-marvell.hash +1 -1
@@ -1,3 +1,3 @@ # Locally calculated -sha256 39dcc8baccb82cbc746d8f82ce7f673e1b1236e8aee0d09e7ab12c27eeb6ecda mv-ddr-marvell-618dadd1491eb2f7b2fd74313c04f7accddae475.tar.gz +sha256 bfab74a625d65238c569b9df282b55c0fc9a1e2d3decedcf194d44774df2ede4 mv-ddr-marvell-305d923e6bc4236cd3b902f6679b0aef9e5fa52d.tar.gz sha256 69208236fc322026920b92d1d839ebdc521ca65379bfdb3368a24945e794fc78 ddr3_init.c
boot/mv-ddr-marvell/mv-ddr-marvell.mk +2 -2
@@ -4,8 +4,8 @@ # ################################################################################ -# This is the commit for mv_ddr-armada-18.12.0 -MV_DDR_MARVELL_VERSION = 618dadd1491eb2f7b2fd74313c04f7accddae475 +# This is the latest commit on mv-ddr-devel as of 20201207 +MV_DDR_MARVELL_VERSION = 305d923e6bc4236cd3b902f6679b0aef9e5fa52d MV_DDR_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(MV_DDR_MARVELL_VERSION)) MV_DDR_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial MV_DDR_MARVELL_LICENSE_FILES = ddr3_init.c
Signature · 1 line
2.25.1
Yann E. MORIN
AppliedPATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 4 lines
Rebase on the mv-ddr-devel branch as the release branches are no longer maintained.
Signed-off-by Dick Olsson <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 76 lines
--- ...raining_leveling.c-uninitialized-var.patch | 31 ------------------- boot/mv-ddr-marvell/mv-ddr-marvell.hash | 2 +- boot/mv-ddr-marvell/mv-ddr-marvell.mk | 4 +-- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patchboot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch deleted +0
-31@@ -1,31 +0,0 @@ -From 5867fcad6e88af3d843bfa831648d84a53732d57 Mon Sep 17 00:00:00 2001 -From: Heinrich Schuchardt <[email protected]> -Date: Wed, 19 Dec 2018 17:17:13 +0100 -Subject: [PATCH] mv_ddr: mv_ddr4_training_leveling.c: uninitialized variable - -With GCC 8.2 uninitialized variables lead to a build error. - -Signed-off-by: Heinrich Schuchardt <[email protected]> -Signed-off-by: Baruch Siach <[email protected]> ---- -Upstream status: commit 5867fcad6e8 - - mv_ddr4_training_leveling.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/mv_ddr4_training_leveling.c b/mv_ddr4_training_leveling.c -index 144e21a03c01..cb95389f5466 100644 ---- a/mv_ddr4_training_leveling.c -+++ b/mv_ddr4_training_leveling.c -@@ -368,7 +368,7 @@ static int mv_ddr4_dynamic_pb_wl_supp(u32 dev_num, enum mv_wl_supp_mode ecc_mode - u32 subphy_num = ddr3_tip_dev_attr_get(dev_num, MV_ATTR_OCTET_PER_INTERFACE); - u8 compare_result = 0; - u32 orig_phase; -- u32 rd_data, wr_data; -+ u32 rd_data, wr_data = 0; - u32 flag, step; - struct mv_ddr_topology_map *tm = mv_ddr_topology_map_get(); - u32 ecc_phy_access_id; --- -2.20.1 -boot/mv-ddr-marvell/mv-ddr-marvell.hash +1
-1@@ -1,3 +1,3 @@ # Locally calculated -sha256 39dcc8baccb82cbc746d8f82ce7f673e1b1236e8aee0d09e7ab12c27eeb6ecda mv-ddr-marvell-618dadd1491eb2f7b2fd74313c04f7accddae475.tar.gz +sha256 bfab74a625d65238c569b9df282b55c0fc9a1e2d3decedcf194d44774df2ede4 mv-ddr-marvell-305d923e6bc4236cd3b902f6679b0aef9e5fa52d.tar.gz sha256 69208236fc322026920b92d1d839ebdc521ca65379bfdb3368a24945e794fc78 ddr3_init.cboot/mv-ddr-marvell/mv-ddr-marvell.mk +2
-2@@ -4,8 +4,8 @@ # ################################################################################ -# This is the commit for mv_ddr-armada-18.12.0 -MV_DDR_MARVELL_VERSION = 618dadd1491eb2f7b2fd74313c04f7accddae475 +# This is the latest commit on mv-ddr-devel as of 20201207 +MV_DDR_MARVELL_VERSION = 305d923e6bc4236cd3b902f6679b0aef9e5fa52d MV_DDR_MARVELL_SITE = $(call github,MarvellEmbeddedProcessors,mv-ddr-marvell,$(MV_DDR_MARVELL_VERSION)) MV_DDR_MARVELL_LICENSE = GPL-2.0+ or LGPL-2.1 with freertos-exception-2.0, BSD-3-Clause, Marvell Commercial MV_DDR_MARVELL_LICENSE_FILES = ddr3_init.cSignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
In reply to Dick OlssonQuoted 10 lines · Dick Olsson via buildroot
Rebase on the mv-ddr-devel branch as the release branches are no longer maintained.
Signed-off-by Dick Olsson <[email protected]>--- ...raining_leveling.c-uninitialized-var.patch | 31 ------------------- boot/mv-ddr-marvell/mv-ddr-marvell.hash | 2 +- boot/mv-ddr-marvell/mv-ddr-marvell.mk | 4 +-- 3 files changed, 3 insertions(+), 34 deletions(-) delete mode 100644 boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch
Hello Dick,
My apologies for the late feedback. This change breaks the build for MacchiatoBin board. I guess it also breaks the build for ClearFrog GT 8k board. The reason is straightforward: both boards make use of Marvell ATF v18.12.x which is compatible with mv-ddr-marvell release devel-18.12.x. Your change bumps mv-ddr-marvell version, however the new version is not compatible with older Marvell ATF release since mv_ddr_topology_map structure has been changed.
Could you please clarify the reason behind this change ? There are no users for mv-ddr-marvell other than Marvell ATF that is used only for MacchiatoBin and ClearFrog GT 8k boards. So on the first glance it looks like this change has been introduced as an accompanying update/cleanup during your work on adding EDK2 firmware.
If so, then I would suggest to revert this particular commit. Let me know if you have any objections for this change.
Regards,
Sergey
PATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
Hi Sergey,
Quoted 7 lines · Sergey Matyukevich
My apologies for the late feedback. This change breaks the
build for MacchiatoBin board. I guess it also breaks the
build for ClearFrog GT 8k board. The reason is straightforward: > both boards make use of Marvell ATF v18.12.x which is compatible with mv-ddr-marvell release devel-18.12.x.
Your change bumps mv-ddr-marvell version, however the new
version is not compatible with older Marvell ATF release sincemv_ddr_topology_mapstructure has been changed.
I'm very sorry for breaking this! I thought I tested a build with the original MacchiatoBin defconfig, but clearly my testing was flawed!
Quoted 6 lines
Could you please clarify the reason behind this change ? There are no users for mv-ddr-marvell other than Marvell ATF that is used only for MacchiatoBin and ClearFrog GT 8k boards. So on the first glance it looks like this change has been introduced as an accompanying update/cleanup during your work on adding EDK2 firmware.
Bumping to a later version of mv-ddr-marvell was required in order to successfully built with mainline ATF, which in turn is required in order to build well with the latest release of EDK2. Based on my brief analysis, most of the patches in Marvell's ATF has made it upstream to ATF v2.4 (or earlier). So I thought the best and most secure approach would be to use mainline.
Quoted 2 lines
If so, then I would suggest to revert this particular commit. Let me know if you have any objections for this change.
May I propose that we "roll-forward" instead, and update all Marvell defconfigs to use mainline ATF instead? I believe this would add the most value for Buildroot users, having access to the latest and most stable fixes. What do you think?
I'll submit a patch for comments in the next day or so!
Cheers
Dick Olsson
PGP: 8204A8CD
PATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
Hi Dick, Sergey,
Quoted 10 lines · D. Olsson via buildroot
Quoted 2 lines · Sergey Matyukevich
If so, then I would suggest to revert this particular commit. Let me know if you have any objections for this change.
May I propose that we "roll-forward" instead, and update all Marvell defconfigs to use mainline ATF instead? I believe this would add the most value for Buildroot users, having access to the latest and most stable fixes. What do you think?
I'll submit a patch for comments in the next day or so!
Note that commit 6f0d85fe7e6e6 ("configs/solidrun_clearfog_gt_8k: bump BSP components") fixed the Clearfog GT-8K defconfig.
baruch
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -PATCH v3 2/11 boot/mv-ddr-marvell: Bump to HEAD as of 20201207
In reply to D. OlssonHello Dick,
Quoted 17 lines
Quoted 7 lines
My apologies for the late feedback. This change breaks the
build for MacchiatoBin board. I guess it also breaks the
build for ClearFrog GT 8k board. The reason is straightforward: > both boards make use of Marvell ATF v18.12.x which is compatible with mv-ddr-marvell release devel-18.12.x.
Your change bumps mv-ddr-marvell version, however the new
version is not compatible with older Marvell ATF release sincemv_ddr_topology_mapstructure has been changed.I'm very sorry for breaking this! I thought I tested a build with the original MacchiatoBin defconfig, but clearly my testing was flawed!
Quoted 6 lines
Could you please clarify the reason behind this change ? There are no users for mv-ddr-marvell other than Marvell ATF that is used only for MacchiatoBin and ClearFrog GT 8k boards. So on the first glance it looks like this change has been introduced as an accompanying update/cleanup during your work on adding EDK2 firmware.
Quoted 6 lines
Bumping to a later version of mv-ddr-marvell was required in order to successfully built with mainline ATF, which in turn is required in order to build well with the latest release of EDK2. Based on my brief analysis, most of the patches in Marvell's ATF has made it upstream to ATF v2.4 (or earlier). So I thought the best and most secure approach would be to use mainline.
As I mentioned, so far there were just two users of mv-ddr-marvell:
defconfigs for MacchiatoBin and ClearFrog GT 8k. And both of them used Marvell ATF. It looks like test_atf.py still uses Marvell ATF as well. So could you please clarify this point ? Am I correct assuming that you have some defconfigs that are not yet in mainline buildroot, enabling both EDK2 and mv-ddr-marvell ?
Quoted 7 lines
Quoted 2 lines
If so, then I would suggest to revert this particular commit. Let me know if you have any objections for this change.
May I propose that we "roll-forward" instead, and update all Marvell defconfigs to use mainline ATF instead? I believe this would add the most value for Buildroot users, having access to the latest and most stable fixes. What do you think?
I see that Baruch has already updated ClearFrog GT 8k to use mainline ATF. So I will just do the same for MacchiatoBin. Though I guess there might be some issues with PCIe support for MacchiatoBin board since upstream ATF does not yet include Marvell PCIe drivers.
Regards,
Sergey
PATCH v3 3/11 package/edk2-platforms: new package
In reply to Dick OlssonEDK2 firmware is usually built from two sources; the core EDK2 environment, and additional platform description files maintained separately. This host package adds the latter set of description files that the core EDK2 package will depend on for certain platforms during the building process.
---
Revision 3:
* Added standard comment header
* Added sha256 of the license file
* Updated to hash matching edk2 202008
Revision 2:
* Now installs all description files into HOST_DIR so other packages do not have to compile from its BUILD_DIR (suggested by Thomas Petazzoni)
--- package/Config.in.host | 1 + package/edk2-platforms/Config.in.host | 8 ++++++++ package/edk2-platforms/edk2-platforms.hash | 3 +++ package/edk2-platforms/edk2-platforms.mk | 18 ++++++++++++++++++ 4 files changed, 30 insertions(+) create mode 100644 package/edk2-platforms/Config.in.host create mode 100644 package/edk2-platforms/edk2-platforms.hash create mode 100644 package/edk2-platforms/edk2-platforms.mk
package/Config.in.host +1 -0
@@ -20,6 +20,7 @@ menu "Host utilities" source "package/e2fsprogs/Config.in.host" source "package/e2tools/Config.in.host" source "package/environment-setup/Config.in.host" + source "package/edk2-platforms/Config.in.host" source "package/erofs-utils/Config.in.host" source "package/eudev/Config.in.host" source "package/exfatprogs/Config.in.host"
package/edk2-platforms/Config.in.host new file +8 -0
@@ -0,0 +1,8 @@ +config BR2_PACKAGE_HOST_EDK2_PLATFORMS + bool "host edk2-platforms" + help + EDK II description files for all supported platforms. The main EDK2 + bootloader package will depend on these description files while building + firmware for certain platforms. + + https://github.com/tianocore/edk2-platforms
package/edk2-platforms/edk2-platforms.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 7cdbeb5671a77a3d9cf09a2f232ae7ed4730064465c8d40943a01d673607a2f6 edk2-platforms-7aab81a35aef7b295e73d7d6dfd528cc812790ed.tar.gz +sha256 50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt
package/edk2-platforms/edk2-platforms.mk new file +18 -0
@@ -0,0 +1,18 @@ +################################################################################ +# +# edk2-platforms +# +################################################################################ + +EDK2_PLATFORMS_VERSION = 7aab81a35aef7b295e73d7d6dfd528cc812790ed +EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION)) +EDK2_PLATFORMS_LICENSE = BSD-2-Clause +EDK2_PLATFORMS_LICENSE_FILE = License.txt + +# There is nothing to build for edk2-platforms. All we need to do is to copy +# all description files to the host directory for other packages to build with. +define HOST_EDK2_PLATFORMS_INSTALL_CMDS + cp -rf $(@D) $(HOST_DIR)/share/edk2-platforms +endef + +$(eval $(host-generic-package))
Signature · 1 line
2.25.1
PATCH v3 3/11 package/edk2-platforms: new package
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 7 lines
EDK2 firmware is usually built from two sources; the core EDK2 environment, and additional platform description files maintained separately. This host package adds the latter set of description files that the core EDK2 package will depend on for certain platforms during the building process.
Signed-off-by Dick Olsson <[email protected]>
[--SNIP--]
Quoted 11 lines
package/edk2-platforms/edk2-platforms.mk new file +5
-0@@ -0,0 +1,18 @@ +################################################################################ +# +# edk2-platforms +# +################################################################################
package/edk2-platforms/edk2-platforms.mk line 15
Quoted 10 lines
package/edk2-platforms/edk2-platforms.mk new file +10
-0+ +EDK2_PLATFORMS_VERSION = 7aab81a35aef7b295e73d7d6dfd528cc812790ed +EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION)) +EDK2_PLATFORMS_LICENSE = BSD-2-Clause +EDK2_PLATFORMS_LICENSE_FILE = License.txt + +# There is nothing to build for edk2-platforms. All we need to do is to copy +# all description files to the host directory for other packages to build with. +define HOST_EDK2_PLATFORMS_INSTALL_CMDS + cp -rf $(@D) $(HOST_DIR)/share/edk2-platforms
I know Thomas said to copy the files there, but I disagree; see below..
package/edk2-platforms/edk2-platforms.mk line 18
Quoted 3 lines
package/edk2-platforms/edk2-platforms.mk new file +3
-0+endef + +$(eval $(host-generic-package))
edk2-platforms provides files for the target, not for the host. As such, it should not be a host package, but a target package.
The platform descriptions are like a small library of stuff for the target (like a .a or a .h or any other description), and thus should be installed in staging.
EDK2_PLATFORMS_INSTALL_TARGET = NO
EDK2_PLATFORMS_INSTALL_STAGING = YES
define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
mkdir -p $(STAGING_DIR)/usr/share/edk2-platforms
cp -a $(@D)/* $(STAGING_DIR)/usr/share/edk2-platforms/
endef
$(eval $(generic-package))Regards,
Yann E. MORIN.
Quoted 8 lines
Signature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 4/11 boot/edk2: new package
In reply to Dick OlssonEDK2 is a modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications.
The initial version of this bootloader package makes it possible to build firmware for the following seven configurations:
* QEMU x86-64 pc machine
* QEMU aarch64 virt machine, booting directly from flash
* QEMU aarch64 virt machine, booting via the kernel protocol
* QEMU aarch64 sbsa-ref machine
* ARM FVP vexpress machine
* Socionext SynQuacer Developerbox
* SolidRun MacchiatoBin
When building for QEMU sbsa-ref, ARM FVP, Developerbox and MacchiatoBin there is a dependency on package/edk2-platforms for additional platform description files.
---
Revision 3:
* Added standard comment header
* Removed spurious change
* Using proper compiler flags
* Added missing libuuid dependency with host-util-linux
* Automated QEMU SBSA config dependency
* Updated to 202008
* Improved code comments
* Added upstream patch to fix Python 3.9 build issues
* Added support for Developerbox and MacchiatoBin
Revision 2:
Review items from Thomas Petazzoni:
* Fixed alphabetical inclusion of Config.in
* Removed spurious change in ATF
* Added architecture dependencies
* Added hash for license file
* Using host dir (instead of build dir) from edk2-platforms
* Simplified _BUILD_CMDS
* Simplified _INSTALL_IMAGES_CMDS
Other improvements:
* Added support for x86-64 and OVMF
* General cleanup and simplification
* Improved code comments
* Renamed variable EDK2_FD_NAME to EDK2_EL2_NAME to be more specific. This variable is only meaningful for platforms that build images intended to be used by other bootloaders in EL2 context (e.g. ATF).
--- boot/Config.in | 1 + ...GenFds-Compatibility-with-Python-3.9.patch | 35 ++++ boot/edk2/Config.in | 88 ++++++++++ boot/edk2/edk2.hash | 3 + boot/edk2/edk2.mk | 164 ++++++++++++++++++ 5 files changed, 291 insertions(+) create mode 100644 boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch create mode 100644 boot/edk2/Config.in create mode 100644 boot/edk2/edk2.hash create mode 100644 boot/edk2/edk2.mk
boot/Config.in +1 -0
@@ -8,6 +8,7 @@ source "boot/arm-trusted-firmware/Config.in" source "boot/barebox/Config.in" source "boot/binaries-marvell/Config.in" source "boot/boot-wrapper-aarch64/Config.in" +source "boot/edk2/Config.in" source "boot/grub2/Config.in" source "boot/gummiboot/Config.in" source "boot/lpc32xxcdl/Config.in"
boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch new file +35 -0
@@ -0,0 +1,35 @@ +From 685ad1d101677f967597a2956f3becd94b49c796 Mon Sep 17 00:00:00 2001 +From: Dick Olsson <[email protected]> +Date: Fri, 18 Dec 2020 21:07:24 +0100 +Subject: [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9 + +Python 3.9 removed the tostring() and fromstring() methods: +https://docs.python.org/3/whatsnew/3.9.html#removed + +Signed-off-by: Dick Olsson <[email protected]> +--- + BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +index dc1727c466..124dc43199 100644 +--- a/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py ++++ b/BaseTools/Source/Python/GenFds/GenFdsGlobalVariable.py +@@ -463,12 +463,12 @@ class GenFdsGlobalVariable: + GenFdsGlobalVariable.SecCmdList.append(' '.join(Cmd).strip()) + else: + SectionData = array('B', [0, 0, 0, 0]) +- SectionData.fromstring(Ui.encode("utf_16_le")) ++ SectionData.frombytes(Ui.encode("utf_16_le")) + SectionData.append(0) + SectionData.append(0) + Len = len(SectionData) + GenFdsGlobalVariable.SectionHeader.pack_into(SectionData, 0, Len & 0xff, (Len >> 8) & 0xff, (Len >> 16) & 0xff, 0x15) +- SaveFileOnChange(Output, SectionData.tostring()) ++ SaveFileOnChange(Output, SectionData.tobytes()) + + elif Ver: + Cmd += ("-n", Ver) +-- +2.25.1 +
boot/edk2/Config.in new file +88 -0
88 lines not on this page · raw message
boot/edk2/edk2.hash new file +3 -0
@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1f8282faeea36d19ba3f8fd3c14070038fd785b76ee4d6270d35647df9346355 edk2-edk2-stable202008.tar.gz +sha256 50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txt
boot/edk2/edk2.mk new file +164 -0
164 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 4/11 boot/edk2: new package
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 14 lines
EDK2 is a modern, feature-rich, cross-platform firmware development environment for the UEFI and PI specifications.
The initial version of this bootloader package makes it possible to build firmware for the following seven configurations:
* QEMU x86-64 pc machine
* QEMU aarch64 virt machine, booting directly from flash
* QEMU aarch64 virt machine, booting via the kernel protocol
* QEMU aarch64 sbsa-ref machine
* ARM FVP vexpress machine
* Socionext SynQuacer Developerbox
* SolidRun MacchiatoBin
Quoted 5 lines
When building for QEMU sbsa-ref, ARM FVP, Developerbox and MacchiatoBin there is a dependency on package/edk2-platforms for additional platform description files.
Signed-off-by Dick Olsson <[email protected]>
[--SNIP--]
Quoted 6 lines
boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch new file +0
-0
boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch line 9
Quoted 9 lines
boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch new file +9
-0@@ -0,0 +1,35 @@ +From 685ad1d101677f967597a2956f3becd94b49c796 Mon Sep 17 00:00:00 2001 +From: Dick Olsson <[email protected]> +Date: Fri, 18 Dec 2020 21:07:24 +0100 +Subject: [edk2/master PATCH 1/1] GenFds: Compatibility with Python 3.9 + +Python 3.9 removed the tostring() and fromstring() methods: +https://docs.python.org/3/whatsnew/3.9.html#removed + +Signed-off-by: Dick Olsson <[email protected]>
Please submit this patch upstream.
See also: https://github.com/tianocore/edk2/pull/1234
[--SNIP--]
Quoted 20 lines
boot/edk2/Config.in new file +14
-0@@ -0,0 +1,88 @@ +config BR2_TARGET_EDK2 + bool "EDK2" + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_5 + depends on BR2_x86_64 || BR2_aarch64 + help + EDK II is a modern, feature-rich, cross-platform firmware + development environment for the UEFI and PI specifications. + + https://github.com/tianocore/tianocore.github.io/wiki/EDK-II + +if BR2_TARGET_EDK2 + +config BR2_TARGET_EDK2_DEBUG + bool "Debug build"
boot/edk2/Config.in line 24
Quoted 10 lines
boot/edk2/Config.in new file +10
-0+ help + Use the debug build type. + +choice + prompt "Platform" + default BR2_TARGET_EDK2_PLATFORM_OVMF_X64 if BR2_x86_64 + default BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU if BR2_aarch64 + +config BR2_TARGET_EDK2_PLATFORM_OVMF_X64 + bool "x86-64"
Should that not depend on BR2_x86_64 ?
boot/edk2/Config.in line 28
Quoted 4 lines
boot/edk2/Config.in new file +4
-0+ help + Configuration for x86-64. + This platform will boot from flash address 0x0. + It should therefore be used as the first bootloader.
Leading TAB for keyword options, and leadng TAB+2-spaces for help text.
boot/edk2/Config.in line 31
Quoted 2 lines
boot/edk2/Config.in new file +2
-0+config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU + bool "ARM Virt Qemu (flash)"
Ditto: should that not depend on BR2_aarch64 ?
Likewise for the other entries, below...
Quoted 14 lines
boot/edk2/Config.in new file +14
-0+ help + Configuration for QEMU targeting the Virt machine. + This platform will only boot from flash address 0x0. + It should therefore be used as the first bootloader. + +config BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL + bool "ARM Virt Qemu (kernel)" + help + Configuration for QEMU targeting the Virt machine. + This platform can boot from either flash address 0x0 or via + the Linux boot protocol. It can therefore be loaded by a + previous bootloader like ARM Trusted Firmware or OP-TEE. + +config BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
boot/edk2/Config.in line 55
Quoted 10 lines
boot/edk2/Config.in new file +10
-0+ bool "ARM VExpress FVP Aarch64" + select BR2_PACKAGE_HOST_EDK2_PLATFORMS + help + Configuration for ARM Versatile Express targeting the + Fixed Virtual Platform (FVP) AArch64 platform. + +config BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX + bool "Socionext DeveloperBox" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE + depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
This option currently does not exist in the tree.
So, this line shouuld only be added when support for EDK2 as an ATF payload is added.
Quoted 10 lines
boot/edk2/Config.in new file +10
-0+ select BR2_PACKAGE_HOST_EDK2_PLATFORMS + select BR2_PACKAGE_HOST_DTC + help + Configuration for the Socionext SynQuacer DeveloperBox (SC2A11). + +comment "Socionext DeveloperBox depends on ATF not using EDK2 as BL33" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33 + +config BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN + bool "SolidRun MacchiatoBin"
boot/edk2/Config.in line 75
Quoted 10 lines
boot/edk2/Config.in new file +10
-0+ depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE + select BR2_PACKAGE_HOST_EDK2_PLATFORMS + select BR2_PACKAGE_HOST_DTC + help + Configuration for the SolidRun MacchiatoBin. + +config BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA + bool "QEMU SBSA" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE + depends on !BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
Ditto.
Quoted 36 lines
boot/edk2/Config.in new file +13
-0+ select BR2_PACKAGE_HOST_EDK2_PLATFORMS + help + Configuration for QEMU targeting the SBSA reference platform. + +comment "QEMU SBSA depends on ATF not using EDK2 as BL33" + depends on BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33 + +endchoice + +endif + +comment "EDK2 needs a toolchain w/ gcc >= 5" + depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_5boot/edk2/edk2.hash new file +3
-0@@ -0,0 +1,3 @@ +# Locally calculated +sha256 1f8282faeea36d19ba3f8fd3c14070038fd785b76ee4d6270d35647df9346355 edk2-edk2-stable202008.tar.gz +sha256 50ce20c9cfdb0e19ee34fe0a51fc0afe961f743697b068359ab2f862b494df80 License.txtboot/edk2/edk2.mk new file +8
-0@@ -0,0 +1,164 @@ +################################################################################ +# +# edk2 +# +################################################################################ + +EDK2_VERSION = edk2-stable202008 +EDK2_SITE = https://github.com/tianocore/edk2
boot/edk2/edk2.mk line 18
Quoted 10 lines
boot/edk2/edk2.mk new file +10
-0+EDK2_SITE_METHOD = git +EDK2_LICENSE = BSD-2-Clause +EDK2_LICENSE_FILE = License.txt +EDK2_DEPENDENCIES = host-python3 host-acpica host-util-linux + +# The EDK2 build system is rather special, so we're resorting to using its +# own Git submodules in order to include certain build dependencies. +EDK2_GIT_SUBMODULES = YES + +EDK2_INSTALL_IMAGES = YES
Since it also does not install anything in target/, you should also add;
EDK2_INSTALL_TARGET = NO
Quoted 8 lines
boot/edk2/edk2.mk new file +8
-0+ifeq ($(BR2_x86_64),y) +EDK2_ARCH = X64 +else ifeq ($(BR2_aarch64),y) +EDK2_ARCH = AARCH64 +endif + +ifeq ($(BR2_TARGET_EDK2_DEBUG),y) +EDK2_BUILD_TYPE = DEBUG
boot/edk2/edk2.mk line 37
Quoted 10 lines
boot/edk2/edk2.mk new file +10
-0+else +EDK2_BUILD_TYPE = RELEASE +endif + +# Packages path. +# +# The EDK2 build system will, for some platforms, depend on binary outputs +# from other bootloader packages. Those dependencies need to be in the path +# for the EDK2 build system, so we define this special directory here. +EDK2_OUTPUT_BASE = $(BINARIES_DIR)/edk2
I am a bit uneasy about that one: does that mean that edk2 will store files there during its build step, or does that mean itr will look there for extra input files?
But see the hooks, below...
boot/edk2/edk2.mk line 47
Quoted 9 lines
boot/edk2/edk2.mk new file +9
-0+ifeq ($(BR2_PACKAGE_HOST_EDK2_PLATFORMS),y) +EDK2_PACKAGES_PATH = $(@D):$(EDK2_OUTPUT_BASE):$(HOST_DIR)/share/edk2-platforms +else +EDK2_PACKAGES_PATH = $(@D):$(EDK2_OUTPUT_BASE) +endif + +# Platform configuration. +# +# We set the variable EDK_EL2_NAME for platforms that may depend on EDK2 as
________________________,^^^
Typo, should be: EDK2_EL2_NAME
However, that variable is used nowhere in this patch, nor in any of the followup patches.
I guess it is needed when EDK2 can be used e.g. as a payload for ATF, so it should probably be added then...
Also, I wonder if it would not be better to define it at the kconfig level:
config BR2_PACKAGE_EDK2_EL2_NAME
string
default "QEMU_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL
default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64
default "FVP_AARCH64_EFI" if BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX
default "ARMADA_EFI" if BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
This way, it is easier for ATF to use BR2_PACKAGE_EDK2_EL2_NAME rather than EDk2_EL2_NAME (this avoids using variables defined in another .mk file).
Quoted 67 lines
boot/edk2/edk2.mk new file +67
-0+# part of booting the EL2 context, like ARM Trusted Firmware (ATF). This way, +# other bootloaders know what binary to build into in their firmware package. +# +# However, some platforms (e.g. QEMU SBSA, Socionext DeveloperBox) are built +# differently where the dependency with ATF is reversed. In these cases EDK2 +# will package the firmware package instead. + +ifeq ($(BR2_TARGET_EDK2_PLATFORM_OVMF_X64),y) +EDK2_DEPENDENCIES += host-nasm +EDK2_PACKAGE_NAME = OvmfPkg +EDK2_PLATFORM_NAME = OvmfPkgX64 +EDK2_BUILD_DIR = OvmfX64 + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU),y) +EDK2_PACKAGE_NAME = ArmVirtPkg +EDK2_PLATFORM_NAME = ArmVirtQemu +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH) + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL),y) +EDK2_PACKAGE_NAME = ArmVirtPkg +EDK2_PLATFORM_NAME = ArmVirtQemuKernel +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH) +EDK2_EL2_NAME = QEMU_EFI + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64),y) +EDK2_DEPENDENCIES += host-edk2-platforms +EDK2_PACKAGE_NAME = Platform/ARM/VExpressPkg +EDK2_PLATFORM_NAME = ArmVExpress-FVP-AArch64 +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME) +EDK2_EL2_NAME = FVP_AARCH64_EFI + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX),y) +EDK2_DEPENDENCIES += host-edk2-platforms host-dtc arm-trusted-firmware +EDK2_PACKAGE_NAME = Platform/Socionext/DeveloperBox +EDK2_PLATFORM_NAME = DeveloperBox +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME) +EDK2_EL2_NAME = FVP_AARCH64_EFI +EDK2_PRE_CONFIGURE_HOOKS += EDK2_OUTPUT_SOCIONEXT_DEVELOPERBOX +EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/ +EDK2_BUILD_OPTS += -D DO_X86EMU=TRUE + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN),y) +EDK2_DEPENDENCIES += host-edk2-platforms host-dtc +EDK2_PACKAGE_NAME = Platform/SolidRun/Armada80x0McBin +EDK2_PLATFORM_NAME = Armada80x0McBin +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME)-$(EDK2_ARCH) +EDK2_EL2_NAME = ARMADA_EFI +EDK2_BUILD_ENV += DTC_PREFIX=$(HOST_DIR)/bin/ +EDK2_BUILD_OPTS += -D INCLUDE_TFTP_COMMAND + +else ifeq ($(BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA),y) +EDK2_DEPENDENCIES += host-edk2-platforms arm-trusted-firmware +EDK2_PACKAGE_NAME = Platform/Qemu/SbsaQemu +EDK2_PLATFORM_NAME = SbsaQemu +EDK2_BUILD_DIR = $(EDK2_PLATFORM_NAME) +EDK2_PRE_CONFIGURE_HOOKS += EDK2_OUTPUT_QEMU_SBSA +endif + +# Workspace setup. +# +# For some platforms we need to prepare the EDK2 workspace and link to the +# ARM Trusted Firmware (ATF) binaries. This will enable EDK2 to bundle ATF +# into its firmware package. + +define EDK2_OUTPUT_SOCIONEXT_DEVELOPERBOX + mkdir -p $(EDK2_OUTPUT_BASE)/Platform/Socionext/DeveloperBox + $(ARM_TRUSTED_FIRMWARE_DIR)/tools/fiptool/fiptool create \
boot/edk2/edk2.mk line 124
Quoted 10 lines
boot/edk2/edk2.mk new file +10
-0+ --tb-fw $(BINARIES_DIR)/bl31.bin \ + --soc-fw $(BINARIES_DIR)/bl31.bin \ + --scp-fw $(BINARIES_DIR)/bl31.bin \ + $(EDK2_OUTPUT_BASE)/Platform/Socionext/DeveloperBox/fip_all_arm_tf.bin +endef + +define EDK2_OUTPUT_QEMU_SBSA + mkdir -p $(EDK2_OUTPUT_BASE)/Platform/Qemu/Sbsa + ln -srf $(BINARIES_DIR)/{bl1.bin,fip.bin} $(EDK2_OUTPUT_BASE)/Platform/Qemu/Sbsa/ +endef
Those two hooks are only used in one place each, and so must be defined in the conditional block that uses them.
Also, those two hooks are used a pre-configure hooks, but they are adding stuff in EDK2_OUTPUT_BASE, which is iteslef in BINARIES_DIR, which is not very nice.
Can't we have EDK2_OUTPUT_BASE be located somewhere in $(@D) instead:
EDK2_OUTPUT_BASE = $(@D)/br-output-base
And then, as part of the IMAGE_INSTALL_CMDS, we copy that to the proper, final location in BINARIES_DIR/edk2 (or whatever), if that is needed.
boot/edk2/edk2.mk line 132
Quoted 7 lines
boot/edk2/edk2.mk new file +7
-0+# Make and build options. +# +# Due to the uniquely scripted build system for EDK2 we need to export most +# build environment variables so that they are available across edksetup.sh, +# make, the build command, and other subordinate build scripts within EDK2. + +EDK2_MAKE_ENV += \
This variable is only assigned here, so this should be a simple assignment, not an append-assignment. Also, this is used as make options, not environment, so should probably be named EDK2_MAKE_OPTS.
boot/edk2/edk2.mk line 134
Quoted 2 lines
boot/edk2/edk2.mk new file +2
-0+ EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \ + EXTRA_OPTFLAGS="$(HOST_CPPFLAGS)"
This naming is pretty confusing, but indeed, EXTRA_XXX are only used to build host tools, not target code...
Quoted 12 lines
boot/edk2/edk2.mk new file +12
-0+EDK2_BUILD_ENV += \ + WORKSPACE=$(@D) \ + PACKAGES_PATH=$(EDK2_PACKAGES_PATH) \ + PYTHON_COMMAND=$(HOST_DIR)/bin/python3 \ + IASL_PREFIX=$(HOST_DIR)/bin/ \ + NASM_PREFIX=$(HOST_DIR)/bin/ \ + GCC5_$(EDK2_ARCH)_PREFIX=$(TARGET_CROSS) + +EDK2_BUILD_OPTS += \ + -t GCC5 \ + -n `nproc` \ + -a $(EDK2_ARCH) \
boot/edk2/edk2.mk line 157
Quoted 10 lines
boot/edk2/edk2.mk new file +10
-0+ -b $(EDK2_BUILD_TYPE) \ + -p $(EDK2_PACKAGE_NAME)/$(EDK2_PLATFORM_NAME).dsc + +define EDK2_BUILD_CMDS + mkdir -p $(EDK2_OUTPUT_BASE) + export $(EDK2_BUILD_ENV) && \ + unset ARCH && \ + source $(@D)/edksetup.sh && \ + $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)/BaseTools $(EDK2_MAKE_ENV) && \ + build $(EDK2_BUILD_OPTS) all
Oh... I see what you mean by "uniquely scripted build system".. ;-]
Regards,
Yann E. MORIN.
Quoted 15 lines
boot/edk2/edk2.mk new file +7
-0+endef + +define EDK2_INSTALL_IMAGES_CMDS + cp -f $(@D)/Build/$(EDK2_BUILD_DIR)/$(EDK2_BUILD_TYPE)_GCC5/FV/*.fd $(BINARIES_DIR) +endef + +$(eval $(generic-package))Signature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 4/11 boot/edk2: new package
Hi Yann,
I'll address the rest of your reviews in the coming days. But here are some initial answers.
Quoted 3 lines
Please submit this patch upstream.
I did submit it upstream and the discussion evolved a bit in their mailing list. I'll update the patch accordingly and reference the upstream conversation in the commit message. But for reference for the purpose of this email:
https://edk2.groups.io/g/devel/message/69235
https://edk2.groups.io/g/devel/message/69390
https://bugzilla.tianocore.org/show_bug.cgi?id=3136
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +1
-1+config BR2_TARGET_EDK2_PLATFORM_OVMF_X64 - bool "x86-64"Should that not depend on
BR2_x86_64?
Yes, it should. And I'll fix the same for all the other similar comments in v4.
Quoted 1 line
Leading TAB for keyword options, and leadng TAB+2-spaces for help text.
Gotcha!
Quoted 9 lines
boot/edk2/edk2.mk line 18
Quoted 5 lines
boot/edk2/edk2.mk new file +5
-0+# The EDK2 build system is rather special, so we're resorting to using its +# own Git submodules in order to include certain build dependencies. +EDK2_GIT_SUBMODULES = YES + +EDK2_INSTALL_IMAGES = YESSince it also does not install anything in target/, you should also add;
EDK2_INSTALL_TARGET= NO
Makes sense!
Quoted 10 lines
boot/edk2/edk2.mk line 37
Quoted 6 lines
boot/edk2/edk2.mk new file +6
-0+# Packages path. +# +# The EDK2 build system will, for some platforms, depend on binary outputs +# from other bootloader packages. Those dependencies need to be in the path +# for the EDK2 build system, so we define this special directory here. +EDK2_OUTPUT_BASE = $(BINARIES_DIR)/edk2I am a bit uneasy about that one: does that mean that edk2 will store files there during its build step, or does that mean itr will look there for extra input files?
In order for EDK2 to consume images that ATF outputs they need to be arranged in specific ways, they're called a "packages" in EDK2 terms (see the PACKAGES_PATH build varaible).
For the Developerbox, we construct a "package" with a FIP from the ATF images and put into a "package" structure. And for the QEMU SBSA the ATF outputs can simply be copied into said directory structure.
So to summarise, it's a place where output files from one bootloader are repackaged as input for EDK2. I thought this was similar to how post build scripts repurpose e.g. the kernel image to build disk images.
That said, it's EDK2 itself building these packages, so keeping it under $(@D) might make the most sense. I'll play around with it to see if I come up with something cleaner.
Quoted 10 lines
Also, I wonder if it would not be better to define it at the kconfig level:
config
BR2_PACKAGE_EDK2_EL2_NAME
string
default "QEMU_EFI" ifBR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNELdefault "FVP_AARCH64_EFI" ifBR2_TARGET_EDK2_PLATFORM_ARM_VEXPRESS_FVP_AARCH64default "FVP_AARCH64_EFI" ifBR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOXdefault "ARMADA_EFI" ifBR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN
Quoted 3 lines
This way, it is easier for ATF to use
BR2_PACKAGE_EDK2_EL2_NAMErather thanEDk2_EL2_NAME(this avoids using variables defined in another .mk file).
I hadn't thought about this pattern before, but I like it!. I'll include it in v4.
Quoted 16 lines
Review
Quoted 8 lines
(quoted diff) +3
-2+endef + +define EDK2_OUTPUT_QEMU_SBSA - mkdir -p $(EDK2_OUTPUT_BASE)/Platform/Qemu/Sbsa - ln -srf $(BINARIES_DIR)/{bl1.bin,fip.bin} $(EDK2_OUTPUT_BASE)/Platform/Qemu/Sbsa/ +endefThose two hooks are only used in one place each, and so must be defined in the conditional block that uses them.
Also, those two hooks are used a pre-configure hooks, but they are adding stuff in
EDK2_OUTPUT_BASE, which is iteslef inBINARIES_DIR, which is not very nice.
Quoted 6 lines
Can't we have
EDK2_OUTPUT_BASEbe located somewhere in $(@D) instead:
EDK2_OUTPUT_BASE= $(@D)/br-output-baseAnd then, as part of the
IMAGE_INSTALL_CMDS, we copy that to the proper, final location in BINARIES_DIR/edk2 (or whatever), if that is needed.
Yes, might make sense and would change when/if I change the EDK2_OUTPUT_BASE stuff I commented on above. I'll see what I come up with...
Quoted 11 lines
boot/edk2/edk2.mk line 132
Quoted 7 lines
boot/edk2/edk2.mk new file +7
-0+# Make and build options. +# +# Due to the uniquely scripted build system for EDK2 we need to export most +# build environment variables so that they are available across edksetup.sh, +# make, the build command, and other subordinate build scripts within EDK2. + +EDK2_MAKE_ENV += \This variable is only assigned here, so this should be a simple assignment, not an append-assignment. Also, this is used as make options, not environment, so should probably be named
EDK2_MAKE_OPTS.
Will fix!
Quoted 5 lines
Review
Quoted 2 lines
(quoted diff) +0
-2- EXTRA_LDFLAGS="$(HOST_LDFLAGS)" \ - EXTRA_OPTFLAGS="$(HOST_CPPFLAGS)"This naming is pretty confusing, but indeed,
EXTRA_XXXare only used to build host tools, not target code...
Yeah, the one and only make command in the build is for base tools for the host. The actual target build is run by custom build scripts. So I thought
Cheers
D. Olsson
PGP: 8204A8CD
PATCH v3 4/11 boot/edk2: new package
Dick, All,
On 2020-12-30 20:22 +0000, D. Olsson spake thusly:
Quoted 10 lines
Quoted 2 lines
Please submit this patch upstream.
See also: https://github.com/tianocore/edk2/pull/1234I did submit it upstream and the discussion evolved a bit in their mailing list. I'll update the patch accordingly and reference the upstream conversation in the commit message. But for reference for the purpose of this email:
https://edk2.groups.io/g/devel/message/69235
https://edk2.groups.io/g/devel/message/69390
https://bugzilla.tianocore.org/show_bug.cgi?id=3136
Very good, thanks!
Yes, we like to have reference to upstream patch status in the patch itself; this helps in the future when we have update the version and the patch no longer applied: with a reference to upstream, we can see whether the patch was applied and we can drop it, or if it was not applied and how we need to adapt it.
Note that, until upstream has decided on a proper solution that suits them, it is OK that we have to carry our patch in the meantime.
Quoted 12 lines
Quoted 4 lines
Quoted 1 line
+EDK2_OUTPUT_BASE = $(BINARIES_DIR)/edk2
I am a bit uneasy about that one: does that mean that edk2 will store files there during its build step, or does that mean itr will look there for extra input files?
In order for EDK2 to consume images that ATF outputs they need to be arranged in specific ways, they're called a "packages" in EDK2 terms (see the
PACKAGES_PATHbuild varaible).For the Developerbox, we construct a "package" with a FIP from the ATF images and put into a "package" structure. And for the QEMU SBSA the ATF outputs can simply be copied into said directory structure.
Quoted 8 lines
So to summarise, it's a place where output files from one bootloader are repackaged as input for EDK2. I thought this was similar to how post build scripts repurpose e.g. the kernel image to build disk images.
That said, it's EDK2 itself building these packages, so keeping it under $(@D) might make the most sense. I'll play around with it to see if I come up with something cleaner.
Thanks for the explanations. Maybe a shorter version can be added to the commit log. ;-)
IMHO those files are indeed only intermediate build files, and thus there is no reason for them to be in BINARIES_DIR.
Thanks for the feedback. :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 5/11 configs/aarch64_efi_defconfig: build the EDK2 firmware from source
In reply to Dick OlssonPrior to this, you had to manually download a pre-built EDK2 flash device image (QEMU_EFI.fd) in order to boot this configuration with QEMU. Now, the configuration is building EDK2 from source.
---
Revision 3:
* post-image.sh will now provide resized flash devices
* readme.txt suggests pflash instead of bios
Revision 2:
* Explicitly added the default EDK2 platform to defconfig
--- board/aarch64-efi/post-image.sh | 12 +++++++++++- board/aarch64-efi/readme.txt | 9 ++++----- configs/aarch64_efi_defconfig | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-)
board/aarch64-efi/post-image.sh +11 -1
@@ -1,5 +1,15 @@ -#!/bin/sh +#!/bin/bash BOARD_DIR="$(dirname $0)" cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg + +# Function taking file $1 as input and outputs file $2 padded to size $3. +function resize_flash { + dd if=/dev/zero of="${BINARIES_DIR}/${2}" bs=1M count="${3}" + dd if="${BINARIES_DIR}/${1}" of="${BINARIES_DIR}/${2}" conv=notrunc +} + +# The QEMU virt machine expects flash devices to be 64M. +resize_flash QEMU_EFI.fd QEMU_EFI_RESIZED.fd 64 +resize_flash QEMU_VARS.fd QEMU_VARS_RESIZED.fd 64
board/aarch64-efi/readme.txt +4 -5
@@ -22,13 +22,12 @@ qemu-system-aarch64 \ -cpu cortex-a57 \ -m 512 \ -nographic \ - -bios </path/to/QEMU_EFI.fd> \ + -drive file=output/images/QEMU_EFI_RESIZED.fd,if=pflash,format=raw \ + -drive file=output/images/QEMU_VARS_RESIZED.fd,if=pflash,format=raw \ -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=eth0 \ -device virtio-net-device,netdev=eth0 -Note that </path/to/QEMU_EFI.fd> needs to point to a valid aarch64 UEFI -firmware image for qemu. -It may be provided by your distribution as a edk2-aarch64 or AAVMF -package, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd . +Note that output/images/QEMU_*.fd are the flash device files built by +the EDK2 package.
configs/aarch64_efi_defconfig +2 -0
@@ -12,6 +12,8 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_PACKAGE_HOST_GENIMAGE=y # Bootloader +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_ARM64_EFI=y
Signature · 1 line
2.25.1
PATCH v3 5/11 configs/aarch64_efi_defconfig: build the EDK2 firmware from source
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 28 lines
Prior to this, you had to manually download a pre-built EDK2 flash device image (QEMU_EFI.fd) in order to boot this configuration with QEMU. Now, the configuration is building EDK2 from source.
Signed-off-by Dick Olsson <[email protected]>---
Revision 3:
*
post-image.shwill now provide resized flash devices
* readme.txt suggests pflash instead of biosRevision 2:
* Explicitly added the default EDK2 platform to defconfig
--- board/aarch64-efi/post-image.sh | 12 +++++++++++- board/aarch64-efi/readme.txt | 9 ++++----- configs/aarch64_efi_defconfig | 2 ++ 3 files changed, 17 insertions(+), 6 deletions(-)board/aarch64-efi/post-image.sh +0
-1@@ -1,5 +1,15 @@ -#!/bin/sh
board/aarch64-efi/post-image.sh line 10
Quoted 10 lines
board/aarch64-efi/post-image.sh +6
-0+#!/bin/bash BOARD_DIR="$(dirname $0)" cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg + +# Function taking file $1 as input and outputs file $2 padded to size $3. +function resize_flash { + dd if=/dev/zero of="${BINARIES_DIR}/${2}" bs=1M count="${3}" + dd if="${BINARIES_DIR}/${1}" of="${BINARIES_DIR}/${2}" conv=notrunc
There is a better and simpler way to achieve that:
truncate -s 64M "${BINARIES_DIR}/QEMU_EFI.fd"
truncate -s 64M "${BINARIES_DIR}/QEMU_VARS.fd"(as I understand it, these files are just meant for QEMU, not actual hardware, so we can resize them in-place without copying).
Regards,
Yann E. MORIN.
Quoted 48 lines
board/aarch64-efi/post-image.sh +5
-0+} + +# The QEMU virt machine expects flash devices to be 64M. +resize_flash QEMU_EFI.fd QEMU_EFI_RESIZED.fd 64 +resize_flash QEMU_VARS.fd QEMU_VARS_RESIZED.fd 64board/aarch64-efi/readme.txt +4
-5@@ -22,13 +22,12 @@ qemu-system-aarch64 \ -cpu cortex-a57 \ -m 512 \ -nographic \ - -bios </path/to/QEMU_EFI.fd> \ + -drive file=output/images/QEMU_EFI_RESIZED.fd,if=pflash,format=raw \ + -drive file=output/images/QEMU_VARS_RESIZED.fd,if=pflash,format=raw \ -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ -device virtio-blk-device,drive=hd0 \ -netdev user,id=eth0 \ -device virtio-net-device,netdev=eth0 -Note that </path/to/QEMU_EFI.fd> needs to point to a valid aarch64 UEFI -firmware image for qemu. -It may be provided by your distribution as a edk2-aarch64 or AAVMF -package, in path such as /usr/share/edk2/aarch64/QEMU_EFI.fd . +Note that output/images/QEMU_*.fd are the flash device files built by +the EDK2 package.configs/aarch64_efi_defconfig +2
-0@@ -12,6 +12,8 @@ BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_PACKAGE_HOST_GENIMAGE=y # Bootloader +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_ARM64_EFI=ySignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 6/11 configs/pc_x86_64_defconfig: build the EDK2 firmware from source
In reply to Dick OlssonPrior to this, you had to manually download a pre-built EDK2 flash device image (OVMF_CODE.fd) in order to boot this configuration with QEMU. Now, the configuration is building EDK2 from source.
--- board/pc/readme.txt | 9 ++++----- configs/pc_x86_64_efi_defconfig | 2 ++ 2 files changed, 6 insertions(+), 5 deletions(-)
board/pc/readme.txt +4 -5
@@ -61,12 +61,11 @@ Run the emulation with: qemu-system-x86_64 \ -M pc \ - -bios </path/to/OVMF_CODE.fd> \ + -drive file=output/images/OVMF_CODE.fd,if=pflash,format=raw \ + -drive file=output/images/OVMF_VARS.fd,if=pflash,format=raw \ -drive file=output/images/disk.img,if=virtio,format=raw \ -net nic,model=virtio \ -net user -Note that </path/to/OVMF.fd> needs to point to a valid x86_64 UEFI -firmware image for qemu. It may be provided by your distribution as a -edk2 or OVMF package, in path such as -/usr/share/edk2/ovmf/OVMF_CODE.fd . +Note that output/images/OVMF_*.fd are the flash device files built by +the EDK2 package.
configs/pc_x86_64_efi_defconfig +2 -0
@@ -14,6 +14,8 @@ BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_MTOOLS=y # Bootloader +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_OVMF_X64=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_X86_64_EFI=y
Signature · 1 line
2.25.1
PATCH v3 7/11 boot/arm-trusted-firmware: add EDK2 as BL33 option
In reply to Dick OlssonARM Trusted Firmware (ATF) has the ability to load EDK2 UEFI when dropping into EL2. This is done via a new configuration option that build the BL33 payload with EDK2 images that will run in the EL2 context.
---
Revision 3:
* Fixed merge conflict after previous spurious change
Revision 2:
* It was concluded that relying on variables from EDK2 is ok since they are expanded inside _BUILD_CMDS
* Now relying on the more specific variable EDK2_EL2_NAME for BL33
--- boot/arm-trusted-firmware/Config.in | 15 ++++++++++++++- boot/arm-trusted-firmware/arm-trusted-firmware.mk | 8 ++++++++ 2 files changed, 22 insertions(+), 1 deletion(-)
boot/arm-trusted-firmware/Config.in +14 -1
@@ -1,7 +1,7 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE bool "ARM Trusted Firmware (ATF)" depends on (BR2_ARM_CPU_ARMV8A || BR2_ARM_CPU_ARMV7A) && \ - BR2_TARGET_UBOOT + (BR2_TARGET_UBOOT || BR2_TARGET_EDK2) help Enable this option if you want to build the ATF for your ARM based embedded device.
@@ -115,6 +115,19 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE endchoice +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33 + bool "Use EDK2 as BL33" + depends on BR2_TARGET_EDK2 + help + This option allows to embed EDK2 as the BL33 part of + the ARM Trusted Firmware. It ensures that the EDK2 package + gets built before ATF, and that the appropriate BL33 + variable pointing to the EDK2 is passed when building ATF. + + Do not choose this option if you intend to build ATF and EDK2 + for the 'qemu_sbsa' platform. In this case, due to the EDK2 + build system, the dependency between ATF and EDK is reversed. + config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 bool "Use U-Boot as BL33" depends on BR2_TARGET_UBOOT
boot/arm-trusted-firmware/arm-trusted-firmware.mk +8 -0
@@ -79,6 +79,14 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee endif endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2 +# Since the flash device name vary between platforms, we use the variable +# provided by the EDK2 package for this. Using this variable here is OK +# as it will expand after all dependencies are resolved, inside _BUILD_CMDS. +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(EDK2_EL2_NAME).fd +endif + ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y) ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE)) ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)
Signature · 1 line
2.25.1
PATCH v3 7/11 boot/arm-trusted-firmware: add EDK2 as BL33 option
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 6 lines
ARM Trusted Firmware (ATF) has the ability to load EDK2 UEFI when dropping into EL2. This is done via a new configuration option that build the BL33 payload with EDK2 images that will run in the EL2 context.
Signed-off-by Dick Olsson <[email protected]>
[--SNIP--]
boot/arm-trusted-firmware/Config.in
Quoted 4 lines
boot/arm-trusted-firmware/Config.in +0
-0
[--SNIP--]
boot/arm-trusted-firmware/Config.in config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE · line 118
Quoted 5 lines
boot/arm-trusted-firmware/Config.in +1
-0@@ -115,6 +115,19 @@ config BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE endchoice +config BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33
Ah, this is the patch you introduce BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33. Not sure how I missed it while reviewing your patch 4 earlier...
Caffeine has now kicked in fully, I hope. Brain, engage! ;-]
Quoted 20 lines
boot/arm-trusted-firmware/Config.in +12
-0+ bool "Use EDK2 as BL33" + depends on BR2_TARGET_EDK2 + help + This option allows to embed EDK2 as the BL33 part of + the ARM Trusted Firmware. It ensures that the EDK2 package + gets built before ATF, and that the appropriate BL33 + variable pointing to the EDK2 is passed when building ATF. + + Do not choose this option if you intend to build ATF and EDK2 + for the 'qemu_sbsa' platform. In this case, due to the EDK2 + build system, the dependency between ATF and EDK is reversed. + config BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33 bool "Use U-Boot as BL33" depends on BR2_TARGET_UBOOTboot/arm-trusted-firmware/arm-trusted-firmware.mk +0
-0
boot/arm-trusted-firmware/arm-trusted-firmware.mk ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee · line 87
Quoted 9 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +6
-0@@ -79,6 +79,14 @@ ARM_TRUSTED_FIRMWARE_MAKE_OPTS += AARCH32_SP=optee endif endif # BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL32_OPTEE +ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33),y) +ARM_TRUSTED_FIRMWARE_DEPENDENCIES += edk2 +# Since the flash device name vary between platforms, we use the variable +# provided by the EDK2 package for this. Using this variable here is OK +# as it will expand after all dependencies are resolved, inside _BUILD_CMDS. +ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(EDK2_EL2_NAME).fd
If you follow my sggestion in the review of patch 4, this would become:
ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(call qstrip,$(BR2_PACKAGE_EDK2_EL2_NAME))
Even though I was the one that previously replied that what you did was OK, I still prefer that we do not rely on it when it can be avoided with simple code, and defining the EL2 name in Kconfig is simpler, I think.
Regards,
Yann E. MORIN.
Quoted 13 lines
boot/arm-trusted-firmware/arm-trusted-firmware.mk +2
-0+endif + ifeq ($(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_AS_BL33),y) ARM_TRUSTED_FIRMWARE_UBOOT_BIN = $(call qstrip,$(BR2_TARGET_ARM_TRUSTED_FIRMWARE_UBOOT_BL33_IMAGE)) ARM_TRUSTED_FIRMWARE_MAKE_OPTS += BL33=$(BINARIES_DIR)/$(ARM_TRUSTED_FIRMWARE_UBOOT_BIN)Signature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 8/11 configs/qemu_aarch64_sbsa_defconfig: new config for QEMU sbsa-ref
In reply to Dick OlssonThis introduces a configuration for the SBSA reference machine under QEMU that is intended for developing and testing firmware. It consists of ATF that load EDK2 as BL33 which in turn will load the kernel in EFI stub mode with ACPI.
---
Revision 3:
* post-image.sh cleanup
* Added host-qemu to config for testing
Revision 2:
* This board was renamed/moved to be specific for QEMU sbsa-ref
* General simplification
* Using set -e in the post-images.sh script
--- board/qemu/aarch64-sbsa/genimage.cfg | 24 ++++++++++++++ board/qemu/aarch64-sbsa/linux.fragment | 1 + board/qemu/aarch64-sbsa/post-image.sh | 20 ++++++++++++ board/qemu/aarch64-sbsa/readme.txt | 34 ++++++++++++++++++++ configs/qemu_aarch64_sbsa_defconfig | 44 ++++++++++++++++++++++++++ 5 files changed, 123 insertions(+) create mode 100644 board/qemu/aarch64-sbsa/genimage.cfg create mode 100644 board/qemu/aarch64-sbsa/linux.fragment create mode 100755 board/qemu/aarch64-sbsa/post-image.sh create mode 100644 board/qemu/aarch64-sbsa/readme.txt create mode 100644 configs/qemu_aarch64_sbsa_defconfig
board/qemu/aarch64-sbsa/genimage.cfg new file +24 -0
@@ -0,0 +1,24 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image disk.img { + hdimage { + gpt = true + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +}
board/qemu/aarch64-sbsa/linux.fragment new file +1 -0
@@ -0,0 +1 @@ +CONFIG_CMDLINE="root=/dev/vda2 rootwait console=ttyAMA0"
board/qemu/aarch64-sbsa/post-image.sh new file +20 -0
@@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)" +EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi + +# Function taking file $1 as input and outputs file $2 padded to size $3. +function resize_flash { + dd if=/dev/zero of="${BINARIES_DIR}/${2}" bs=1M count="${3}" + dd if="${BINARIES_DIR}/${1}" of="${BINARIES_DIR}/${2}" conv=notrunc +} + +# The QEMU sbsa machine expects flash devices to be 256M. +resize_flash SBSA_FLASH0.fd SBSA_FLASH0_RESIZED.fd 256 +resize_flash SBSA_FLASH1.fd SBSA_FLASH1_RESIZED.fd 256
board/qemu/aarch64-sbsa/readme.txt new file +34 -0
@@ -0,0 +1,34 @@ +Intro +===== + +The QEMU sbsa-ref machine is primarily meant for firmware development and +testing. Thus, the Linux kernel is not necessarily meant to boot to userland. + +A successful boot should be considered: + +1. ARM Trusted Firmware (ATF) boots until BL31 +2. ATF loads EDK2 (UEFI) as BL33 +3. EDK2 loads the Linux kernel in EFI stub mode +4. Linux begins to boot, exits boot services, begins loading the address map +5. Freeze + +Build +===== + + $ make qemu_aarch64_sbsa_defconfig + $ make + +Emulation +========= + +Run the emulation with: + + output/host/bin/qemu-system-aarch64 \ + -M sbsa-ref \ + -cpu cortex-a57 \ + -smp 4 \ + -m 1024 \ + -nographic \ + -drive file=output/images/SBSA_FLASH0_RESIZED.fd,if=pflash,format=raw \ + -drive file=output/images/SBSA_FLASH1_RESIZED.fd,if=pflash,format=raw \ + -hda output/images/disk.img
configs/qemu_aarch64_sbsa_defconfig new file +44 -0
44 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 8/11 configs/qemu_aarch64_sbsa_defconfig: new config for QEMU sbsa-ref
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 6 lines
This introduces a configuration for the SBSA reference machine under QEMU that is intended for developing and testing firmware. It consists of ATF that load EDK2 as BL33 which in turn will load the kernel in EFI stub mode with ACPI.
Signed-off-by Dick Olsson <[email protected]>
[--SNIP--]
Quoted 16 lines
board/qemu/aarch64-sbsa/post-image.sh new file +10
-0@@ -0,0 +1,20 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)" +EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi
board/qemu/aarch64-sbsa/post-image.sh line 20
Quoted 10 lines
board/qemu/aarch64-sbsa/post-image.sh new file +10
-0+ +# Function taking file $1 as input and outputs file $2 padded to size $3. +function resize_flash { + dd if=/dev/zero of="${BINARIES_DIR}/${2}" bs=1M count="${3}" + dd if="${BINARIES_DIR}/${1}" of="${BINARIES_DIR}/${2}" conv=notrunc +} + +# The QEMU sbsa machine expects flash devices to be 256M. +resize_flash SBSA_FLASH0.fd SBSA_FLASH0_RESIZED.fd 256 +resize_flash SBSA_FLASH1.fd SBSA_FLASH1_RESIZED.fd 256
As already previously suggested in patch 5:
- don't copy the files
- use truncate -s 256M
Quoted 9 lines
board/qemu/aarch64-sbsa/readme.txt new file +3
-0@@ -0,0 +1,34 @@ +Intro +===== +
board/qemu/aarch64-sbsa/readme.txt line 13
Quoted 10 lines
board/qemu/aarch64-sbsa/readme.txt new file +10
-0+The QEMU sbsa-ref machine is primarily meant for firmware development and +testing. Thus, the Linux kernel is not necessarily meant to boot to userland. + +A successful boot should be considered: + +1. ARM Trusted Firmware (ATF) boots until BL31 +2. ATF loads EDK2 (UEFI) as BL33 +3. EDK2 loads the Linux kernel in EFI stub mode +4. Linux begins to boot, exits boot services, begins loading the address map +5. Freeze
Even though the purpose of that machine is for firmware testing, and getting up to the kernel freewe is enough, can w still get better than a freeze?
I mean, if the boot freezes in any of the previous steps (like, ATF or EDK2 failing, or Linux failing to exit boot services, etc..), such a freeze would be undistinguishable from a success... Getting a real, even if minimalist, userland like a shell, would prove the boot to indeed be successful.
But if that proves to be too complex to come up with, we can settle for a freeze...
Regards,
Yann E. MORIN.
Quoted 78 lines
board/qemu/aarch64-sbsa/readme.txt new file +20
-0+Build +===== + + $ make qemu_aarch64_sbsa_defconfig + $ make + +Emulation +========= + +Run the emulation with: + + output/host/bin/qemu-system-aarch64 \ + -M sbsa-ref \ + -cpu cortex-a57 \ + -smp 4 \ + -m 1024 \ + -nographic \ + -drive file=output/images/SBSA_FLASH0_RESIZED.fd,if=pflash,format=raw \ + -drive file=output/images/SBSA_FLASH1_RESIZED.fd,if=pflash,format=raw \ + -hda output/images/disk.imgconfigs/qemu_aarch64_sbsa_defconfig new file +44
-0@@ -0,0 +1,44 @@ +# Architecture +BR2_aarch64=y + +# Toolchain +BR2_TOOLCHAIN_BUILDROOT=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-sbsa/post-image.sh support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-sbsa/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.53" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/aarch64-sbsa/linux.fragment" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# UEFI firmware +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_QEMU_SBSA=y + +# ARM Trusted Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu_sbsa" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y + +# Host tools for genimage +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_MTOOLS=y + +# host-qemu for testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=ySignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 9/11 configs/qemu_aarch64_virt_efi_defconfig: new config for QEMU Virt EFI
In reply to Dick OlssonThis introduces a configuration for QEMU Virt that boots Linux with ATF and the EDK2 EFI firmware without any additional bootloaders. ATF is loading EDK2 in EL2 using the BL33 payload configuration.
---
Revision 3:
* Changed flash device setup to work with QEMU 5.0
--- board/qemu/aarch64-virt-efi/genimage.cfg | 24 +++++++++++ board/qemu/aarch64-virt-efi/linux.fragment | 1 + board/qemu/aarch64-virt-efi/post-image.sh | 15 +++++++ board/qemu/aarch64-virt-efi/readme.txt | 27 +++++++++++++ configs/qemu_aarch64_virt_efi_defconfig | 46 ++++++++++++++++++++++ 5 files changed, 113 insertions(+) create mode 100644 board/qemu/aarch64-virt-efi/genimage.cfg create mode 100644 board/qemu/aarch64-virt-efi/linux.fragment create mode 100755 board/qemu/aarch64-virt-efi/post-image.sh create mode 100644 board/qemu/aarch64-virt-efi/readme.txt create mode 100644 configs/qemu_aarch64_virt_efi_defconfig
board/qemu/aarch64-virt-efi/genimage.cfg new file +24 -0
@@ -0,0 +1,24 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image disk.img { + hdimage { + gpt = true + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +}
board/qemu/aarch64-virt-efi/linux.fragment new file +1 -0
@@ -0,0 +1 @@ +CONFIG_CMDLINE="root=/dev/vda2 rootwait console=ttyAMA0"
board/qemu/aarch64-virt-efi/post-image.sh new file +15 -0
@@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)" +EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi + +# The QEMU virt machine expects the BIOS flash device to be 64M. +rm -rf ${BINARIES_DIR}/flash.bin +dd if=${BINARIES_DIR}/bl1.bin of=${BINARIES_DIR}/flash.bin bs=4096 conv=notrunc +dd if=${BINARIES_DIR}/fip.bin of=${BINARIES_DIR}/flash.bin seek=64 bs=4096 conv=notrunc
board/qemu/aarch64-virt-efi/readme.txt new file +27 -0
@@ -0,0 +1,27 @@ +Intro +===== + +This board allows to build a minimal Linux system that boot directly +with Arm Trusted Firmware, EDK2 (UEFI), ACPI and GICv3 without any +additional bootloaders like GRUB2. + +Build +===== + + $ make qemu_aarch64_virt_efi_defconfig + $ make + +Emulation +========= + +Run the emulation with: + + output/host/bin/qemu-system-aarch64 \ + -M virt,secure=on,gic-version=3 \ + -cpu cortex-a57 \ + -smp 4 \ + -m 1024 \ + -nographic \ + -bios output/images/flash.bin \ + -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ + -device virtio-blk-device,drive=hd0
configs/qemu_aarch64_virt_efi_defconfig new file +46 -0
46 lines not on this page · raw message
Signature · 1 line
2.25.1
PATCH v3 9/11 configs/qemu_aarch64_virt_efi_defconfig: new config for QEMU Virt EFI
Dick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 49 lines
This introduces a configuration for QEMU Virt that boots Linux with ATF and the EDK2 EFI firmware without any additional bootloaders. ATF is loading EDK2 in EL2 using the BL33 payload configuration.
Signed-off-by Dick Olsson <[email protected]>board/qemu/aarch64-virt-efi/genimage.cfg new file +24
-0@@ -0,0 +1,24 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image disk.img { + hdimage { + gpt = true + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +}board/qemu/aarch64-virt-efi/linux.fragment new file +1
-0@@ -0,0 +1 @@ +CONFIG_CMDLINE="root=/dev/vda2 rootwait console=ttyAMA0"board/qemu/aarch64-virt-efi/post-image.sh new file +0
-0
board/qemu/aarch64-virt-efi/post-image.sh line 5
Quoted 5 lines
board/qemu/aarch64-virt-efi/post-image.sh new file +5
-0@@ -0,0 +1,15 @@ +#!/bin/bash + +set -e + +BOARD_DIR="$(dirname $0)"
BOARD_DIR is not used anywhere else, so drop it.
board/qemu/aarch64-virt-efi/post-image.sh line 10
Quoted 5 lines
board/qemu/aarch64-virt-efi/post-image.sh new file +5
-0+EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi
So, if I understand correctly, ${EFI_DIR}/bootaa64.efi will be an absolute symlink to ${BINARIES_DIR}/Image, and then ${EFI_DIR} will be used to populate the VFAT image used as first partition.
But two things:
1. the symlinks target will be invalid at runtime, as it contains a
path on the build machine;
2. VFAT can't handle symlinks anyway.
So, does genimage follow symlinks when it generates the VFAT image?
board/qemu/aarch64-virt-efi/post-image.sh line 15
Quoted 4 lines
board/qemu/aarch64-virt-efi/post-image.sh new file +4
-0+# The QEMU virt machine expects the BIOS flash device to be 64M. +rm -rf ${BINARIES_DIR}/flash.bin +dd if=${BINARIES_DIR}/bl1.bin of=${BINARIES_DIR}/flash.bin bs=4096 conv=notrunc +dd if=${BINARIES_DIR}/fip.bin of=${BINARIES_DIR}/flash.bin seek=64 bs=4096 conv=notrunc
You said "flash device [must] be 64M" but 64*4K is not 64M. Also, this just starts the dump at offset 64*4K, but does not guarantee the resulting file to be exactly 64M...
Quid?
Maybe:
cp "${BINARIES_DIR}/bl1.bin" "${BINARIES_DIR}/flash.bin"
truncate -s $((64*4096)) "${BINARIES_DIR}/flash.bin"
cat "${BINARIES_DIR}/fip.bin" >> "${BINARIES_DIR}/flash.bin"
truncate -s 64M "${BINARIES_DIR}/flash.bin"But yes, I can see here how using truncate is sub-optimal... Keeping some incantations of dd is acceptable here.
Quoted 23 lines
board/qemu/aarch64-virt-efi/readme.txt new file +17
-0@@ -0,0 +1,27 @@ +Intro +===== + +This board allows to build a minimal Linux system that boot directly +with Arm Trusted Firmware, EDK2 (UEFI), ACPI and GICv3 without any +additional bootloaders like GRUB2. + +Build +===== + + $ make qemu_aarch64_virt_efi_defconfig + $ make + +Emulation +========= + +Run the emulation with:
board/qemu/aarch64-virt-efi/readme.txt line 27
Quoted 10 lines
board/qemu/aarch64-virt-efi/readme.txt new file +10
-0+ + output/host/bin/qemu-system-aarch64 \ + -M virt,secure=on,gic-version=3 \ + -cpu cortex-a57 \ + -smp 4 \ + -m 1024 \ + -nographic \ + -bios output/images/flash.bin \ + -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ + -device virtio-blk-device,drive=hd0
Mix of leading space and TAB s (use spaces only, please).
Quoted 11 lines
configs/qemu_aarch64_virt_efi_defconfig new file +5
-0@@ -0,0 +1,46 @@ +# Architecture +BR2_aarch64=y + +# Toolchain +BR2_TOOLCHAIN_BUILDROOT=y
configs/qemu_aarch64_virt_efi_defconfig line 15
Quoted 10 lines
configs/qemu_aarch64_virt_efi_defconfig new file +10
-0+ +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" + +# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-virt-efi/post-image.sh support/scripts/genimage.sh"
Ah, something I forgot to comment on on the other patches: the name 'post-image.sh' is a bit too generic. Please try to find a better name that explains what the script actually does, e.g.:
board/qemu/aarch64-virt-efi/assemble-bios-flash-image
(and no need to end the filename with '.sh')
Regards,
Yann E. MORIN.
Quoted 39 lines
configs/qemu_aarch64_virt_efi_defconfig new file +31
-0+BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/qemu/aarch64-virt-efi/genimage.cfg" + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.4.53" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/qemu/aarch64-virt-efi/linux.fragment" + +# Linux headers same as kernel, a 5.4 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_4=y + +# UEFI firmware +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_ARM_VIRT_QEMU_KERNEL=y + +# ARM Trusted Firmware +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="qemu" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_FIP=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="QEMU_USE_GIC_DRIVER=QEMU_GICV3" + +# Host tools for genimage +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_MTOOLS=y + +# host-qemu for testing +BR2_PACKAGE_HOST_QEMU=y +BR2_PACKAGE_HOST_QEMU_SYSTEM_MODE=ySignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH v3 9/11 configs/qemu_aarch64_virt_efi_defconfig: new config for QEMU Virt EFI
Hi Yann, all,
I will address the rest of your feedback for this series directly in the next revision. But this email requires some more in-depth explanation from me.
Quoted 8 lines · Yann E. MORIN
board/qemu/aarch64-virt-efi/post-image.sh line 10
Quoted 3 lines
board/qemu/aarch64-virt-efi/post-image.sh new file +3
-0+# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efiSo, if I understand correctly, ${EFI_DIR}/bootaa64.efi will be an absolute symlink to ${BINARIES_DIR}/Image, and then ${EFI_DIR} will be used to populate the VFAT image used as first partition.
Quoted 8 lines
But two things:
1. the symlinks target will be invalid at runtime, as it contains a
path on the build machine;2. VFAT can't handle symlinks anyway.
So, does genimage follow symlinks when it generates the VFAT image?
So genimage will follow the symlinks and create the appropriate files in the image. I felt it was cleaner and more robust to create links rather than constantly copy and re-copy files on
every build.
Quoted 7 lines
board/qemu/aarch64-virt-efi/post-image.sh line 15
Quoted 4 lines
board/qemu/aarch64-virt-efi/post-image.sh new file +4
-0+# The QEMU virt machine expects the BIOS flash device to be 64M. +rm -rf ${BINARIES_DIR}/flash.bin +dd if=${BINARIES_DIR}/bl1.bin of=${BINARIES_DIR}/flash.bin bs=4096 conv=notrunc +dd if=${BINARIES_DIR}/fip.bin of=${BINARIES_DIR}/flash.bin seek=64 bs=4096 conv=notruncYou said "flash device [must] be 64M" but 644K is not 64M. Also, this
just starts the dump at offset 644K, but does not guarantee theresulting file to be exactly 64M...
The inline comment is incorrect, thanks for catching! I will fix in my next revision.
Quoted 9 lines
cp "${BINARIES_DIR}/bl1.bin" "${BINARIES_DIR}/flash.bin" truncate -s $((64*4096)) "${BINARIES_DIR}/flash.bin" cat "${BINARIES_DIR}/fip.bin" >> "${BINARIES_DIR}/flash.bin"
truncate -s 64M "${BINARIES_DIR}/flash.bin"But yes, I can see here how using truncate is sub-optimal... Keeping some incantations of dd is acceptable here.
The offset for fip.bin needs to be exactly 64 bytes from the end of bl1.bin. So I think it's easier to use dd here instead of cat/truncate.
Quoted 11 lines
Review
Quoted 9 lines
(quoted diff) +0
-9- output/host/bin/qemu-system-aarch64 \ - -M virt,secure=on,gic-version=3 \ - -cpu cortex-a57 \ - -smp 4 \ - -m 1024 \ - -nographic \ - -bios output/images/flash.bin \ - -drive file=output/images/disk.img,if=none,format=raw,id=hd0 \ - -device virtio-blk-device,drive=hd0Mix of leading space and TAB s (use spaces only, please).
Will fix!
Quoted 11 lines
configs/qemu_aarch64_virt_efi_defconfig line 15
Quoted 6 lines
configs/qemu_aarch64_virt_efi_defconfig new file +6
-0+# Filesystem / image +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qemu/aarch64-virt-efi/post-image.sh support/scripts/genimage.sh"Ah, something I forgot to comment on on the other patches: the name '
post-image.sh' is a bit too generic. Please try to find a better name that explains what the script actually does, e.g.:
Quoted 3 lines
board/qemu/aarch64-virt-efi/assemble-bios-flash-image
(and no need to end the filename with '.sh')
Ok. Since it's not really BIOS in the strict sense I will simply name the scripts "assemble-flash-images" since we assemble multiple images, i.e. the EFI system partition and boot flash images.
Cheers
D. Olsson
PGP: 8204A8CD
PATCH v3 10/11 configs/socionext_developerbox_defconfig: new config for Developerbox
In reply to Dick OlssonThis introduces configuration for the Socionext Developerbox. Its an Aarch64 workstation built with ARM Trusted Firmware and EDK2 firmware.
--- board/socionext/developerbox/genimage.cfg | 24 ++++++++++++++++++++++ board/socionext/developerbox/post-image.sh | 9 ++++++++ board/socionext/developerbox/readme.txt | 14 +++++++++++++ configs/socionext_developerbox_defconfig | 21 +++++++++++++++++++ 4 files changed, 68 insertions(+) create mode 100644 board/socionext/developerbox/genimage.cfg create mode 100755 board/socionext/developerbox/post-image.sh create mode 100644 board/socionext/developerbox/readme.txt create mode 100644 configs/socionext_developerbox_defconfig
board/socionext/developerbox/genimage.cfg new file +24 -0
@@ -0,0 +1,24 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + gpt = true + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +}
board/socionext/developerbox/post-image.sh new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi
board/socionext/developerbox/readme.txt new file +14 -0
@@ -0,0 +1,14 @@ +Intro +===== + +This is the board support for the Socionext SynQuacer Developerbox (SC2A11). +The firmware is built with ARM Trusted Firmware and EDK2 (UEFI). + +More info +========= + +For more information about this board and the firmware see: + +- https://www.96boards.org/product/developerbox/ +- https://www.96boards.org/documentation/enterprise/developerbox/downloads/edk2.md.html +- https://trustedfirmware-a.readthedocs.io/en/latest/plat/synquacer.html
configs/socionext_developerbox_defconfig new file +21 -0
@@ -0,0 +1,21 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/socionext/developerbox/post-image.sh support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/socionext/developerbox/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="synquacer" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS="bl31 fiptool" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="PRELOADED_BL33_BASE=0x8200000" +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_SOCIONEXT_DEVELOPERBOX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.25.1
PATCH v3 11/11 configs/solidrun_macchiatobin_efi_defconfig: EFI config for MacchiatoBin
In reply to Dick OlssonThis introduces an alternative board build for the MacchiatoBin based on EDK2 (UEFI) firmware loaded as BL33 by ARM Trusted Firmware.
--- board/solidrun/macchiatobin-efi/genimage.cfg | 24 +++++++++++++++++++ .../solidrun/macchiatobin-efi/linux.fragment | 4 ++++ board/solidrun/macchiatobin-efi/post-image.sh | 9 +++++++ board/solidrun/macchiatobin-efi/readme.txt | 14 +++++++++++ configs/solidrun_macchiatobin_efi_defconfig | 24 +++++++++++++++++++ 5 files changed, 75 insertions(+) create mode 100644 board/solidrun/macchiatobin-efi/genimage.cfg create mode 100644 board/solidrun/macchiatobin-efi/linux.fragment create mode 100755 board/solidrun/macchiatobin-efi/post-image.sh create mode 100644 board/solidrun/macchiatobin-efi/readme.txt create mode 100644 configs/solidrun_macchiatobin_efi_defconfig
board/solidrun/macchiatobin-efi/genimage.cfg new file +24 -0
@@ -0,0 +1,24 @@ +image efi-part.vfat { + vfat { + file EFI { + image = "efi-part/EFI" + } + } + size = 32M +} + +image sdcard.img { + hdimage { + gpt = true + } + + partition boot { + partition-type = 0xEF + image = "efi-part.vfat" + } + + partition root { + partition-type = 0x83 + image = "rootfs.ext2" + } +}
board/solidrun/macchiatobin-efi/linux.fragment new file +4 -0
@@ -0,0 +1,4 @@ +CONFIG_CMDLINE="console=ttyS0,115200n8 root=/dev/mmcblk1p2 rootwait" +CONFIG_MARVELL_PHY=y +CONFIG_MARVELL_10G_PHY=y +CONFIG_SFP=y
board/solidrun/macchiatobin-efi/post-image.sh new file +9 -0
@@ -0,0 +1,9 @@ +#!/bin/bash + +set -e + +EFI_DIR=${BINARIES_DIR}/efi-part/EFI/BOOT + +# Set up the kernel executable according to the UEFI standard. +mkdir -p ${EFI_DIR} +ln -sf ${BINARIES_DIR}/Image ${EFI_DIR}/bootaa64.efi
board/solidrun/macchiatobin-efi/readme.txt new file +14 -0
@@ -0,0 +1,14 @@ +Intro +===== + +This is the board support for MacchiatoBin with UEFI. Refer to +board/solidrun/macchiatobin/readme.txt for more information. + +More info +========= + +For more information about the UEFI support for this board see: + +- https://developer.solid-run.com/knowledge-base/armada-8040-uefi/ +- http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+UEFI+EDK+II +- http://wiki.macchiatobin.net/tiki-index.php?page=Update+the+Bootloader
configs/solidrun_macchiatobin_efi_defconfig new file +24 -0
@@ -0,0 +1,24 @@ +BR2_aarch64=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_5_9=y +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/solidrun/macchiatobin-efi/post-image.sh support/scripts/genimage.sh" +BR2_ROOTFS_POST_SCRIPT_ARGS="-c board/solidrun/macchiatobin-efi/genimage.cfg" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.9.12" +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="200M" +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="a80x0_mcbin" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_EDK2_AS_BL33=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_TARGETS="mrvl_flash" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="USE_COHERENT_MEM=0" +BR2_TARGET_BINARIES_MARVELL=y +BR2_TARGET_EDK2=y +BR2_TARGET_EDK2_PLATFORM_SOLIDRUN_ARMADA80X0MCBIN=y +BR2_TARGET_MV_DDR_MARVELL=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
2.25.1
PATCH v3 11/11 configs/solidrun_macchiatobin_efi_defconfig: EFI config for MacchiatoBin
Hi Dick,
Quoted 5 lines · Dick Olsson via buildroot
This introduces an alternative board build for the MacchiatoBin based on EDK2 (UEFI) firmware loaded as BL33 by ARM Trusted Firmware.
Signed-off-by Dick Olsson <[email protected]>---
[...]
board/solidrun/macchiatobin-efi/readme.txt line 5
Quoted 11 lines
board/solidrun/macchiatobin-efi/readme.txt new file +5
-0@@ -0,0 +1,14 @@ +Intro +===== + +This is the board support for MacchiatoBin with UEFI. Refer to +board/solidrun/macchiatobin/readme.txt for more information.
Please add a "How to build" section here. The details on the "generic" readme.txt "How to build" section are not correct for this defconfig.
baruch
Quoted 9 lines
board/solidrun/macchiatobin-efi/readme.txt new file +9
-0+ +More info +========= + +For more information about the UEFI support for this board see: + +- https://developer.solid-run.com/knowledge-base/armada-8040-uefi/ +- http://wiki.macchiatobin.net/tiki-index.php?page=Build+from+source+-+UEFI+EDK+II +- http://wiki.macchiatobin.net/tiki-index.php?page=Update+the+Bootloader
Signature · 3 lines
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -v3 cover Introduce EDK2 firmware package
In reply to Dick OlssonDick, All,
On 2020-12-18 20:27 +0000, Dick Olsson via buildroot spake thusly:
Quoted 5 lines
Here is the third revision of the series introducing two hardware targets and not just virtual platforms. This latest revision also includes updates to bootarm-trusted-firmware as well as boot/mv-ddr-marvell both required to build properly with the latest stable release of EDK2.
Thanks for this new iteration! :-)
It looks really good now, and the review I did was mostly focused on details and aesthetics.
I almost applied the whole series, but there was too many unknowns for me to guess at in patch 5, and I was not confident enough to tweak them.
Still, I did apply pathces 1 and 2; that's not much off your chest, but that's still that...
Thanks!
Regards,
Yann E. MORIN.
Quoted 110 lines
This series is introducing the EDK2 bootloader package which can build firmware for five different platforms, on both x86-64 and AArch64.
* QEMU x86-64 pc machine
* QEMU aarch64 virt machine, booting directly from flash
* QEMU aarch64 virt machine, booting via kernel protocol
* QEMU aarch64 sbsa-ref machine
* ARM FVP vexpress machine
* Socionext Developerbox
* SolidRun MacchiatoBinThe EDK2 build system is very particular and includes different dependencies and a lot of custom scripting, which has lead to these design decisions when building these Buildroot packages:
* EDK2 needs to rely on Git submodules because its dependencies are not easy to build separately
* Each platform is a specific configuration option (instead of a string) because they require slightly different packages etc.Dick Olsson (11):
boot/arm-trusted-firmware: Bump to version 2.4 boot/mv-ddr-marvell: Bump to HEAD as of 20201207 package/edk2-platforms: new package
boot/edk2: new package
configs/aarch64_efi_defconfig: build the EDK2 firmware from source configs/pc_x86_64_defconfig: build the EDK2 firmware from source boot/arm-trusted-firmware: add EDK2 as BL33 option configs/qemu_aarch64_sbsa_defconfig: new config for QEMU sbsa-ref configs/qemu_aarch64_virt_efi_defconfig: new config for QEMU Virt EFI configs/socionext_developerbox_defconfig: new config for Developerbox configs/solidrun_macchiatobin_efi_defconfig: EFI config for
MacchiatoBinboard/aarch64-efi/post-image.sh | 12 +- board/aarch64-efi/readme.txt | 9 +- board/pc/readme.txt | 9 +- board/qemu/aarch64-sbsa/genimage.cfg | 24 +++ board/qemu/aarch64-sbsa/linux.fragment | 1 + board/qemu/aarch64-sbsa/post-image.sh | 20 +++ board/qemu/aarch64-sbsa/readme.txt | 34 ++++ board/qemu/aarch64-virt-efi/genimage.cfg | 24 +++ board/qemu/aarch64-virt-efi/linux.fragment | 1 + board/qemu/aarch64-virt-efi/post-image.sh | 15 ++ board/qemu/aarch64-virt-efi/readme.txt | 27 +++ board/socionext/developerbox/genimage.cfg | 24 +++ board/socionext/developerbox/post-image.sh | 9 + board/socionext/developerbox/readme.txt | 14 ++ board/solidrun/macchiatobin-efi/genimage.cfg | 24 +++ .../solidrun/macchiatobin-efi/linux.fragment | 4 + board/solidrun/macchiatobin-efi/post-image.sh | 9 + board/solidrun/macchiatobin-efi/readme.txt | 14 ++ boot/Config.in | 1 + boot/arm-trusted-firmware/Config.in | 19 +- .../arm-trusted-firmware.hash | 2 +- .../arm-trusted-firmware.mk | 8 + ...GenFds-Compatibility-with-Python-3.9.patch | 35 ++++ boot/edk2/Config.in | 88 ++++++++++ boot/edk2/edk2.hash | 3 + boot/edk2/edk2.mk | 164 ++++++++++++++++++ ...raining_leveling.c-uninitialized-var.patch | 31 ---- boot/mv-ddr-marvell/mv-ddr-marvell.hash | 2 +- boot/mv-ddr-marvell/mv-ddr-marvell.mk | 4 +- configs/aarch64_efi_defconfig | 2 + configs/pc_x86_64_efi_defconfig | 2 + configs/qemu_aarch64_sbsa_defconfig | 44 +++++ configs/qemu_aarch64_virt_efi_defconfig | 46 +++++ configs/socionext_developerbox_defconfig | 21 +++ configs/solidrun_macchiatobin_efi_defconfig | 24 +++ package/Config.in.host | 1 + package/edk2-platforms/Config.in.host | 8 + package/edk2-platforms/edk2-platforms.hash | 3 + package/edk2-platforms/edk2-platforms.mk | 18 ++ 39 files changed, 751 insertions(+), 49 deletions(-) create mode 100644 board/qemu/aarch64-sbsa/genimage.cfg create mode 100644 board/qemu/aarch64-sbsa/linux.fragment create mode 100755 board/qemu/aarch64-sbsa/post-image.sh create mode 100644 board/qemu/aarch64-sbsa/readme.txt create mode 100644 board/qemu/aarch64-virt-efi/genimage.cfg create mode 100644 board/qemu/aarch64-virt-efi/linux.fragment create mode 100755 board/qemu/aarch64-virt-efi/post-image.sh create mode 100644 board/qemu/aarch64-virt-efi/readme.txt create mode 100644 board/socionext/developerbox/genimage.cfg create mode 100755 board/socionext/developerbox/post-image.sh create mode 100644 board/socionext/developerbox/readme.txt create mode 100644 board/solidrun/macchiatobin-efi/genimage.cfg create mode 100644 board/solidrun/macchiatobin-efi/linux.fragment create mode 100755 board/solidrun/macchiatobin-efi/post-image.sh create mode 100644 board/solidrun/macchiatobin-efi/readme.txt create mode 100644 boot/edk2/0001-GenFds-Compatibility-with-Python-3.9.patch create mode 100644 boot/edk2/Config.in create mode 100644 boot/edk2/edk2.hash create mode 100644 boot/edk2/edk2.mk delete mode 100644 boot/mv-ddr-marvell/0001-mv_ddr-mv_ddr4_training_leveling.c-uninitialized-var.patch create mode 100644 configs/qemu_aarch64_sbsa_defconfig create mode 100644 configs/qemu_aarch64_virt_efi_defconfig create mode 100644 configs/socionext_developerbox_defconfig create mode 100644 configs/solidrun_macchiatobin_efi_defconfig create mode 100644 package/edk2-platforms/Config.in.host create mode 100644 package/edk2-platforms/edk2-platforms.hash create mode 100644 package/edk2-platforms/edk2-platforms.mkSignature · 7 lines
2.25.1 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'