From patchwork Wed Nov 20 17:03:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3956 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:16 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pl1-f188.google.com (mail-pl1-f188.google.com [209.85.214.188]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AKH3ELv006951 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Nov 2024 18:03:15 +0100 Received: by mail-pl1-f188.google.com with SMTP id d9443c01a7336-2124debb33csf10053945ad.0 for ; Wed, 20 Nov 2024 09:03:15 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732122188; cv=pass; d=google.com; s=arc-20240605; b=CmD4FtJsLYUOxgzD5ojV5HpZKBIZoQN0txdZpPamzRPtjO64KA50+wsbkhdaazLPZn bXgPHE6yQPz6PP38ktK+9D4oKtwneMZ7opisikPliQIm8Xrd1EA+BqB9a9mYDBfSPQyJ xrCo9JB9ulU9NjajxQfChxfOz4ZyrNFr94qnt6N6+l55RTsgYBeoJYJKp7fPfy0kxU2T uX8UtTW6QeEF6KvtPu9KOLOkdJ7MWmHVlxMP++/k8zb0is37OtJ+vJcGhsVJ+vSyMGjY M3Z6GrQLTMwhnm6golJp0tadZQT7QUykjJpZ6vtiLiLL10c/oeie/3EIWBNykzETYrSk VmzA== 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=HH44jfIvrkJJy+MvIDMtoAicDlcWwN8lK4Xhn/Fk3zw=; fh=JzXCeBK2pyvxh1K4GG8OsBl0bj6jdFhOp60bEFQe2wU=; b=EG78YXC6qhYegC8xFSoc2d7AZq0TbVGPEK+qIkavRJiQqtfFSXRpiMS8cypLEOAkNv d751ULnUVqAEZaaSOYBSPggxFhS8UrQH/5aNQGZ9PLLi6HQODs69cdSbvzRGEgprBi0h CCFNf5SL2a2c2RC8Vl5A22S01vHuZqzhXv77w+UYGR4cILc/hR3HXYrTQFMMLNws2XmQ teTefv76CNPEW1rG3jPHzLORUTRAde3Q3zrKBZHThFE0xS0rRoXP38TfcAA6Ss6FN1gu F5Aj2fM9kGUazjy1PsPFhfJeeRY9a2FrUuMRKY0Fx5mjaVLcMHX7QQlCieFpD7s5j5By ncig==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=HrpOteHC; spf=pass (google.com: domain of fm-294854-202411201703032aa330eb552b43fb66-jungy2@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703032aa330eb552b43fb66-jUNgY2@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=1732122188; x=1732726988; 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=HH44jfIvrkJJy+MvIDMtoAicDlcWwN8lK4Xhn/Fk3zw=; b=L+Fp9kztUcLwg22PABQWRF8PPlVxI3M2EVZPMQg4vfQmJM4aXJGgMkQHq2K/6DwJbv WFPDNmlyr1wgKVnsHFqZ8NcpaBdgGuZjFG49Pg5tWrwf3nSzXnUvN0adWrn7UAJg2X48 RwgyGmIZJajSj2b5iVlh/k7Oij3pv1DWe8b6UhEEg/amvFgmZBFgYtkRUbiMv4V0ObJr 94duyeHKJE6XxWQNw9P1kjj3DfdELXZaqwhIOhVjwSOHtasNX8XLJrJnM1uehINNV4ns XsmWaVE5T3aw040bY1J3yRQ2v7FPYRl8VfPzEZRnFsxwXG4FlTT3h8EdLIznKAp72Rva aqaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732122188; x=1732726988; 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=HH44jfIvrkJJy+MvIDMtoAicDlcWwN8lK4Xhn/Fk3zw=; b=LQ6MCtqQQ8GWoSV2EZDP56PSDh8Iie/0XSesV5qIY4BP6v/TnGKpVuuJa5GYjIbn5I qdiyME/NE34YCXp8VbjFSuU+SjfubfRjiwoOGXTqHrxXnZhG/CGzp0ZNWxitqrLCWCH9 ZYIeSUOej671CCJYwF0802BTCXfwgXXgXSzyu6B142e4KxHPlK2XSNbmMOQnXF4Rcn5N 2muDzVPQK4eHkapjepr7yLKBl/pToXbIDkiAA1ArHTv0hT9sAb6x8YQ2cLU3KR7Ycrwt oD3M69oScaNtnRax4TWZT22xWtlpulBxfdgOLb3NVmj8q4YbJaDh3bDqFWPQ42KiesS0 ngRA== X-Forwarded-Encrypted: i=2; AJvYcCXClfe57gLwb4OrJV+/P9RsxNJlgv9mIbuTQUqUiZRVeqF6dfIBqoRqUGTz2SogeIjcQCJw+1I=@isar-build.org X-Gm-Message-State: AOJu0Yx/H+5vbkUAZ9qkhNBnUXVOX+iP8j0sjl3se19pjCWr083IYu66 zLa6Pzl/aa3hRRLQXGHKRKwwOoi9qHsjc+rKYnbk7H4eWwCK5Uou X-Google-Smtp-Source: AGHT+IEhkan7OxkXrAzjUM1NzVI3lYYxiRQyD+kgpNZGk4mM3+tDKq4/1idEIoV/QL6QAp5mK9gEhA== X-Received: by 2002:a17:902:e848:b0:20f:c225:f2a5 with SMTP id d9443c01a7336-21283a409e8mr217005ad.10.1732122187604; Wed, 20 Nov 2024 09:03:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:903:650:b0:212:2223:27a7 with SMTP id d9443c01a7336-21222232ec9ls15238195ad.2.-pod-prod-00-us; Wed, 20 Nov 2024 09:03:06 -0800 (PST) X-Received: by 2002:a17:902:ce84:b0:20b:db4:d913 with SMTP id d9443c01a7336-2128376a8ddmr1589515ad.11.1732122185916; 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=Qy2u3uBnVFbC7JNDDUfvcLyZ3Pq/fKrKbSKa6PNb09dsucazy+SYsbiR0TnYNUTwza KqUw7SBSTrGZVD1CZVTUuDqzuTPKK6glhrXmkdVC6Kdh36TeZJY3AnAjEsXvqd/h/pIE J9BFrwFTLepF1SBB/2PAJlBBPTqekoH4Sktilf31fP1AzL3Se+gkajpcDrlZqD/5xJ6u sUuGMImV99ASAn3CrDNa1kC17GpAZ5Fsbi0fKiQkjfNsQIwz4sLRd5A5fyjFhPGY3uZC Uggxegn7V1y/A1c6k7E8dNzcjoPnNUlznjkyUEZCLYyHIQkZHQR/pECQx+EWI2q+5cXO GNZg== 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=K/9H8H130CK5JxJctldzaMoS23gMPdsPHcrHTmkexo8=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=NdQDe4anKwGPvDKNRYBQ/vr+MRWD5lC+8bkRNtXHVdTuDFOAes4WCHNMHOEwnCeWtA xdI7e5Tsi//nLFTniaAx9WW6B0seDIxSdL3uot7HTpnpij+2WRSgGIRhIV3ZCUjZqruY CO/36wd4xPHKgZVz1FbKy5qgkr67Bf2FQMMTCqjEGdyc7V13fI9dGDsnPg8bVQpUB7eI B7N9lWcJyxRnDgyVEe2eiD30XukK/W1CISf4dFDmfJdlTsUA47z2dv7q5KIJxxJqRFPI zPAroV9M+rn3OMtnn2ap1RIFO37ItY4bN+jRFnJ2qqbglIfvQSLTjPq6kguACqPUb1h2 IMTg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=HrpOteHC; spf=pass (google.com: domain of fm-294854-202411201703032aa330eb552b43fb66-jungy2@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703032aa330eb552b43fb66-jUNgY2@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 d9443c01a7336-211d0d23127si6078085ad.0.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-202411201703032aa330eb552b43fb66-jungy2@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 202411201703032aa330eb552b43fb66 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 7/7] initramfs-tee-supplicant-hook: Convert to hook.inc Date: Wed, 20 Nov 2024 18:03:01 +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=fm2 header.b=HrpOteHC; spf=pass (google.com: domain of fm-294854-202411201703032aa330eb552b43fb66-jungy2@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-294854-202411201703032aa330eb552b43fb66-jUNgY2@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..b9dedfd3 --- /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"