[v5,08/13] kas: Add image type selection

Message ID 20230926053742.11352-9-ubely@ilbers.de
State Accepted, archived
Headers show
Series Support building Isar using kas | expand

Commit Message

Uladzimir Bely Sept. 26, 2023, 5:37 a.m. UTC
This allows to choose between base and debug Isar image.

Signed-off-by: Uladzimir Bely <ubely@ilbers.de>
---
 Kconfig                         |  1 +
 kas/image/Kconfig               | 32 ++++++++++++++++++++++++++++++++
 kas/image/isar-image-base.yaml  |  7 +++++++
 kas/image/isar-image-debug.yaml |  7 +++++++
 kas/isar.yaml                   |  3 ---
 5 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 kas/image/Kconfig
 create mode 100644 kas/image/isar-image-base.yaml
 create mode 100644 kas/image/isar-image-debug.yaml

Patch

diff --git a/Kconfig b/Kconfig
index 5a3050a4..538c0a1b 100644
--- a/Kconfig
+++ b/Kconfig
@@ -16,5 +16,6 @@  config KAS_BUILD_SYSTEM
 
 source "kas/distro/Kconfig"
 source "kas/machine/Kconfig"
+source "kas/image/Kconfig"
 source "kas/package/Kconfig"
 source "kas/opt/Kconfig"
diff --git a/kas/image/Kconfig b/kas/image/Kconfig
new file mode 100644
index 00000000..8e617386
--- /dev/null
+++ b/kas/image/Kconfig
@@ -0,0 +1,32 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+#
+# Authors:
+#  Uladzimir Bely <ubely@ilbers.de>
+
+menu "Image type selection"
+
+choice
+	prompt "Image type selection"
+	default IMAGE_BASE
+
+config IMAGE_BASE
+	bool "Base image"
+	help
+	  This is the basic Isar image with bare minimum of preinstalled packages.
+	  It's technically close do the debootstrapped system with packages
+	  required to boot up the system.
+
+config IMAGE_DEBUG
+	bool "Debug image"
+	help
+	  This image includes some tools preinstalled useful for debug.
+
+endchoice
+
+config KAS_INCLUDE_IMAGE
+	string
+	default "kas/image/isar-image-base.yaml" if IMAGE_BASE
+	default "kas/image/isar-image-debug.yaml" if IMAGE_DEBUG
+
+endmenu
diff --git a/kas/image/isar-image-base.yaml b/kas/image/isar-image-base.yaml
new file mode 100644
index 00000000..0666510f
--- /dev/null
+++ b/kas/image/isar-image-base.yaml
@@ -0,0 +1,7 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+  version: 14
+
+target: isar-image-base
diff --git a/kas/image/isar-image-debug.yaml b/kas/image/isar-image-debug.yaml
new file mode 100644
index 00000000..94c5a334
--- /dev/null
+++ b/kas/image/isar-image-debug.yaml
@@ -0,0 +1,7 @@ 
+# This software is a part of ISAR.
+# Copyright (C) 2023 ilbers GmbH
+
+header:
+  version: 14
+
+target: isar-image-debug
diff --git a/kas/isar.yaml b/kas/isar.yaml
index c8dec31c..df26b780 100644
--- a/kas/isar.yaml
+++ b/kas/isar.yaml
@@ -6,9 +6,6 @@  header:
 
 build_system: isar
 
-target:
-- isar-image-base
-
 repos:
   isar:
     layers: