From patchwork Sat Nov 16 10:55:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 3935 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-il1-f187.google.com (mail-il1-f187.google.com [209.85.166.187]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGAu5jY013511 (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-il1-f187.google.com with SMTP id e9e14a558f8ab-3a6b9f3239dsf5551375ab.0 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=cpEtJsz+nY6PYUhk3LUW3qWLlWPK8azGnTZT4eGmYJcBARCuao7sE1jB0utzpYRnp+ ufNjoiKOTCuNWprgEVIwCy7FXz5PvbyD+4KqK+ZGX3auefhD+uFbnBBP6+6RRypW6IlD GY0Dxl1S3oa6r1DTGJT+RZTVOPnJbRUmSsZn2tnqENVV27+rzBMDzCL28cXenpQmFbqy m62RQhzETDD8t7dEVCBUCoH8EPcRO0LWmJEApmlo2Ipd7X/P8uMH43BD8SJTv2OCcKR+ CuLhX9+DtT/FKZTfgynF5nP5K+IW2qPHjOddrnM6qBySy1hwe99oYNdnnqzbrj0fDwVD eWRg== 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=uq2hirg4k1aenxaWHeBZ8Hx3DD8IW62o2U/mpyQdTCw=; fh=DzXPbbsG2fONGl3mMQVckTN/mF2uG0IYoonOBLAyH5M=; b=fIEW0d2tir2owfBSqaxFKMXZDRarB3UBo1m35fIflJUF8hI3YDj0QFf1oMlzR06sbD pwUZ/CaEVF99D+lIoDbfgFP4zNProCxJ17rE8u9WoP8bgM+oreZ16vFjoa/KZaEz2aMf pC2ZDoSLNIW+X4ikiHqPbfwErre9B5g7Hdse1K+J3cDhbM614bHI/2axJhktJInadjag RnmFosA6HCbjQbikjV5aqkVFlN8D6GLPpaRlGYsWE0Diubs0mhszZJljd2FTAuCuGAZn bAqAL88wSGTLg9Mt0hcNRXkQdB9mqP3teE6AUvYdP9O0wVK7t2tK158dXyyhIAg4TItd d4AQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="E87/vHhE"; spf=pass (google.com: domain of fm-294854-2024111610555589b946b2eb7d05415b-6kycz_@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-2024111610555589b946b2eb7d05415b-6KyCz_@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=uq2hirg4k1aenxaWHeBZ8Hx3DD8IW62o2U/mpyQdTCw=; b=tTNwXsxeGkwCZuvIeDvtOGM0BNDIHKwjjQl+TWRhmqQKNa0qT6o0Mu2kK4wz5jfchV NwQJfSUP1C4WluKbCIG29JMnxXp8NfSpXPhVHWg/a5gKQ0jn+UuUKF+Oi+Durh0uRxPX RPpfdM9G4vXfhN/CCzxeHtYVB5N2fxL9QlDKqwSZduj9idaV64j/7ZZEEsdZ4kgsDunH L3cgYZFp4N86IMW52jPpfakstb7uh8SChuFLqkwRzW9sa4HqlXA0EydvOCiF1oIkDqCN /DJSQ3cNWE5t0sqUjHqNM0aYk+iVq81vi5T/RQGYQgFn4u31hsUq09jWz2A9s9jBhtoK VxDg== 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=uq2hirg4k1aenxaWHeBZ8Hx3DD8IW62o2U/mpyQdTCw=; b=Imv6qIMqmM8hLR6XRUOVKiBpdNPxvZbXyl3iAhVf93lwJTlDpIVeJdh18ijvtSAmsH dTGTC1xKifNhfRtWPwyNh3IwvEeTbdscHjUlVgv0OSMcJsupdcjlaY/c8YADOqYe0dUu yku9hjKchq0XqxsKUDcARsB0G6W58+L36up5NRI0V7S3n/oIaR/UcnKL92teLNwhsjSZ 6ZSTKKiuOy5Q6jm97EBVYvM3BPYQWI4Nrfwm1i8JPgdiV7WOkN8DvYc+ORVWkAAMGa7Y rYC84niohJ1nWMzYkbRp60jTiFCMNvueepQI8kCwjfU3htv7lRBpPJVK2Apw8/sahuAW jAtw== X-Forwarded-Encrypted: i=2; AJvYcCWzqytu4HwjifdEeAAErwLBGhBVv3dPk2fjRj+fv6x4j4X6T4/bvJK0PkV6CV8fR5aGezG0/q0=@isar-build.org X-Gm-Message-State: AOJu0YwytimxGSg9F553f7edgYLlKAxlUPCqp1Xw6KMk+R9/bOZQX7kc ZnZrOaycsEgNp5Pb3iZ0jG3ZLP/spkeSXSRXz7rB9V4AE/+Tscmv X-Google-Smtp-Source: AGHT+IFzSH6ceEUGPSNNua0eoQJ7LWyY/5GqSHeTbb2apT7xoPHOXVtToSRW1fYoAfNmBBGLdTsunA== X-Received: by 2002:a05:6e02:17ca:b0:3a7:21c2:a419 with SMTP id e9e14a558f8ab-3a748061791mr44984855ab.14.1731754558820; Sat, 16 Nov 2024 02:55:58 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a92:d78b:0:b0:3a7:5181:e6d5 with SMTP id e9e14a558f8ab-3a75181e786ls2541835ab.0.-pod-prod-06-us; Sat, 16 Nov 2024 02:55:57 -0800 (PST) X-Received: by 2002:a05:6e02:3c08:b0:3a0:a71b:75e5 with SMTP id e9e14a558f8ab-3a748027c23mr56779015ab.7.1731754557336; 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=fWCrDFnNyuhAwlekzwx1imunzNQ4X6BDBg3Z6Mm76Lj2uCDcAJsqGBF561zUCpYrsC GMiCeLUqllBQ9k7RxJd0SqGu9XZH3jjXyyVEOPGvkyMATVFQRRhnyoS0vWF//GwnyZhz E3lGY+T4QdnHDTFTHRxpqAuhW80rJUYi50EFCFJD0Ww6aCgP07/5v51ClxZJn+1vf8Vs wNlGcsgmBFIjZma37qVjBossCX75d5M6KfWpmDkGWnw1oC6D6pfYZMezHJRIdX3lhFZx Hs1/aukN8MxbbFX6ZjludwGPQP596mHC7HmYxRhY5PuMFXKpYDM2XCyhKG4tYZCJjugF XKqA== 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=biEQuNIe6TwOh0hbqD+Xnj5J4S4mHUhP3SuDN/VAN00aj87RKhHTG/UzV1oocRxtom 5BeESagExwrsiG/TAVPO4NfGeS6zycoHhqGxB5hpRk6RlWvDhumYXEiD3aKshtPJcAOv L4uzwV7d9/Cktcf/8eRv9GYE/TKgQA+wDW1UgsIiM7YwsMy2StUi21IkplfSZK1Zxlq0 V+SW4OheSXQiaJxkMnlbtf14Rid37yTOinzPuqaAOjo2jnpMAbxdpjo8MziIJqw4QpZm EO++NcbxNoZ1E5JvOovDaLZ8qST/DZHJKjCGxQh7ljokt/Jg0wIpXwHjWEkitkeMRZpV AqRw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b="E87/vHhE"; spf=pass (google.com: domain of fm-294854-2024111610555589b946b2eb7d05415b-6kycz_@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-2024111610555589b946b2eb7d05415b-6KyCz_@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-227.siemens.flowmailer.net (mta-64-227.siemens.flowmailer.net. [185.136.64.227]) by gmr-mx.google.com with ESMTPS id 8926c6da1cb9f-4e0756e365dsi160965173.7.2024.11.16.02.55.57 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-2024111610555589b946b2eb7d05415b-6kycz_@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) client-ip=185.136.64.227; Received: by mta-64-227.siemens.flowmailer.net with ESMTPSA id 2024111610555589b946b2eb7d05415b 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 7/7] initramfs-tee-supplicant-hook: Convert to hook.inc Date: Sat, 16 Nov 2024 11:55:52 +0100 Message-ID: <1681d4daf7fcd5013cd36b32a5aa2bb66dd083ef.1731754552.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="E87/vHhE"; spf=pass (google.com: domain of fm-294854-2024111610555589b946b2eb7d05415b-6kycz_@rts-flowmailer.siemens.com designates 185.136.64.227 as permitted sender) smtp.mailfrom=fm-294854-2024111610555589b946b2eb7d05415b-6KyCz_@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 --- .../{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"