diff mbox series

[1/2] Kconfig: Add HAVE_LIBUBOOTENV and HAVE_LIBEBGENV

Message ID 20230104151924.3797632-1-sbabic@denx.de
State Accepted
Headers show
Series [1/2] Kconfig: Add HAVE_LIBUBOOTENV and HAVE_LIBEBGENV | expand

Commit Message

Stefano Babic Jan. 4, 2023, 3:19 p.m. UTC
From: James Hilliard <james.hilliard1@gmail.com>

Allow passing through the environment if libubootenv or libebgenv
are available for the build target.

Defaults to yes because we do not do any library checking for now.

Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
Signed-off-by: Stefano Babic <sbabic@denx.de>
---
 Kconfig              | 8 ++++++++
 Makefile.deps        | 4 ++++
 bootloader/Config.in | 8 ++++++++
 3 files changed, 20 insertions(+)
diff mbox series

Patch

diff --git a/Kconfig b/Kconfig
index 85fa5fd7..48325bf2 100644
--- a/Kconfig
+++ b/Kconfig
@@ -53,6 +53,14 @@  config HAVE_LIBUBI
 	bool
 	option env="HAVE_LIBUBI"
 
+config HAVE_LIBUBOOTENV
+	bool
+	option env="HAVE_LIBUBOOTENV"
+
+config HAVE_LIBEBGENV
+       bool
+       option env="HAVE_LIBEBGENV"
+
 config HAVE_LIBEXT2FS
 	bool
 	option env="HAVE_LIBEXT2FS"
diff --git a/Makefile.deps b/Makefile.deps
index 08df4e22..97ac96e3 100644
--- a/Makefile.deps
+++ b/Makefile.deps
@@ -42,6 +42,10 @@  ifeq ($(HAVE_LIBUBI),)
 export HAVE_LIBUBI = y
 endif
 
+ifeq ($(HAVE_LIBUBOOTENV),)
+export HAVE_LIBUBOOTENV = y
+endif
+
 ifeq ($(HAVE_LIBZEROMQ),)
 export HAVE_LIBZEROMQ = y
 endif
diff --git a/bootloader/Config.in b/bootloader/Config.in
index 1744b612..ad784c51 100644
--- a/bootloader/Config.in
+++ b/bootloader/Config.in
@@ -14,16 +14,24 @@  config BOOTLOADER_NONE
 
 config BOOTLOADER_EBG
 	bool "EFI Boot Guard"
+	depends on HAVE_LIBEBGENV
 	help
 	  Support for EFI Boot Guard
 	  https://github.com/siemens/efibootguard
 
+comment "EFI Boot Guard needs libebgenv and libz"
+	depends on !HAVE_ZLIB || !HAVE_LIBEBGENV
+
 config UBOOT
 	bool "U-Boot"
+	depends on HAVE_LIBUBOOTENV
 	help
 	  Support for U-Boot
 	  https://www.denx.de/wiki/U-Boot
 
+comment "U-Boot needs libubootenv"
+	depends on !HAVE_LIBUBOOTENV
+
 config UBOOT_FWENV
 	string "U-Boot Environment Configuration file"
 	depends on UBOOT