[01/17] Kconfig: Rework installer image submenu

Message ID 0bfff32b3a5b866350b7283d6d7125adf51111aa.1719927511.git.jan.kiszka@siemens.com
State Accepted, archived
Headers show
Series Reworks, fixes and unattended mode for image installer | expand

Commit Message

Jan Kiszka July 2, 2024, 1:38 p.m. UTC
From: Jan Kiszka <jan.kiszka@siemens.com>

Even though kas processes it, "menuconfig" is not a valid entry for a
choice. While fixing this, also make the installer payload a choice,
rather than a string input, to make it easier for users.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 kas/image/Kconfig | 43 ++++++++++++++++++++++++++++++++-----------
 1 file changed, 32 insertions(+), 11 deletions(-)

Patch

diff --git a/kas/image/Kconfig b/kas/image/Kconfig
index 45611c4e..e4f64dcc 100644
--- a/kas/image/Kconfig
+++ b/kas/image/Kconfig
@@ -30,24 +30,45 @@  config IMAGE_CI
 	  This image includes is for running CI. Via isar-ci-ssh-setup recipe.
 	  It creates ci user with non-interactive ssh access to the board.
 
-menuconfig IMAGE_INSTALLER
+config IMAGE_INSTALLER
 	bool "Installer image"
 	help
 	  This image contains a target image and scripts to install the target image on a device.
 
-config INSTALLER_TARGET_IMAGE
-	string "Install Base or Debug image"
-	default "isar-image-base"
+endchoice
+
+if IMAGE_INSTALLER
+
+choice
+	prompt "Image to install"
+	default INSTALL_IMAGE_BASE
+
+config INSTALL_IMAGE_BASE
+	bool "Base image"
 	help
-	  This selects the target image of the installer:
-	  - isar-image-base
-	  - isar-image-debug
-	  If left empty it will generate a installer image without payload.
-	  The user of that image needs then to copy a image to the partition
-	  labeled INSTALLDATA.
-	depends on IMAGE_INSTALLER
+	  Embed the basic Isar image into the installer image.
+
+config INSTALL_IMAGE_DEBUG
+	bool "Debug image"
+	help
+	  Embed the Isar debug image into the installer image.
+
+config INSTALL_EMPTY
+	bool "No installer payload"
+	help
+	  This will generate a installer image without payload. The user of
+	  that image needs then to copy a image to the partition labeled
+	  INSTALLDATA.
+
 endchoice
 
+config INSTALLER_TARGET_IMAGE
+	string
+	default "isar-image-base" if INSTALL_IMAGE_BASE
+	default "isar-image-base" if INSTALL_IMAGE_DEBUG
+
+endif
+
 config KAS_INCLUDE_IMAGE
 	string
 	default "kas/image/isar-image-base.yaml" if IMAGE_BASE