From patchwork Sat Nov 16 11:12:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3939 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 16 Nov 2024 12:13:12 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qv1-f64.google.com (mail-qv1-f64.google.com [209.85.219.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGBDB4g014091 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 12:13:12 +0100 Received: by mail-qv1-f64.google.com with SMTP id 6a1803df08f44-6d3736a62b0sf37269576d6.1 for ; Sat, 16 Nov 2024 03:13:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731755586; cv=pass; d=google.com; s=arc-20240605; b=QVgfz2k5dql5F6Qzr5vcu55bxTqDligdWCfWFVAvPS7uS7ZPxRub1aVJzP16iEr/od qVuBg12VuJ6RNZVa0TJAnSn7qXUZSseijUQW0VIiHM50P21lxB5hwEXso3uB4e2ZT4XH PTrJQvQa1+j84POtM9oAtGKnnfuIpQ8D2GlsfDqkbnPy5/03dPEqj0qy0KQczdMQQxx1 w4oOtPVmbaDxcvjwcyLaJ0C2d1kVKybJ+sP8dyxv9eimm39gSCEh3itwe5KNz993mYF4 gLqfvmKlYJvDxpSi4AeEUdDvIHu0oG1zgv1zqUz51dLpw2Lq1nIwfp4Gf02gfutjiWlu PITg== 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=saMfx7Gj6I9N0xfzMk1TbP/mL8Jh5T2Gi1zgPMDhNjE=; fh=QtyOmAfXVI8aREb+9B5EC6rIhtTdx8+ifyDeuXA0rDo=; b=iDMD3zdYy2VEwcr90GWshf1MNbJyYiYiQYG3HJfzTVnUlj2Rpo1XW3oVg+mIXN3YK8 Dz1IAYAMMjfuRKn2cfDNiVzyMGvHwGtS7J0nQOR5uuCkg1uGh4ibTe6mAc7YEu4Dgsyx MAjgjtOU/FsGqOUGRXVqPyVtdavdrnul4K310J4qMGTAfXbzNqAqEsCg99MkXqKoUAq6 FXSPXH3MSztYJYl7kteTe/lIWkUedTC3fX9Hd858sFjSesHONWP2CDvmrt85TIq4HXC8 u9XDDlAxB1pKOSLwr9/X07Cyyp36dn2U+fXMGaISF+nZnwuDP5C38pIpccqBED6BBoto t2CA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=EFhiF4nK; spf=pass (google.com: domain of fm-294854-2024111611130332c36974c3773a3780-enuoa_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130332c36974c3773a3780-eNUoa_@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=1731755586; x=1732360386; 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=saMfx7Gj6I9N0xfzMk1TbP/mL8Jh5T2Gi1zgPMDhNjE=; b=LxQvbQ0/yg5gmA6XMigCOI9bCl5SO67wwzVIOrGsQPFoBV3attheeVBNSHUxONgV/o yScTYd8A3T80inzztVzhUAdZQSOkXqnZZP9tGFKW2N3+4/ZwlA93WaRfw66jZd/fLwJc +Q9gtd8Xt+gDs3n+kPcqZLm4m1Ar8VCK3rndJR//fiPE5YrNH6MJW4uFgspKpbTcJgu0 0mIMOx0Pvusz3ZDQ9EBheoS247PIQzV4W3YIcUvAz0sir2oh1T6UuYYfm9497fTccO+U wb6V2UWwoYs0hL+jQ0iXNOr8zQZmVdDR0Qjl7S6VP29aIo+D8KekVjZ+GjZ0Ow2ZFNqu baYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731755586; x=1732360386; 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=saMfx7Gj6I9N0xfzMk1TbP/mL8Jh5T2Gi1zgPMDhNjE=; b=gTRXWTKzs9jr7WZAtMrNhl25qcfL64LTJB0AVwq4lEcsedrKriHzjJeKTApfUXlZIG ulCLjoNqtEiS1vUSjZEgcqr5bzJn+/MN/QAfh9S04fwf5DzkLsxd7lrkQpGdsKdIMDZ3 eHw8nDC6w8fdHPRIdKfVhopnK9vTS3IgEFLQSRH3qebjALmiIu4Epiq5ZiEhd3zMb6jx RwGNQkNYE8eJGVuz098GdXWZzpNW5GIwyGsYwGvgNE41Qbc+P8E934ws/MutLHrVkZCg gpErxbDx859Uq3mMWYz9UC+3agXiaeNwYS3iuZ9OjVU9qiEw8hjgrqCXq4Yd/LJSxP7e enSQ== X-Forwarded-Encrypted: i=2; AJvYcCXkmBpa4vRNS494ST24EXKcIELs/Ajr11l0RuHGQLUgksp+Zzg2f3nbbyJS88kMCJbUxQuP48M=@isar-build.org X-Gm-Message-State: AOJu0YxvipdckquInzTmBiQ85gTFw7712Zvczm8kXym3ePihNIw94g6N 9OkEcZYPJ96+sxRRhGVPaFOvGeiqui7f64IwKqi2hpMRK05nOxPn X-Google-Smtp-Source: AGHT+IEqtb2CRYtHnmk/bBbKs6u6eA8DCkpTcKo2bbYmAxmmfXkYnsZ3kvN/TXoLVvW2lYcCQj/AEA== X-Received: by 2002:a05:6214:1244:b0:6d4:12c:c6c6 with SMTP id 6a1803df08f44-6d4012ccd63mr61574646d6.27.1731755585677; Sat, 16 Nov 2024 03:13:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ad4:5aab:0:b0:6cb:d4f7:64e0 with SMTP id 6a1803df08f44-6d3e99ff026ls17502606d6.2.-pod-prod-09-us; Sat, 16 Nov 2024 03:13:04 -0800 (PST) X-Received: by 2002:a05:6214:5bc2:b0:6cb:ee08:c1e8 with SMTP id 6a1803df08f44-6d3fb7c5ca4mr99718626d6.23.1731755584616; Sat, 16 Nov 2024 03:13:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731755584; cv=none; d=google.com; s=arc-20240605; b=CGd2vMGiogzbpU72o0A7V1lMf9c0K9l/tyD6LDlbJEOz6stzz3XfH9NLt+uK/SF/wu pWOiq0Aot22euxPkuzkdJ2/VwT/vhVyBlWvi0QlV/r7npR9piRKzgvMLcEvc5YDBn/jP hK3ya23RrcmwDalWV1hbrK8rck8WuPEvzV820JvviqC/UKNlbvJ1Rp58+0izP2WtnuRt CUnUKzTEjaM8cWMt0ZHcRqFbmJoU/yEoLIbIafGcfaLd0UMkzcXoUMkJTRIPEG7cqzHi 7xHMHuA4lHX7tlJOz0hCVN7WawhCHFXBtdWh2vYM/0Pqw9Vycg12X3yujl221W2ZoZuL idaQ== 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=3NmuJ+CYB4NjLAWvkKRcIcbaRDM33YIGEP1V/+MRMTE=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=CNLl2MgZXQ97Nay1PCH9noRb0whYJXgj0R4PO9gfsmUzzWgGwuayURbZ0EsJ5nTXp0 xjwdUxqK+64lNaJg1KvNt/Jt47/RpNnxO/xchzrrNQNQYBUQbgEK9rSYr7LupDaBOhAX sEy10xlsM3UYJ2PFhxv3Riijw9lMb8vwI6nxs3wfPCJzj+jO5prYxtFMx3hzYsA/o0h6 7TLQQN+wcX5G7coGGJXh8JmtwO3A60eC5V5lLRwwtKUpp/Ehc3yf8bUxBX4tASUSk2yD CJeBnS3fLDjBO7kuEVI/iUMqXYvJbw+QPDLwSOmkdeACmZWGMkwnD79Z1LjNlT/ANRKj xPZA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=EFhiF4nK; spf=pass (google.com: domain of fm-294854-2024111611130332c36974c3773a3780-enuoa_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130332c36974c3773a3780-eNUoa_@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-226.siemens.flowmailer.net (mta-65-226.siemens.flowmailer.net. [185.136.65.226]) by gmr-mx.google.com with ESMTPS id 6a1803df08f44-6d40dd32785si987546d6.8.2024.11.16.03.13.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 03:13:04 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-2024111611130332c36974c3773a3780-enuoa_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) client-ip=185.136.65.226; Received: by mta-65-226.siemens.flowmailer.net with ESMTPSA id 2024111611130332c36974c3773a3780 for ; Sat, 16 Nov 2024 12:13:03 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v4 4/7] initramfs-isar-example-hook: Convert recipe over to new hook.inc Date: Sat, 16 Nov 2024 12:12:58 +0100 Message-ID: <2fa74c75e2558f0621766ad90a0e0b512a53deb3.1731755581.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=EFhiF4nK; spf=pass (google.com: domain of fm-294854-2024111611130332c36974c3773a3780-enuoa_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130332c36974c3773a3780-eNUoa_@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Jan Kiszka Reply-To: Jan Kiszka 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: Jan Kiszka Allows to drop the own hook recipe and makes the local-top boot script effectively a one-liner. Signed-off-by: Jan Kiszka --- .../images/isar-initramfs.bb | 2 +- .../initramfs-example/files/example.hook | 21 ----------------- .../initramfs-example/files/example.script | 23 ------------------- .../initramfs-example/files/local-top | 3 +++ ....bb => initramfs-isar-example-hook_0.1.bb} | 21 ++++++----------- 5 files changed, 11 insertions(+), 59 deletions(-) delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.hook delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.script create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/local-top rename meta-isar/recipes-initramfs/initramfs-example/{initramfs-example.bb => initramfs-isar-example-hook_0.1.bb} (63%) diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb index 4df9e0b8..71dbaa43 100644 --- a/meta-isar/recipes-initramfs/images/isar-initramfs.bb +++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb @@ -14,6 +14,6 @@ INITRAMFS_PREINSTALL += " \ # Recipes that should be installed into the initramfs build rootfs. INITRAMFS_INSTALL += " \ - initramfs-example \ + initramfs-isar-example-hook \ initramfs-fsck-hook-ext4 \ " diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.hook b/meta-isar/recipes-initramfs/initramfs-example/files/example.hook deleted file mode 100644 index ba848c92..00000000 --- a/meta-isar/recipes-initramfs/initramfs-example/files/example.hook +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -# Example hook script. -# -# See "HOOK SCRIPTS" in initramfs-tools(7) for details. - -set -e - -PREREQ="" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions -# Begin real processing below this line diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/example.script b/meta-isar/recipes-initramfs/initramfs-example/files/example.script deleted file mode 100644 index c55e9ea7..00000000 --- a/meta-isar/recipes-initramfs/initramfs-example/files/example.script +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# Example boot script. -# -# See "BOOT SCRIPTS" in initramfs-tools(7) for details. - -set -e - -PREREQ="" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /scripts/functions -# Begin real processing below this line - -log_success_msg "Hello from ISAR!" diff --git a/meta-isar/recipes-initramfs/initramfs-example/files/local-top b/meta-isar/recipes-initramfs/initramfs-example/files/local-top new file mode 100644 index 00000000..66e382b4 --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-example/files/local-top @@ -0,0 +1,3 @@ +# Script header is provided by initramfs-hook/hook.inc + +log_success_msg "Hello from ISAR!" diff --git a/meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb b/meta-isar/recipes-initramfs/initramfs-example/initramfs-isar-example-hook_0.1.bb similarity index 63% rename from meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb rename to meta-isar/recipes-initramfs/initramfs-example/initramfs-isar-example-hook_0.1.bb index c336dda9..8c600639 100644 --- a/meta-isar/recipes-initramfs/initramfs-example/initramfs-example.bb +++ b/meta-isar/recipes-initramfs/initramfs-example/initramfs-isar-example-hook_0.1.bb @@ -4,37 +4,30 @@ # # This software is a part of ISAR. +require recipes-initramfs/initramfs-hook/hook.inc + DESCRIPTION = "Sample initramfs module for ISAR" MAINTAINER = "Your name here " -DEBIAN_DEPENDS = "initramfs-tools" # If the conf-hook enables BUSYBOX=y, busybox is needed: DEBIAN_DEPENDS .= ", busybox" -SRC_URI = " \ +SRC_URI += " \ file://example.conf-hook \ - file://example.hook \ - file://example.script \ + file://local-top \ " -inherit dpkg-raw - do_install[cleandirs] += " \ ${D}/usr/share/initramfs-tools/conf-hooks.d \ - ${D}/usr/share/initramfs-tools/hooks \ - ${D}/usr/share/initramfs-tools/scripts/local-top \ " -do_install() { +do_install:append() { # See "CONFIGURATION HOOK SCRIPTS" in initramfs-tools(7) for details. install "${WORKDIR}/example.conf-hook" \ "${D}/usr/share/initramfs-tools/conf-hooks.d/isar-example" - # See "HOOK SCRIPTS" in initramfs-tools(7) for details. - install "${WORKDIR}/example.hook" \ - "${D}/usr/share/initramfs-tools/hooks/isar-example" + # See "HOOK SCRIPTS" in initramfs-tools(7) for details on + # hook-header[.tmpl] + hook. # Note that there are other places where a boot script might be deployed to, # apart from local-top. See "BOOT SCRIPTS" in initramfs-tools(7) for details. - install "${WORKDIR}/example.script" \ - "${D}/usr/share/initramfs-tools/scripts/local-top/example.script" }