From patchwork Sat Nov 16 10:55:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3936 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 11:56:06 +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 4AGAu55p013512 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 11:56:06 +0100 Received: by mail-yb1-f191.google.com with SMTP id 3f1490d57ef6-e38088d99a5sf731925276.2 for ; Sat, 16 Nov 2024 02:56:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731754559; cv=pass; d=google.com; s=arc-20240605; b=exRjLbq7em5amWRHB4XkcsMmqeMpO7nGgmys2/znSMhvduawL8EHrdypcNeThnMPBO SX8Ut2EqXixlT59cVAYv1Wd48tmpjmEp8riPAsjXmVNUq8gfAYbGRdEvnyypEJdBrlNO j1QAHFJl/nNwec3pxY9y0Go9L14dr/kWOGEpwaiywdWjynPTpucCM8FZelTdJkFeUgby BzsxmjDPwZlpyQOMdPxDG3/7tljegURJ8Enw3UTPuRN8inuHkxdiWpFAlDMKoFrStNHB rEuViX0qAXonhDkWeV1fF3Vlves3hKaIVtbVeYSgp7JDEoY2iy9hIe5dZ4kIsml9nRWu wSkA== 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=Kf4knulLOitwJDtQZfBrE2e7KWDMr43czTIPijbJMj8=; fh=SWp0DsSM3P13hdiNxYUTAor4Ic0S6r2u9UJhQgxu0JM=; b=FylzdcqypcywH3vorT1BByyHg32YluCU6E1ystoYOfYSe1rBY/jTDj85OxogVeasEk EDm7LSmsOcprQvGl12VG80EHWUqoftzFsVy2ZVBkDQO+dVvV1VplEvzTKyEpL8XjbMu7 xpuX006zql/nIyRHSzHFgtafC6lVWb1CJyn5dO22yu676ONHSDf5Bk7Bl+MgV/9nZ6H3 gVDaom8ic2JPlDija5lVzHk3mLwNaAsPBNqqRwaRRfQikZ39R3M3uZnpdZjiOhwxZi4W wJxfcXGlJEfvuW/TTAfKSIhauSN9PwuJLaMfIiL2Prm+WhAEJy4xzv0wppFYkC69nsbp 2wlQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=AeZ36fJ6; spf=pass (google.com: domain of fm-294854-202411161055558d9f4b255f0958c8ec-yzkkfy@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-202411161055558d9f4b255f0958c8ec-yZKKFY@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=1731754559; x=1732359359; 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=Kf4knulLOitwJDtQZfBrE2e7KWDMr43czTIPijbJMj8=; b=cOLfATxdp51slm530PsdQM/e/T5szWJe0IjYd1Ni+NeumgJjyq3WAJ+2G70tW437og 5EyX+FDPiDEzor2sN15W4MSjTavLCeBrKgURd9kkXihMQFTTOu40UH9uPDb1aCX0tRJg zgCpr5k2oQf+6h243DjYd1W3MxceW0oIVm39YSye+dzP43om7kEwEg4pl4fsUdDTV6s/ IHRXo59i4Bd8Tb2/GYFUHEU+aWQUYwsQFKA5d3ISWobkO6vKuYj4hlNma4cEXwjxzrln MUDDxM6Ykuhbml+haTmbMpGIGI5TVxE8HCkFtTRbha0PeUKOmpst1ZtM/9+GWYrF29kS 1oUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731754559; x=1732359359; 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=Kf4knulLOitwJDtQZfBrE2e7KWDMr43czTIPijbJMj8=; b=T30GbeKm2hDmv91Q4zlGsAiwHvrCFoiO4x+KEewKeBnKXkjLqQ5ZWOuoa8NWec/aQn gpyp4DIDDESZnb+oIm1kJkjDi3SLVuDo1uV2vxRJNbsU9tZqkT7uRGvurUATdT471e3u 2dHN+Q0/NEc65kpRsVf2jYW0G0/us64i3OM58vgmLOfbDCRf00/cJpeyHHGc77PzYSme MJ7t4SKawDXoAQhWHpvKeO8ybcWC9MsmHPobTIFjLQMhhTAB8AoNglEMFysZIIMAMJwA Ad7sYsRZUe3biXWRv2CKcN534pH8dc5e7/sJpjox3VVHNzJ2eenFjLU/aozx4GhDp9ik tSSg== X-Forwarded-Encrypted: i=2; AJvYcCVPGl+0rn16l3yNL+zmUG1HfAvX6dFbOONc4XCU1zylLx+jrdYeLm8q+O9ZbhlFdb/HZIQm5zM=@isar-build.org X-Gm-Message-State: AOJu0Yxv8Ze4jaVb/nKyrqmIedDHP3onanodgCpuh3N4YKYa4xwfDFXA wzpseofGzfTQlMzwpoT5kLEHfnRimAFEn5NrP45C/IAKQBzifZE6 X-Google-Smtp-Source: AGHT+IGUg/9Pyj5oaljqHD5At2xgbstEA3zLu5hp3D22crQAAq28eG5wABr2KrwaqZZzaOb8TiUWmQ== X-Received: by 2002:a05:6902:18d6:b0:e33:25e2:4b1a with SMTP id 3f1490d57ef6-e38263b8193mr5589039276.40.1731754558671; Sat, 16 Nov 2024 02:55:58 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a25:d886:0:b0:e30:cb77:2e86 with SMTP id 3f1490d57ef6-e387e6a2d14ls636040276.0.-pod-prod-05-us; Sat, 16 Nov 2024 02:55:57 -0800 (PST) X-Received: by 2002:a05:690c:600a:b0:6e5:e6e8:d6b7 with SMTP id 00721157ae682-6ee55bba716mr65464057b3.1.1731754557094; Sat, 16 Nov 2024 02:55:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731754557; cv=none; d=google.com; s=arc-20240605; b=b899kIIEVk1F76x6lDI/zswvrGn4Et5gZVyYL0EVBSe7kNjMEOgCaNg6U8f+ns3u2c OPfbDp+L4I3o4PuC01uIsJCdoUMJA93Voa6lBHfobwAM2W0lkxkHjt4sVD3bkesCMtwC 01l/W/ffpE/UZAVEqJs7fiRmaEjb/J0zllVmNIEXyvACUEY9GmHcnxhVV+7nuHo1HO7S yZcXxtzrBM+G3xPHv1R7ZD+Xpe5UP2a2ROjdWaGRyvNYBTIK3LzWgfUfVzwNFGEcdSaP LrbChpUU/EM7JiUAU3zPDjiIWc613QxhHwXi1r5K/3RO4Bj8aJsdqhcNoM2YKN4V5gWk aa0w== 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=jiGeojvRHNmlFc79f5MWKbmm2aQ3f37pFoK/ppr6hVmL/6vhcpYpRe8M7KrCrtaV1N X+m5dDPqK+802HMz7AKVLsyYz5XnenlY0i8JXT61IZUhbu0TfXiIDxn/+1VviOLilYj7 1pTiicx/uQESNkLaCXZrbOlXgakeOY2L/0/3Dvu7QqZ+I0QJ0kUhE05shUkU/iyOo2+e uGprUW+rAYciW4Ji/8cMeIEStPaqGPR/rT/0voGqzpcbAihvNbO3T1KWp7EUACV2/Iid vocJ0Pscm5kYyInk5b0E/Ld2YdNJuhWorVTObOmSnSxtw0KSk4VnL4E3RQ+l9kH+6vAq SZKQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=AeZ36fJ6; spf=pass (google.com: domain of fm-294854-202411161055558d9f4b255f0958c8ec-yzkkfy@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-202411161055558d9f4b255f0958c8ec-yZKKFY@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-65-228.siemens.flowmailer.net (mta-65-228.siemens.flowmailer.net. [185.136.65.228]) by gmr-mx.google.com with ESMTPS id 00721157ae682-6ee7133c0f3si1025747b3.2.2024.11.16.02.55.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 02:55:57 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-202411161055558d9f4b255f0958c8ec-yzkkfy@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) client-ip=185.136.65.228; Received: by mta-65-228.siemens.flowmailer.net with ESMTPSA id 202411161055558d9f4b255f0958c8ec for ; Sat, 16 Nov 2024 11:55:55 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v3 6/7] initramfs-tee-ftpm-hook: Convert to hook.inc Date: Sat, 16 Nov 2024 11:55:51 +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=AeZ36fJ6; spf=pass (google.com: domain of fm-294854-202411161055558d9f4b255f0958c8ec-yzkkfy@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-202411161055558d9f4b255f0958c8ec-yZKKFY@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"