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"