From patchwork Wed Nov 20 17:02: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: 3954 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 20 Nov 2024 18:03:15 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f185.google.com (mail-il1-f185.google.com [209.85.166.185]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AKH3Dtk006936 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Nov 2024 18:03:14 +0100 Received: by mail-il1-f185.google.com with SMTP id e9e14a558f8ab-3a7776959fdsf26504825ab.1 for ; Wed, 20 Nov 2024 09:03:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732122188; cv=pass; d=google.com; s=arc-20240605; b=kVsPOj3mBI/zAhQuZHN9P0kJ4oNGBc8WrR6fSrGOsuLwF/jawkU0wWlHPzbhoTLFgb TNiyj3d5d16DLTg8hGsN+BRZX1aW1YrIBzlenV3zgaEmsQLbfPYwrapwKFLMu/r79ZiO pTPmTcc934yEHrLQBws2v8q60SXzzGY3D04daSI2uaL9K2B5soM7afFj0RuGBb51zJOm ZvU8XxJt1XOPlJcaWlyst1fgpwShFzNsaok6sjxVSNsZJYVN5/6kfGwsqa6Zl95MJuH0 6RWTz0+TaCfNKKM7S4KdhP0juqm7EwwfCjBwhtXNusqQssC0VkFsFDvQVeBnTUXN4aFd dNaQ== 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=Y+dDoFa9xPv7fsejXBaHlS3IwQCec6S8LXz92KTVHtI=; fh=ZW+vM47bX0o4nJGs5Iri0Y4MVKlqfWZRkz18FX7u4fs=; b=Q1ccyPNK+M9WrIDSSGKyK3/UVFTUwwNhpvfyU+S1W9ry3bU+Hj+MtdGumHOzj9pnFI y3C9IpTDiFJYU3rAaemnMhJkU6BcajJ1UKug8SU1IZHMvfqJg/t3CfM1MvrixnMy8q6j pHK7Af+2xA2TRYSc9ZS7DZzE8AYuY55Nu4rd6HHA3FXuN2NIXC4HmxAETwbWJeN2h+0P mmDXw6QMALETcGEetJX8f+twP/OnrglGG/7CZ7RqfMRLC9P5xmGJ6NEDkMWNkC8XWiRv P9yznQapjqxBuFLZnBed6u2PjaK3GzlslFVKHUZ/Q+iG9H8VJPG/7zpaLZhKTZAhqoLa q/BA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=S2gITWUH; spf=pass (google.com: domain of fm-294854-202411201703029c1639590a1bcd864a-g3cphj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703029c1639590a1bcd864a-G3Cphj@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=1732122188; x=1732726988; 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=Y+dDoFa9xPv7fsejXBaHlS3IwQCec6S8LXz92KTVHtI=; b=eG9SgZxOm3FbgqJFru8JUpupgqv0ErSeFaPXy5dF5oRljm83tQ90UvQrMlXuNRv/gV KLFE7mQNVCJLQHjQ9exWxc3dy/ggEoAVPlbkJDmgpwnsDtLL7mZ/jFp0Qvc99yXTgFT8 E53jGoYqBp2l+2WGA1eh6SY5Amlr91xTsqh8KGrDliQKgCQ9kbvmSQ+7o2C9RXkwLTOJ IDxu6o3Odwf0A8EmJ6uBlQ4T47CFI3sv8caPbl4eCYUXMFItqMLZfqPuwKSDRIWZskAO 8wesJQOU6vCRb1EZ7A4PxaYQAQNO8WRCIYEoVBbupH8FVyQxf0sVwV2ZHd16IiISd6Pu 0+cw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732122188; x=1732726988; 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=Y+dDoFa9xPv7fsejXBaHlS3IwQCec6S8LXz92KTVHtI=; b=vPvKGSWjOOGG9WpZwGGy8JMMeHis5zRdVsL0CTSg/5WU5oVIxiP0poWhX+bSwVIOsb CIabClQMZexAoUq/j+8EntMafoHGXzw4Ul4G0ypvry+VOhhJpA0DCB/QA8BZBAoyeekk 1QVfFyFbtnqw8HLBUEPcuR3ygSEdLblRW84XvLA/fDB06wz4CKoFrsj7I7+cSZuY9/rj kOk78xyG++GQN/OuNhhSt24ibJfzF9YrUh+zDLzG6jL3hDI1Erfb00pSldQj32f46Zh/ 5Zgp2JsNEDqs/rgA7Cwlq/6DaD+ymkNkUHer+lY0iegAldK7a42k9tYTGbZfhwmy0juM T+1w== X-Forwarded-Encrypted: i=2; AJvYcCUEASX6IpsA1gLjj0oJLrl1CPAnVY2kyu2Gk7iaoMCGDJVW1TwwOel20YvCJYfOEHacgc1fvpE=@isar-build.org X-Gm-Message-State: AOJu0Yy7Dix2SIoRXYD00TBDEu66xiRj0S9A1AP7uzNB5ZnZx0DHjk3S CMN6WuQapO7wjyv8FMpIk5y1xCZAiOKc9X1F98zRGOzyzxpA4qjZ X-Google-Smtp-Source: AGHT+IEhex771+1hYKrYC3cX/5njdWQh/FWxQLyVZOBEWRteGYaJBwpK44xVJ8jphKeGrjsYsZoBSw== X-Received: by 2002:a05:6e02:1c22:b0:3a7:8ff2:2849 with SMTP id e9e14a558f8ab-3a78ff228abmr2544535ab.10.1732122188128; Wed, 20 Nov 2024 09:03:08 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:3093:b0:3a7:1f66:5837 with SMTP id e9e14a558f8ab-3a7903c44c2ls54835ab.2.-pod-prod-02-us; Wed, 20 Nov 2024 09:03:05 -0800 (PST) X-Received: by 2002:a05:6602:2d83:b0:83a:95fc:b242 with SMTP id ca18e2360f4ac-83eb5fefbc6mr350378439f.7.1732122184830; Wed, 20 Nov 2024 09:03:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732122184; cv=none; d=google.com; s=arc-20240605; b=kRTboGuMpvDboRtNMV2dZoejPnlsqzYVCGW4ZTKmhzqWBTUOhu3h3WoPdJjDx81AIm fmoKNgyGMuQkAxvxpdE4TdLyNoW39CAOANIBMh2feWRXU0mLPHrCo6pqG2IuWCCSpFFf luc/mQ22uvmUqGOs7dAQKnhU5VIhZkXiyFxmvA8porrX2UaD00ghCi1oMI6LdaMkITpN 4AOoYZSKeEgcd4zqNrAlIel3mvxB3dUJHKWQFNCzLTXXNg2sBdGJ00b+yOxEfCGOFZQ+ knK6Q2cDzkvvGCafGW8R96ug6agDVpesnqIx2Y6N9npQCqjiyuJEJT6CpIFCZ2pEf8L5 4rjg== 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=XYPMEJ6ctB2tE56HftF0WEJZ/IJJ/mr/T6f7gVSZaxUw2+iSHQqTYSgFGIzqCdW6lh q7qkSMhP/M9k5bTfI6jwNMoHrWCsWHNqMUaX/DqyjHYnRhd5bkgO3VSTqVWztmIj4RWJ 4NNPyKP5dqitLG1be6woGD+Dw2Eki1p5RLwfbAImy+feQWQ0gYE/iukpO9AD61K7cU+G syWQmvFiuPUPV/XjGFOuGHOBUTeJgIyb8SxcVgCQZwfn9+OPO13CJOR6bmsyacQOuaHe wbe7RAgLHAhkpmH+yYoqzu7Sq8GfVsaYMnAazCRQOhYUy7xDbTyW65embQ5xiTuzjqE+ yOZA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=S2gITWUH; spf=pass (google.com: domain of fm-294854-202411201703029c1639590a1bcd864a-g3cphj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703029c1639590a1bcd864a-G3Cphj@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 ca18e2360f4ac-83e6e12036bsi49320039f.4.2024.11.20.09.03.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2024 09:03:04 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202411201703029c1639590a1bcd864a-g3cphj@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 202411201703029c1639590a1bcd864a for ; Wed, 20 Nov 2024 18:03:03 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v5 4/7] initramfs-isar-example-hook: Convert recipe over to new hook.inc Date: Wed, 20 Nov 2024 18:02:58 +0100 Message-ID: <6c191d6604638d20238be879ed546176bc3d040f.1732122181.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=fm2 header.b=S2gITWUH; spf=pass (google.com: domain of fm-294854-202411201703029c1639590a1bcd864a-g3cphj@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703029c1639590a1bcd864a-G3Cphj@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" }