From patchwork Sat Nov 16 10:55:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3937 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 11:56:11 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ot1-f62.google.com (mail-ot1-f62.google.com [209.85.210.62]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGAuAkY013710 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 11:56:11 +0100 Received: by mail-ot1-f62.google.com with SMTP id 46e09a7af769-71a3da16d58sf2401690a34.3 for ; Sat, 16 Nov 2024 02:56:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731754558; cv=pass; d=google.com; s=arc-20240605; b=kPmt7nNsCSd8MB08A3mt1B70+iZe0yLQBJcM4sMVhzAdNMP2JHZORGfPWd0Nxh3S9u e7ACeZvv3mH/Plyo+0pKrWuykZ/mP65EjDXZnOSvP6aWezSFAQnu+k/nGVahQCfoKmBg jd+iX0X38BNDhSTsSNq/dFjXCjftho/ZjmkRBzXMqxvj4mNh5RBAGV6T78JtgrwWzmuH qHErFi3CBEqPwJsSAp/IouT6NiHFhhaMjh6FlWRlreUEp+EoqHRLEzXOS84vG2wD67fg dcssZvWW8+TrFV6IFXRrg5fWDbI8ZaUmOSC8Lr5K7sDBnMx0rOZOhf719P8mGhobWiI+ k+NA== 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=b1fZ+HZGnGHWDD800wGNVGqqSgWwacmbBAx/BtYzwVQ=; fh=fKsOwWZDlNqnWPJDy7CT9ggL0bvHN6GXXuSxxaDNLAY=; b=GKMXHILu8YV9WmFRIcZzA/5/X7Ru0STZTzbdYWshl2rt2sVoJYSRa+ku7Eu2jTo3nw 7V5eBGHzXj1FYKoHdSS16LlNKzz5rHogB3hn8Er0yWocM9fpftoIDknLy0t7LErOz36B BTg6JzHl7Sae+ZagPtMu8H7g5sBpTN4UepnnxC59KEI2OYkXfC19s0sKMzMMEex2fCcX bQXSbGFGWzXEdVeC6q/kkCnP18YnMvOcYzEJH/0qxPFt5WHyCV1d9CHy7Lp9tcDY4CIn /dE45MqjQbdKqQ0cnY3cYz/PSdg+9zKB9gALkxYsPdsbyTLfVWKm82nT/xfgQT6jBXjA FHKw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=aPfLmOgi; spf=pass (google.com: domain of fm-294854-202411161055541b2c2751a2ad5379c0-m0dy_c@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-202411161055541b2c2751a2ad5379c0-m0Dy_c@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=1731754558; x=1732359358; 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=b1fZ+HZGnGHWDD800wGNVGqqSgWwacmbBAx/BtYzwVQ=; b=ApoKJUrUazZzf/kONIM+jezUjNlNdwGtHOWrYgZ6JQkISmmH34O1JfDTe3hihKx4wy EGHZf/YZsoDdEQEFnMyA/xSl3G9mZUWaAY9Ag141uRTVEdytZTH87IYVaHfHCCoeRwZV sFPV8ZdJzFNGMvjCCW5O88Y2OB/dCnUejC67X+YqCPZiw06gP8NLcGgHM8ExwwvwwRok 0yJ+VB8Kx3fDqmFneyTQNjxOoCYbjvVvWBgWl1Aruuu/aZqPKUc+D6CEj0+IuIzPHEQE SgRSiN6BUtARaJ0kMOlwAEuCa6A7OkQ8Rir4sCBgvP0xFwH75lL0ALM241sJ7TfqUHyd HS5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731754558; x=1732359358; 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=b1fZ+HZGnGHWDD800wGNVGqqSgWwacmbBAx/BtYzwVQ=; b=Ojsa/Q5HwrLM5O5iJ9Yrv49/z9P/tRZ7ZyWnPOa9v6Z6yIxrkg9nJbTmK9+TwpXUCT g7wtXK6bEBKidw6aNJEoDMYD0zINZbzOwRbF4drDK2Mw40lsfzfscDc25Wzqo6EfdlUa gz5LBplzcuEDTdR6WJ4cHKIFOzVeEc3vipz9a+FT4wIXnCC4LnU2U2TtsLL0Q7oG4O2P Mza3i6anoLMTzaa9iXiStv9/n6rvfNKRFJcxgRSaQLYW+Nu5KOPl518gwIaOhR7ocXWs EfSrtUZkPI6Sum/k4MFnXaM4vb5hQQdHk9BM3oSb5siciOvkRmpEX50oYuZPBy72gUTG fhKg== X-Forwarded-Encrypted: i=2; AJvYcCVTyEyHFLM5hcJGJPQlrJaTyA8ZOIrAoPcck57VSFMPJi6IwgQoNSgkIExxDEW0ZFLvnJocOs4=@isar-build.org X-Gm-Message-State: AOJu0YzpbBYmKAT4/KvlxO9OraIwRvmEq4bW0aUrSDvzdgMM5mzi913e rt81hg7kRtLoXUYx0jVPx15u4bfn9nxznUUHOh7/wP4YZV4YRYWH X-Google-Smtp-Source: AGHT+IG8Gv+Kbu0XyGM2Kj6pYY5RRUD/GL11+PPum5pZzpjSWs3QUDfrZAnKZp1qL5e80aBOfFw6Ww== X-Received: by 2002:a05:6830:6006:b0:718:99fa:347 with SMTP id 46e09a7af769-71a77945314mr5975807a34.14.1731754557753; Sat, 16 Nov 2024 02:55:57 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6820:4cc1:b0:5e7:b0e9:85d1 with SMTP id 006d021491bc7-5ee9cdd1ef4ls2207413eaf.2.-pod-prod-08-us; Sat, 16 Nov 2024 02:55:57 -0800 (PST) X-Received: by 2002:a05:6820:1e10:b0:5ba:ec8b:44b5 with SMTP id 006d021491bc7-5eeab419c20mr5340068eaf.3.1731754556885; Sat, 16 Nov 2024 02:55:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731754556; cv=none; d=google.com; s=arc-20240605; b=jWKw/pPqQk/L0JwT8Udc86gLC5+3r669Iq1CqyqyF3ni2fZEkwp6Jlf36Na+fJgwd0 lvgGh/21AC8SLoBWKJEIqMUtG/DaSMwrRSE0u1DqgmA4e7VU4A+Gm9itYnd0u4LLqE2d Ac1SpBE2GWKUa9soECTvvzTvticLghCKP+V+qvxMcx2g4nFpyyiuf8Xxb9jZHuJc7LuD g2kiSeCknaXuanJ9vqBPjqeSDhshVfqH1PYprUsfb8f8x7lTHjZUFu0u5JnXYY2IsQER ORIVIpGh76UZXXcIoE4SxJRyIQzLq9NXG/a7fP9+3Rp+zJDM3KC6uGDVcjLE+QcDjUL/ oMbQ== 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=dJSdGisq9YNqBEx2X7jgCXfYZ4doFx53le7VbTBqjPx7pSoUYbEENoon6sew2woRPN SQMPlbZSa+Rig48gROT2ZQgfSzkn2kp9y/t0575OindfexCZekEwoBE/Qz1/ZYRku3eP GR9Pzr1kKIdkZ3cZEiYNK6sNQZ7bW0bl8DfvTHdGu7WtCUTPdT9S/c5N/jeuURoHS5Iz gYIwipcOdQgz+ca9LHFhmnkCgo9Ou6A1tfwcfiewqQANvVPj2q6lgrRvzbdMga5ChDvC M9kbw6wU3ZqyxgM4HhEg7W5yGP94CiunstkuJ2a4SFg+td3iSYYfzklez93KZ48lyTJ8 6YZA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=aPfLmOgi; spf=pass (google.com: domain of fm-294854-202411161055541b2c2751a2ad5379c0-m0dy_c@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-202411161055541b2c2751a2ad5379c0-m0Dy_c@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id 006d021491bc7-5eeabd10970si164677eaf.1.2024.11.16.02.55.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 02:55:56 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202411161055541b2c2751a2ad5379c0-m0dy_c@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 202411161055541b2c2751a2ad5379c0 for ; Sat, 16 Nov 2024 11:55:54 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v3 4/7] initramfs-isar-example-hook: Convert recipe over to new hook.inc Date: Sat, 16 Nov 2024 11:55:49 +0100 Message-ID: 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=aPfLmOgi; spf=pass (google.com: domain of fm-294854-202411161055541b2c2751a2ad5379c0-m0dy_c@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-202411161055541b2c2751a2ad5379c0-m0Dy_c@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_H3,RCVD_IN_MSPIKE_WL, 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" }