diff mbox series

[03/13] x86: zboot: Create a separate ZBOOT option for zboot logic

Message ID 20231204002944.897949-4-sjg@chromium.org
State Accepted
Commit 80d4c987576070082ed27da88aed732d42396135
Delegated to: Tom Rini
Headers show
Series Complete decoupling of zboot logic from commands | expand

Commit Message

Simon Glass Dec. 4, 2023, 12:29 a.m. UTC
Most of the functionality of zboot is contained in the logic which
handles a zimage. Create a separate Kconfig for the logic so that it can
(later) be used without the command itself being enabled.

Enable ZBOOT by default on x86, with the command depending on that. The
existing 'imply' can therefore be removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 arch/Kconfig          | 1 -
 arch/x86/Kconfig      | 8 ++++++++
 arch/x86/lib/Makefile | 2 +-
 cmd/Kconfig           | 2 ++
 4 files changed, 11 insertions(+), 2 deletions(-)

Comments

Tom Rini Dec. 9, 2023, 3:49 p.m. UTC | #1
On Sun, Dec 03, 2023 at 05:29:28PM -0700, Simon Glass wrote:

> Most of the functionality of zboot is contained in the logic which
> handles a zimage. Create a separate Kconfig for the logic so that it can
> (later) be used without the command itself being enabled.
> 
> Enable ZBOOT by default on x86, with the command depending on that. The
> existing 'imply' can therefore be removed.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Tom Rini <trini@konsulko.com>
diff mbox series

Patch

diff --git a/arch/Kconfig b/arch/Kconfig
index 2e0528d819c9..de91aac4b8d4 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -246,7 +246,6 @@  config X86
 	imply CMD_PCI
 	imply CMD_SF
 	imply CMD_SF_TEST
-	imply CMD_ZBOOT
 	imply DM_GPIO
 	imply DM_KEYBOARD
 	imply DM_MMC
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 99e59d94c606..e5ee10af33c5 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -1053,4 +1053,12 @@  config SPL_COREBOOT_SYSINFO
 	  display, memory and build information. It is stored in
 	  struct sysinfo_t after parsing by get_coreboot_info().
 
+config ZBOOT
+	bool "Support the zImage format"
+	default y
+	help
+	  Enable this to support booting the x86-specific zImage format. This
+	  uses a special, binary format containing information about the Linux
+	  format to boot.
+
 endmenu
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index 90a7618ecfde..8fc35e1b51ea 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -48,7 +48,7 @@  obj-$(CONFIG_$(SPL_TPL_)GENERATE_ACPI_TABLE) += acpi_table.o
 endif
 obj-y	+= tables.o
 ifndef CONFIG_SPL_BUILD
-obj-$(CONFIG_CMD_ZBOOT)	+= zimage.o
+obj-$(CONFIG_ZBOOT) += zimage.o
 endif
 obj-$(CONFIG_USE_HOB) += hob.o
 ifndef CONFIG_TPL_BUILD
diff --git a/cmd/Kconfig b/cmd/Kconfig
index 9ebea76c2ce5..584ffd039686 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -538,6 +538,8 @@  config THOR_RESET_OFF
 
 config CMD_ZBOOT
 	bool "zboot - x86 boot command"
+	depends on ZBOOT
+	default y
 	help
 	  With x86 machines it is common to boot a bzImage file which
 	  contains both a kernel and a setup.bin file. The latter includes