diff mbox series

[v6,1/2] boot/grub2/Config.in: add efi and legacy booleans

Message ID 20211203185106.1196187-1-aduskett@gmail.com
State Accepted
Headers show
Series [v6,1/2] boot/grub2/Config.in: add efi and legacy booleans | expand

Commit Message

Adam Duskett Dec. 3, 2021, 6:51 p.m. UTC
Add two new booleans to grub2/Config.in:
BR2_TARGET_GRUB_EFI and BR2_TARGET_GRUB_LEGACY.

Each target selects the appropriate bool, which makes it much more simple for
other packages such as mender-grubenv to check if grub legacy or EFI is
selected.

Signed-off-by: Adam Duskett <aduskett@gmail.com>
---
 boot/grub2/Config.in | 11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/boot/grub2/Config.in b/boot/grub2/Config.in
index 7bbe697932..36a32520a4 100644
--- a/boot/grub2/Config.in
+++ b/boot/grub2/Config.in
@@ -40,6 +40,7 @@  config BR2_TARGET_GRUB2_HAS_PTF
 config BR2_TARGET_GRUB2_I386_PC
 	bool "i386-pc"
 	depends on BR2_i386 || BR2_x86_64
+	select BR2_TARGET_GRUB_LEGACY
 	help
 	  Select this option if the platform you're targetting is a
 	  x86 or x86-64 legacy BIOS based platform.
@@ -48,6 +49,7 @@  config BR2_TARGET_GRUB2_I386_EFI
 	bool "i386-efi"
 	depends on BR2_i386 || BR2_x86_64
 	select BR2_TARGET_GRUB2_HAS_PTF
+	select BR2_TARGET_GRUB_EFI
 	help
 	  Select this option if the platform you're targetting has a
 	  32 bits EFI BIOS. Note that some x86-64 platforms use a 32
@@ -57,6 +59,7 @@  config BR2_TARGET_GRUB2_X86_64_EFI
 	bool "x86-64-efi"
 	depends on BR2_x86_64
 	select BR2_TARGET_GRUB2_HAS_PTF
+	select BR2_TARGET_GRUB_EFI
 	help
 	  Select this option if the platform you're targetting has a
 	  64 bits EFI BIOS.
@@ -73,6 +76,7 @@  config BR2_TARGET_GRUB2_ARM_EFI
 	bool "arm-efi"
 	depends on BR2_arm
 	select BR2_TARGET_GRUB2_HAS_PTF
+	select BR2_TARGET_GRUB_EFI
 	help
 	  Select this option if the platform you're targetting is an
 	  ARM platform and you want to boot Grub 2 as an EFI
@@ -81,6 +85,7 @@  config BR2_TARGET_GRUB2_ARM_EFI
 config BR2_TARGET_GRUB2_ARM64_EFI
 	bool "arm64-efi"
 	depends on BR2_aarch64
+	select BR2_TARGET_GRUB_EFI
 	help
 	  Select this option if the platform you're targetting is an
 	  Aarch64 platform and you want to boot Grub 2 as an EFI
@@ -145,6 +150,12 @@  config BR2_TARGET_GRUB2_INSTALL_TOOLS
 	  This will also install the Grub 2 loadable modules to the
 	  target.
 
+config BR2_TARGET_GRUB_EFI
+	bool
+
+config BR2_TARGET_GRUB_LEGACY
+	bool
+
 endif # BR2_TARGET_GRUB2
 
 comment "grub2 needs a toolchain w/ wchar"