From patchwork Thu Oct 30 09:44:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 304 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 30 Oct 2025 10:45:38 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f59.google.com (mail-wm1-f59.google.com [209.85.128.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 59U9jbR6005595 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 30 Oct 2025 10:45:37 +0100 Received: by mail-wm1-f59.google.com with SMTP id 5b1f17b1804b1-47113dfdd20sf2604095e9.1 for ; Thu, 30 Oct 2025 02:45:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1761817531; cv=pass; d=google.com; s=arc-20240605; b=XM5Iz1XTliQpqHPjjsObON6sIljrIfSK9syNFARTeLlJACIH/AU39awpnzNUFRnJxh eRVJfedvp3n6J82KDmdBYro5nGpjcb3roOwCAfRdXbE7vWcfcBZ1GpmY58fkNIcgrfVw oztzCNOGMhAXVp6Suia1tPprRU2U+HPAKWEVHMSysntoP2yG0zlTUhLFnE9zeMT8ux9Z v9NVdjNxiqfB6xiGVg+MDmIVFZj8sNVFhlE7tcq2TpOYsneYD9va6p9OM8ovhBC+6838 ESQ2HUxEQPmyRyD0UV2x10W+2SHscfqlyKMf40GaK3AqWKW5869r9giBs+BkXI97aj+U EWMw== 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:to:from:dkim-signature; bh=AqPLAyFFAiNKwq2NNYRuCc9z4TYeUe7TuPOwaH2cyAk=; fh=CI7iZWwXx8l6ftwu+uFJxckLyBNE5zuYTDUIIbNcIYY=; b=H8r+XHJIMzzU7HmIjjU+JyYrp5sMXc5kD5iD7WCrMC7/+Fh85TTR5S0HyVFNXXK0T4 hRm8feXnF1EO1l47UBqVXK7urb3Sdu3mre0BgXFASUUB0WZtK7Qqx/SD17KfAiNaXrQJ fvxt0YSlg8wNd+IqLGlVj2PEzzO0iOnv6aUGOSohQyPk38cJykDsYAglc+THdwfT0zRi 8DGsQ4hX+IX05C0Ud/e8Lxe9bI33fxk+YS0xtP79ffGmSgprbkDXZjR8P75b86/n9SX8 HrzSKDyKbKoeeiil0t+HK4y/BnOMl480m5v1eHmTfCSzqMq6CUQmmkxAUFBaKaAwOBK8 j+IA==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=iicqaU9Q; spf=pass (google.com: domain of fm-51332-2025103009452648c64adc3b00020783-_ebkr9@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-2025103009452648c64adc3b00020783-_EbKR9@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=1761817531; x=1762422331; 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:to:from:from:to:cc:subject :date:message-id:reply-to; bh=AqPLAyFFAiNKwq2NNYRuCc9z4TYeUe7TuPOwaH2cyAk=; b=uMlUXC53EYrDdfcXnjGhlVYaq1XfEXOS2KKeRCvxynCSgUOSgTLKSqTB3CwzRl2KWK dS7obek53vJ9pISrZGpWg5IvNKhedwT2l9tgl3ZEEcA7VjKwboEVMdqAdLE8/qbj+/mv 337jXjzFv7/Ro8tpu2E2KMoRkzT408/WwoMTVhNDUcg6fQfj1XWZk1eWqoyj0yrW3d8n bo7R6ftA5IpYg2GqcwB7MTTLO79VJKHfZ13u3Ktv8cbal2EnrrXNpmZwiw7KTldX4vQJ rUHuimkPrYh8CjiJ8qfQDHJg2dbh5QVsH5PhVEy20s9eExxcOh9Zp/yq8z83qrNp29qu ym0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1761817531; x=1762422331; 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:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AqPLAyFFAiNKwq2NNYRuCc9z4TYeUe7TuPOwaH2cyAk=; b=w4x5BsHCBbbdXNMNTp4QGa63Jd6UJ3Yggsnu3WXps0DKy3+rN7cWgUA20KqtneJtUx YPOOtSwp5uMuUGYlSgl1Qp/x02KjdtW6Q2VlDvL6HpngdExGa1GpNCx3zjoatFL66sQr uwWVmYt+6QGCd4EYqnaHz8yZeiRgAxEOKeaXVdKrC3EdroTGaA6Sl64w2PGQ7djRXXwt RG7giNIzy2xnHl/WF8dFUCi5MTc0Vy4PxOcN4YwMeczJPHVLpRPtILskKwXGquP1yWY1 oDlJ+k2KCLt056z7dBvBgCLlZ4tv7avWZVAq26KT5U0WtsTogss3vhOxINAh+SAjYjM5 bYKw== X-Forwarded-Encrypted: i=2; AJvYcCWnUNj/D2O+3Y1OO5dXctw9X2DageffhVNj8s/WSa4vjQyb8wzqVsTUPHUPuzaG/UNHuwI37P8=@isar-build.org X-Gm-Message-State: AOJu0YznAryb9MHzOra+NL2DIw5RTC6Xv9qonsQhcwXvB52ec+74Qiri AuTGzvkwRo5g/ziVsjmEfQCsSKDwyaHLq/6xHkeAGAVb4t4df641MuWz X-Google-Smtp-Source: AGHT+IHkLg4obnBf5KZcccnhpwohUHIZOlyZt3TzqmdI2T1F0k6RzOqBx3x7wss74mifXl7Kzq456Q== X-Received: by 2002:a05:600c:3e87:b0:46e:4704:b01e with SMTP id 5b1f17b1804b1-4771e38c57dmr61374425e9.8.1761817531092; Thu, 30 Oct 2025 02:45:31 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+b6TvjpJchS4ahXHdCHx9lXQjztf+C9E5kMewYIVMWfjw==" Received: by 2002:a05:600c:3e08:b0:46b:f67b:3bc with SMTP id 5b1f17b1804b1-477276e54b2ls4766255e9.0.-pod-prod-06-eu; Thu, 30 Oct 2025 02:45:27 -0700 (PDT) X-Received: by 2002:a05:600c:502b:b0:46c:adf8:c845 with SMTP id 5b1f17b1804b1-4771e3ad363mr45902245e9.16.1761817527391; Thu, 30 Oct 2025 02:45:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1761817527; cv=none; d=google.com; s=arc-20240605; b=OHDYJOjO+5oq2F6Y7smPCRkq60ohqgr+MVNGa/K4lDb6ikYvEDTywHI6L2EixJ9muG 6jajRILxlNyToum3n5+YUragXiS//fguOw4D/CvO/IXiPseSM+WQAVpra88qFcRlOfzK hFIXzbDtaKJFU2cc+zVZIsAf+vqieIHZg2tBnwVB6dAr3FsB3OKmrST5hiQVTAgTeju+ tS7pMYPeUmlSSwFrH4206dgSumZHZMR785eY1mmyaB05odIox775IT/2zmNG29tMce4d I1ZaOMYlja6XU2nSTpVRN/8ZOEwys/PTr7WbUM3TCY1yAG8G/RLi8AkGTC+wDJdRyPFA rWyQ== 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:to:from:dkim-signature; bh=8laRroSlgcbbU56XJC//7HiUpW7+nxSoEgGAxeckAO4=; fh=pD9NMAE6punlmxDz2SM7DMFwkWrKOHAvTYxfub7CxRs=; b=Rei+HL3MJc6sTg5fhuh6ctyUYTXpcl56gXTZlFkk/ghRC1RjNjhkdAiaO0+4B2lwL1 hI9KJVsqV0gTvJwTJ8ZQ8MaqqP+VxnNt8V9a8Hf2vkp1csabCCOJV5fmJNrYi8WPJOFf s9NJYjMJ0qyo2TSSQFQjFp2GIKZ+4HYQ05pDnBBk8JXoVcOBo07PRHeXBWnfEO/hDSea X6L7FTTVRvkUVrmACeC7CNg9uk/qlQOReIuyg2BAHc3roOypRGboA5ZQXy9I9GhIUVZZ xGl6KaqEDC3O+62T0l4fWy0d50qNLZziTaat4VIZ0i7HgH2VU+VcLHEH793M58lBBraa +bIw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=iicqaU9Q; spf=pass (google.com: domain of fm-51332-2025103009452648c64adc3b00020783-_ebkr9@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-2025103009452648c64adc3b00020783-_EbKR9@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 5b1f17b1804b1-47727fc5e0asi147555e9.0.2025.10.30.02.45.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Oct 2025 02:45:27 -0700 (PDT) Received-SPF: pass (google.com: domain of fm-51332-2025103009452648c64adc3b00020783-_ebkr9@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 2025103009452648c64adc3b00020783 for ; Thu, 30 Oct 2025 10:45:26 +0100 X-Patchwork-Original-From: "'Quirin Gylstorff' via isar-users" From: Quirin Gylstorff To: isar-users@googlegroups.com, jan.kiszka@siemens.com, felix.moessbauer@siemens.com, cedric.hombourger@siemens.com Subject: [PATCH v5 00/12] Add support for dracut Date: Thu, 30 Oct 2025 10:44:34 +0100 Message-ID: <20251030094451.1303871-1-Quirin.Gylstorff@siemens.com> MIME-Version: 1.0 X-Flowmailer-Platform: Siemens Feedback-ID: 519:519-51332:519-21489:flowmailer X-Original-Sender: quirin.gylstorff@siemens.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=iicqaU9Q; spf=pass (google.com: domain of fm-51332-2025103009452648c64adc3b00020783-_ebkr9@rts-flowmailer.siemens.com designates 185.136.64.226 as permitted sender) smtp.mailfrom=fm-51332-2025103009452648c64adc3b00020783-_EbKR9@rts-flowmailer.siemens.com; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=siemens.com X-Original-From: Quirin Gylstorff Reply-To: Quirin Gylstorff 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: Quirin Gylstorff Debian intends to change the default initrd generator from initramfs-tools to dracut[1],[2]. This is a first draft to support multiple initrd generator in ISAR. I tested it with bookworm and trixie. You can switch a normal Debian version to a dracut based initrd by installing the package `dracut`. This similar to a normal Debian installation. Customizing the initrd generation should be done with a seperate recipe which inherit `initrd-dracut`. This is intentionally done to avoid installing packages which are only used by the initrd generation process. [1]: https://salsa.debian.org/kernel-team/meetings/-/wikis/20250730 [2]: https://meetbot.debian.net/debian-kernel/2025/debian-kernel.2025-08-06-19.00.log.html Changes v5: - cleanup formatting - Add additional comments - Add isar-work mount point to the rootfs to copy the initrd to the workdir - make the build compatible with ubuntu - use the feature to derive the module name from the installed package Changes v4: - fix extra_modules and extra_drivers - extend user_manual to switch normal installation to dracut Changes v3: - drop initramfs patch - add examples - add user_manual section Changes v2: - extract the initramfs-cmd from the cmdline - increase version of enable-fsck - add function to print an error in case a invalid package is installed Quirin Gylstorff (12): Add dracut to custom kernel builds rootfs: Allow to overwrite the initramfs generation cmds rootfs: Add isar-work directory to rootfs mounts rootfs: Copy the newly created initrd.img to the work directory rootfs: Add dracut to initramfs generator initramfs: allow to set the generator command Add class to generate custom dracut initramfs rootfs: add flag to use dracut if it is not part of the package list Add example dracut initramfs Add dracut module helper Use lighttpd as a example how to add a dracut module user_manual: Add dracut for initramfs generation doc/user_manual.md | 73 ++++++++++++++- .../dracut-example-lighttpd_0.1.bb | 44 ++++++++++ .../dracut-example-lighttpd/files/install.sh | 20 +++++ .../files/lighttpd.conf | 52 +++++++++++ .../files/lighttpd.service | 13 +++ .../files/sysuser-lighttpd.conf | 2 + .../recipes-initramfs/images/isar-dracut.bb | 25 ++++++ meta/classes/initramfs.bbclass | 19 +++- meta/classes/initrd-dracut.bbclass | 58 ++++++++++++ meta/classes/rootfs.bbclass | 41 ++++++--- .../dracut-module/dracut-module.inc | 88 +++++++++++++++++++ .../dracut-module/files/module-setup.sh.tmpl | 42 +++++++++ meta/recipes-kernel/linux/linux-custom.inc | 2 +- 13 files changed, 461 insertions(+), 18 deletions(-) create mode 100644 meta-isar/recipes-initramfs/dracut-example-lighttpd/dracut-example-lighttpd_0.1.bb create mode 100644 meta-isar/recipes-initramfs/dracut-example-lighttpd/files/install.sh create mode 100644 meta-isar/recipes-initramfs/dracut-example-lighttpd/files/lighttpd.conf create mode 100644 meta-isar/recipes-initramfs/dracut-example-lighttpd/files/lighttpd.service create mode 100644 meta-isar/recipes-initramfs/dracut-example-lighttpd/files/sysuser-lighttpd.conf create mode 100644 meta-isar/recipes-initramfs/images/isar-dracut.bb create mode 100644 meta/classes/initrd-dracut.bbclass create mode 100644 meta/recipes-initramfs/dracut-module/dracut-module.inc create mode 100644 meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl