* [Buildroot] [PATCH 1/3] boot/edk2: add custom version option
2025-04-11 17:29 [Buildroot] [PATCH 0/3] add custom version options for all three edk2 packages Vincent Stehlé
@ 2025-04-11 17:29 ` Vincent Stehlé
2025-04-11 17:29 ` [Buildroot] [PATCH 2/3] package/edk2-platforms: " Vincent Stehlé
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Vincent Stehlé @ 2025-04-11 17:29 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé
Add a custom version option, to enable easily specifying an official EDK
II version to use. This is similar to what is done in other packages,
such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2 makefile to the config
menu to support that. We keep the same latest version by default to
preserve current behaviour.
Also, add a check of the custom version option validity in edk2
makefile.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
---
boot/edk2/Config.in | 26 ++++++++++++++++++++++++++
boot/edk2/edk2.mk | 16 +++++++++++++++-
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/boot/edk2/Config.in b/boot/edk2/Config.in
index 4e6e7d122c..35314047e3 100644
--- a/boot/edk2/Config.in
+++ b/boot/edk2/Config.in
@@ -18,6 +18,32 @@ config BR2_TARGET_EDK2
if BR2_TARGET_EDK2
+choice
+ prompt "EDK2 version"
+ default BR2_TARGET_EDK2_LATEST
+ help
+ Select the specific EDK2 version you want to use
+
+config BR2_TARGET_EDK2_LATEST
+ bool "edk2-stable202411"
+
+config BR2_TARGET_EDK2_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+
+endchoice
+
+config BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE
+ string "EDK2 version"
+ depends on BR2_TARGET_EDK2_CUSTOM_VERSION
+
+config BR2_TARGET_EDK2_VERSION
+ string
+ default "edk2-stable202411" if BR2_TARGET_EDK2_LATEST
+ default BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE \
+ if BR2_TARGET_EDK2_CUSTOM_VERSION
+
choice
prompt "Platform"
default BR2_TARGET_EDK2_PLATFORM_OVMF_I386 if BR2_i386
diff --git a/boot/edk2/edk2.mk b/boot/edk2/edk2.mk
index 3941d01883..dfe64e24bb 100644
--- a/boot/edk2/edk2.mk
+++ b/boot/edk2/edk2.mk
@@ -4,7 +4,7 @@
#
################################################################################
-EDK2_VERSION = edk2-stable202411
+EDK2_VERSION = $(call qstrip,$(BR2_TARGET_EDK2_VERSION))
EDK2_SITE = https://github.com/tianocore/edk2
EDK2_SITE_METHOD = git
EDK2_LICENSE = BSD-2-Clause-Patent
@@ -184,4 +184,18 @@ define EDK2_INSTALL_IMAGES_CMDS
cp -f $(@D)/Build/$(EDK2_BUILD_DIR)/$(EDK2_BUILD_TYPE)_GCC5/FV/*.fd $(BINARIES_DIR)
endef
+ifeq ($(BR2_TARGET_EDK2)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_TARGET_EDK2_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2 version specified. \
+ Check your BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_TARGET_EDK2 and BR_BUILDING
+
$(eval $(generic-package))
--
2.47.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH 2/3] package/edk2-platforms: add custom version option
2025-04-11 17:29 [Buildroot] [PATCH 0/3] add custom version options for all three edk2 packages Vincent Stehlé
2025-04-11 17:29 ` [Buildroot] [PATCH 1/3] boot/edk2: add custom version option Vincent Stehlé
@ 2025-04-11 17:29 ` Vincent Stehlé
2025-04-11 17:29 ` [Buildroot] [PATCH 3/3] package/edk2-non-osi: " Vincent Stehlé
2026-11-21 21:51 ` [Buildroot] [PATCH v2 1/3] boot/edk2: " Angelo Compagnucci
3 siblings, 0 replies; 7+ messages in thread
From: Vincent Stehlé @ 2025-04-11 17:29 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé
Add a custom version option, to enable easily specifying an official EDK
II Platforms version to use. This is similar to what is done in other
packages, such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2-platforms makefile to the
config menu to support that. Also, we need to make edk2-platforms appear
in the menu to allow selecting the version. We keep the same latest
version by default to preserve current behaviour.
Also, add a check of the custom version option validity in
edk2-platforms makefile.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
---
package/edk2-platforms/Config.in | 35 +++++++++++++++++++++++-
package/edk2-platforms/edk2-platforms.mk | 17 ++++++++++--
2 files changed, 49 insertions(+), 3 deletions(-)
diff --git a/package/edk2-platforms/Config.in b/package/edk2-platforms/Config.in
index 17633c0fdd..2527c6eb3e 100644
--- a/package/edk2-platforms/Config.in
+++ b/package/edk2-platforms/Config.in
@@ -1,8 +1,41 @@
config BR2_PACKAGE_EDK2_PLATFORMS
- bool
+ bool "EDK2 Platforms"
help
EDK2 description files for all supported platforms.
The main EDK2 bootloader package will depend on these
description files while building firmware for some platforms.
https://github.com/tianocore/edk2-platforms
+
+if BR2_PACKAGE_EDK2_PLATFORMS
+
+choice
+ prompt "EDK2 Platforms version"
+ default BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ help
+ Select the specific EDK2 Platforms version you want to use
+
+config BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ bool "f10cc760cf3f7eb693822de1347e71173944e44a"
+
+config BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+
+endchoice
+
+config BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE
+ string "EDK2 Platforms version"
+ depends on BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+
+config BR2_PACKAGE_EDK2_PLATFORMS_VERSION
+ string
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ default "f10cc760cf3f7eb693822de1347e71173944e44a" \
+ if BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ default BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE \
+ if BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+
+endif
diff --git a/package/edk2-platforms/edk2-platforms.mk b/package/edk2-platforms/edk2-platforms.mk
index 65fcf81a3c..e7cd67555a 100644
--- a/package/edk2-platforms/edk2-platforms.mk
+++ b/package/edk2-platforms/edk2-platforms.mk
@@ -4,8 +4,7 @@
#
################################################################################
-# Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_PLATFORMS_VERSION = f10cc760cf3f7eb693822de1347e71173944e44a
+EDK2_PLATFORMS_VERSION = $(call qstrip,$(BR2_PACKAGE_EDK2_PLATFORMS_VERSION))
EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION))
EDK2_PLATFORMS_LICENSE = BSD-2-Clause-Patent
EDK2_PLATFORMS_LICENSE_FILES = License.txt
@@ -19,4 +18,18 @@ define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
cp -rf $(@D)/*/ $(STAGING_DIR)/usr/share/edk2-platforms/
endef
+ifeq ($(BR2_PACKAGE_EDK2_PLATFORMS)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2-platforms version specified. \
+ Check your BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_PACKAGE_EDK2_PLATFORMS and BR_BUILDING
+
$(eval $(generic-package))
--
2.47.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] package/edk2-non-osi: add custom version option
2025-04-11 17:29 [Buildroot] [PATCH 0/3] add custom version options for all three edk2 packages Vincent Stehlé
2025-04-11 17:29 ` [Buildroot] [PATCH 1/3] boot/edk2: add custom version option Vincent Stehlé
2025-04-11 17:29 ` [Buildroot] [PATCH 2/3] package/edk2-platforms: " Vincent Stehlé
@ 2025-04-11 17:29 ` Vincent Stehlé
2026-11-21 21:51 ` [Buildroot] [PATCH v2 1/3] boot/edk2: " Angelo Compagnucci
3 siblings, 0 replies; 7+ messages in thread
From: Vincent Stehlé @ 2025-04-11 17:29 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé
Add a custom version option, to enable easily specifying an official EDK
II Non-OSI platforms version to use. This is similar to what is done in
other packages, such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2-non-osi makefile to the
config menu to support that. Also, we need to make edk2-non-osi appear
in the menu to allow selecting the version. We keep the same latest
version by default to preserve current behaviour.
Also, add a check of the custom version option validity in edk2-non-osi
makefile.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
---
package/edk2-non-osi/Config.in | 36 +++++++++++++++++++++++++++-
package/edk2-non-osi/edk2-non-osi.mk | 17 +++++++++++--
2 files changed, 50 insertions(+), 3 deletions(-)
diff --git a/package/edk2-non-osi/Config.in b/package/edk2-non-osi/Config.in
index 6c540c8a40..88f4d52673 100644
--- a/package/edk2-non-osi/Config.in
+++ b/package/edk2-non-osi/Config.in
@@ -1,5 +1,5 @@
config BR2_PACKAGE_EDK2_NON_OSI
- bool
+ bool "EDK2 Non-OSI platforms"
help
EDK2 description files for additional platforms, not
compatible with the normal licensing requirements.
@@ -9,3 +9,37 @@ config BR2_PACKAGE_EDK2_NON_OSI
Only the Marvell Armada files are copied at this point.
https://github.com/tianocore/edk2-non-osi
+
+if BR2_PACKAGE_EDK2_NON_OSI
+
+choice
+ prompt "EDK2 Non-OSI platforms version"
+ default BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ help
+ Select the specific EDK2 Non-OSI platforms version you want
+ to use
+
+config BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ bool "8c09bd0955338db38813e0d8ae1faa634f545f73"
+
+config BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+
+endchoice
+
+config BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE
+ string "EDK2 Non-OSI platforms version"
+ depends on BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+
+config BR2_PACKAGE_EDK2_NON_OSI_VERSION
+ string
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ default "8c09bd0955338db38813e0d8ae1faa634f545f73" \
+ if BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ default BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE \
+ if BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+
+endif
diff --git a/package/edk2-non-osi/edk2-non-osi.mk b/package/edk2-non-osi/edk2-non-osi.mk
index d787c882b3..204768d2ae 100644
--- a/package/edk2-non-osi/edk2-non-osi.mk
+++ b/package/edk2-non-osi/edk2-non-osi.mk
@@ -4,8 +4,7 @@
#
################################################################################
-# Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_NON_OSI_VERSION = 8c09bd0955338db38813e0d8ae1faa634f545f73
+EDK2_NON_OSI_VERSION = $(call qstrip,$(BR2_PACKAGE_EDK2_NON_OSI_VERSION))
EDK2_NON_OSI_SITE = $(call github,tianocore,edk2-non-osi,$(EDK2_NON_OSI_VERSION))
EDK2_NON_OSI_INSTALL_TARGET = NO
EDK2_NON_OSI_INSTALL_STAGING = YES
@@ -24,4 +23,18 @@ define EDK2_NON_OSI_INSTALL_STAGING_CMDS
)
endef
+ifeq ($(BR2_PACKAGE_EDK2_NON_OSI)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2-non-osi version specified. \
+ Check your BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_PACKAGE_EDK2_NON_OSI and BR_BUILDING
+
$(eval $(generic-package))
--
2.47.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH v2 1/3] boot/edk2: add custom version option
2025-04-11 17:29 [Buildroot] [PATCH 0/3] add custom version options for all three edk2 packages Vincent Stehlé
` (2 preceding siblings ...)
2025-04-11 17:29 ` [Buildroot] [PATCH 3/3] package/edk2-non-osi: " Vincent Stehlé
@ 2026-11-21 21:51 ` Angelo Compagnucci
2026-11-21 21:51 ` [Buildroot] [PATCH v2 2/3] package/edk2-platforms: " Angelo Compagnucci
2026-11-21 21:51 ` [Buildroot] [PATCH v2 3/3] package/edk2-non-osi: " Angelo Compagnucci
3 siblings, 2 replies; 7+ messages in thread
From: Angelo Compagnucci @ 2026-11-21 21:51 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé, Cheng Yang
From: Vincent Stehlé <vincent.stehle@arm.com>
Add a custom version option, to enable easily specifying an official EDK
II version to use. This is similar to what is done in other packages,
such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2 makefile to the config
menu to support that. We keep the same latest version by default to
preserve current behaviour.
Also, add a check of the custom version option validity in edk2
makefile.
Skip the hash check for custom versions: the hash file only covers the
default version. optee-os and uboot do the same.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v1 -> v2:
- rebase on master: the default version is now edk2-stable202608
- skip the hash check for custom versions, otherwise the download
fails with "No hash found"
- say in the help text that custom versions must be edk2-stable202605
or later: older versions use the removed GCC5 toolchain name
Supersedes v1: https://patchwork.buildroot.org/project/buildroot/patch/20250411172944.1379043-2-vincent.stehle@arm.com/
Also supersedes this older patch for the same feature:
https://patchwork.buildroot.org/project/buildroot/patch/tencent_8FFB06F67FA524B2D90D051931B1F0082405@qq.com/
boot/edk2/Config.in | 27 +++++++++++++++++++++++++++
boot/edk2/edk2.mk | 20 +++++++++++++++++++-
2 files changed, 46 insertions(+), 1 deletion(-)
diff --git a/boot/edk2/Config.in b/boot/edk2/Config.in
index 2f4737fab9..63f44ce50e 100644
--- a/boot/edk2/Config.in
+++ b/boot/edk2/Config.in
@@ -21,6 +21,33 @@ config BR2_TARGET_EDK2
if BR2_TARGET_EDK2
+choice
+ prompt "EDK2 version"
+ default BR2_TARGET_EDK2_LATEST
+ help
+ Select the specific EDK2 version you want to use
+
+config BR2_TARGET_EDK2_LATEST
+ bool "edk2-stable202608"
+
+config BR2_TARGET_EDK2_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+ (edk2-stable202605 or later).
+
+endchoice
+
+config BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE
+ string "EDK2 version"
+ depends on BR2_TARGET_EDK2_CUSTOM_VERSION
+
+config BR2_TARGET_EDK2_VERSION
+ string
+ default "edk2-stable202608" if BR2_TARGET_EDK2_LATEST
+ default BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE \
+ if BR2_TARGET_EDK2_CUSTOM_VERSION
+
choice
prompt "Platform"
default BR2_TARGET_EDK2_PLATFORM_OVMF_LOONGARCH64 if \
diff --git a/boot/edk2/edk2.mk b/boot/edk2/edk2.mk
index 81a9dfddd3..a0732cd3ca 100644
--- a/boot/edk2/edk2.mk
+++ b/boot/edk2/edk2.mk
@@ -4,7 +4,7 @@
#
################################################################################
-EDK2_VERSION = edk2-stable202608
+EDK2_VERSION = $(call qstrip,$(BR2_TARGET_EDK2_VERSION))
EDK2_SITE = https://github.com/tianocore/edk2
EDK2_SITE_METHOD = git
EDK2_LICENSE = BSD-2-Clause-Patent
@@ -14,6 +14,10 @@ EDK2_DEPENDENCIES = edk2-platforms host-python3 host-acpica host-util-linux
EDK2_INSTALL_TARGET = NO
EDK2_INSTALL_IMAGES = YES
+ifeq ($(BR2_TARGET_EDK2):$(BR2_TARGET_EDK2_LATEST),y:)
+BR_NO_CHECK_HASH_FOR += $(EDK2_SOURCE)
+endif
+
ifeq ($(BR2_ENABLE_DEBUG),y)
EDK2_BUILD_TYPE = DEBUG
ifeq ($(BR2_TARGET_EDK2_OVMF_DEBUG_ON_SERIAL),y)
@@ -159,4 +163,18 @@ define EDK2_INSTALL_IMAGES_CMDS
cp -f $(@D)/Build/$(EDK2_BUILD_DIR)/$(EDK2_BUILD_TYPE)_GCC/FV/*.fd $(BINARIES_DIR)
endef
+ifeq ($(BR2_TARGET_EDK2)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_TARGET_EDK2_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2 version specified. \
+ Check your BR2_TARGET_EDK2_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_TARGET_EDK2 and BR_BUILDING
+
$(eval $(generic-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 2/3] package/edk2-platforms: add custom version option
2026-11-21 21:51 ` [Buildroot] [PATCH v2 1/3] boot/edk2: " Angelo Compagnucci
@ 2026-11-21 21:51 ` Angelo Compagnucci
2026-11-21 21:51 ` [Buildroot] [PATCH v2 3/3] package/edk2-non-osi: " Angelo Compagnucci
1 sibling, 0 replies; 7+ messages in thread
From: Angelo Compagnucci @ 2026-11-21 21:51 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé, Cheng Yang
From: Vincent Stehlé <vincent.stehle@arm.com>
Add a custom version option, to enable easily specifying an official EDK
II Platforms version to use. This is similar to what is done in other
packages, such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2-platforms makefile to the
config menu to support that. Also, we need to make edk2-platforms appear
in the menu to allow selecting the version. We keep the same latest
version by default to preserve current behaviour.
Also, add a check of the custom version option validity in
edk2-platforms makefile.
Skip the hash check for custom versions: the hash file only covers the
default version. optee-os and uboot do the same.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Cc: Dick Olsson <hi@senzilla.io>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v1 -> v2:
- rebase on master: the default version is now the edk2-platforms
commit f8dbb5c60330 ("AmpereAltraPkg: Add support for configuring
ASPM per root complex"), set by 2260627613cb ("boot/edk2: bump to
version edk2-stable202608")
- skip the hash check for custom versions, otherwise the download
fails with "No hash found"
Supersedes v1: https://patchwork.buildroot.org/project/buildroot/patch/20250411172944.1379043-3-vincent.stehle@arm.com/
package/edk2-platforms/Config.in | 35 +++++++++++++++++++++++-
package/edk2-platforms/edk2-platforms.mk | 21 ++++++++++++--
2 files changed, 53 insertions(+), 3 deletions(-)
diff --git a/package/edk2-platforms/Config.in b/package/edk2-platforms/Config.in
index 17633c0fdd..fad0983d63 100644
--- a/package/edk2-platforms/Config.in
+++ b/package/edk2-platforms/Config.in
@@ -1,8 +1,41 @@
config BR2_PACKAGE_EDK2_PLATFORMS
- bool
+ bool "EDK2 Platforms"
help
EDK2 description files for all supported platforms.
The main EDK2 bootloader package will depend on these
description files while building firmware for some platforms.
https://github.com/tianocore/edk2-platforms
+
+if BR2_PACKAGE_EDK2_PLATFORMS
+
+choice
+ prompt "EDK2 Platforms version"
+ default BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ help
+ Select the specific EDK2 Platforms version you want to use
+
+config BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ bool "f8dbb5c603302dc661f572b560bdb34f7db6edb5"
+
+config BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+
+endchoice
+
+config BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE
+ string "EDK2 Platforms version"
+ depends on BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+
+config BR2_PACKAGE_EDK2_PLATFORMS_VERSION
+ string
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ default "f8dbb5c603302dc661f572b560bdb34f7db6edb5" \
+ if BR2_PACKAGE_EDK2_PLATFORMS_LATEST
+ default BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE \
+ if BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION
+
+endif
diff --git a/package/edk2-platforms/edk2-platforms.mk b/package/edk2-platforms/edk2-platforms.mk
index b7cd29784a..967862b437 100644
--- a/package/edk2-platforms/edk2-platforms.mk
+++ b/package/edk2-platforms/edk2-platforms.mk
@@ -4,14 +4,17 @@
#
################################################################################
-# Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_PLATFORMS_VERSION = f8dbb5c603302dc661f572b560bdb34f7db6edb5
+EDK2_PLATFORMS_VERSION = $(call qstrip,$(BR2_PACKAGE_EDK2_PLATFORMS_VERSION))
EDK2_PLATFORMS_SITE = $(call github,tianocore,edk2-platforms,$(EDK2_PLATFORMS_VERSION))
EDK2_PLATFORMS_LICENSE = BSD-2-Clause-Patent
EDK2_PLATFORMS_LICENSE_FILES = License.txt
EDK2_PLATFORMS_INSTALL_TARGET = NO
EDK2_PLATFORMS_INSTALL_STAGING = YES
+ifeq ($(BR2_PACKAGE_EDK2_PLATFORMS):$(BR2_PACKAGE_EDK2_PLATFORMS_LATEST),y:)
+BR_NO_CHECK_HASH_FOR += $(EDK2_PLATFORMS_SOURCE)
+endif
+
# There is nothing to build for edk2-platforms. All we need to do is to copy
# all description files to staging, for other packages to build with.
define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
@@ -19,4 +22,18 @@ define EDK2_PLATFORMS_INSTALL_STAGING_CMDS
cp -rf $(@D)/*/ $(STAGING_DIR)/usr/share/edk2-platforms/
endef
+ifeq ($(BR2_PACKAGE_EDK2_PLATFORMS)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2-platforms version specified. \
+ Check your BR2_PACKAGE_EDK2_PLATFORMS_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_PACKAGE_EDK2_PLATFORMS and BR_BUILDING
+
$(eval $(generic-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread* [Buildroot] [PATCH v2 3/3] package/edk2-non-osi: add custom version option
2026-11-21 21:51 ` [Buildroot] [PATCH v2 1/3] boot/edk2: " Angelo Compagnucci
2026-11-21 21:51 ` [Buildroot] [PATCH v2 2/3] package/edk2-platforms: " Angelo Compagnucci
@ 2026-11-21 21:51 ` Angelo Compagnucci
1 sibling, 0 replies; 7+ messages in thread
From: Angelo Compagnucci @ 2026-11-21 21:51 UTC (permalink / raw)
To: buildroot; +Cc: Dick Olsson, Vincent Stehlé, Cheng Yang
From: Vincent Stehlé <vincent.stehle@arm.com>
Add a custom version option, to enable easily specifying an official EDK
II Non-OSI platforms version to use. This is similar to what is done in
other packages, such as linux, uboot, optee_os or arm-trusted-firmware.
Move the default version definition from edk2-non-osi makefile to the
config menu to support that. Also, we need to make edk2-non-osi appear
in the menu to allow selecting the version. We keep the same latest
version by default to preserve current behaviour.
Also, add a check of the custom version option validity in edk2-non-osi
makefile.
Skip the hash check for custom versions: the hash file only covers the
default version. optee-os and uboot do the same.
Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com>
Co-authored-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Tested-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
Signed-off-by: Angelo Compagnucci <angelo.compagnucci@gmail.com>
---
Changes v1 -> v2:
- rebase on master: the default version is now the edk2-non-osi
commit 7ac12d81e02b ("Remove Intel Platform and Silicon Packages"),
set by 2260627613cb ("boot/edk2: bump to version
edk2-stable202608")
- skip the hash check for custom versions, otherwise the download
fails with "No hash found"
Supersedes v1: https://patchwork.buildroot.org/project/buildroot/patch/20250411172944.1379043-4-vincent.stehle@arm.com/
package/edk2-non-osi/Config.in | 36 +++++++++++++++++++++++++++-
package/edk2-non-osi/edk2-non-osi.mk | 21 ++++++++++++++--
2 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/package/edk2-non-osi/Config.in b/package/edk2-non-osi/Config.in
index 6c540c8a40..38467d63ba 100644
--- a/package/edk2-non-osi/Config.in
+++ b/package/edk2-non-osi/Config.in
@@ -1,5 +1,5 @@
config BR2_PACKAGE_EDK2_NON_OSI
- bool
+ bool "EDK2 Non-OSI platforms"
help
EDK2 description files for additional platforms, not
compatible with the normal licensing requirements.
@@ -9,3 +9,37 @@ config BR2_PACKAGE_EDK2_NON_OSI
Only the Marvell Armada files are copied at this point.
https://github.com/tianocore/edk2-non-osi
+
+if BR2_PACKAGE_EDK2_NON_OSI
+
+choice
+ prompt "EDK2 Non-OSI platforms version"
+ default BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ help
+ Select the specific EDK2 Non-OSI platforms version you want
+ to use
+
+config BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ bool "7ac12d81e02b323bffdf1ef3c188ea33c2185c91"
+
+config BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+ bool "Custom version"
+ help
+ This option allows to use a specific official version
+
+endchoice
+
+config BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE
+ string "EDK2 Non-OSI platforms version"
+ depends on BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+
+config BR2_PACKAGE_EDK2_NON_OSI_VERSION
+ string
+ # Keep in sync with latest commit as of the release date for boot/edk2
+ default "7ac12d81e02b323bffdf1ef3c188ea33c2185c91" \
+ if BR2_PACKAGE_EDK2_NON_OSI_LATEST
+ default BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE \
+ if BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION
+
+endif
diff --git a/package/edk2-non-osi/edk2-non-osi.mk b/package/edk2-non-osi/edk2-non-osi.mk
index 48b34bcdcd..26414f3e0d 100644
--- a/package/edk2-non-osi/edk2-non-osi.mk
+++ b/package/edk2-non-osi/edk2-non-osi.mk
@@ -4,12 +4,15 @@
#
################################################################################
-# Keep in sync with latest commit as of the release date for boot/edk2
-EDK2_NON_OSI_VERSION = 7ac12d81e02b323bffdf1ef3c188ea33c2185c91
+EDK2_NON_OSI_VERSION = $(call qstrip,$(BR2_PACKAGE_EDK2_NON_OSI_VERSION))
EDK2_NON_OSI_SITE = $(call github,tianocore,edk2-non-osi,$(EDK2_NON_OSI_VERSION))
EDK2_NON_OSI_INSTALL_TARGET = NO
EDK2_NON_OSI_INSTALL_STAGING = YES
+ifeq ($(BR2_PACKAGE_EDK2_NON_OSI):$(BR2_PACKAGE_EDK2_NON_OSI_LATEST),y:)
+BR_NO_CHECK_HASH_FOR += $(EDK2_NON_OSI_SOURCE)
+endif
+
# Copy Marvell Armada files
EDK2_NON_OSI_LICENSE += BSD-2-Clause-Patent (Marvell Armada)
EDK2_NON_OSI_LICENSE_FILES += Silicon/Marvell/Armada7k8k/DeviceTree/Armada80x0McBin.inf
@@ -24,4 +27,18 @@ define EDK2_NON_OSI_INSTALL_STAGING_CMDS
)
endef
+ifeq ($(BR2_PACKAGE_EDK2_NON_OSI)$(BR_BUILDING),yy)
+
+#
+# Check custom version option
+#
+ifeq ($(BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION),y)
+ifeq ($(call qstrip,$(BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE)),)
+$(error No custom edk2-non-osi version specified. \
+ Check your BR2_PACKAGE_EDK2_NON_OSI_CUSTOM_VERSION_VALUE setting)
+endif
+endif
+
+endif # BR2_PACKAGE_EDK2_NON_OSI and BR_BUILDING
+
$(eval $(generic-package))
--
2.53.0
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 7+ messages in thread