From patchwork Wed Nov 5 12:12:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Quirin Gylstorff X-Patchwork-Id: 314 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 05 Nov 2025 13:14:12 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lf1-f59.google.com (mail-lf1-f59.google.com [209.85.167.59]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5A5CE9LE018643 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 5 Nov 2025 13:14:10 +0100 Received: by mail-lf1-f59.google.com with SMTP id 2adb3069b0e04-591ec0a2a11sf5770263e87.1 for ; Wed, 05 Nov 2025 04:14:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1762344844; cv=pass; d=google.com; s=arc-20240605; b=TmN2EaVPa4wqMgm1BdNpsptmy0wZETbugHRwHbO6wHSV8/iwFDqhtRLJMg9LJZlWcR dG0Wr/SgEBnWH9ETib3lgVVQTatWjLljeCgFwnXlqU4OtX947fP+C2hEhilDAjCwxJ/w lItp+MaPfnzY0/2IwgAyJDJj4BFbUJj77YYhNCQg13rrN9t//N2aUpvEkIS1HNYhOHyA asaIQQv1NyX1PymIFLvYdWoZtaoA/x+367drcKwINZIVpOtBBWf32qFxnWDhT7RvOqxe J37vT807CNQvEJqVAqywtV9NEsJmwxhdSXY7N2dta7hbpYGoQejJncE7BaWFDBMqVhk8 Wjug== 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=0S19A2ocF6VV1eopQa46cd7UnyC1djSVqlcvDIUhY80=; fh=7QoyW1UNKnZ++TfXDMyw9vj0u0l5AN2O9vSMyRPUvtI=; b=jvQ6rMVRmyU6D74Yh87kbrirZaPyLHJtS7wMN68tgoOaKLJR5fjWCQvZ7NRm1KP6Th 1nd7UT7PI/B/29A7PDh5xxnMKyFifh9kGWdhaaWEDpmw/mw+lSDkE/CtkDtlgAl9IQaY sTZmkUa38ZFejdWGkHOqDlMpRohPIeqpOweoi9+MVls5bEYacXITfb0+fIFPGI2Wwpvp HGd5MhRViME17I50pEGICIe2nrmywcCmgM0ZgmSxA+OMkYFsui2y8lbLOSZq3uau75A6 2KNeOUEHXljFQaY4wZwBZDdJVUDuq3IVUO8Ed5G6QCF3IUysyCkY74QxGWEzeDJ4UKTc nyiQ==; darn=isar-build.org ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=cjxDeeJj; spf=pass (google.com: domain of fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@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=1762344844; x=1762949644; 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=0S19A2ocF6VV1eopQa46cd7UnyC1djSVqlcvDIUhY80=; b=C9sUVgiYQvjDxShTSdN6yhJFfm6BbsufUKe0eIQ+Rpi62N6q/BApKGENyj622n2KBW QMJ7AvmFoxGziiFtKgiug4zsWrZ+wV1ySnFnnUN6EoH55js17E7cdj9M0pqoB2mN9SZQ e02KIDOqZYBgdpdLn18+ScK1nKOtnW7CHnahqb4zjFvF3bku7EwhmnygSUQfZP0JF0o9 EjwmMqSOK6ezktGqbXRa2Jl3s3bGjy1TDOGJAYVaLHMhowK/Prg0c9WDfBrygf1LNJry hGt82oMGuvlkfH+BIj9ro8D1vedIfqVEAgx1HsrchRYVzSFLXbkvL3XipF8hwAFOhlZ9 P9yQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1762344844; x=1762949644; 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=0S19A2ocF6VV1eopQa46cd7UnyC1djSVqlcvDIUhY80=; b=J6fPbu34jVREKSZ9eEpvDppjQU7+eO9xCHgEkPsd0enQeqH4JwohACwaOMLGSQOaEh oWlU/oCH/xNjYb7FIvacUk33/gaezqKX8NSpjVBvU4FV4RLYUPRO43fWJ/a6pbV/uYL/ 8tc5UjxIcx7ksVuwMA789Hw8Jwyk3YSQWvqdI/pBFqAM7vcAYPZ1A5Zw6viWbcPr7lCB kuJPOOzEyg3fYOu7HV+TFUEoz2GXKa33iWmzhMoUPCRKnwRBVkgyYPV5WfJOAxrp69oV 4Ksl5fWlXtXfRmk+8Qycg7zyFiEOPnp7n9rjOdS98QbPapCitl02O7igprxeL8VgKIeX OfSQ== X-Forwarded-Encrypted: i=2; AJvYcCV472cfK+qKFfzYRsQO2kA68Gk54Iyx5NqNYJflEW4YXDcGpha+HP29GPsEKBYK7Lf9lnlHSIo=@isar-build.org X-Gm-Message-State: AOJu0Yzf2AAF1reUz7JOZHzc8vkbgEhB2kUJdLULAv2XkHfqQcGQzTBO 7zwQB8WWMywyubvf5GBlGClHAjsQgPipEMT2sUVrknTV7lq5avdOlbvE X-Google-Smtp-Source: AGHT+IE6/Sc6N9sEM+YiDWCH9h1svvpALkTK0Z5/yazlwfdX1yA7auVD4IXqljdxjEgNba82ukM1dw== X-Received: by 2002:a05:6512:3b06:b0:594:2646:2350 with SMTP id 2adb3069b0e04-5943d75c742mr985075e87.21.1762344844063; Wed, 05 Nov 2025 04:14:04 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+YfmJmtbdLL6u8gX1LbOuHO5xdw9Iqg3WMVcwbgQwsJKw==" Received: by 2002:a05:6512:141c:b0:591:c93c:cf8e with SMTP id 2adb3069b0e04-594400b6ef3ls218513e87.0.-pod-prod-02-eu; Wed, 05 Nov 2025 04:14:00 -0800 (PST) X-Received: by 2002:a05:6512:124d:b0:592:f3ef:19ad with SMTP id 2adb3069b0e04-5943d7d609cmr943114e87.34.1762344840045; Wed, 05 Nov 2025 04:14:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1762344840; cv=none; d=google.com; s=arc-20240605; b=JgbbLcgfukWWZYvel/KVLFmLnRgd3l+qi3YMzBs2EADXYfVlrw3+MNtIdKLhFDfYY9 8G9vergAj05nJhfpwP6+gYwVsyrUx/a3R5SA/zWjNXPXq5F0zpF4FJpTvLEZqvpIC04S nHLGVwuBA8N8xC13HES4vuDSyGNE2+3EA1Ggs2yZQ1075w5kqKZ9B31T3RZv6d4sTkWQ siRQQoOoCZm8taDGeHV3oXqvcukEGNLEL3hB7SeGSRi8wodNAgfS03rOicFUtVF5oD// MxcmSXoYHj7nMTcPrT/6GFXiDtnkdWscw2KfYA3eTV5LVjiF4ncjaDTy+UXNU+ZnMwip o3aw== 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=Su1OJsgwajQG77QbmHhUc1RF6dSwkHr0nDJrIYZEK0c=; fh=pD9NMAE6punlmxDz2SM7DMFwkWrKOHAvTYxfub7CxRs=; b=dH+4pS5n0zf/hzb2uYwVchvdCWQbw25CAVgzHdzHdjrIkU1Yvg5A/0QKmpXAQKb28e K9iC80YicIw/YiAyIkG9cNNT/vt506vDcucQfYlYachIOkxkP3dR8AVxZ3MnQ0XhquR4 8iwZHs7Wv45pSsWahDj7Aro2L/5Zz+bMWkfM5T9Osn9tBFPyjHR5hM0cN5TIbGp0HAeO J7zmjVMpuC0SOwJUEzfGbgrraY3xR3z63PIWtEzcHQZ8+++PllmNreqgDbCwa1fhD9b1 IKxTHO41R+yLeYx6IF1CGRpxYr4oG/AOZUEYQ1fkReg+CiyafsyCk69g60hoCm92I0O5 4/tg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=fm1 header.b=cjxDeeJj; spf=pass (google.com: domain of fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@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 2adb3069b0e04-59446f550cesi12347e87.8.2025.11.05.04.13.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Nov 2025 04:13:59 -0800 (PST) Received-SPF: pass (google.com: domain of fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@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 20251105121359b7924e19ff0002075d for ; Wed, 05 Nov 2025 13:13:59 +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 v7 00/13] Add support for dracut Date: Wed, 5 Nov 2025 13:12:31 +0100 Message-ID: <20251105121350.114449-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=cjxDeeJj; spf=pass (google.com: domain of fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@rts-flowmailer.siemens.com designates 185.136.65.228 as permitted sender) smtp.mailfrom=fm-51332-20251105121359b7924e19ff0002075d-2gnb1v@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 v7: - move from classes to classes-recipe Changes v6: - use class instead of inc - fail early if dracut generation fail 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 (13): 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 rootfs: exit immediately if INITRAMFS_GENERATOR_CMD fails 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-recipe/dracut-module.bbclass | 87 +++++++++++++++++++ meta/classes-recipe/initrd-dracut.bbclass | 58 +++++++++++++ meta/classes/initramfs.bbclass | 19 +++- meta/classes/rootfs.bbclass | 43 ++++++--- .../dracut-module/files/module-setup.sh.tmpl | 42 +++++++++ meta/recipes-kernel/linux/linux-custom.inc | 2 +- 13 files changed, 461 insertions(+), 19 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-recipe/dracut-module.bbclass create mode 100644 meta/classes-recipe/initrd-dracut.bbclass create mode 100644 meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl