From patchwork Wed Nov 20 17:03: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: 3955 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 20 Nov 2024 18:03:15 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pf1-f192.google.com (mail-pf1-f192.google.com [209.85.210.192]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AKH3DRx006932 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Nov 2024 18:03:14 +0100 Received: by mail-pf1-f192.google.com with SMTP id d2e1a72fcca58-724229e625asf3051b3a.3 for ; Wed, 20 Nov 2024 09:03:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732122187; cv=pass; d=google.com; s=arc-20240605; b=eeVWafXDbl8vz3KMlcd/o1SOR/j6eKEv/dw4SY9GoQSon4gWts4FKMTh5d2DRJdsyG Q1QejTbIJM3vWG4LNxm3fabBVKZJLm+rcmXYnKKbxiXZFUCHK7/QSGOVaMNZrfGOBi4v gAmNy/8wiyUjPK5Yy4Ic0bwcMPWsnQsgrnki31zBt3YHrdC5tgHpw5iEcFlUy/b56S7s w4jG1vYWad2AvLs9ETY3ckjRNTuIywpZuTlSJ0ooV+mFljAEztvYb82C2SeCwHRwKIR4 FkVfgnO8DWcApbCiCZRHety8kHIv16LZqVytwVAr8Qw7JSIII63AI3EiWpPdBqf17rpS ZjUw== 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=H0EoHt3z7exmkUma8/Cuo/gl1EdPCxSIcbGNLDNLxjc=; fh=RA0VLrkGu6XRIITgasQqqfimWl4AqWZOkrb0e0dGQ+w=; b=e17IyoChRpVLBjyjmHhOZVjHmy0ACUtiOe8SU9vUF8rlRRzrjiNiZYpbdWlhpHv4gW ka9pEgOEQpCKtrNlF5uuQ6FZmfz3NhK9td9PglBf43Gtq2B8/b8p9Hi8fzYq99C9wldQ 25TD1TVtGCqoD5p42wEzvdm4RyV1D4MCYTE0w87uAKxx9qSJpAiS/NWBz+DFJXEH/PvD wwN9jXsiUl7rpcgfAU0je0Iq+JV0RTB2TUCVu8cMay9jYpB6Ed+QHFpvfqCiML4WdoSw 8IwVblV1BeFxv2Ik2jbsZJylNTkz3RiAbHxnvjU+rY8trfCNJeYunOkYpN/CsbiUa8GJ YfyA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fkmACf3c; spf=pass (google.com: domain of fm-294854-2024112017030323a88823b8a2693bd2-wlh7m1@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-2024112017030323a88823b8a2693bd2-Wlh7M1@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=1732122187; x=1732726987; 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=H0EoHt3z7exmkUma8/Cuo/gl1EdPCxSIcbGNLDNLxjc=; b=IWJJuhU9lsfSI5SZ8csDnkrfdbA4MQxDlLcVp7ulghbyw928IQkgr7zBKdH9wDfstB AeIU+XfwTr6DhLkgH3BMM4T1jgEdpM1RB9caw5A/QBi2OWQ2ON+J0U89Ic7oTnUoprVL 69dPLX4nvkaJ9aoEMsJPHWTatmT4JjAJzYNZHydp7OiQU0R6rMUfUoN61TeZ7UM/Wqy2 YOOxRhEt1/5EsuMavwwXRIF3Vu5S4BXvMYyRZrNlEe+qB1TO6jBHvmknfdLbBKq/SRnv Bs+dW1BVxhNMHdMotXFrabd/nnEab1ka0/6xY4Z3xoM4NiRIUi6/zmrehtd+FH03Fde6 RvDw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732122187; x=1732726987; 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=H0EoHt3z7exmkUma8/Cuo/gl1EdPCxSIcbGNLDNLxjc=; b=bvbkVLsCyTu+knJYTj1dji1+UTFZECnDgR33+KnNOJNB+LKYBDkV4OLzUznMZdLw1u jywq/EUxt+yrTHAnJn+AQrBMGcbPm3knpI5cdAJ16YsIpEq+CEK/zg+z7wHKAHKF31bL pskDbOx/g7TGOrFkClJtrOHBTi7QOvebkWLwEfVEp+rprJUZFulMBeHuXKha8LhfjJEB xd/IC3wQuNjk/FVZ8fsqqY/P1F2wDqngXuVkogPb8El1UBZ/TIRC5tsA2k9afX7nIfZp hys6ayfB7YGmUi2NFQnpHWOkFbSsevptyZ62Ey8MqQUAe1sVTFx5QbHM2pg6nu4aaoW/ eBdQ== X-Forwarded-Encrypted: i=2; AJvYcCUpv1xqIkG/rx3OSF5atD/eOpnnvuGUBw7S4YDtUp8lqij0V/T9GORW8zqtmi41IlRxpVc0GD4=@isar-build.org X-Gm-Message-State: AOJu0YyCMs0UIwrMx7bTGXgI4irRd1C9DfHj2E2ws7VFCmyb7g7tfbS9 KPAedOuUVVOfb4R7jJjhmO5IUFnqh4/0F+hcV8qDVl3hW/QNW+hq X-Google-Smtp-Source: AGHT+IGYkKNG/j98+mLW0HrfSCHi6r0rP0Sy7xnZ7VXz1tr2M0DcJahJnhJRpuuc5pfPBtpYp3hdxg== X-Received: by 2002:a17:90b:3146:b0:2ea:3d61:1847 with SMTP id 98e67ed59e1d1-2eaca7eb664mr3394303a91.32.1732122187111; Wed, 20 Nov 2024 09:03:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90b:1186:b0:2e1:1d4a:962a with SMTP id 98e67ed59e1d1-2eaebc26f4cls21898a91.1.-pod-prod-04-us; Wed, 20 Nov 2024 09:03:05 -0800 (PST) X-Received: by 2002:a17:90b:3510:b0:2ea:aa30:5ee3 with SMTP id 98e67ed59e1d1-2eaca6d6b2emr3767310a91.2.1732122185579; Wed, 20 Nov 2024 09:03:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732122185; cv=none; d=google.com; s=arc-20240605; b=EjvH+2KXDp+MgLzugAytwWjtdA62pUwhsjvuLsXK/XDflX8qGuYe7HJ3mOfYhOpNM5 Wra7RsNdVpzfAaFyWwytYP/qDw2yGs21KPW6LNlPZi5mXUieeWbLxP7CeA/j/PFEJFmQ qMBMFhbu21KCVCRC5EQ6EgkwwD6TI7i7o02D2Ys4aRJ8Zwgx2d4uK7SC9CRiAeS4MAio QJqW9Tx1N6Lz8NeInxoeTo6WaDQrB5ALEt3kThuiYxa0HqiVfQQay2B9MyZOWMgfMx/A sQEr/fPRBln6oh7ACZiXCj13HjhUTminPKrWwKPgV6o1w8CKQanZ9Tn4KDnakDwGENRQ 9JnA== 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=Pv0LVuRTeCyRTMTsc+4QWjQNci/ZD3arrO0D6tqo3l3br/BMDR/PC3dJtyPrGYZrJS 2Gw+NXYkx4LmqbgsZuSd3+OZ3XSLnuIpf+cyrnYrYzgusDIWX/UdhsAs2CI4nDUDzQO4 tAvqfjEW4GGUPy9iruqQS3AYtNQ+bAXNtnCSOUJzTfJniq6KMm+pQ2npmUhp5RCUKo2n SD2tWQm2r4xszZHWSHP+bSUdiGuo8mchlTp5dgbmx8WWXvhGgWUbwKE6oMsWTiIUzZov yHJhB130oSn9I3nIxZtxzV6/EkGoeqXN4keBRxCiGKfG7WkHEzYuMtbMulNulkCGMcDq S4xg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fkmACf3c; spf=pass (google.com: domain of fm-294854-2024112017030323a88823b8a2693bd2-wlh7m1@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-2024112017030323a88823b8a2693bd2-Wlh7M1@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-2eaca6fce6dsi271177a91.1.2024.11.20.09.03.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2024 09:03:05 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-2024112017030323a88823b8a2693bd2-wlh7m1@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 2024112017030323a88823b8a2693bd2 for ; Wed, 20 Nov 2024 18:03:03 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v5 6/7] initramfs-tee-ftpm-hook: Convert to hook.inc Date: Wed, 20 Nov 2024 18:03:00 +0100 Message-ID: <9c99494b0bbaf84f50cd70388372d5309224afc2.1732122181.git.jan.kiszka@siemens.com> In-Reply-To: References: MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-294854:519-21489:flowmailer X-Original-Sender: jan.kiszka@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=fkmACf3c; spf=pass (google.com: domain of fm-294854-2024112017030323a88823b8a2693bd2-wlh7m1@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-2024112017030323a88823b8a2693bd2-Wlh7M1@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"