[PATCH 5/6] isar-installer: Fixing race between ttys in unattended mode.

4 views
Skip to first unread message

alexander...@siemens.com

unread,
Sep 22, 2025, 1:04:54 PM (6 days ago) Sep 22
to isar-...@googlegroups.com, Alexander Heinisch
From: Alexander Heinisch <alexander...@siemens.com>

Signed-off-by: Alexander Heinisch <alexander...@siemens.com>
---
kas/image/Kconfig | 12 ++++++++----
kas/installer/Kconfig | 19 +++++++++++++++++--
kas/installer/unattended.yaml | 18 ++++++++++++++++++
3 files changed, 43 insertions(+), 6 deletions(-)
create mode 100644 kas/installer/unattended.yaml

diff --git a/kas/image/Kconfig b/kas/image/Kconfig
index 1ebd056e..1e757ae4 100644
--- a/kas/image/Kconfig
+++ b/kas/image/Kconfig
@@ -37,10 +37,6 @@ config IMAGE_INSTALLER

endchoice

-if IMAGE_INSTALLER
-source "kas/installer/Kconfig"
-endif
-
config KAS_INCLUDE_IMAGE
string
default "kas/image/isar-image-base.yaml" if IMAGE_BASE
@@ -48,4 +44,12 @@ config KAS_INCLUDE_IMAGE
default "kas/image/isar-image-ci.yaml" if IMAGE_CI
default "kas/image/isar-image-installer.yaml" if IMAGE_INSTALLER

+if IMAGE_INSTALLER
+menu "Installer config"
+
+source "kas/installer/Kconfig"
+
+endmenu
+endif
+
endmenu
diff --git a/kas/installer/Kconfig b/kas/installer/Kconfig
index 83380ee2..0b891c9a 100644
--- a/kas/installer/Kconfig
+++ b/kas/installer/Kconfig
@@ -3,7 +3,9 @@
#
# SPDX-License-Identifier: MIT

-menu "Installer config"
+config KAS_INCLUDE_IMAGE
+ string
+ default "kas/image/isar-image-installer.yaml"

choice
prompt "Image to install"
@@ -44,6 +46,10 @@ config INSTALL_UNATTENDED

if INSTALL_UNATTENDED

+config KAS_INCLUDE_INSTALLER_UNATTENDED
+ string
+ default "kas/installer/unattended.yaml"
+
config INSTALLER_UNATTENDED
string
default "1" if INSTALL_UNATTENDED
@@ -76,4 +82,13 @@ config INSTALLER_TARGET_OVERWRITE

endif

-endmenu
+config INSTALLER_TTY_SERVICES
+ string "TTY Service to use"
+ default "getty@tty1 serial-getty@ttyS0" if !INSTALL_UNATTENDED
+ default "serial-getty@ttyS0" if INSTALL_UNATTENDED
+ help
+ TTY Service(s) used to execute the installer on.
+ In case of unattended installers, make sure only one tty
+ is specified here, else race condition between installer
+ instances may occur.
+ Examples: "serial-getty@ttyS0", "getty@tty1" or combinations like "getty@tty1 serial-getty@ttyS0"
diff --git a/kas/installer/unattended.yaml b/kas/installer/unattended.yaml
new file mode 100644
index 00000000..21beac0a
--- /dev/null
+++ b/kas/installer/unattended.yaml
@@ -0,0 +1,18 @@
+# This software is a part of ISAR.
+# Copyright (C) Siemens AG, 2025
+#
+# SPDX-License-Identifier: MIT
+
+header:
+ version: 14
+
+local_conf_header:
+ target_bootstrapper_deploy-image: |
+ INSTALLER_UNATTENDED = "1"
+ INSTALLER_TARGET_DEVICE ?= "/dev/sda:/dev/nvme0n1"
+ INSTALLER_TARGET_OVERWRITE ?= "OVERWRITE"
+
+ target_bootstrapper-tty: |
+ TARGET_BOOTSTRAPPER_TTY_SERVICES ?= "\
+ serial-getty@ttyS0 \
+ "
\ No newline at end of file
--
2.39.5

Reply all
Reply to author
Forward
0 new messages