From patchwork Thu Dec 12 12:53:47 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "alexander.heinisch" X-Patchwork-Id: 3981 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 12 Dec 2024 13:54:27 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f190.google.com (mail-il1-f190.google.com [209.85.166.190]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4BCCsPjY003986 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 12 Dec 2024 13:54:26 +0100 Received: by mail-il1-f190.google.com with SMTP id e9e14a558f8ab-3a81777ab57sf4132195ab.2 for ; Thu, 12 Dec 2024 04:54:26 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1734008060; cv=pass; d=google.com; s=arc-20240605; b=IKiJHb9fWTRbpziUay+0UJHwOpOP7kaxpOVi0r7uFDIgfd3XXn3lCH1mk6GAwwdqeD T+q+Rkl9pL7ywzzwNXWvewjC8iXitobENJ7MZoxvruLRvkhpLGs6VU67bUuOn6cq+0YF 4Y+bQFl71mj3J0RMwAVYU/IG149aGmLenOUiH4J+pZLlvWwjhb02JXwBBgxJrcIyXNi/ +yq14BDYd8RrPsAmwziEj8xRtws6xJd3fdwr3KVTdjD/GZjH4OGol58aEufM0IOJzUbT R1IZCcy7H9/8YXEC4R4CUjxvpfu5UjWAGuoPEAVq+I6OO+qco3lJuGLpReXzsog4Oybq k2Hw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:feedback-id:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=eU/c4ew/gUd4xQZeoLGHiyY8G/mGwXDRkzNYYhFXJ5k=; fh=3oqeOV9pmNHqH+ULHBPvymI2flw7Si0xgVbj1ucPH14=; b=SH1g8mDq/7Zq9ZRj09l7i6WIRHf1lCGLlE1FKCUWBFRNsX5N2hQ+jCtMoHjdR2FmTq krpTbniDRHbec1ZbRGJ8pqFeydUVBDgVvCH9of3jJx48sFB78eA4bqv6h+VDisZrMjuD 4RNU7fj1D77Dee4+Q16RUxIrYkh9fwumddaQ3kxnXVAgPAj5HadjtcDD7vVJ+ch6xsDE DseTkTDxk3E4CXcH3j/w+Itx8o6xDaOxvdvSJMGSRWGFNXPKlcQnr2/3OEcSXf+gYBow ipqOD6+23sivM2LeyWQs5Gj/tMsHeCMIzPkColQKIMfpQuBzLc74l0nK70NpQYWdOhtM pnCA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=MehIe7+E; spf=pass (google.com: domain of fm-1326448-2024121212541774b69b696615c5123c-fqfgbh@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1326448-2024121212541774b69b696615c5123c-FQfgBh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1734008060; x=1734612860; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=eU/c4ew/gUd4xQZeoLGHiyY8G/mGwXDRkzNYYhFXJ5k=; b=wi55zPfrvh7vcHiUsWHNJV4xeVJnZypxHLtj/nseGxKIPd8MP3VVOveyoEApUMtHLp 6pcOUupEEg8exJTNx9J//q2iUZ5yeuFC1SVhWFQ8UXwN+ykivPco3LPRIJwktsUcDP80 K/egFn7/oVTYHIYm8m7X9rAKJngoqnoqaYCcJqkzH7EEPoqHco8+Ib8wQCX8+9Vb2K2K B8N/8MGc6Ay/PgfI7TqyAkweNViGtNiCWLQE2wfdPDxL2jk/lnmxUpUA8wgL47+mI93+ BaMYZ55SDge4KyGx+47ued+oeD/xbNRcCQSDlB1866km5VIMGQLQMWZO5BsIzmQZqsck MQnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734008060; x=1734612860; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-authentication-results:x-original-sender:feedback-id :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:x-beenthere:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=eU/c4ew/gUd4xQZeoLGHiyY8G/mGwXDRkzNYYhFXJ5k=; b=KDmOD2cH8ezVoQ1AhF3HzpclihCfSqL5kTD0nDD9vuOGTT1TBc2AMQWS3zNJfAsJqw D82D04aISfMr5QTeYQmtSwGDpfqLwQdP8BvbTdOPSt4Ekn6AtKiLUWIwFbrcyQ32SBkb eDFRWxXvAm0UilLsQBWTRMIFV3JzF5gi7Jm0ngLWNWPgaXsWpluCgWNl8oPo//2VWY6D ptMTgMpcPV25UN/QOA7dxv929wnTRfRgLdqyc5nh9TM61XKObR9E3cvYTNA6Z/3k0PXC 1GRWaGnEVWnajiwnaS/YBMdmD6QfyKQq0hppyduX+Vs+MHwyY2MHqEopJUPEisTNPpiH ct/g== X-Forwarded-Encrypted: i=2; AJvYcCVGjvWxoCFyExZ77hNVQcgwzcA5TRHJf6LYLVNcixyibjih2mkjfqoam4efCaslDEmc2FrStfc=@isar-build.org X-Gm-Message-State: AOJu0YxkpyLC2Dbtul6xybsyF1U3VjCzLaop8UUUKOmaHBGoFc36SrGH L1rtgqaEO5YrbeNT3HpNEVQjql9ie7RX78s2rUKIEB9EbCZVkZZN X-Google-Smtp-Source: AGHT+IHAfxmHLQExOKsIXINAizfpnoyuQTQn1DeCvZpXHg4bvY2C5l1uLnjZeodXUSHsBHvtFELZVg== X-Received: by 2002:a05:6e02:1d1e:b0:3a7:a69c:9692 with SMTP id e9e14a558f8ab-3ae59444861mr1212135ab.21.1734008060071; Thu, 12 Dec 2024 04:54:20 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:c60c:0:b0:3a9:d94d:cc48 with SMTP id e9e14a558f8ab-3ac6e4831bcls273165ab.2.-pod-prod-04-us; Thu, 12 Dec 2024 04:54:19 -0800 (PST) X-Received: by 2002:a05:6602:14cb:b0:82c:d768:aa4d with SMTP id ca18e2360f4ac-844e56595f5mr16624439f.9.1734008058889; Thu, 12 Dec 2024 04:54:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1734008058; cv=none; d=google.com; s=arc-20240605; b=Co//xZO5ZwrTomeZ/ZV2XZMK4dibxFbGfGHHJhVQaIsx8fB7echO+20CJBxadvGuec JKxAEtgC7ylm2oI1PS74zzmvJNPF4Z/dLDU9xQt2QXtbbWG/M6xnULANOcAKlx2EqYTr qYOjgLFpkSNO6OEMxsaj6+5ChY5uSHDD40Zwlh9Q0X6rTn4AidnHiH6eo+lI5su2kljs hjamGK3GsdaZWAyf7e+E5sIB69jchNMGFZZFe8neB9r+EAno3XE5mMkE8YBY3ui/mbqQ OgW4Jz/2udxj2d4jeEgaTOcjWOu3w8Ez/kcrJZ0808JIg+5RhXCwjhNHRtEOqD9PXHEA oNMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=feedback-id:content-transfer-encoding:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature; bh=GRvx2kICflMxTohkyXuLBwvFwzbYUoz3ZvvgotbMLrs=; fh=8QWtUpqP60l2J4iCqh8UnyHHQEjCwckEBR+rhHx1FrU=; b=EAQulUcmTzngFmrRNRFqiosJVHYINKpAfjezjt/XKH3jocPC3tEqqu4GKSfQf2SuBZ xuGl70J3BS7KZahgRc3+0YUXf3vXbYYQkyYH4YXnGdepQFHIQdqt0q957FmKqBasQfF7 VwGqtfBjuxjcw85gU+F8ObbaWiLRGNAmKEOR5bSmjp5f2zN2s67qLMxtWJLLyZMW/OJz EEMj0uSmrfH5BzMoZgjxjqRHvX5mttvY6RlTaRuydBX2gCF833BKcP1VXm5h7qe+TRPT K2DXCVfn2cCdQk3/XCL3erhvrzXZ5BJHPYHmx3FNYvmIOnd/4BukK3GixTbQ7+xrbFf0 9JRg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=MehIe7+E; spf=pass (google.com: domain of fm-1326448-2024121212541774b69b696615c5123c-fqfgbh@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1326448-2024121212541774b69b696615c5123c-FQfgBh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-227.siemens.flowmailer.net (mta-65-227.siemens.flowmailer.net. [185.136.65.227]) by gmr-mx.google.com with ESMTPS id ca18e2360f4ac-844d3825059si11921239f.1.2024.12.12.04.54.18 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Dec 2024 04:54:18 -0800 (PST) Received-SPF: pass (google.com: domain of fm-1326448-2024121212541774b69b696615c5123c-fqfgbh@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) client-ip=185.136.65.227; Received: by mta-65-227.siemens.flowmailer.net with ESMTPSA id 2024121212541774b69b696615c5123c for ; Thu, 12 Dec 2024 13:54:17 +0100 X-Patchwork-Original-From: "alexander.heinisch via isar-users" From: "alexander.heinisch" To: isar-users@googlegroups.com, amikan@ilbers.de Cc: Alexander Heinisch Subject: [PATCH 2/2] isar-installer: Added config options for isar-image-installer unattended mode. Date: Thu, 12 Dec 2024 13:53:47 +0100 Message-ID: <20241212125347.76001-3-alexander.heinisch@siemens.com> In-Reply-To: <20241212125347.76001-1-alexander.heinisch@siemens.com> References: <20241212125347.76001-1-alexander.heinisch@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-1326448:519-21489:flowmailer X-Original-Sender: alexander.heinisch@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=MehIe7+E; spf=pass (google.com: domain of fm-1326448-2024121212541774b69b696615c5123c-fqfgbh@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-1326448-2024121212541774b69b696615c5123c-FQfgBh@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: alexander.heinisch@siemens.com Reply-To: alexander.heinisch@siemens.com Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,RCVD_IN_RP_CERTIFIED, RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= From: Alexander Heinisch Signed-off-by: Alexander Heinisch --- kas/image/Kconfig | 37 +++++++++++++++++++ .../images/isar-image-installer.bb | 10 +++++ 2 files changed, 47 insertions(+) diff --git a/kas/image/Kconfig b/kas/image/Kconfig index e4f64dcc..0c0a664c 100644 --- a/kas/image/Kconfig +++ b/kas/image/Kconfig @@ -67,6 +67,43 @@ config INSTALLER_TARGET_IMAGE default "isar-image-base" if INSTALL_IMAGE_BASE default "isar-image-base" if INSTALL_IMAGE_DEBUG +config INSTALL_UNATTENDED + bool "Run installer unattended" + +if INSTALL_UNATTENDED + +config INSTALLER_UNATTENDED + string + default "1" if INSTALL_UNATTENDED + default "" + +config INSTALLER_TARGET_DEVICE + string "Target device to deploy" + default "/dev/sda" + help + Device to deploy the image onto. + Leave this empty to get prompted during installation + Examples: /dev/sda, /dev/nvme0n1 + +choice + prompt "Overwrite handling" + default OPT_INSTALLER_TARGET_OVERWRITE + +config OPT_INSTALLER_TARGET_OVERWRITE + bool "Overwrite if target is not empty" + +config OPT_INSTALLER_TARGET_ABORT + bool "Abort if target is not empty" + +endchoice + +config INSTALLER_TARGET_OVERWRITE + string + default "OVERWRITE" if OPT_INSTALLER_TARGET_OVERWRITE + default "ABORT" if OPT_INSTALLER_TARGET_ABORT + +endif + endif config KAS_INCLUDE_IMAGE diff --git a/meta-isar/recipes-core/images/isar-image-installer.bb b/meta-isar/recipes-core/images/isar-image-installer.bb index a325ab9f..ee04bb41 100644 --- a/meta-isar/recipes-core/images/isar-image-installer.bb +++ b/meta-isar/recipes-core/images/isar-image-installer.bb @@ -10,7 +10,17 @@ 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 ??= "" + +OVERRIDES .= "${@':unattended-installer' if d.getVar('INSTALLER_UNATTENDED') else ''}" +ADDITIONAL_KERNEL_CMDLINE:append:unattended-installer = " \ + installer.unattended \ + installer.image.uri=/install/${IMAGE_DATA_FILE}.${IMAGE_DATA_POSTFIX} \ + installer.target.dev=${INSTALLER_TARGET_DEVICE} \ + installer.target.overwrite=${INSTALLER_TARGET_OVERWRITE} \ + " + IMAGER_INSTALL:wic:append = " ${SYSTEMD_BOOTLOADER_INSTALL}" IMAGE_INSTALL += "deploy-image-service"