All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options
@ 2026-01-04 13:47 Julien Olivain via buildroot
  2026-01-16 20:26 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 2+ messages in thread
From: Julien Olivain via buildroot @ 2026-01-04 13:47 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>
---
Change v1 -> v2:
- move extra options at the end of EDK2_BUILD_OPTS (Thomas)
---
 boot/edk2/Config.in | 15 +++++++++++++++
 boot/edk2/edk2.mk   |  3 ++-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/boot/edk2/Config.in b/boot/edk2/Config.in
index 850b9a39de..168fc296a2 100644
--- a/boot/edk2/Config.in
+++ b/boot/edk2/Config.in
@@ -130,6 +130,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 05e44c711b..2c089aefca 100644
--- a/boot/edk2/edk2.mk
+++ b/boot/edk2/edk2.mk
@@ -156,7 +156,8 @@ EDK2_BUILD_OPTS += \
 	-n $(BR2_JLEVEL) \
 	-a $(EDK2_ARCH) \
 	-b $(EDK2_BUILD_TYPE) \
-	-p $(EDK2_PACKAGE_NAME)/$(EDK2_PLATFORM_NAME).dsc
+	-p $(EDK2_PACKAGE_NAME)/$(EDK2_PLATFORM_NAME).dsc \
+	$(call qstrip,$(BR2_TARGET_EDK2_EXTRA_BUILD_OPTS))
 
 define EDK2_BUILD_CMDS
 	mkdir -p $(EDK2_BUILD_PACKAGES)
-- 
2.52.0

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

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

* Re: [Buildroot] [PATCH v2 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options
  2026-01-04 13:47 [Buildroot] [PATCH v2 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options Julien Olivain via buildroot
@ 2026-01-16 20:26 ` Thomas Petazzoni via buildroot
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni via buildroot @ 2026-01-16 20:26 UTC (permalink / raw)
  To: Julien Olivain; +Cc: buildroot, Dick Olsson

Hello,

On Sun, Jan 04, 2026 at 02:47:55PM +0100, Julien Olivain via buildroot wrote:
> 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>

Thanks, applied to master!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2026-01-16 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-04 13:47 [Buildroot] [PATCH v2 1/1] boot/edk2: add a new Kconfig option to pass arbitrary build options Julien Olivain via buildroot
2026-01-16 20:26 ` Thomas Petazzoni via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.