From patchwork Mon Nov 11 20:50:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3915 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:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-pg1-f186.google.com (mail-pg1-f186.google.com [209.85.215.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4ABKoaLq014842 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Nov 2024 21:50:37 +0100 Received: by mail-pg1-f186.google.com with SMTP id 41be03b00d2f7-7ee3c2a2188sf3453501a12.3 for ; Mon, 11 Nov 2024 12:50:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731358230; cv=pass; d=google.com; s=arc-20240605; b=clySDok3dYrKdQgfvUKMIvl9dkNmJHTcEz9ClobAerj+m+SuFGS4eoztt6foez2HBX 5PUtGk2avp5ETLXfA3Hno9Rf44ZzQtNv+6H9gGd44maF8sdCqD1znO3DfrCIw2lGwinH 2GD60jCIqH4GeOmBow9RTNeIwR0c/dkQqVmWvxKag4pmnxJQqzgOdMiItLj6Gknz815B 0pyLWBTdlAWt7A5/VSJPcMrlbhOCHVjEJ2MfjFy0RituKF8hSCrySOo04n8OPmH3yWFU k+5sBTp2J5avdvrduqNvDiPrfiFt12U+wyyT0MCt3LrxyGCBGiVYfxYRbbCp9VCxp2XB hnfg== 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; fh=jUVHzhELPDJzehEZeRCe/QP65dMN3ssrjz4cEDzBjCs=; b=bGjTse2k9pFjqpYxaOFRKbHhI803o4hEaVRJc9ezCUVk/lraLReoP+5f5rNXA1d+hc B+mH97kaJVGWzEUJj5eFG0FfSF17kvieAp8Q+vIm3JheBeFXtJEcqigsspCsCpOhc9Sb jQF06g0FHzSe53/FrybV7B2KKvuzHnofiGs9Y06YIbAQnp3sWxQJHSLXkQlDg7uWVsvY 0SKl7iHXsGKO1zfI/nXE/v01ag278BBNmSbvhDc0mgQx7DO6AUPjiNQGVTRyO9TIweFV 7O9rzLq4T3E+4yc4IAGTVpFaPzjxi1gTvbc6f2tUu6AcAiNHRk+6N809hKBsW9zX+T4U 6DWA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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=1731358230; x=1731963030; 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; b=jfdO1jj1bmIkyr4Tj2SjNxb8/hLLHrozBnl0bWUDRaSeTL5UdHDEmjCoT0ijXtJiHc eDODEcuRTXPRHfVanEGe23d4PlwajTDfSVtS1QNP9HmcqTjPxfdlYJiXcSd+JR2v+4Xo 8did0SgdO79FwSxZAgeMJuHYSDAPaEqVCmLDQ+PrBalR76ufE2Sv2ud1IamViNswKj4G yyqRh1L+Fck+z9nNogIAzkRHq9K3BnMTHN4sF+JIKGGpRXLNHhlinFTJj3aSpkdMVW6A EBcYD3yTQWGIso9O6KATMXxJAjlS3qWYcN9UEpe9LipC2s7+QSyPOStmgghya6RTsuKs 8dXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731358230; x=1731963030; 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=Kev9gnlxnQ/ktGaAE2WJUO02mPNJONcmrfyzQemJ3hQ=; b=XLoWKGCe6SEBdpOYZyGls4SHRZJHBTKl+K7HIzFTrpXr2rgXla5i9LH3zUDAHo8ZBb YNDBPaHKhe6VcyuVgnlbDly47WZAeEZ4tedtmPRI4vQRdU7zgMqRzW7MVDprJsMaHAgz z3A0Q8GhiXyUqz1vsS7QZZtiiWrQxs4nZiJdKr2Qp0+RKYzIlVmCRUDyg0M5Km/ORg3s O41fuXAxaZLHqbMYubearkInz96Dn3rqU/2Rcfhg0vPuL1Lw6cIQL9MULbPRloC0hS+7 W+bF+ZdOefC3uKu6TWyhxA/wBYH9hLlx/zc6s48/QDcncMNlfitngmj1lLRjog7kt8pS FWqw== X-Forwarded-Encrypted: i=2; AJvYcCUG9MOczT4glPBP8vaAf60X7UwlTl6M5ti042IDpyM7H7VEfS15X96gBMC0Yu9SDHNnzRjVs6g=@isar-build.org X-Gm-Message-State: AOJu0YwtFxw4C9cHazI7uchyDnG13kh2+vCk54cJy60XAzEff+LHbxCm cmBOS2MvQALiv7E3uWRg64n0WPDTJMQPccYbnXYsJ3g090uJHoVi X-Google-Smtp-Source: AGHT+IFtP4CXWXL6gOSrNTge4jTsVecwxYXXTsJ+hpxVYptfETbfXkcqS9yVmo1qDmYjM/NmeY1Zlg== X-Received: by 2002:a17:902:ebcf:b0:210:c5ab:2420 with SMTP id d9443c01a7336-21183ccf0f4mr141993355ad.5.1731358230174; Mon, 11 Nov 2024 12:50:30 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:903:705:b0:206:8932:d4fa with SMTP id d9443c01a7336-21175214d74ls32114715ad.0.-pod-prod-09-us; Mon, 11 Nov 2024 12:50:29 -0800 (PST) X-Received: by 2002:a17:903:234c:b0:20b:6188:fc5e with SMTP id d9443c01a7336-21183d66a42mr197786175ad.28.1731358228745; 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=NIVtwAMkJAedxTpigPmHRFMTZM1/skBrN35hsYcURMc+SNMGjWCNEH8xDRGdOKZd5T lbP8NXJv1fJldR1MGYoQ12yL1XKM6xnteKgfXCOfnEFH/6caEk2lfupGYQpJPwhhqxxw IdkC+/AF084IsexrGCfpHxlJI7E0rxHX2p146p7czcDE5NXEyxeAezrz/ACQNZ0j3x3S QEycFEiZHIXEBbvZEzmFuRlBfhk19EbCo+Rk/VapLhWeoiL/gAdp8lsCDDU7wEYMXrGu mQHNxDFsgha/jew8DouriBBvxthvc/NVap/5vPZnJaBRQM2i+1Bsw5Gthr+CgQTTfGIC l5pg== 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=wX0wNI23XS1f30g4Cw0cLpi3idM9YV8lQ99gMldZRm4=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=W1glMAIGEVAQTdgSDnpKPxCiTWcHVnLzkL8YwGmw/AvTKlpGrCjnMf5BJiA9NX6jVk NOpICc8ZztBKy0KAoXb1ZaLg5pZmRMOLt4N30y4iQ+TxFlcLSA7//IE/KpHDsZMcZtbZ XWkGP+xW1/3CGjKzc0ewQn5pdKsFPl5QysVz9SgIob5IIIX5evvuTjuwyhwX6wxml4Wq ZQ0NDzE0nx+sIj/6iE7Xvi7WGMhJWR6DoEMyYfAYMpBOsGBxZZ21Zo4pMI03G8U18uZs yA66zwgMI6wZLcNPNAInvoTcUYRrb7s2qN1ST21kMPFy5Z2odOUOMzlJkCHic3HSoETN Wsxw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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-2e9e34a3a9csi57147a91.1.2024.11.11.12.50.28 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-202411112050262544849882de7926ea-b_51fb@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 202411112050262544849882de7926ea 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 7/7] initramfs-tee-supplicant-hook: Convert to hook.inc Date: Mon, 11 Nov 2024 21:50:24 +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=i3PLimYW; spf=pass (google.com: domain of fm-294854-202411112050262544849882de7926ea-b_51fb@rts-flowmailer.siemens.com designates 185.136.65.227 as permitted sender) smtp.mailfrom=fm-294854-202411112050262544849882de7926ea-b_51FB@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..6bea92e8 --- /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"