From patchwork Sat Nov 16 11:13:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3944 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Sat, 16 Nov 2024 12:23:34 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oo1-f63.google.com (mail-oo1-f63.google.com [209.85.161.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGBNXCk014610 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 12:23:33 +0100 Received: by mail-oo1-f63.google.com with SMTP id 006d021491bc7-5eb7a63c9f3sf250896eaf.0 for ; Sat, 16 Nov 2024 03:23:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731756207; cv=pass; d=google.com; s=arc-20240605; b=LFvD3FDhiHaO3syIR7GVwErFGBivOUpqxhh/UEyLOCqGHtX44c/ptPyCrMlYRlJBVu 6ZF/2wY+My11AR8g3lPb1In5PGSKe60MyIrbI/Zu2rCL4Apu4GyNMjIWAUYLVBmDmrTT OSDzkdjdbSgjv5LD7yvMctLvBm9XBDO78klU2mvOsfHOCSOuB7dJJAEE+PmeDadYmF45 hKEZ4MOx2SJspE3L0PYEDuQeA4YhamDR8yMWwGrf9/d7/jnXAh+XYh7PIOAewoT9EZhK GSs1QRH1cL8OT0SYQU6FdUcFO8CnpU4/tf0cyyhmcZvM013CXfcggTh+RA6QeDaL3QnJ iO8Q== 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=LZk5t2yTXNwzMADi1HM5joFQbdJHitEGmdPrbXz0ETw=; fh=+ROseK/pHntZ7M2rQx5Zt9HY7Xdpa5mRNz19JRWeeys=; b=i+05aZIG2xys4TcZHCYwxg5HgnSAyylelMZB69D1akydkKp2RBiIEuox5dcSznUEX9 0uvpY7vIZ2lu5MjEVxDVh3n8Q+7VUo4xeKyz7wyYnBiuVMRiDlVLDnXjRnlUnAWoVcNi rM3pmTffvT6laGR8gYHEJROszmtKeZSqIcSO8VcIq0Xiege0pMpmOktjkpJlxj6xm4Z9 c3+AeEt17f56LMfeUDYsB3IkKd/VrI4H6ze/UZaBHAZwioSmdBKK6UA35rVv8S+e3g1i EwC18EY5WK+415O3DZZKWBlychMZiwlr5kE++uK0DX7nBtfTH4mGwBDXnhVi5qLXMDOR tMfQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=fXGlw93G; spf=pass (google.com: domain of fm-294854-2024111611130309ddf97faf0e50f43e-qlcyo_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130309ddf97faf0e50f43e-QlCyO_@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=1731756207; x=1732361007; 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=LZk5t2yTXNwzMADi1HM5joFQbdJHitEGmdPrbXz0ETw=; b=qYt8ragUGEgu/1z9czrvEk6mprVgxkmLMDbJNgTjhhSMY2ErpsV3zCuu0iEve2b4dz J5IwNSGNQ6dDgRZl+S6liZZwdxNXk0RorA7TqOb2RKiLec7I++4NqJWF2CU90N8TsP4S KW+F2LskEmIPVKmY9kn78nlZe8f1ogPA3nPtH+ToFWfraC6U0rqpSF+Je9j0qlneHCfN 3symGdsa7U44kSAGjCztAseg9TGYiBSDsWuchWn0T5zMDRCY63bKA20+06W9RgJh0DHI aeVpJYiVWZCzuCmMGt76tonRagury9VgVj7vnUY7QVwtCT+OALlQFcphlfJ6bdl6VyDp dmGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731756207; x=1732361007; 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=LZk5t2yTXNwzMADi1HM5joFQbdJHitEGmdPrbXz0ETw=; b=UFLL8QRZEt7x0+aoQzpOCWgmwMIbq8LuDA69wOEzm0fdmEZQQNDfLeRtwyKdFaUS1z miPOrbN9PVcgu+qjdz0TFSknvCgtcZOXGEhCDZ48AgBCOY30QppSiNTYEt5n4S1pMS3i Sbbggd7b3OMaLxEXtqXJldRWm9dQIqgvM4vlt7VWYN0x7y573F0SaqH0D4ghXNLAX+jO rgx60+NnL+t/OkH06MqKA4cqpUqpZcEKgTLR+fGsqpltpA/Aaofcdc9q9DVQ6dwFpeBv CK/GkbMgAgENMfWDoB1Dq+5KWDgWO/FnrZZYnpuoSzyc3f0BEPdgKt4e/F3JiRz6OzMs LTfw== X-Forwarded-Encrypted: i=2; AJvYcCWYqhXVDgdDixW1r90p9z/5WynvJWXQ2GemUg8FA124Mzqnb8S0nKhcM/vmd8oHzvjzg1G72Mo=@isar-build.org X-Gm-Message-State: AOJu0YyU5GrAR+dF86VJdbPYq5VAcJKaiGvQ70eb2pdVJhuFw74JGKs9 b4Re02V39J8Eqb1D3SxCAim+GOVAfiUBES+9CPSh1L8eYbHMJj2U X-Google-Smtp-Source: AGHT+IGVwTc/9CXOl7JLGCrwfgM2EcXFrlFvoibu5ZmSvty/SEoKcnrt8cghs18zJ8x3yhOu88k1xw== X-Received: by 2002:a05:6a00:3d07:b0:71e:b1dc:f255 with SMTP id d2e1a72fcca58-72476b974a1mr8145890b3a.9.1731755587427; Sat, 16 Nov 2024 03:13:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a62:e119:0:b0:724:682e:c1d with SMTP id d2e1a72fcca58-724873ab743ls458240b3a.2.-pod-prod-05-us; Sat, 16 Nov 2024 03:13:06 -0800 (PST) X-Received: by 2002:a05:6a00:4b04:b0:71e:427a:68de with SMTP id d2e1a72fcca58-72476cefac1mr8479932b3a.24.1731755585885; Sat, 16 Nov 2024 03:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731755585; cv=none; d=google.com; s=arc-20240605; b=RMgnycx9YFEFXLTVbtZMmZPMutne2vF7t9icbSF2NVQbwvjCdXByHQ1/RDHlcl/OZG Xto3lYiElPNjvgqhXtdiDixL8Qz40Ec/UM56NutoPxQhnwZpyeRooKWbetXFBct+gKjT jwWLZ62rNw8QMkpYdmd2yERwhBLLAhmJMuaiTClqV/rkKMAG6oOxbTUo0FfoX/Uif+f2 sr+W3EYcmGrhWwG9ftQxssnSAv8+9t4TScIoLYwk6Nlz6pk0p3SXwKaH2BgIhrFyPrJh K+TUr5h0F00pvFthYZbLa2dU3F5D8f9gstMUuh9uOqkcwxxSmyTHQhSf2NF9c/lwb1M7 EkWg== 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=gsW0OQywImYegnlTm07QjtUITCsuqgLqevqQ5vhEt0ndhspbCsxWnEMDgs6TbTkTZC nU9tGHACTQZEjxFzcJUQxtC0GCjtqdab2B6315/MuLW02v0IpedQOA9Zf+79OtALa9S1 yNUA8Wfhu+ngwYcwASt5hVlwfhkca4yUazF2iF5r7Ksec9ecQaOFqGtyE1QEwbPilaP6 gjx3XMHJ2gOFPQXDJkgNjTEIz2fZ0jDDSYyXAkAhABAO/IbDEpXYz8Np6ryw5oKyZJpV 4Gh8F7oPsycPeetBOvECwvHJCJiJGrPrYGC5oBBelRYZfiCSH8IWCoyiP+wmwHBqY1Yr GzuA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=fXGlw93G; spf=pass (google.com: domain of fm-294854-2024111611130309ddf97faf0e50f43e-qlcyo_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130309ddf97faf0e50f43e-QlCyO_@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 41be03b00d2f7-7f8c1c2c4fasi182239a12.2.2024.11.16.03.13.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 03:13:05 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-2024111611130309ddf97faf0e50f43e-qlcyo_@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 2024111611130309ddf97faf0e50f43e for ; Sat, 16 Nov 2024 12:13:03 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v4 6/7] initramfs-tee-ftpm-hook: Convert to hook.inc Date: Sat, 16 Nov 2024 12:13:00 +0100 Message-ID: <1f96d3e74a67372db3433e5cb1aa56d69f482bd8.1731755581.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=fXGlw93G; spf=pass (google.com: domain of fm-294854-2024111611130309ddf97faf0e50f43e-qlcyo_@rts-flowmailer.siemens.com designates 185.136.65.226 as permitted sender) smtp.mailfrom=fm-294854-2024111611130309ddf97faf0e50f43e-QlCyO_@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"