From patchwork Mon Nov 11 20:50:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3911 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Mon, 11 Nov 2024 21:50:36 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-yw1-f187.google.com (mail-yw1-f187.google.com [209.85.128.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoYs3014815 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:34 +0100 Received: by mail-yw1-f187.google.com with SMTP id 00721157ae682-6eaae8b12bfsf77940877b3.3 for ; Mon, 11 Nov 2024 12:50:34 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358228; cv=pass; d=google.com; s=arc-20240605; b=czz+L4FqD+9GDgYZB/fXSXLzZG+qWFeK5md+7PJguIo5IwCkH4+0mzklQMh4PmqO17 W7/liPwYmAbq3pFy08LEidnkMiefmuuv9t7jMQogmTYsG1lPksu6zGeaoTISBE2CBoS+ hdp/FRqmsEu8IC5jSHhxVTR6X3h37m+VAZcrj8lNA4bNh9jehsRUhQBh9Y1q8/HXiOPS j95Bp3PBhsVU+DzEtbOZSevF6eZLbjKPm1VBlE8bcBIv7m3znFmuAdsbZfgVUy1+ft58 SA0ta88zuqBT4PHJPNJitixZUYyTGKVwU7ROMUGDjsMhFbhAZa5O9R2DNleNmVbjEo4u 78tQ== 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=rfGhCf1QxxvdEoKixMR379jq1CZ6IZGnZvvDtCNKfIk=; fh=WLg9jCI9PHFy76kAUr2zk4hg0YTvDNiikKNOy9sHd/4=; b=AYc/qovFx89j9xZfCCvfccEts9/fooPp5IW+oG4FSS4IputjliG3WOJ3fYBTJ8ohgd QV49pqoCfbhBfOQAXnipjQd0MvXN+0UgrAlBKARJb9Zni9vE4g1We4sPOjf/Vyx6Gm13 c88RR12nTAYQK0uurBFJUIZJv8GxXXh/EYsKaPDHr/y8tu3RHjjv2MJML7RX7ppSi95I sQZvTqnuCXB5ovYcRgVk92EwxydSgOm3AC743BYObmmv5CmNhtlvLdd2dtAvFAFjatNx 9GlKPj8Tr4HPPBTbgBPwsFudAvnkvFbE8HKU7dLp3gQQUN7mSqoTyFI/bD2di4os/RBy Gz1A==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=T39PLzfa; spf=pass (google.com: domain of fm-294854-20241111205025bc1e5bd8645d54da89-r9ouyx@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025bc1e5bd8645d54da89-R9OuYx@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=1731358228; x=1731963028; 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=rfGhCf1QxxvdEoKixMR379jq1CZ6IZGnZvvDtCNKfIk=; b=AnIJMLxeCSQ+oL6X6rDjuvI8wXiJlKgHKEM5mz9K2aiW21J/9r136D5lQ5pgDq7SLd 3fnmIIIrSqRzkLEeKmxLDbrFfdXmt53szPRxwesIyBOpSnqGFrhfJDiaZwJTqLhqZgH+ /D5o/PGOAmJ73vzrcn64CHwQFb5mSjukUBFfYtqxw6NaCn8ZHt2c5iKtbbB719okzgWS Nq+EjfMZivf97pE+h34AFoSEIhpG6n5nN9zntYb2YcnaKx2e7ctDZonOnyCPxFZL74Db TFVITYtaLT0O1aXKAe0znJqyQqoaa8Zx8dbuIgw3lPUaQfzX1mor/GOqW5k/pQio9VOj sXdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358228; x=1731963028; 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=rfGhCf1QxxvdEoKixMR379jq1CZ6IZGnZvvDtCNKfIk=; b=qRG8+Nq0Vg16ZbgXvoktVdOy1Mm8xCrWO6VtXoCBSsFQ/+xVl55XgK4Oxgy4sgeNee Wr6FyQtKmHc+QJULWhQOwYooIlF9s7tu/sTgRij2ma8QCWztxWrfzJvSL50MLSU8T7uZ GB7Nan+K+CetNL9fmhMLZjWHm7sII+/P1HVQWQgNwCX2ogL273U/Q0XLkvDmqwVUs65z vRbFJRtqm0/b4JECo+nmenPgIhYKet9XKv4t6cC2kFAvtVJ16vRAe23EmIwoRsdORB1r iszD1POg4oCW44ttSW9FxWQEiZ1l4KZY2dZOp3blFcw2sPYkuSVwDC4CLozwzzvdizOs L37A== X-Forwarded-Encrypted: i=2; AJvYcCXVEibyJWouTZ0tqJLi/NYtZSVc64yTp7eJfs4Xkd/IUp1t7JOzQatQLzG07ZVOC/aauNErdYI=@isar-build.org X-Gm-Message-State: AOJu0YxGogiYl8cz80kuYVpMlKgN06Iiv2LECg39EeWIM7JIwRKuSLhm Lx5WvJYLA4truCcwhZRC322GLH3OIjm5hGV3PXIY7iEbWMFTUtjL X-Google-Smtp-Source: AGHT+IGUuXHwuKb/luZfYpPnRwtnx0xaiS66WPF5RLugymPp5/k8fUenxPUBe+Pmch4JOVaFpghozg== X-Received: by 2002:a05:6902:2743:b0:e2e:4315:54fd with SMTP id 3f1490d57ef6-e337f8837dfmr12858311276.30.1731358228327; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:622a:114d:b0:458:1588:173e with SMTP id d75a77b69052e-462fb32295als77923431cf.1.-pod-prod-03-us; Mon, 11 Nov 2024 12:50:27 -0800 (PST) X-Received: by 2002:ac8:58d6:0:b0:460:e89d:897e with SMTP id d75a77b69052e-46309326052mr189698961cf.18.1731358227173; Mon, 11 Nov 2024 12:50:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731358227; cv=none; d=google.com; s=arc-20240605; b=kAMnFgdRhIPTkHHajfXUyoyWx3CMuGoVeGm8XXz5agbw12GXNq7zcqrzKyP+ttY6nw DnIWjygeevBE/dcNbf/biZTUP0MFyrTuOK2LO4FQKcKTTzxwYmj13xcSyaVNTskoOVqa h5899HrGwAbxTEkgdm6wn+YsZMWg2zNGUwkz0XBkv4p8idXcC68WuBc5sUldm6JCu8Lc c3qaPTXF6kVyAPoYkBAL/jsuXBssNzVVfoaOG5pN2i4VpCp/A2Jcz7lJPuDQBH6uqhJE P+O2ivoUqqouPVMp2RGykTSUUmRio0fhIV2Lccks7kz/kAV4t9KFBj2cKVqUthpx5OEB dQ6A== 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=ZiPCWu8L+h5kaMuDDANyuOSyTrkTcQCPHSAbwI+BD5/62BiP9FqnGZuIk/bkCyiKYW wsVTrUp68lSuee3PCdmYnX8QGljLf//SPVrpy9lLvWT2ipw3oHw8oogJNz+VuyhmHfi8 mUsLyEe/0Yc8H4bqxWKR2EgR5ZvvzuhLoxXRcbKz7CxEhcfaLmDH3CIye3zq7PyXqDyU XimW0QM5CqlANq4NRzW0R1jR11urS4J3ubExNlORMRNZsQXJ+OMCF0iHhFBBQF47JRwa t/0nRdVJ6MmdAlUJg7mXIiRI57J33ZHR6Row7w1vwu8DQBfhC186QQZaPyyyRnS8YjSQ KhCA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=T39PLzfa; spf=pass (google.com: domain of fm-294854-20241111205025bc1e5bd8645d54da89-r9ouyx@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025bc1e5bd8645d54da89-R9OuYx@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 d75a77b69052e-462ff5b59casi5080641cf.3.2024.11.11.12.50.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Nov 2024 12:50:27 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241111205025bc1e5bd8645d54da89-r9ouyx@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 20241111205025bc1e5bd8645d54da89 for ; Mon, 11 Nov 2024 21:50:25 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 4/7] initramfs-isar-example-hook: Convert recipe over to new hook.inc Date: Mon, 11 Nov 2024 21:50:21 +0100 Message-ID: <780bf2b1ace9344af7834997088095d1e1500179.1731358224.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=T39PLzfa; spf=pass (google.com: domain of fm-294854-20241111205025bc1e5bd8645d54da89-r9ouyx@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025bc1e5bd8645d54da89-R9OuYx@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" }