From patchwork Mon Nov 11 20:50:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3917 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:40 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f183.google.com (mail-pg1-f183.google.com [209.85.215.183]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKocnn014871 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:39 +0100 Received: by mail-pg1-f183.google.com with SMTP id 41be03b00d2f7-7ea0069a8b0sf4107452a12.0 for ; Mon, 11 Nov 2024 12:50:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=H8jxzHQxPDUK8DfJBRYmwI+4UqYXtLgIiB5P/Xr8g6J328T1UbSGU3ExsrbCgQZ5VB jR4JqESHsbwzs/3LNo1Gkd7JQYrH4O0G7cyHGtM9zfkc2Iz9weinlKFcKocr97495wG2 B/kW/Q5bnDJnOkp/mMg4u9lAhz+Lk1L90xCiizLIsB2yFWZn8h9QCvdr9p4ZsM87zO2S Ir/8Kax2njavrExFti/We3aVMb6+h/w1mxiOFGL0zq0LrdCaxPbqPn2RfLgfMRvn70uU 6VwL1T6lmeyx8uHBDN2hxiu5AT0WFL7DQB3rO2FOuNX4ehVM4lJvx2tOWAWpDVRAPHfq nCQg== 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=Pe3JLq9PvGcg7pLbo6vQXJXa68LjxYeiFSBHDOG0cqM=; fh=6erkcYCQp7GLnWFhJl4jLTJQPY7OJy44WtmvsgdA4b8=; b=Ge6mpuoG9IsRPr9HFyYDk5ONjK4nG/ansM/MNH/IorB9oyUrz083iu5ygsd0Bsyqfa 4ufFPaR0oF3bXgnZK2y7oFnNHd9yhsrEcH2qYPkjRvk+8oE5nXwiXys9+QZjMtzw4BNp nDLeeRm3rowyaNxxx5dARH8NDdTeaJ+aCNSZqgQaFH2+BBpuBgZHz+KGsBZNJt4FIe3h 6WGFCJUO1NIzPBwCoWqnwA/qGlK3iGCOiaTIJwBt8C+Ulbo90WyoxjedgpnH2VwwBq5B rRi9zWsmLJJMALIE5+EbQFSEaK7EF9ceq57dse5KrZutqe01ELl8oTgpXHXyC1Owgevr /Q3w==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CidoKSHo; spf=pass (google.com: domain of fm-294854-20241111205025b6a977e253c3078f27-p_jmbz@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b6a977e253c3078f27-P_jmbz@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=1731358229; x=1731963029; 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=Pe3JLq9PvGcg7pLbo6vQXJXa68LjxYeiFSBHDOG0cqM=; b=cOzsPDFFeGHDaQxBDR9TzaVr7uSZqKdkZVFJ2bwG1QG8tDH7ImRmhTTsoRcYgBvgFE rx6WM+9sHgTBM09qw+j/8eQdS5RCMh5RW2gIuq18dGSd+JFzbQ2Fox7RPs9XVjPcNCK2 H1RccxW4pULD8Xid/n7Psk28TNH2qxEwq5okz24W7kPp3PO+VoyALJSPVnBwHUZHmbbZ WA+1NyZXyroKJ27z5YU23FFGgcC0iy+5D9zXkLV9LBAitlqK5F1Xuj9lRlLid8GPSNLE 0ipP4gQ+RI7KdeBeBAz5TKRNE37zA4Vdxv5ntB0aeGCVg7x8wWftt8fAQI6h43yZuBkn H/7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; 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=Pe3JLq9PvGcg7pLbo6vQXJXa68LjxYeiFSBHDOG0cqM=; b=gOOW9HmGJNAJ5K9BeaBSX6RTpvkCmaF0sRo8YDmxRVySR+cfz4PMKJRLXfR5hU39f/ JI9dJDhvd/A16WWzyb7njo5ktgWQcl2Xurzq0uYG5w4WjE32TS/d+yi/0E8rRkB8SzYV UwzXer9vFoZoAIKiYsQcuUdQBMf3+eZ4dvu8q/CIbWZJl1RDPx0ScQLTkGhuBU4+rRTn 4eIguISJJiAOsMu6kU11aC0OsZLqe//RYlK9pN+5OXw0LHuy0XRWdZSFOPLa7mB0I3xw h9RFgbcrKQNizM96E/UScGGo8rIY+1H5yjyg8nzzfffBVMvCNaT0RE8tS6HOIXuCdmzm sdQA== X-Forwarded-Encrypted: i=2; AJvYcCWhN4p5IQViQf6pxMiBSVt5bySrkz87c7JRrVphkoOTLZqjpo54vkbHLF11emLbh65XYadsitk=@isar-build.org X-Gm-Message-State: AOJu0YzSF0DU7Nnycfl0JGD8hQk943vip9CSSJV3VdNXPZmdkNW7Gxnn UD0p8FySU0ISnUEWe1VzdS3kFXbW+Yw8dBRBEeyxNxt3zotqZNPI X-Google-Smtp-Source: AGHT+IFzyiE2UiqS889gw3qXSX1Iyaf6aEEyUggS1Lu7wSBTl9bnNqjYT3po1Y2AlVAfSlswiYGsZg== X-Received: by 2002:a17:903:1c6:b0:20c:a19b:8ddd with SMTP id d9443c01a7336-211aba2a94amr1003715ad.51.1731358229382; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:3841:b0:2e9:b4a5:8590 with SMTP id 98e67ed59e1d1-2e9b4a58be5ls750231a91.1.-pod-prod-01-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a17:90b:3c01:b0:2e0:db81:4f79 with SMTP id 98e67ed59e1d1-2e9e4aa86bcmr463184a91.2.1731358227962; 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=cfo6rQr1qjaDO7B3naEDZx5NyrmLn6UA1w43HaCk9pRSwrtt59luuFBID+VgaHj8g8 TayBHLTTsyR57oUmN19WpPlCNScKEjQrE4vJdI7L3sj9gurQiHVLB8Rg3UmOPw2hlLB0 d8sfYuTGyW/pGXyIVuKXzch795DLkBIA6UuNiEmD+AsaQQf7lnlyr5wgBDgn0Wpx8Yqs sXjLF1b6f1MPtg6Fu8IKG2G8uCYLyMtRUeKczgiSZqp3jIyiBSTUoD0dMvuWpxtXkhKP m9fpatUzX2G3gEbTQIRDbyuQnjVHjy4ZgSCLT4KKyBUr06hArL0lhEHm4pFDIweJcA2C BEHA== 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=5suEqm6pVSLa/ArbhlWF4UYRLfnkMjT7DxjtmPc4baQ=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=R8USPyIcq7jwNrqtMPJBSR+aWcPJmsQJia/20ci16xoTsn0N6Z5VUNjtc2CJ4xvHCV sK35GyP2pkPqWHC9R/UEsMxTxPzLf5lywXXv0gmCEK0L0XoL37WJYS0FUfXvI+67kLio OmWIN4KDTorZYR16DzlCssJlo6+eiMhJNWr1wEu/WyZ33gTGbPKtK3ZAC8qP8EkZNHI4 uc31B67o6P04uytKio3z605GRq7gXn246fi9cHqBB8+8Q95JFrlUoI5DYowoaraYzYSc WOkZ/h+s/MKU4lIoaogNpSmAFTYUKrvlglIeKopB8t328b7IQ3kCRPyHjQm4QgXwZAjr MEYQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=CidoKSHo; spf=pass (google.com: domain of fm-294854-20241111205025b6a977e253c3078f27-p_jmbz@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b6a977e253c3078f27-P_jmbz@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 98e67ed59e1d1-2e9e34ae273si28452a91.1.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-20241111205025b6a977e253c3078f27-p_jmbz@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 20241111205025b6a977e253c3078f27 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 1/7] initramfs-hook: Add infrastructure to ease writing hooks Date: Mon, 11 Nov 2024 21:50:18 +0100 Message-ID: <934f188717e95b8c019736e4546d57e90a247327.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=CidoKSHo; spf=pass (google.com: domain of fm-294854-20241111205025b6a977e253c3078f27-p_jmbz@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b6a977e253c3078f27-P_jmbz@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 xxx Signed-off-by: Jan Kiszka --- .../initramfs-hook/files/hook-header.tmpl | 39 ++++++++++ .../initramfs-hook/files/script-header.tmpl | 26 +++++++ .../recipes-initramfs/initramfs-hook/hook.inc | 74 +++++++++++++++++++ 3 files changed, 139 insertions(+) create mode 100644 meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/hook.inc diff --git a/meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl b/meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl new file mode 100644 index 00000000..ee30d691 --- /dev/null +++ b/meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl @@ -0,0 +1,39 @@ +#!/bin/sh +# +# Copyright (c) Siemens AG, 2024 +# +# Authors: +# Jan Kiszka +# +# SPDX-License-Identifier: MIT +# + +set -e + +prereqs() +{ + echo "${HOOK_PREREQ}" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /usr/share/initramfs-tools/hook-functions + +for module in ${HOOK_ADD_MODULES}; do + manual_add_modules $module +done + +for executable in ${HOOK_COPY_EXECS}; do + if exec_path=$(command -v $executable 2>/dev/null); then + copy_exec "$exec_path" + else + echo "(ERROR): Unable to copy $executable" >&2 + exit 1 + fi +done + diff --git a/meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl b/meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl new file mode 100644 index 00000000..faa1a644 --- /dev/null +++ b/meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (c) Siemens AG, 2024 +# +# Authors: +# Jan Kiszka +# +# SPDX-License-Identifier: MIT +# + +set -e + +prereqs() +{ + echo "${SCRIPT_PREREQ}" +} + +case $1 in +prereqs) + prereqs + exit 0 + ;; +esac + +. /scripts/functions + diff --git a/meta/recipes-initramfs/initramfs-hook/hook.inc b/meta/recipes-initramfs/initramfs-hook/hook.inc new file mode 100644 index 00000000..5509c074 --- /dev/null +++ b/meta/recipes-initramfs/initramfs-hook/hook.inc @@ -0,0 +1,74 @@ +# +# Copyright (c) Siemens AG, 2024 +# +# Authors: +# Jan Kiszka +# +# SPDX-License-Identifier: MIT +# + +FILESPATH:append := ":${FILE_DIRNAME}/files" + +inherit dpkg-raw + +SRC_URI = " \ + file://hook-header.tmpl \ + file://script-header.tmpl" + +TEMPLATE_FILES = " \ + hook-header.tmpl \ + script-header.tmpl" + +TEMPLATE_VARS:append = " \ + HOOK_PREREQ \ + HOOK_ADD_MODULES \ + HOOK_COPY_EXECS \ + SCRIPT_PREREQ" + +HOOK_PREREQ ?= "" +HOOK_ADD_MODULES ?= "" +HOOK_COPY_EXECS ?= "" +SCRIPT_PREREQ ?= "" + +DEBIAN_DEPENDS = "initramfs-tools" + +def get_initramfs_hook_name(d): + name = d.getVar('BPN') + if name.startswith("initramfs-"): + name = name[10:] + if name.endswith("-hook"): + name = name[:-5] + return name + +INITRAMFS_HOOK_NAME ?= "${@get_initramfs_hook_name(d)}" + +do_install() { + if [ -f "${WORKDIR}/hook" ] || [ -n "${HOOK_COPY_EXECS}" ] || \ + [ -n "${HOOK_ADD_MODULES}" ]; then + rm -rf "${D}/usr/share/initramfs-tools/hooks" + install -d -m 0755 "${D}/usr/share/initramfs-tools/hooks" + + install -m 0755 "${WORKDIR}/hook-header" \ + "${D}/usr/share/initramfs-tools/hooks/${INITRAMFS_HOOK_NAME}" + if [ -f "${WORKDIR}/hook" ]; then + cat "${WORKDIR}/hook" >> \ + "${D}/usr/share/initramfs-tools/hooks/${INITRAMFS_HOOK_NAME}" + else + echo "exit 0" >> \ + "${D}/usr/share/initramfs-tools/hooks/${INITRAMFS_HOOK_NAME}" + fi + fi + + for script in init-top init-premount local-top nfs-top local-block \ + local-premount nfs-premount local-bottom nfs-bottom \ + init-bottom; do + if [ ! -f "${WORKDIR}/$script" ]; then + continue + fi + + rm -rf "${D}/usr/share/initramfs-tools/scripts/$script" + install -d -m 0755 "${D}/usr/share/initramfs-tools/scripts/$script" + install -m 0755 "${WORKDIR}/$script" \ + "${D}/usr/share/initramfs-tools/scripts/$script/${INITRAMFS_HOOK_NAME}" + done +} From patchwork Mon Nov 11 20:50:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3916 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:39 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f191.google.com (mail-pl1-f191.google.com [209.85.214.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKobAn014854 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:38 +0100 Received: by mail-pl1-f191.google.com with SMTP id d9443c01a7336-2112b3f4338sf54696145ad.1 for ; Mon, 11 Nov 2024 12:50:38 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=hTA6SAAmA2VtXdydIxw3PO6dkPz5vNfyZgI42exOaZvjK8CERuWQ8wB0WPZ9lZHdIn QnqmYg4lYX7oqxLAejiHjXTbnCcNn0uhM7JxhqUji7rzpTMJCpsplH5G8jfquSAPEGyE wKqrLZY8lFAZoCtl2m40tfuoqdJRjaAKufVjTevgI91QfNqj0bHL9SIRgFzaNHS0FEvd IUFIuyJdUwAqr0JUDAFtoG7/KxGM8lYqEew02whJd/4LiTE5nhllOj3GB5NztegVCh4u rg5dL1zwq8OPju6wNEwHZ3fkfOj49rOUC9w8p+GlaktPkq5mhohrqK6g6qq4gGmzYrro KPCA== 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=1WyWzHq8f9maBDFBXOegsaoUJEs8lyLb04Q1SPvGIJQ=; fh=GxCIriul0HOPRBM+b1AFlGaPvekLbNIXpVVYoEOGXBY=; b=joM35eTObxiw0L33ny1hpwS31K9lTSNpXMqFFJlGuPPoUUqtylrcUxGoVe547F8sLu Cg9I3/TeB8OMqzMAIVxXpRbasNFPscPkvG3IfV9nt7gtfuVI8t/NCRy6H9WCYzJcE50L hpcQbTMbdsAZlOmwkOKgvIahyvX4GmPojNhG4kdJeg8+8TKgG+JakW9JXyh+BhISQmBl FuBBtPyLgnBFYHlm2HlkUhkAwujoVg7it8WYUQeY9/ZqPeI+jZZS9Rd6o+TYIc9A//ml RN6BnYMhOBHhgOBSsxCqZr9UB0XuSwkhh47zi8fmzWLUKr90G1aDGrpB8Vjs2JFKvgiQ fNnw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QIDvwRke; spf=pass (google.com: domain of fm-294854-2024111120502561300d664ba9a22c0d-bzrkfr@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-2024111120502561300d664ba9a22c0d-bZRKFr@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=1731358229; x=1731963029; 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=1WyWzHq8f9maBDFBXOegsaoUJEs8lyLb04Q1SPvGIJQ=; b=ODuKeFW4rj/zj0PgU4LT1YRoEA2MPjo5pWUKt9S/ebWvMfR0ZIOYVrCn1kl+sbiYca jEHvp5VTlfpU8oxDsaIkSNLXBfRczWs0I6vH0kaZvrgdDPNj1uuKSDNHmGVhcDwjYInO aZd2YYQNdeI1s8dVLblL+nzp28t/mGX4itxtzHLWOjPbR+nlX5yg5HWIao/wddz2wM3K BA47yCSEr+aCGtjemW2ujQ4rnbuo4uku3fcT3RvSbjiiVCXgDx6keA7P62PF6BV4X1FV BpF8wDeS3MTm06WZQY9M603GcMsBhTHLHy5PbKCcmqT13U1fLO5oZ4ZtiEQ5YVkTlq+d Cmww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; 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=1WyWzHq8f9maBDFBXOegsaoUJEs8lyLb04Q1SPvGIJQ=; b=Nyd5wQZAy8DehzKmmoX1w7RHJcwP2qSTnsyAWe7t/4tlmeWKudFnmgt66JXyQUNY9d sPCq9XHm5WftmSO7aldaP0haX08WZGtw5zvBXelETwEoxWdrMzrGIK1fbTYJX4ttlAFB RSJI8OUpOkNjZPNu2C00Ch3PEq37eTsjvxpODiXb9pAJZaiuUwxMQSAEyp/O3RysbcZL 4tYyH8W7pvwa+WrTIgDw6FlTpQhYC7n18Z6P0I3QDioGP5xlimtn+MWKKOM5QwdHkBLL if2aih7l7Wd6HXLOoXpQHW1HkNxGvh1s/ZwD8yWWZY3GW8minKEtR+Sl2vAAPxvoNUML RlGA== X-Forwarded-Encrypted: i=2; AJvYcCVQdtzx/KhuSjj92pDlDNWIFrPmYhUYygMTQ2G+Akxkyai2f/cW7JomaJzqYjkIzXcwSWyI4xM=@isar-build.org X-Gm-Message-State: AOJu0YxtA76u1X4ORLoyj2wwlpGdAoK5BCY5RdDFC5YghHsOnazPRI5i NosJweNAj+lsIPDb+Rx+b4Ze+MPKV24M5e5FyUkQ+ML96N5WBnw7 X-Google-Smtp-Source: AGHT+IF0xQZgZcMzx3NVIPnJiJ0LrAq8oS9dXy2dTlD7tvrUhUVaWiQ9eELXDOt66vnn+os1Z+aPvQ== X-Received: by 2002:a17:903:2391:b0:20c:a1a3:5373 with SMTP id d9443c01a7336-21183e72361mr139663835ad.55.1731358229238; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:903:705:b0:206:935f:fa6 with SMTP id d9443c01a7336-21175212582ls19108155ad.0.-pod-prod-05-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a05:6a20:840d:b0:1db:eb56:be7c with SMTP id adf61e73a8af0-1dc22b1b74fmr20694718637.35.1731358227777; 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=TFGGMAcUlkNKPstKXgDMhiq+OeP+dlP+jeh1EnR6qvsF5lgpnfotGA7CgLy/mDnzkd ej8tU5hONnp4XD+eG6Fg/GgIzxKzqyJbRpEUAH6p6vU394mvrIW3qA/eJ8BvpGHcvXUl mlh6H6WCf13jF7cHNl5bpH7hdJsW5Dou5J20pIFJIu9avHpcE5xzeZKslFvSgzNRvmfk R5fodeOwIq4TKkEzSY598z4Cgg5MNTPiLY748cuUKNFRUkZY6kBAibn1PeYr2PggJqro rhB/xVUGnayB4dNVhf8Z9Zaq4o75J6rW/3xNf1HCF47nb83ysyuPm9BpyFExm/u8kZ4f cX8g== 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=n621mkuUmvw8m8MLoY29oSN2pW6Rijv5zGOUEr8NoTY=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=jeagLzUOjYbLryrxLLIB6VpKIQaXXz1PFiHATC51EoyH/7PtVD95jq2r3FO0rZMOAR JWHbHvU0nXSN7NOdNJuk+hsF8+y+8RCPcSorCGk0lzIXmp199IgxweyJQoJBxIxgLglu VQ/lCInxp9peDCgz+sxLofgJujVJZALQcIfguxwSMFVaIWytNACpyXuxHLddnEJk/PeV q8DTpjOqUUuWxflzh3zn7ChESTurnhqFIg4yKJJe5lRyHACg3sPzokqwMNloR4sf4Aq6 FyyX9yQh11SXrEwKj/v2GQPERBDNg7c3fr+MTpgsRfkBWR2ZvixVIYu/b/uknhRiTSR/ NMfQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=QIDvwRke; spf=pass (google.com: domain of fm-294854-2024111120502561300d664ba9a22c0d-bzrkfr@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-2024111120502561300d664ba9a22c0d-bZRKFr@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-225.siemens.flowmailer.net (mta-65-225.siemens.flowmailer.net. [185.136.65.225]) by gmr-mx.google.com with ESMTPS id 41be03b00d2f7-7f452cf952csi95856a12.1.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-2024111120502561300d664ba9a22c0d-bzrkfr@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) client-ip=185.136.65.225; Received: by mta-65-225.siemens.flowmailer.net with ESMTPSA id 2024111120502561300d664ba9a22c0d 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 2/7] doc: Describe initramfs customizations Date: Mon, 11 Nov 2024 21:50:19 +0100 Message-ID: <423377b14db0f2acc9534af4f8f436fc862accff.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=QIDvwRke; spf=pass (google.com: domain of fm-294854-2024111120502561300d664ba9a22c0d-bzrkfr@rts-flowmailer.siemens.com designates 185.136.65.225 as permitted sender) smtp.mailfrom=fm-294854-2024111120502561300d664ba9a22c0d-bZRKFr@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 Document to new hook.inc as well as the preexisting initramfs class. Signed-off-by: Jan Kiszka --- doc/user_manual.md | 54 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/doc/user_manual.md b/doc/user_manual.md index 284847c8..7e04c7e8 100644 --- a/doc/user_manual.md +++ b/doc/user_manual.md @@ -1600,3 +1600,57 @@ CONTAINER_DELETE_AFTER_LOAD = "1" SRC_URI += "docker://debian;digest=sha256:f528891ab1aa484bf7233dbcc84f3c806c3e427571d75510a9d74bb5ec535b33;tag=bookworm-20240701-slim" ``` + +## Customize the initramfs + +Isar supports the customization of initramfs images by providing an +infrastructure for quickly creating hooks and by allowing to replace the +Debian-generated image with a separately built one. + +### Creating initramfs hooks + +To create an initramfs hook that adds tools or modules to the image and may +also run custom scripts during boot, use the include file +`recipes-initramfs/initramfs-hook/hook.inc`. It is controlled via a number of +variables: + + - `HOOK_PREREQ` defines the prerequisites for running the hook script. + - `HOOK_ADD_MODULES` passes the provided modules names to the + `manual_add_modules` function during initramfs creation. + - `HOOK_COPY_EXECS` identifies the source of the passed executables on the + rootfs that runs mkinitramfs and passes that to `copy_exec`. If an + executable is not found, an error thrown, and the creation fails. + - `SCRIPT_PREREQ` defines the prerequisites for running the boot script. + +If the generated hook script is not sufficient, you can append an own +bottom-half script by providing a `hook` file in `${WORKDIR}`. It will be +appended to the `hook-header` that the helper generates. + +For running a custom script during boot-up, provide a bottom-half file in +`${WORKDIR}`. Its name defines where it is hooked up with the initramfs boot +process: `init-top`, `init-premount`, `local-top`, `nfs-top`, `local-block`, +`local-premount`, `nfs-premount`, `local-bottom`, `nfs-bottom`, `init-bottom` + +See https://manpages.debian.org/stable/initramfs-tools-core/initramfs-tools.7.en.html +for further details. + +The hook recipe should follow the naming convention `initramfs--hook` +so that its scripts will then be called `` in the generated +initramfs. + +See `initramfs-example` for an exemplary hook recipe. + +### Creating an initramfs image aside the rootfs + +To avoid shipping all tools and binaries needed to generate an initramfs, isar +provides the initramfs class. It creates a temporary Debian rootfs with all +those dependencies and generates the initramfs from there, rather than the +target's rootfs. + +This initramfs class should be pulled in by an image recipe. Said recipe +specifies all dependencies of the initramfs via `INITRAMFS_INSTALL` for +self-built packages and `INITRAMFS_PREINSTALL` for prebuilt ones, analogously +to the respective `IMAGE_*` variables. Note that the kernel is automatically +added to `INITRAMFS_INSTALL` if `KERNEL_NAME` is set. + +See `isar-initramfs` for an example recipe. From patchwork Mon Nov 11 20:50:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3912 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-oa1-f59.google.com (mail-oa1-f59.google.com [209.85.160.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoZCi014824 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:36 +0100 Received: by mail-oa1-f59.google.com with SMTP id 586e51a60fabf-2885c5af51csf8111211fac.3 for ; Mon, 11 Nov 2024 12:50:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=Sjif1meQi+SHq87WTpj/GgP/Z9qwYg9iatBaiEDJk/JxHxWOBUzePjjNldeDa9nCx5 +TspPU01Yhq5o0M9O45IU1aEDNPb3T9MfQtIAKiP9hcRXusHx8FtXlRI1VETdOT5SUXt phRP+blhuKlXDd/XEIKj1zTeG7/WNFago7RikMkn0Tpuf10/x88XvQjv3Fdrfmptlhip F+EYcvfFevL26KTXEbYr0cwW8PyBGiWdzwClTGLW4M9UDdwzNE5qLvQfNVSzDcn6h/LL VygSoJXZUtxLgaLt9qXWpEzwQytx/pKGhNGCFMJDViAI7l5koAIbZQ/qTZN1Hgkh6+Nb Mg0w== 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=QlvCEEe9Y5N2axTvdOUtz6Gc6eMk08SgaPIXePx/J58=; fh=ODL/5+LiE1mkocWIhZ64Iiw6LgIvpcdByF54DwY6zuA=; b=XlHF1XQwegqBNQ+Wp7TTNm9gHrw+HezFR2/XZ2C1d3fQcFi7mQz2/9Pj9jCakJ/Kbj JtLPeBOAsdH6d3D2W0+n1MUcBupwn52nLPbHZQaQWUDnBzCVT+awMlqkaa0j1MsKkPVd rskPasDTR6WzAa1tBaA/BhFhtyI+pOtouyasijIQyEHGC3Yodv8t0uuSqlw2+WxFST7X VpbhuZSxaj3swQFJsShHHJD95yWeQOunX4BMiQHjA80IGhMHGa283yQYUmfwpL2tFKGw hQwZCXO5Mw19HF8K/Jp8rpDiJQ1t4uxz0prVV+HH8aFz62ri95Tf1d/ZYfiWYYLgPr3Y jizA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=PYBa2YUi; spf=pass (google.com: domain of fm-294854-20241111205025b3f55c920b493f7c1b-sdiv_7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b3f55c920b493f7c1b-SDiV_7@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=1731358229; x=1731963029; 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=QlvCEEe9Y5N2axTvdOUtz6Gc6eMk08SgaPIXePx/J58=; b=cKQCC3Hul/HbedLRwWYJttcyO8fGorVOuIEsNcW1nJpGqvIJb11/lGtEy2jbNm6Ubb q7UVVafX7lWXiOSMJvTeGJvm6UIoQPWUioK0GEenJnFCCbitA4+WBuOxBxPSywP4ERme 96+5s7G6NHfN4LCcThH8LUGwLQNWiNDFXZxDokQpdMo8dOSzYRdUZxftyJNfoFqwiVs9 SNkKZqSbIA/DmABa967AZOxUVL0v+viDCmJPvDROkFkRkOZdkXSdR4SxJJ7NErRJbY5B 5mspjQUZvVuT9Qe3T1F3RDYE7CkWp7zh6pspsFDIuvIcYAeT17pXEyb4VTfRmwmTDDgk in8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; 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=QlvCEEe9Y5N2axTvdOUtz6Gc6eMk08SgaPIXePx/J58=; b=MknL6MRt+aD/pcLSzNDsZ84iL4/Xf+8VcivQavMTsPrGtcq79EwuFRfbn9LvLApiwV Aoo9YOMllEwfo5ZcuS7AF/AQN+NVhhGT2XbbKWKsG+SPrmQ8T0a5o1RQUMrcRRxP2AUk Q83U5xCrcavb/sRZh593ivW1sbIFEyH5eHiE5DiCLJ9tYhujXxSWN6l4LKGtWsNnPfDJ OeQiQC1/PVoIdtWom5QRJ2s6CDswcH/WiseFVn5uKZsrDXRCRP5RYl2AM5Zh2hvduArJ 4ViF7DzLyxye1d+2uGdCVdcHvzYpSFe3Up1L2I65CXNxOlBEWCvfRTpKXsdQYPdDu/rQ WMJg== X-Forwarded-Encrypted: i=2; AJvYcCUS4vxasXP0rzvG1u7900H2rqfYO+t/KsTuEOpnhFJWZiIxLizVb729AYc8IF98F0n2rlYmlJU=@isar-build.org X-Gm-Message-State: AOJu0YzekjG6GGljvxojdriAKZhxLoNsNdhNQvOXhUPRDS4+a9/g36Qv zT2EosuVwvRw+9pHV0GsmY3ZFkyrHMXYi3vu6FNClwQ1MwK1+DLR X-Google-Smtp-Source: AGHT+IHXoFZPP0WkpuXf2fEEp1AsXKv58sQbCOt3449QkiLMKDCElBxaZO+vS4fCLWGqCUmY4YWFOg== X-Received: by 2002:a05:6870:701f:b0:288:865e:1d05 with SMTP id 586e51a60fabf-2956026f568mr11590142fac.28.1731358228776; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6871:709:b0:277:f19a:1140 with SMTP id 586e51a60fabf-29540fdcf6als3582247fac.1.-pod-prod-05-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a05:6870:701f:b0:288:865e:1d05 with SMTP id 586e51a60fabf-2956026f568mr11590115fac.28.1731358227851; 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=CVDNBAAtSOphQRqbQ+sIZVmdcTi2wPPh9++rkf2grK0pHrBzRY0kfz4mjQ7Ip+svtk hZg5fJJ1qUyo5i/AUwgaE0mLXK8HiH9/Bx7+eM90faYD+IsCmrkR9NObHF0NiPrNd9vm 0uokmbeor5CsudZslLEMQ/rymvS7GSIiFi6GA7vDp0o6nSmyBaooKmhOK15o5rdCwd9R EoN7MHp98jSSjObe3p/Cei/dxs91e85m9FIOgDkPIfqgEyY/Bw+AXcW1h1Y3ev5tGDsn M1PQ+SFXeEyf6auLxBVvyHKG6gFRmSgeNPmPRECj/XSvqIgOuFjEukJcmlXt3iEIjD1p zdjQ== 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=hd+Ra0mXFjq5wVHelyhO/fJKkwklcL3HIN/UivOBJwM=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=jif4qCHsbWk9b8h1cutoyVzVzzs5NJmSRNhMqCao8S00r7HCchJ5xS6nBWM9SMPwdF t17EuKT9yEX8R1w7LtIdEHH650xxe0pKweUMbWxNE7KW5hIZpqj3Mql/2AATvyZv/fKo ePJH3QDqV3AUX7bcvtn6eI6jBriO+Ru5W8quxMigtkzNM+2Y79tb+WfBdxPxcicb0JIa Wl1J66B1D+g2zeb9W+BeLnxlJy5Y8Kdb+C1My/ShlGb0FO5iymyh4elx4pdjhYrfeEZG bpk9z6ueKycO8wfb9EJKP2UuDAeS9pFPnQqU3udq+CZ9Rx3BMhhpdfeYTg8GsScijTwR jbsg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=PYBa2YUi; spf=pass (google.com: domain of fm-294854-20241111205025b3f55c920b493f7c1b-sdiv_7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b3f55c920b493f7c1b-SDiV_7@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-226.siemens.flowmailer.net (mta-64-226.siemens.flowmailer.net. [185.136.64.226]) by gmr-mx.google.com with ESMTPS id 41be03b00d2f7-7f41f6c5a16si165566a12.5.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-20241111205025b3f55c920b493f7c1b-sdiv_7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) client-ip=185.136.64.226; Received: by mta-64-226.siemens.flowmailer.net with ESMTPSA id 20241111205025b3f55c920b493f7c1b 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 3/7] isar-initramfs: Add initramfs-fsck-hook-ext4 Date: Mon, 11 Nov 2024 21:50:20 +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=PYBa2YUi; spf=pass (google.com: domain of fm-294854-20241111205025b3f55c920b493f7c1b-sdiv_7@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-20241111205025b3f55c920b493f7c1b-SDiV_7@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 Ensure basic CI coverage for this hook recipe. Signed-off-by: Jan Kiszka --- meta-isar/recipes-initramfs/images/isar-initramfs.bb | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb index aaa0350a..4df9e0b8 100644 --- a/meta-isar/recipes-initramfs/images/isar-initramfs.bb +++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb @@ -15,4 +15,5 @@ INITRAMFS_PREINSTALL += " \ # Recipes that should be installed into the initramfs build rootfs. INITRAMFS_INSTALL += " \ initramfs-example \ + initramfs-fsck-hook-ext4 \ " 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" } From patchwork Mon Nov 11 20:50:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3914 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:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-il1-f187.google.com (mail-il1-f187.google.com [209.85.166.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoa5K014846 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:37 +0100 Received: by mail-il1-f187.google.com with SMTP id e9e14a558f8ab-3a3cb771556sf61238275ab.3 for ; Mon, 11 Nov 2024 12:50:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=Dh4ZKH7dT3iarps7v6yldMeDgaU0Uj7McS5bRjnoNHUlRnP6a/uu6O65y9K/d9QZ9G qwSfwJKTAzsO/Lv7fq2GDHXQ/8ecX8bnEgS6IU9ytWJdQ63UczGhqVYlpIE2WgqBivIV 0MfHz1TKoJrucWxqvTWqCD5du+TZcqiXAiw8eCiluzSWRxBn2kQtzrSIJU7ZVQpYC0UU bfSLRaD5ZZO/y05XJGG6asCFwTEalyxNC4uJ8pLIT53ozrgmmBxwP3gssnpgX7KEwbqb nzLTET4kTwvC568+Y1ub5/51uV8g7L9whAmto3NVYsGQS+iYKpq43+XI+1Tu6Y7MEBMx dnlg== 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=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; fh=Pqcxtkljv4XErEL13z6FRXFuVaBteA+kkTq+OvST5qk=; b=EfT/4tXNTSm2bmkkjl6sPF8+GXL2U0WSkWeAzEIGCBdAF5SyoCUv3M1wLdngZSyScD XcKySV9HAUXKyGg0ORLWi44pgZ4Zy/5NENT2ogchxLxxuXOnUnwDCWEo0Tz/5sE09PEb UNEQPbXavzaqV9f/xtyEwqKA83ztsIowzMg6f8Ba71IO0yvMCSdz3aXajpwJDOOnmoT9 M5W95Fca3pPpj3b3TX3n6O+1Deq2snq0kPHBqAxU1DJnj4ZaZDKRwZ4Awev/shIvl8ok Uih/TMAsG82wZzGMdPueRhHBhBe0B+7rXwESz4sZl9giT6JaOnt/7m3Uk37zGM1bzY9n cpaw==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@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=1731358229; x=1731963029; 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=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; b=gjHYzw7t/rSkDAalCLn80XaDGj/wCfq3h/QrRwjuByFqVx9nbQ3A/9LAyChdDVq1rO v5T/QBmj2Yqf+8wPK+zIpJNj9wsnjT+ArlYVZ8kV90TDe60k9aCslMGtC20EqFWZF5rb ALlsaCQklqeYk/oS+u3SWW2WHm4keSk2EFByeVmYsqGlL2cThOZHRh3bVaXsqvP458Ds PRJyxm5rr2AeUdcoDNnXw+tFBYkwDiuDo9IqnI6Ex0Ao2ku+qEHcD9nhJjJp6utsCzzi tV2zlhc86Y8ucBsm9dUGKpzacOjJb3vPn4zMnhhg5OTxPs/PIWTTkdfFG0WfBeTTbyKp 5nvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; 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=e0wEqeurvuMPIzthjMaWFKee7gx93kz3S16C+VpK0gw=; b=AcskyyxdbgoQBJfUgouz59Zgt23Tdf/A1KY9dJKHS/r7qV27HShRtuGzrxpNRAeL5h XBlq91De3HST8192ErvSxLdQwJ6vT29V+R/knEP42X8zfgmXgQ4YHDF+aineqab/RfDq btk+G/qYWe6qV/SBYTuJD8mG+OAHFhjWYu4sjH7LbO8fnhv22yQ/bFUDpXWnyH3Tcmj5 g9TBIyEMCdSd6GLemVM1pkJ/8Llz8RXmFcNX9mCoGRywTFKnD7Gi+voTgTOv3prs8lHc x/sLbkBLF6lQTOnoRa0bv01H8o/76y2GD5rniXx/2YtYSIvvGJf9+6bB5N9JWKBLkQpl 9iFg== X-Forwarded-Encrypted: i=2; AJvYcCUMNvKhAPudrNiZWGGbvdo8oR70lyPdh11R5cCrHbsmvcyPCPVQsgx3fbloFBPp7Ctp6ce5nVY=@isar-build.org X-Gm-Message-State: AOJu0Yx/WjvLvSvs7efrLsAAUSlZvEkgBQ6N3i11trPP6XMeadGfVPS5 EA88EMvDwFA8dd+JSUe9CzAIlwEHKRD51WWWfa1JoHW06ejGHzw5 X-Google-Smtp-Source: AGHT+IFNNfHRhXEVCe5Udz5BG/CuS6sHp6aMn1LnOCZz2t9pBHk0p2pJFi01SYennQns3br3T8izsQ== X-Received: by 2002:a92:50c:0:b0:3a6:f349:71e6 with SMTP id e9e14a558f8ab-3a6f3497316mr111638775ab.22.1731358229252; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6e02:1686:b0:3a4:f561:1c0a with SMTP id e9e14a558f8ab-3a6e815d01els35311665ab.1.-pod-prod-05-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a05:6602:3fce:b0:82d:13ce:2956 with SMTP id ca18e2360f4ac-83e0335471emr1486758439f.10.1731358228285; Mon, 11 Nov 2024 12:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731358228; cv=none; d=google.com; s=arc-20240605; b=jbiLsIH6BnEurMoCM9LheNx0gTVRhP7pgYwtMc0EekL9cGzUFJ2ieIxAU8NNvz71z4 MLLcCBT0dD0dQUpODQ4vM3MkInS6GtcuR1zbcguMp65sxanYcQ/tbuTnBlrMJHdh4isC l91NQ+SqYC1AzFzkVpoFswgD8jXfRkH10zxqqWRfB7C4Lmm/6V3a6Eek7/N3aoZ3aa6Y f4BjzJJZ8kYRcqJ2bHGgZG8PtUbsjTfX/HqayduVepaROXkYl+S7EvkpaYW2S9gQJ3Zy tqAWiII116Pe93BCXQlMXvAlZQPHo2szSUlmsLTUBbdRjVv6NdU3ZoIhAoqJw5sOENPB Rz5w== 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=nr/IOWZlvRHaDWujWo2iA6qbxs9uM0R3Tj5/JwgWteo=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=B65goY2qyNqcADQwBniCfoyhWoN5iFMTzg3CoYHAiOkpp3utg1HhO79T9NrlulOE9t jDjtAjmIOSxArjoaJRKtgsBYQtnDxRYt649/pxGuMmOVNtElq9OheK2GVpkGqML+IFlT XQnlK7Ii5OEqfRkHmzojai9gnKKizjUl2TpZfiBXTBvWun4G/tFe1cdSTC49T9KuWKnV DkKE7kYqHHS99k9gNkk6Q6MGzpkHlpj8ePoVi5FW+ZxBF2/6ixBgByONY15i+d3gApKd bvs0IjfCn0GeLrhKXlQ7xnmcxUmGQwaIzu0lUFpPUafuAXKNO+zAp559O6Ecuy8Q1dOU lbdg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@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 8926c6da1cb9f-4de788302d0si234551173.7.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:28 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@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 20241111205026cc787bd8742c941f8f for ; Mon, 11 Nov 2024 21:50:26 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 5/7] initramfs-fsck-ext4-hook: Convert to hook.inc and improve Date: Mon, 11 Nov 2024 21:50:22 +0100 Message-ID: <119732ece3ac710416516282f0cdcb5c05c9b4d1.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=DKBmAkUA; spf=pass (google.com: domain of fm-294854-20241111205026cc787bd8742c941f8f-o9xhhp@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-20241111205026cc787bd8742c941f8f-o9xhhP@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 Use the convention and helping features of the new initramfs hook.inc to simplify this hook. We move it under recipes-initramfs to align with other recipes there. Another change is making fsck.ext4 mandatory, both as dependency and while copying it in via the helper - there is no reason for this recipe to almost silently ignore any unavailability. Signed-off-by: Jan Kiszka --- .../images/isar-initramfs.bb | 2 +- .../files/initramfs-fsck-hook-ext4.triggers | 0 .../initramfs-fsck-ext4-hook_0.3.bb | 14 +++++++ .../files/initramfs.fsck.ext4.hook | 39 ------------------- .../initramfs-fsck-hook-ext4_0.2.bb | 18 --------- 5 files changed, 15 insertions(+), 58 deletions(-) rename meta/{recipes-support => recipes-initramfs}/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers (100%) create mode 100644 meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb delete mode 100644 meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook delete mode 100644 meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb diff --git a/meta-isar/recipes-initramfs/images/isar-initramfs.bb b/meta-isar/recipes-initramfs/images/isar-initramfs.bb index 71dbaa43..d2a946f7 100644 --- a/meta-isar/recipes-initramfs/images/isar-initramfs.bb +++ b/meta-isar/recipes-initramfs/images/isar-initramfs.bb @@ -15,5 +15,5 @@ INITRAMFS_PREINSTALL += " \ # Recipes that should be installed into the initramfs build rootfs. INITRAMFS_INSTALL += " \ initramfs-isar-example-hook \ - initramfs-fsck-hook-ext4 \ + initramfs-fsck-ext4-hook \ " diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers b/meta/recipes-initramfs/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers similarity index 100% rename from meta/recipes-support/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers rename to meta/recipes-initramfs/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers diff --git a/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb b/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb new file mode 100644 index 00000000..9e9654ad --- /dev/null +++ b/meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb @@ -0,0 +1,14 @@ +# This software is a part of ISAR. +# Copyright (C) Siemens AG, 2019-2024 +# +# SPDX-License-Identifier: MIT + +DESCRIPTION = "Recipe to add fsck hook to the initramfs" + +require recipes-initramfs/initramfs-hook/hook.inc + +SRC_URI += "file://initramfs-fsck-hook-ext4.triggers" + +HOOK_COPY_EXECS = "fsck fsck.ext4 logsave" + +DEBIAN_DEPENDS += ", e2fsprogs, logsave" diff --git a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook b/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook deleted file mode 100644 index 259b73b4..00000000 --- a/meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook +++ /dev/null @@ -1,39 +0,0 @@ -# This software is a part of ISAR. -# Copyright (C) Siemens AG, 2019 -# -# SPDX-License-Identifier: MIT - -#!/bin/sh - -set -e - -PREREQ="" - -prereqs() -{ - echo "$PREREQ" -} - -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/scripts/functions -. /usr/share/initramfs-tools/hook-functions - -if [ ! -x /sbin/fsck ]; then - echo "Warning: couldn't find /sbin/fsck!" - exit 0 -fi - -copy_exec /sbin/fsck -copy_exec /sbin/logsave - -if prog="$(command -v fsck.ext4)"; then - copy_exec "$prog" -else - echo "Warning: /sbin/fsck.ext4 doesn't exist, can't install to initramfs, ignoring." -fi diff --git a/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb b/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb deleted file mode 100644 index 9860dbc8..00000000 --- a/meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb +++ /dev/null @@ -1,18 +0,0 @@ -# This software is a part of ISAR. -# Copyright (C) Siemens AG, 2019 -# -# SPDX-License-Identifier: MIT - - -DESCRIPTION = "Recipe to add fsck hook to the initramfs" - -inherit dpkg-raw -SRC_URI = "file://initramfs-fsck-hook-ext4.triggers \ - file://initramfs.fsck.ext4.hook \ - " - - -do_install() { - install -m 0755 -d ${D}/etc/initramfs-tools/hooks - install -m 0740 ${WORKDIR}/initramfs.fsck.ext4.hook ${D}/etc/initramfs-tools/hooks/fsck.ext4.hook -} From patchwork Mon Nov 11 20:50:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3913 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:37 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-yb1-f191.google.com (mail-yb1-f191.google.com [209.85.219.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoZFq014830 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:36 +0100 Received: by mail-yb1-f191.google.com with SMTP id 3f1490d57ef6-e2971589916sf7836527276.3 for ; Mon, 11 Nov 2024 12:50:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358229; cv=pass; d=google.com; s=arc-20240605; b=EgSQvfKElNQYQqD52F1aHkILSqyH22FmYg/bDnxnLGnRyu9SzfJk3wZ8vaMe9SH/G8 jnKFirceMd3Xl1O8iZcba5cyi1y1VA+zT+vHu1JjNCg8GV5XNfqTZHmNdIU6KmBG77Wl ZJLJ3b/Vr63Cp09bLwcxrtxnO1Uakr3dyJBK9bVzM7ND2ZVkN9BOJ+LhoODRF91JfRUM 5nwZrbrXN28CNoJ+1esER2cBEU/jCciwDKBWZuOaIlhS/1XIPixBgPVsUytwZwcKxcYq UgLAsqFBDVgTWSb38MVXdWyt9lAN950OKyf1gUZqJ+t4aYC9N/4P4UDoXePrbP1nuKc1 Ki2g== 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=u3e8/5H6VgTobsqt/oehuVV4bWplj5fMC+clKz/a96U=; fh=t2JbURql2fzb9I9voB7ZCVMb9xeRy9zPBfKqwbbx41A=; b=e+3y1dqCEk5R1T1BzIcZi7A/eP11LbY22HboSl5nmieOGUUCPX7bjzJ0lyl1OzVvo7 YjkqQExUb6lA3kENvDHQWOLebaxbHcBhHmezSK6Ji0uU15MGYX2qU673+1YmxhF+iJ38 ISFxFj1FUYsNEDPq25fusr9tpd+xkTUNsrW1xsAQCBaI7PSZfLkwSShtfdTrp389Vd7+ 9sCEmKGQUQGIm/rB1T4bZXRhM0HyLMR9fKwzpj89PwtAOZSeYXX53vWJVsFgywz1L9EN nNhQ2q5zwuWoNBrpzCfvyZE7CY8UA0RtmgtZr8QCBAjoc7vahp1dNad1kqLS8Sg7xu+i Ar3w==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=e9Deda1P; spf=pass (google.com: domain of fm-294854-202411112050260be381f3c31959b04f-hvq_nl@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-202411112050260be381f3c31959b04f-hVq_NL@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=1731358229; x=1731963029; 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=u3e8/5H6VgTobsqt/oehuVV4bWplj5fMC+clKz/a96U=; b=c12q0BJPr2PfmHE6+ACTW/aFpArO+cAb2NLitCOerR/7ACWNjz58SX70w13NdPK4vM XBM44/IxEvyJcIe0GUgVTjovkY1cf83vo/Z4RrmLxgJCr4Xej2htbHuFEHDlyZXs5X+V nROyXh1Z1wXRxpbGMhQ5fUDYnvR0zxu/mQmY2p4Qc0Pk8i08D/oMvAhpirWMLkUHj8fD XrVqi3v6Fri1zkKZNjrRoqSEnNsJ2/ONK4IHf6dOYFarQ2VOXy0wlopHaBS9gkc/9LPI 0jWP0GNkp8wjuS5Q6Sj78DEiDAeYwwneE2gSOYY4RKjPGxRSPSaVu93dsm4rMAjqBd7h MdQA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358229; x=1731963029; 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=u3e8/5H6VgTobsqt/oehuVV4bWplj5fMC+clKz/a96U=; b=GmQc4uFZmaZfE1/mEh8W82+Aruti9bAdDmcOrAW3h/mIlZz+l064f9dnPNNVETVbV+ jDRrp377g1hxwNFv2XSfv7YL50EgvqyL+azvg3wVKCq5CR4NlDKlZS+099A0l03Pj+2V 3z012FOWMtL19nefnEBpX6f85uTNBrELbOoqSp0tz1ASjU9qJAAXRN7I3VFSK1kaf54R //63wYhWlWx4sDcapCnrZk5OeSioXPn+4MEZP48gN3wwNLB7Wwwd8H0+sEDbklJUDEYL EwpOL2U5RUd6OMQtspQqXGXmqnDAwm5OKM2sh297zmXKR7I9R6WV1l7bXA4BqXoJWr1j ymoA== X-Forwarded-Encrypted: i=2; AJvYcCW6qZsu8z83ZKFTdBTXEebqR5xhkXsu2/i5O54ABvbWMjFmpXuQUsl2J4H7G0QgOsP7DRssvjE=@isar-build.org X-Gm-Message-State: AOJu0YxhumLCyiY1lGFPUdgV7930/gkEe56KKUdnXgOwWsgaO8FuXlIo dOSoUHrv0i7+jMKMa7xzf/fLlFe3i7luhEbCThxFcpIY++jm6i2v X-Google-Smtp-Source: AGHT+IFT+GQr7Qy8XL3MjDx5y4jHENz4SyQHwXE4ETqELEwiUVyEjAGANAM9xzfjkX0oWLopq+2eCQ== X-Received: by 2002:a05:6902:320c:b0:e29:1a7f:2f9f with SMTP id 3f1490d57ef6-e337f8d0579mr10899886276.41.1731358229277; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6902:181e:b0:e30:84f1:999f with SMTP id 3f1490d57ef6-e336800eb35ls1133655276.0.-pod-prod-02-us; Mon, 11 Nov 2024 12:50:28 -0800 (PST) X-Received: by 2002:a05:690c:6710:b0:6db:b5b2:53c with SMTP id 00721157ae682-6eadde3fbf0mr117467347b3.32.1731358228323; Mon, 11 Nov 2024 12:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731358228; cv=none; d=google.com; s=arc-20240605; b=WU8BzrEJHBkTiFbywMctfOQ1EFGfcGB3+C9PVJNO9mkfeqCBPpZjUiumbdlEwWzUyt Sva2AQUstd1nphfeCMfUk+zqLXfewnAavAADdTXca6pnMuGYOjAODCkEsBQRjqg/Nfjh ecqYOw/5NHrOHU3+v/s14yXdqZq16KANwwoawRKa1W7hE4eKbGLYk3X1gqy9G3d0FkQ7 gcVi5uRM+15QwKLU97fvf7+fgPsgzjQDsvnXgdUwGoftFaTl7/aEvtpiJZUQ3Bi25//G JhJKWUb30Qoo+yAu7m+8KAax27Ud0/ebT00Vtp08uOqL1CK3e5MuyKEi+chnj8vqkmK4 C8lw== 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=damBkMLDbvyJroW1CNbqTpW5Nz8l3TrrIrRhSEEXQtM=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=NUpvFmq3EzQmq+/tt2RHw25yfiE2vF5mus2zPPaD6zp7gvpDpGdQA4t7IK3xmK36xP lDiT9RxfWU1E4V3FHTIcfaV+Mnsl2t61rW45m9+jhWn9K7xEPy0XBmbcsbt2AtS7zwHg qdns726wTwFjqVg1utznJIOdDc8JrfWblrNZY3a6P1hWBCDEZQ9pICPscs1sGSnpG6ZW P4e6tHiNkOe6ZJPhkC3mE3A9uQ6GHCIvY7X9727gkJ8KIB/n6YzjnfRJ6+S+KKs4AQbm VcMG5HwvuUbdeNQESflYqmTvqx6KGdn2NjUUCByvUbMKjuUV9DklUi3uNuAxjKjLzTSi qNjw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=e9Deda1P; spf=pass (google.com: domain of fm-294854-202411112050260be381f3c31959b04f-hvq_nl@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-202411112050260be381f3c31959b04f-hVq_NL@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-225.siemens.flowmailer.net (mta-64-225.siemens.flowmailer.net. [185.136.64.225]) by gmr-mx.google.com with ESMTPS id 00721157ae682-6eace7a5e39si5913657b3.0.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:28 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202411112050260be381f3c31959b04f-hvq_nl@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) client-ip=185.136.64.225; Received: by mta-64-225.siemens.flowmailer.net with ESMTPSA id 202411112050260be381f3c31959b04f for ; Mon, 11 Nov 2024 21:50:26 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 6/7] initramfs-tee-ftpm-hook: Convert to hook.inc Date: Mon, 11 Nov 2024 21:50:23 +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=e9Deda1P; spf=pass (google.com: domain of fm-294854-202411112050260be381f3c31959b04f-hvq_nl@rts-flowmailer.siemens.com designates 185.136.64.225 as permitted sender) smtp.mailfrom=fm-294854-202411112050260be381f3c31959b04f-hVq_NL@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 Reduces the own bits significantly. Signed-off-by: Jan Kiszka --- .../files/{tee-ftpm.script => local-top} | 18 +----------- .../files/tee-ftpm.hook | 28 ------------------- .../initramfs-tee-ftpm-hook_0.1.bb | 27 ------------------ .../initramfs-tee-ftpm-hook_0.2.bb | 15 ++++++++++ 4 files changed, 16 insertions(+), 72 deletions(-) rename meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/{tee-ftpm.script => local-top} (75%) delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook delete mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb create mode 100644 meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top similarity index 75% rename from meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script rename to meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top index 3355a7e0..989bf288 100644 --- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.script +++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/local-top @@ -1,4 +1,4 @@ -#!/bin/sh +# # Copyright (c) Siemens AG, 2023 # # Authors: @@ -7,22 +7,6 @@ # SPDX-License-Identifier: MIT # -set -e - -PREREQ="tee-supplicant" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /scripts/functions - FTPM_DEV=/dev/tpmrm0 # The tee-supplicant would take some time to be discovered, 30 seconds should diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook deleted file mode 100644 index e80f00b4..00000000 --- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/files/tee-ftpm.hook +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/sh -# Copyright (c) Siemens AG, 2023 -# -# Authors: -# Su Bao Cheng -# -# SPDX-License-Identifier: MIT -# - -set -e - -PREREQ="tee-supplicant" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions - -# The tpm_ftpm_tee.ko does not exist in any stock debian kernels, it could be -# provided by customized kernel. -manual_add_modules tpm_ftpm_tee diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb deleted file mode 100644 index 82fec1bb..00000000 --- a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) Siemens AG, 2023 -# -# Authors: -# Su Bao Cheng -# -# SPDX-License-Identifier: MIT -# - -inherit dpkg-raw - -SRC_URI += " \ - file://tee-ftpm.hook \ - file://tee-ftpm.script \ - " - -DEBIAN_DEPENDS = "initramfs-tools" - -do_install[cleandirs] += " \ - ${D}/usr/share/initramfs-tools/hooks \ - ${D}/usr/share/initramfs-tools/scripts/local-top" - -do_install() { - install -m 0755 "${WORKDIR}/tee-ftpm.hook" \ - "${D}/usr/share/initramfs-tools/hooks/tee-ftpm" - install -m 0755 "${WORKDIR}/tee-ftpm.script" \ - "${D}/usr/share/initramfs-tools/scripts/local-top/tee-ftpm" -} diff --git a/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb new file mode 100644 index 00000000..9f77c158 --- /dev/null +++ b/meta/recipes-initramfs/initramfs-tee-ftpm-hook/initramfs-tee-ftpm-hook_0.2.bb @@ -0,0 +1,15 @@ +# Copyright (c) Siemens AG, 2023-2024 +# +# Authors: +# Su Bao Cheng +# +# SPDX-License-Identifier: MIT +# + +require recipes-initramfs/initramfs-hook/hook.inc + +SRC_URI += "file://local-top" + +HOOK_PREREQ = "tee-supplicant" +HOOK_ADD_MODULES = "tpm_ftpm_tee" +SCRIPT_PREREQ = "tee-supplicant" From patchwork Mon Nov 11 20:50:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3915 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:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f186.google.com (mail-pg1-f186.google.com [209.85.215.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoaLq014842 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:37 +0100 Received: by mail-pg1-f186.google.com with SMTP id 41be03b00d2f7-7ee3c2a2188sf3453501a12.3 for ; Mon, 11 Nov 2024 12:50:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358230; cv=pass; d=google.com; s=arc-20240605; b=clySDok3dYrKdQgfvUKMIvl9dkNmJHTcEz9ClobAerj+m+SuFGS4eoztt6foez2HBX 5PUtGk2avp5ETLXfA3Hno9Rf44ZzQtNv+6H9gGd44maF8sdCqD1znO3DfrCIw2lGwinH 2GD60jCIqH4GeOmBow9RTNeIwR0c/dkQqVmWvxKag4pmnxJQqzgOdMiItLj6Gknz815B 0pyLWBTdlAWt7A5/VSJPcMrlbhOCHVjEJ2MfjFy0RituKF8hSCrySOo04n8OPmH3yWFU k+5sBTp2J5avdvrduqNvDiPrfiFt12U+wyyT0MCt3LrxyGCBGiVYfxYRbbCp9VCxp2XB hnfg== 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; fh=jUVHzhELPDJzehEZeRCe/QP65dMN3ssrjz4cEDzBjCs=; b=bGjTse2k9pFjqpYxaOFRKbHhI803o4hEaVRJc9ezCUVk/lraLReoP+5f5rNXA1d+hc B+mH97kaJVGWzEUJj5eFG0FfSF17kvieAp8Q+vIm3JheBeFXtJEcqigsspCsCpOhc9Sb jQF06g0FHzSe53/FrybV7B2KKvuzHnofiGs9Y06YIbAQnp3sWxQJHSLXkQlDg7uWVsvY 0SKl7iHXsGKO1zfI/nXE/v01ag278BBNmSbvhDc0mgQx7DO6AUPjiNQGVTRyO9TIweFV 7O9rzLq4T3E+4yc4IAGTVpFaPzjxi1gTvbc6f2tUu6AcAiNHRk+6N809hKBsW9zX+T4U 6DWA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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=1731358230; x=1731963030; 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; b=jfdO1jj1bmIkyr4Tj2SjNxb8/hLLHrozBnl0bWUDRaSeTL5UdHDEmjCoT0ijXtJiHc eDODEcuRTXPRHfVanEGe23d4PlwajTDfSVtS1QNP9HmcqTjPxfdlYJiXcSd+JR2v+4Xo 8did0SgdO79FwSxZAgeMJuHYSDAPaEqVCmLDQ+PrBalR76ufE2Sv2ud1IamViNswKj4G yyqRh1L+Fck+z9nNogIAzkRHq9K3BnMTHN4sF+JIKGGpRXLNHhlinFTJj3aSpkdMVW6A EBcYD3yTQWGIso9O6KATMXxJAjlS3qWYcN9UEpe9LipC2s7+QSyPOStmgghya6RTsuKs 8dXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358230; x=1731963030; 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; b=XLoWKGCe6SEBdpOYZyGls4SHRZJHBTKl+K7HIzFTrpXr2rgXla5i9LH3zUDAHo8ZBb YNDBPaHKhe6VcyuVgnlbDly47WZAeEZ4tedtmPRI4vQRdU7zgMqRzW7MVDprJsMaHAgz z3A0Q8GhiXyUqz1vsS7QZZtiiWrQxs4nZiJdKr2Qp0+RKYzIlVmCRUDyg0M5Km/ORg3s O41fuXAxaZLHqbMYubearkInz96Dn3rqU/2Rcfhg0vPuL1Lw6cIQL9MULbPRloC0hS+7 W+bF+ZdOefC3uKu6TWyhxA/wBYH9hLlx/zc6s48/QDcncMNlfitngmj1lLRjog7kt8pS FWqw== X-Forwarded-Encrypted: i=2; AJvYcCUG9MOczT4glPBP8vaAf60X7UwlTl6M5ti042IDpyM7H7VEfS15X96gBMC0Yu9SDHNnzRjVs6g=@isar-build.org X-Gm-Message-State: AOJu0YwtFxw4C9cHazI7uchyDnG13kh2+vCk54cJy60XAzEff+LHbxCm cmBOS2MvQALiv7E3uWRg64n0WPDTJMQPccYbnXYsJ3g090uJHoVi X-Google-Smtp-Source: AGHT+IFtP4CXWXL6gOSrNTge4jTsVecwxYXXTsJ+hpxVYptfETbfXkcqS9yVmo1qDmYjM/NmeY1Zlg== X-Received: by 2002:a17:902:ebcf:b0:210:c5ab:2420 with SMTP id d9443c01a7336-21183ccf0f4mr141993355ad.5.1731358230174; Mon, 11 Nov 2024 12:50:30 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:903:705:b0:206:8932:d4fa with SMTP id d9443c01a7336-21175214d74ls32114715ad.0.-pod-prod-09-us; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-Received: by 2002:a17:903:234c:b0:20b:6188:fc5e with SMTP id d9443c01a7336-21183d66a42mr197786175ad.28.1731358228745; Mon, 11 Nov 2024 12:50:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731358228; cv=none; d=google.com; s=arc-20240605; b=NIVtwAMkJAedxTpigPmHRFMTZM1/skBrN35hsYcURMc+SNMGjWCNEH8xDRGdOKZd5T lbP8NXJv1fJldR1MGYoQ12yL1XKM6xnteKgfXCOfnEFH/6caEk2lfupGYQpJPwhhqxxw IdkC+/AF084IsexrGCfpHxlJI7E0rxHX2p146p7czcDE5NXEyxeAezrz/ACQNZ0j3x3S QEycFEiZHIXEBbvZEzmFuRlBfhk19EbCo+Rk/VapLhWeoiL/gAdp8lsCDDU7wEYMXrGu mQHNxDFsgha/jew8DouriBBvxthvc/NVap/5vPZnJaBRQM2i+1Bsw5Gthr+CgQTTfGIC l5pg== 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=wX0wNI23XS1f30g4Cw0cLpi3idM9YV8lQ99gMldZRm4=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=W1glMAIGEVAQTdgSDnpKPxCiTWcHVnLzkL8YwGmw/AvTKlpGrCjnMf5BJiA9NX6jVk NOpICc8ZztBKy0KAoXb1ZaLg5pZmRMOLt4N30y4iQ+TxFlcLSA7//IE/KpHDsZMcZtbZ XWkGP+xW1/3CGjKzc0ewQn5pdKsFPl5QysVz9SgIob5IIIX5evvuTjuwyhwX6wxml4Wq ZQ0NDzE0nx+sIj/6iE7Xvi7WGMhJWR6DoEMyYfAYMpBOsGBxZZ21Zo4pMI03G8U18uZs yA66zwgMI6wZLcNPNAInvoTcUYRrb7s2qN1ST21kMPFy5Z2odOUOMzlJkCHic3HSoETN Wsxw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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 98e67ed59e1d1-2e9e34a3a9csi57147a91.1.2024.11.11.12.50.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 Nov 2024 12:50:28 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@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 202411112050262544849882de7926ea for ; Mon, 11 Nov 2024 21:50:26 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH 7/7] initramfs-tee-supplicant-hook: Convert to hook.inc Date: Mon, 11 Nov 2024 21:50:24 +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=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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 Reduces the own bits significantly. Signed-off-by: Jan Kiszka --- .../{tee-supplicant.script => local-top} | 18 +--------- .../files/tee-supplicant.hook | 36 ------------------- .../initramfs-tee-supplicant-hook_0.1.bb | 27 -------------- .../initramfs-tee-supplicant-hook_0.2.bb | 16 +++++++++ 4 files changed, 17 insertions(+), 80 deletions(-) rename meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/{tee-supplicant.script => local-top} (68%) delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook delete mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb create mode 100644 meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.bb diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/local-top similarity index 68% rename from meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script rename to meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/local-top index ac01d7ec..575a742d 100644 --- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.script +++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/local-top @@ -1,4 +1,4 @@ -#!/bin/sh +# # Copyright (c) Siemens AG, 2023 # # Authors: @@ -7,22 +7,6 @@ # SPDX-License-Identifier: MIT # -set -e - -PREREQ="" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /scripts/functions - /usr/sbin/modprobe optee /usr/sbin/tee-supplicant -d diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook deleted file mode 100644 index 3e2f4016..00000000 --- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/files/tee-supplicant.hook +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -# Copyright (c) Siemens AG, 2023 -# -# Authors: -# Su Bao Cheng -# -# SPDX-License-Identifier: MIT -# - -set -e - -PREREQ="" -prereqs() -{ - echo "$PREREQ" -} -case $1 in -prereqs) - prereqs - exit 0 - ;; -esac - -. /usr/share/initramfs-tools/hook-functions - -hook_error() { - echo "(ERROR): $1" >&2 - exit 1 -} - -# For stock debian bookworm arm64 kernel, these two .ko exist, but not built-in. -manual_add_modules tee -manual_add_modules optee - -copy_exec /usr/sbin/tee-supplicant || hook_error "/usr/sbin/tee-supplicant not found" -copy_exec /usr/bin/pgrep || hook_error "/usr/bin/pgrep not found" diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb deleted file mode 100644 index a7a19bee..00000000 --- a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.1.bb +++ /dev/null @@ -1,27 +0,0 @@ -# Copyright (c) Siemens AG, 2023 -# -# Authors: -# Su Bao Cheng -# -# SPDX-License-Identifier: MIT -# - -inherit dpkg-raw - -SRC_URI += " \ - file://tee-supplicant.hook \ - file://tee-supplicant.script \ - " - -DEBIAN_DEPENDS = "initramfs-tools, tee-supplicant, procps" - -do_install[cleandirs] += " \ - ${D}/usr/share/initramfs-tools/hooks \ - ${D}/usr/share/initramfs-tools/scripts/local-top" - -do_install() { - install -m 0755 "${WORKDIR}/tee-supplicant.hook" \ - "${D}/usr/share/initramfs-tools/hooks/tee-supplicant" - install -m 0755 "${WORKDIR}/tee-supplicant.script" \ - "${D}/usr/share/initramfs-tools/scripts/local-top/tee-supplicant" -} diff --git a/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.bb b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.bb new file mode 100644 index 00000000..6bea92e8 --- /dev/null +++ b/meta/recipes-initramfs/initramfs-tee-supplicant-hook/initramfs-tee-supplicant-hook_0.2.bb @@ -0,0 +1,16 @@ +# Copyright (c) Siemens AG, 2023-2024 +# +# Authors: +# Su Bao Cheng +# +# SPDX-License-Identifier: MIT +# + +require recipes-initramfs/initramfs-hook/hook.inc + +SRC_URI += "file://local-top" + +HOOK_ADD_MODULES = "tee optee" +HOOK_COPY_EXECS = "tee-supplicant pgrep" + +DEBIAN_DEPENDS = "tee-supplicant, procps"