From patchwork Wed Nov 20 17:02:54 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kiszka X-Patchwork-Id: 228 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:13 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-oa1-f61.google.com (mail-oa1-f61.google.com [209.85.160.61]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AKH3B8t006890 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 20 Nov 2024 18:03:11 +0100 Received: by mail-oa1-f61.google.com with SMTP id 586e51a60fabf-2967f717d96sf14652fac.1 for ; Wed, 20 Nov 2024 09:03:11 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1732122185; cv=pass; d=google.com; s=arc-20240605; b=ZBitpjAoc1WU7QD6KYiLLMVnsyCYa35w6uRtNssFT01DApUce/SUQljiQFLgpZzv8d 1fs9BStetlVrL88Bw5VFiV7QVj1zLKTVDsTRj7WPo/p+to8GfI3kQux9iiKPXZuAvHbs XiteCF53KRr2NcVkwCm8yrr3hbgAEgTmH27OMoDiJjuoPCFUeR2MU9JmwyUKQvHHlDl1 BdCBy9+G6R66QxcOEQHtaBD36TOKKJeNtr8Unslx4IYSPQMzq+KdPk3HbapF+o+Q5fIM /vKFfVC3KqBrI4Z5oWbTfBIztVdtwJQfQ+NLGHpdvOagVZoLhpcUIY+sKRsjE9eePtYy Zjdw== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=wjFSEZ2PYKe8OvAigoOP7Wb4WCtjwQbq2e2ZmWgXBYo=; fh=U4UT+GJhG5vw3nuiSxRqwcSbuRDh2rYt70gYEw9aruI=; b=Ieo78QfaiNfSnwZAEFIk7cUIWDsYoBC0ZNasrqf4eJcBHp70OWR99jYH9pby23Vi4O MbkF2CkhhKsjsp5B/fIlauLnTIXmR7LYJvbDqpqZ4bkXA5vi/yp5pWrnowqFX4AuWn7Y wdimxm0yArXxTVvt5Kt7/zJNROv2LROEGuL4Sker5VhHwoffmiyYs042fpO68ZFnzy+c 4ol+3BjAqlB9KdAoqtvFXZNATiB+QERxz+XRXgEu+plf5LLQ0g73xCx4KpuBjr036QZs Q+JqDUGiXA+hU7yfqrIqKBxFHUCnEdPmscMNygB9oylqdrPdvOucawE3UTWJEnJls+L0 EYcA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=FKVdOoGd; spf=pass (google.com: domain of fm-294854-20241120170302e4394d6629cc9b379a-f5og_h@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20241120170302e4394d6629cc9b379a-F5oG_h@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=1732122185; x=1732726985; 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:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=wjFSEZ2PYKe8OvAigoOP7Wb4WCtjwQbq2e2ZmWgXBYo=; b=jurWhB6gfmHrts09mz9VHopaSrPMayXSongwTQb0pBT9ZtMf89TZxR2SEXCzMqU/TC nt3ZM2xSLjoxU60MhPszKBrJfm1zcurok9moeuDBHqSw56ZyxRP510XgDHmdkvaoLxIc jjBsSZa59Ai2T2KzQp2eQlyEJ6dOxywoeA8RF0MKT7TfiNngjTiVGledAisOlN8GcdX2 U5lvwgXQv9Oo7FXsYrFImdvfDLfc6efV97hlBwuDVuSEz37SNcWdKvuvcKsTY8BSssLe 4ZxxhjnG8gh7OK99MD8KGUYA1oijj946i+P/Xv8LlkT6l85A9t+9r1s+mBZ0XEe68r1W 2oqA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732122185; x=1732726985; 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:message-id:date:subject:cc:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=wjFSEZ2PYKe8OvAigoOP7Wb4WCtjwQbq2e2ZmWgXBYo=; b=sf+KBZDYrnzhfdd6me8GRNo34uAp+m5z5OQpB4V61ikAk9TR3Vx0VpdAP98LQlxIgO g/oDGwl7uXmuhsT4o6mwPpYVrXSt/I1zzfucZv/8WWVaJTB+mFgyguJiiNrOYUjyTlg4 vdVS11f3l7DPLmTYtvR0KtspQd9PLQnyb05gKIeIlmLJg6dlpoDbMPV/nS0tsA9eHk3k 2q4D/VkJb/UE9MsokFsqZWHBZC/I+uibM6FSkVIF0R5cShOodMyem9bn6jpPSKkZaYmQ iGchjP0MJh0G5EcnYxxcp38ny7TzdM4G44P6U9JS6rhKDXQaScnkZepYAnLQ22H6rnYl JCaQ== X-Forwarded-Encrypted: i=2; AJvYcCVob3Oxo/EeQqzqlG+0OJ92lZJTTrO2NW3DpxikYni3yg1+g1FqirgcA9bv6bRdbRQlzLTakaI=@isar-build.org X-Gm-Message-State: AOJu0YzyHQoM28FKIlpTwgPQ9ftAJI/y51nlaiMB+AadrAupUgRcgmN0 IOYR1yqgEyFZff5hT1i10xBmngVWx/FAed7fPHhHDqh9K47Jmwss X-Google-Smtp-Source: AGHT+IGMR2w2O1PnOtnWj/a88pRznrhbIwNNcgvjKIBJg2uTw5ybcmzdWdbIhP27nufIt1yikc6rug== X-Received: by 2002:a05:6871:e01d:b0:296:f1f6:5067 with SMTP id 586e51a60fabf-296f1f665admr1449828fac.39.1732122185180; Wed, 20 Nov 2024 09:03:05 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6820:1ace:b0:5eb:bf77:e0e with SMTP id 006d021491bc7-5ef3c4c6a18ls26184eaf.2.-pod-prod-06-us; Wed, 20 Nov 2024 09:03:04 -0800 (PST) X-Received: by 2002:a05:6808:1899:b0:3e7:b9be:527b with SMTP id 5614622812f47-3e7eb7a7f26mr4335572b6e.31.1732122183942; Wed, 20 Nov 2024 09:03:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1732122183; cv=none; d=google.com; s=arc-20240605; b=EB5UqYtEC6KusbPQyDNck3PiLQ2Fea+M37xMe7GpjB5sWhSobJ2vChV4Guh18Dz6jn WZ4Un+tjrv+qHC9nJrz344qy06eC18d58Z9eIDX9K0uUu6A3Z3ntzzRffh3tkXkcuOt7 eQ4HrKw/i5YP8H7hLZGQi2WKFJCSNDwb1S0gbYWyy+0fXYVvACSlyUaZvAQqUmnXL7f/ +duwKOLlGqRHoE/x0mWvBxlNhsgTHRqblj001pwJBkbJ9Q5LkxNrtK1XNOIMSaby0XHX rj7v3hFPA9CqkGoKIZyjFKQKBNkrGQKXElNHAoZ1/1e915yDw5g6ksOLcpxEdEx+z2Gb +DRA== 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:message-id:date :subject:cc:to:from:dkim-signature; bh=KDBY0mIHSWbtlRPm64zfsC6H5+rhjdQYRGCzZqgBpaY=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=coboR2PUtx5YpgZwIrnAEA2o4Qv+s75jz19pMimZfYSWTyAGb/2gfgkBdpm1J9zIfB K4KeDUSJhbTlpSQgduVdQdL1wEBYPLCudLaSE7yOuPNOBcIgLNgkhHad4KIVTCrcBBiP 0WeY/5Z0pn487zdKGQ6rP0KUT2HNMUyWmK6p29gYTiXauts11KsvqSCRRYPls7WG28qI 65/kln5er54hX/RC1Ib0VNDnzeCCsR69rUuNSUkIw0ak40FaxU1rHd+t3OzhyZQ5umAB AI6hr6v2IkmTxZd/8eg3McvaALBOS0/Bfn9NVRCvN49syAk3qdYs7Rlm9QSpw1kMH/4h 9y0A==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm2 header.b=FKVdOoGd; spf=pass (google.com: domain of fm-294854-20241120170302e4394d6629cc9b379a-f5og_h@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20241120170302e4394d6629cc9b379a-F5oG_h@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com Received: from mta-64-228.siemens.flowmailer.net (mta-64-228.siemens.flowmailer.net. [185.136.64.228]) by gmr-mx.google.com with ESMTPS id 71dfb90a1353d-514c3bb7270si124426e0c.2.2024.11.20.09.03.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2024 09:03:03 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241120170302e4394d6629cc9b379a-f5og_h@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) client-ip=185.136.64.228; Received: by mta-64-228.siemens.flowmailer.net with ESMTPSA id 20241120170302e4394d6629cc9b379a for ; Wed, 20 Nov 2024 18:03:02 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v5 0/7] Simplify writing initramfs hooks Date: Wed, 20 Nov 2024 18:02:54 +0100 Message-ID: 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=FKVdOoGd; spf=pass (google.com: domain of fm-294854-20241120170302e4394d6629cc9b379a-f5og_h@rts-flowmailer.siemens.com designates 185.136.64.228 as permitted sender) smtp.mailfrom=fm-294854-20241120170302e4394d6629cc9b379a-F5oG_h@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?= Changes in v5: - permit completely self-provided boot scripts as well (now fully tested against an isar-cip-core port) Changes in v4: - add forgotten header to boot scripts (this part was apparently only build-tested so far...) Changes in v3: - fix DEBIAN_DEPENDS for initramfs-tee-supplicant-hook - use .= for extending DEBIAN_DEPENDS Changes in v2: - add commit message to patch 1 Specifically while looking at the initramfs recipes we have in isar-cip-core, it felt like it's time to simplify their creation and offload the developers from all the related boilerplate bits. But the benefit can also be observed with the initramfs recipes in isar itself. Jan Jan Kiszka (7): initramfs-hook: Add infrastructure to ease writing hooks doc: Describe initramfs customizations isar-initramfs: Add initramfs-fsck-hook-ext4 initramfs-isar-example-hook: Convert recipe over to new hook.inc initramfs-fsck-ext4-hook: Convert to hook.inc and improve initramfs-tee-ftpm-hook: Convert to hook.inc initramfs-tee-supplicant-hook: Convert to hook.inc doc/user_manual.md | 58 +++++++++++++ .../images/isar-initramfs.bb | 3 +- .../initramfs-example/files/example.hook | 21 ----- .../initramfs-example/files/example.script | 23 ------ .../initramfs-example/files/local-top | 3 + ....bb => initramfs-isar-example-hook_0.1.bb} | 21 ++--- .../files/initramfs-fsck-hook-ext4.triggers | 0 .../initramfs-fsck-ext4-hook_0.3.bb | 14 ++++ .../initramfs-hook/files/hook-header.tmpl | 39 +++++++++ .../initramfs-hook/files/script-header.tmpl | 26 ++++++ .../recipes-initramfs/initramfs-hook/hook.inc | 81 +++++++++++++++++++ .../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 ++++ .../{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 ++++ .../files/initramfs.fsck.ext4.hook | 39 --------- .../initramfs-fsck-hook-ext4_0.2.bb | 18 ----- 21 files changed, 263 insertions(+), 268 deletions(-) delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.hook delete mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/example.script create mode 100644 meta-isar/recipes-initramfs/initramfs-example/files/local-top rename meta-isar/recipes-initramfs/initramfs-example/{initramfs-example.bb => initramfs-isar-example-hook_0.1.bb} (63%) rename meta/{recipes-support => recipes-initramfs}/initramfs-fsck-hook/files/initramfs-fsck-hook-ext4.triggers (100%) create mode 100644 meta/recipes-initramfs/initramfs-fsck-hook/initramfs-fsck-ext4-hook_0.3.bb create mode 100644 meta/recipes-initramfs/initramfs-hook/files/hook-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/files/script-header.tmpl create mode 100644 meta/recipes-initramfs/initramfs-hook/hook.inc 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 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 delete mode 100644 meta/recipes-support/initramfs-fsck-hook/files/initramfs.fsck.ext4.hook delete mode 100644 meta/recipes-support/initramfs-fsck-hook/initramfs-fsck-hook-ext4_0.2.bb