[1/2] isar-installer: Added option to add additional kernel cmdline arguments for isar-image-installer.

Message ID 20241212125347.76001-2-alexander.heinisch@siemens.com
State Accepted, archived
Headers show
Series isar-installer: Added option to add additional kernel cmdline arguments for isar-image-installer. | expand

Commit Message

alexander.heinisch Dec. 12, 2024, 12:53 p.m. UTC
From: Alexander Heinisch <alexander.heinisch@siemens.com>

In combination with unattended mode this allows to specify
several settings like target device, target image path, aso.
to be specified during buildtime.

isar-image-installer allows to specify several parameters like:
 - installer.unattended
 - installer.image.uri ...file name of the image to be installed (parameter name uri chosen since we plan to support download of images in upcoming patches)
 - installer.target.dev ...target device name (e.g. /dev/sda) for the image to be installed to
 - installer.target.overwrite ...strategy how to handle target devices not empty (possible values: OVERWRITE - overwrite data on target | ABORT - abort installation if target not empty)
to execute image deployment in "unattended" mode.

Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
---
 meta-isar/recipes-core/images/isar-image-installer.bb     | 1 +
 meta-isar/scripts/lib/wic/canned-wks/installer-efi.wks.in | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/meta-isar/recipes-core/images/isar-image-installer.bb b/meta-isar/recipes-core/images/isar-image-installer.bb
index dfce311a..a325ab9f 100644
--- a/meta-isar/recipes-core/images/isar-image-installer.bb
+++ b/meta-isar/recipes-core/images/isar-image-installer.bb
@@ -10,6 +10,7 @@  DESCRIPTION = "Example of a ISAR based Installer Image"
 # Use variable to switch easily to another wks
 INSTALLER_WKS_FILE ??= "installer-efi.wks.in"
 WKS_FILE = "${INSTALLER_WKS_FILE}"
+ADDITIONAL_KERNEL_CMDLINE ??= ""
 IMAGER_INSTALL:wic:append = " ${SYSTEMD_BOOTLOADER_INSTALL}"
 
 IMAGE_INSTALL += "deploy-image-service"
diff --git a/meta-isar/scripts/lib/wic/canned-wks/installer-efi.wks.in b/meta-isar/scripts/lib/wic/canned-wks/installer-efi.wks.in
index be8127cb..ecc6adbb 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/installer-efi.wks.in
+++ b/meta-isar/scripts/lib/wic/canned-wks/installer-efi.wks.in
@@ -3,7 +3,7 @@ 
 #
 # SPDX-License-Identifier: MIT
 
-bootloader --ptable gpt --timeout 0 --append "rootwait console=ttyS0,115200 console=tty0 earlyprintk"
+bootloader --ptable gpt --timeout 0 --append "rootwait console=ttyS0,115200 console=tty0 earlyprintk ${ADDITIONAL_KERNEL_CMDLINE}"
 part /boot --source bootimg-efi-isar --sourceparams "loader=systemd-boot" --label efi --part-type EF00 --align 1024 --use-uuid
 part / --source rootfs --fstype ext4 --exclude-path=install --label installroot --align 1024 --use-uuid
 part /install --source rootfs --change-directory=install --label INSTALLDATA --size 4G --fstype=vfat --use-uuid --align 1024