From patchwork Sat Nov 16 11:12: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: 227 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 12:13:11 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-qt1-f191.google.com (mail-qt1-f191.google.com [209.85.160.191]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 4AGBD9Vm014061 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sat, 16 Nov 2024 12:13:10 +0100 Received: by mail-qt1-f191.google.com with SMTP id d75a77b69052e-46360a97a99sf11953481cf.1 for ; Sat, 16 Nov 2024 03:13:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1731755584; cv=pass; d=google.com; s=arc-20240605; b=CTZt9BtnjfBdu8Yy0op6qcNgk7LDVdL28gY4OzEc4PNg/8E+ayhI2sZEJs0zrFyKzX LKonzEQOO4+JbEy8IWKuyQSmrDNCrJrXvcdO9FhAVvAB2QubbhwzDaiEmVGiN8ATrD5M hYXbOnF8ZIcKXkQUmxnD7ggVhFO/ylOvDX60YloeMNeOuhXYi911WuR1NMfhOxNcQsD1 iXrthrIlAcIrJqHK2IFf8QEakLgw2IP5vmLg4p/LspnVZ7CljPj3V0Dc/C55bOzkF1er KF7YGUYrkWur7R5hhhsLvZQHL8M0qSanigA9XU8DxaN4iMxWMoD4bLvNettgoIYduYZj G9yA== 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=CmuTRqTDnArdBIGUwa7sr15aHlTuujB4lET/WCzrPhY=; fh=wlPRB4qzB58YiKqg/ynyN8t7O1WmWhntczhE8NBCcSA=; b=Di/w4JCfMgJuvG4D86VhIj5BRRZtmMlP7Bg7k31/dcyLuwtecudgVd802ZwofkF2bS nHt/0jWykqROp+NVQ0Q2q/nN1u3QYny9Ne4yYL2zHEEFwZrTLh7Iuy+nBqN0VUAmM/8x p5Hjc0KO1k12gwwpQGb7snUQ1vvGS4dVAho5hD760RBlDQ/GXopj4FU8088KwY2049kv In+pl5p1iTZjxvOE81dmfWlUVOnlXqFajPo1js03jO16HRnE4KFfEvLwEYiNiZkFLw1X iZdeO+95kYXJEqlFxvTpo+ZzyMOlI8QJcrkQnXMesRjHOlri+C/M/YjvKD7epI1tEPl4 wBQg==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=RMQZDx1c; spf=pass (google.com: domain of fm-294854-20241116111302e34ef432150aeff0dd-q76f8s@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-20241116111302e34ef432150aeff0dd-q76F8S@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=1731755584; x=1732360384; 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=CmuTRqTDnArdBIGUwa7sr15aHlTuujB4lET/WCzrPhY=; b=jyOZkNCx6WYFV/0cbIrnpBybqwgENDbawPVPpqzLW+eBDRtBVMmJuB3fc75xDjOnkF uRIarXoy7e/OqV9uhSl2wDY9QABKqz+pb7v2wvFGtXUJ1+IKasEMfD4ewfmsTYp324Wy +z8cybvEGzJkr4C/trSmOZ8xegzI0UlCVzPpEiuua1NlhQyIpFvtGn9vmFCZKTHrWkSd G2T6k/RZcIWi8N3GZwOVp2xSFAd+MF5Lu+UauA44WWuPNd/ZHVwECSh1X1a0CxDliaUS SXUv5ilAosRfkO8h7QoMvEI2VgBvm9OMqsgvhDtj2ZzS6vr8UryF+yWXcZDjMjdIrt/n di3Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731755584; x=1732360384; 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=CmuTRqTDnArdBIGUwa7sr15aHlTuujB4lET/WCzrPhY=; b=YX58IMIDhqSH30PfY3072aYDx4GKJUXT/ziSR2PXG+x8jxB9cM38edyKUxTThZGJqE KE69vs2Jy4r9T30O9Zp+peUuHexVsTy+kaLikZG+fAcEXC7Y12JSDKo3+81CshHDJib1 jE8xCW+GOEjonu/ZACM4RI+53pS6gmPl2rEitpMHCCvzad7lG6wkFDd8nnPek9swl4R1 fOHAV1AZu+btHLIHuhLb+f+YdRSMXK5cz3QVSdtYsR9zR07lk0tyZmmhy0MJ/4kpQZxg UGUCDSY/8o0cwXycr8umxxSWhzsDxRSVaPTxyZdIVB4rkwtocR5RUyDaAGnTBX1E0/Kh bsjQ== X-Forwarded-Encrypted: i=2; AJvYcCXBdg2YC7FTNogkRZ6c99P0tfWSncpgAKLZq2udogLDiZy+TFFsSQJg7pfm/JuT73hNJzOWi1Q=@isar-build.org X-Gm-Message-State: AOJu0YzY9+z4aKj8YMaXJ0PIOFrmtYWuyE/6tCSDr6IkMuG9DTYupfxi OjHi/Abambvc5bFPCcgcV3s1EIK9yTZ1hmfXNy7YFWmkkJ4Qohk/ X-Google-Smtp-Source: AGHT+IHsTjgqyJWk8EgUSZxUq/IqdatnMLk0897x8SuzIepLCE20AfYDj94UxAB+qLCWycVY7HQ8YA== X-Received: by 2002:a05:622a:4111:b0:462:d75a:e2f0 with SMTP id d75a77b69052e-46363de866cmr97313691cf.7.1731755584367; Sat, 16 Nov 2024 03:13:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:ac8:5a11:0:b0:460:89b7:cac0 with SMTP id d75a77b69052e-46370581d60ls7275771cf.1.-pod-prod-06-us; Sat, 16 Nov 2024 03:13:03 -0800 (PST) X-Received: by 2002:ae9:c004:0:b0:7b1:5504:2762 with SMTP id af79cd13be357-7b36235e2aemr564761385a.38.1731755583563; Sat, 16 Nov 2024 03:13:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1731755583; cv=none; d=google.com; s=arc-20240605; b=aF+si8mVr3rwc+GCMuM6Urroea40E8dSrJUr3mwzBMnYaR7+7awdLsdGOdUA1Q7Kz0 NT+7f2Jhpgzwv/Ig+AFHYEAto5LbcHhe67t1UrLrvXPaB7ctZsIUUmRAzBZKiqpBDKFF E8BVUB+58ijDyvBmXix4L605kWCQ39Q7GKGsbgNyP2dGGHjBhh4PxJlETIFjZAQGIUzo 57YpsH5Mewvq2LhtDp6/0ndpXJV7mFTVYsh29A2WalQtVwVNXD5GUNjdDMv3JOx2nzMr 3N+s9KX9aM1li5rD+XS1Elc/bru2ix84Rd4nXAmJyPtJV9ARj4X1ns5sBFf8W3jFRHYZ ui6g== 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=c9lCfNGSTZfT2hgHEmOcs5ki8IGwHwOo5WJbBTOS8JQ=; fh=TWGwN84gUgHIe5O4CbyH9KISyeWwGbvUX7cnJPxVD70=; b=Tx/U36oZdAI6MIMhO6oMVe0+IDTl3WYqUC1VFde05scvmPT8YnFuUprnBJfgF+Ubvw +JAKUZesLaPIv+D4jDTEEw7WCbzEd4zkT1bzqbrK/zJAUwr3IgY0TVk7EYZWkyYWTgRB n4FVnK/FHl2RbWxNBOAJJJuJyw6m5SPBmVoGD9x9xhpyTdDSYw+lBvYKjzUtbyzkPQNO 7byCQdK1Q8ZawBXhEqBP1u3mrX4uZZHQJmS36K1BIWcI8PiuYXIyzEh5S4tRGiXBJ7Co SIzv9C3+3uqZh2tCy9/IEM0XAlzmZhL5YJbhNkqxZnMMoQGsvjiPz6nUveQJJr6DKcPL tH8g==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=RMQZDx1c; spf=pass (google.com: domain of fm-294854-20241116111302e34ef432150aeff0dd-q76f8s@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-20241116111302e34ef432150aeff0dd-q76F8S@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 af79cd13be357-7b35caa2c92si23043885a.6.2024.11.16.03.13.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 Nov 2024 03:13:03 -0800 (PST) Received-SPF: pass (google.com: domain of fm-294854-20241116111302e34ef432150aeff0dd-q76f8s@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 20241116111302e34ef432150aeff0dd for ; Sat, 16 Nov 2024 12:13:02 +0100 X-Patchwork-Original-From: "'Jan Kiszka' via isar-users" From: Jan Kiszka To: isar-users Cc: Quirin Gylstorff Subject: [PATCH v4 0/7] Simplify writing initramfs hooks Date: Sat, 16 Nov 2024 12:12: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=fm1 header.b=RMQZDx1c; spf=pass (google.com: domain of fm-294854-20241116111302e34ef432150aeff0dd-q76f8s@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-294854-20241116111302e34ef432150aeff0dd-q76F8S@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?= 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 | 54 +++++++++++++ .../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 | 76 +++++++++++++++++++ .../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, 254 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