Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options
@ 2025-06-30 18:58 Julien Olivain via buildroot
  2025-07-05 21:32 ` Romain Naour via buildroot
  2026-01-04 10:56 ` Thomas Petazzoni via buildroot
  0 siblings, 2 replies; 5+ messages in thread
From: Julien Olivain via buildroot @ 2025-06-30 18:58 UTC (permalink / raw)
  To: buildroot; +Cc: Dick Olsson, Julien Olivain

EDK2 build may include extra options. Those are usually in the form
of "-D SOMEFLAG_ENABLE" and might be specific for a processor
architecture or a platform. For example:
"-D NETWORK_HTTP_BOOT_ENABLE", "-D NETWORK_TLS_ENABLE", ...

Those options are generally documented in their respective packages.
See for example:
https://github.com/tianocore/edk2/blob/master/OvmfPkg/README

This commit adds a new Kconfig string option to let the use define
arbitrary build flags.

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
 boot/edk2/Config.in | 15 +++++++++++++++
 boot/edk2/edk2.mk   |  1 +
 2 files changed, 16 insertions(+)

diff --git a/boot/edk2/Config.in b/boot/edk2/Config.in
index 635bb0100a..eda15df2a1 100644
--- a/boot/edk2/Config.in
+++ b/boot/edk2/Config.in
@@ -119,6 +119,21 @@ config BR2_TARGET_EDK2_OVMF_DEBUG_ON_SERIAL
 	  See OVMF README:
 	  https://github.com/tianocore/edk2/blob/master/OvmfPkg/README
 
+config BR2_TARGET_EDK2_EXTRA_BUILD_OPTS
+	string "Extra build options"
+	help
+	  EDK2 build may include extra options. Those are usually in
+	  the form of "-D SOMEFLAG_ENABLE" and might be specific for a
+	  processor architecture or a platform. For example: "-D
+	  NETWORK_HTTP_BOOT_ENABLE", "-D NETWORK_TLS_ENABLE", ...
+
+	  Those options are generally documented in their respective
+	  packages. See for example:
+	  https://github.com/tianocore/edk2/blob/master/OvmfPkg/README
+
+	  This configuration is an arbitrary string that will be
+	  passed to the build command.
+
 config BR2_TARGET_EDK2_FD_NAME
 	string
 	default "OVMF" if BR2_TARGET_EDK2_PLATFORM_OVMF_I386
diff --git a/boot/edk2/edk2.mk b/boot/edk2/edk2.mk
index 36bcbfc88b..57d45e5fca 100644
--- a/boot/edk2/edk2.mk
+++ b/boot/edk2/edk2.mk
@@ -146,6 +146,7 @@ EDK2_BUILD_ENV += \
 	GCC5_$(EDK2_ARCH)_PREFIX=$(TARGET_CROSS)
 
 EDK2_BUILD_OPTS += \
+	$(call qstrip,$(BR2_TARGET_EDK2_EXTRA_BUILD_OPTS)) \
 	-t GCC5 \
 	-n $(BR2_JLEVEL) \
 	-a $(EDK2_ARCH) \
-- 
2.50.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-01-04 14:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 18:58 [Buildroot] [PATCH 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options Julien Olivain via buildroot
2025-07-05 21:32 ` Romain Naour via buildroot
2026-01-04 10:57   ` Thomas Petazzoni via buildroot
2026-01-04 10:56 ` Thomas Petazzoni via buildroot
2026-01-04 13:52   ` Julien Olivain via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox