From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 22 Oct 2026 16:28:14 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f64.google.com (mail-wm1-f64.google.com [209.85.128.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 69MESEnH020089 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 22 Oct 2026 16:28:14 +0200 Received: by mail-wm1-f64.google.com with SMTP id 5b1f17b1804b1-4a1e295b702sf18988805e9.2 for ; Thu, 22 Oct 2026 07:28:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1792679288; cv=pass; d=google.com; s=arc-20260327; b=j6AJdImicbSqlZzbr6i2LyzwTjGWUdgrFtx6MZJy/A3pLY0yssHrXuGVSTL9RgIyG7 OjifE5iSgGmlVoX+rr1wnS7UKjR/Gn/9fBJeUoAzzDF/ENsF4hUDG64hikprqmMIbXPg lX/bhLrbhZalVrMx1d1BnFBM2Y6grkf5p1b7PHvEloReRawWxkHPxwVYhzXzEHWr9lXG exgUaPbm7ET4ajFoTOLRLwS7vtKwQuXnnZ/oX5ABSDEkyrGk5LMGBiKgJMNXB4AyJH+p l3bPvSC/yCs7/KRRNyVU/AoJZ7yUhrtCYRf45Z0+o+a7s9cqoA614u71Hf1cGIilo9Y9 1PEw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=PSaPm77WfJUYdrNvhYDvxuG+crs2aUb7x/aRhMcglLQ=; fh=AR0f5MdzxdGS2+OdcQELudIXyNZPkXJjtzTraloL6w4=; b=bbykn7X1LdZsmAKOlO97WmQ7Nbx48rXQoxW2fVnvTAeVcp62yxRMjuEGGARxokw9FJ LTi8hFnj8CEzJs8qYv6kL7NiNmEPzkEJhSloGMm3cyCsaPozWxG82V4r7VVmMzclIyqH y+7/+FGxCX0WIMxvO2+pbK8mvjkY+sIzVkdZbW39JlBeRVGA+aoKOMQFes9Y8twGMK7U 6/4sP+XgUtRcYQkJlJTvNA1YFYNn93erkxN/P1LmuiB6lWM1qvxL6vc+od+GFAg3jdrl REoiF3ud9gSzyv8y8P7Kx0D+8jk2x5UBn8eLhxXMujpucTsw/K/RfLJDfm/ioGispYIP txIA==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1792679288; x=1793284088; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=PSaPm77WfJUYdrNvhYDvxuG+crs2aUb7x/aRhMcglLQ=; b=Luwlm3ZKkR9+l6MBz4qyyMcEPGpalrn9uszsDCVanxpnRxaUf34idwJRQZXJyqVxfS HK8DdiK2L+ECoxm4+kQwa+vts/Rs7KUKUigIng0RUdsA6o48VWnPGCtEnIxjhORzy9z2 qLpmspwncain80HzEMxyllF1XhTGV0fs9VOQ3iah03TYWDurkRvPA6ncGGX9UxVRtHHa Xx0I2TNPzeBj/QwmXodEhEEvngn+8M4h5TpUjsg7w7Fcn0D8FMoaw66oeaPH/sh7lOeY eWN3Q148FznfLbCl7AqIIpQ+sNPp65BcoTaXdnnEBbC0xGWezP2FuFvDD1Y0j3TdCc+I qDlA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1792679288; x=1793284088; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:from:content-language:references:to:subject:user-agent :mime-version:date:message-id:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to:content-type; bh=PSaPm77WfJUYdrNvhYDvxuG+crs2aUb7x/aRhMcglLQ=; b=BUsm4mVpQJPOx1uPKzYUEcGqkX6NqsusR/AVdT/tvCYfz1xLUmTiIjlcnZx+U5/WuW rnwoD/RtNL2DPLEZi0JdmmC08UZRcdNNGD7Qhmp1Qm0STo5uidIz42uZowKIhYD+5FWR 4snLXmLH+1NArNWFIWlHvHyICDx5RPWls0a/5e4wkmMo2jYedA+iKB8Mj1uYCjhI9daD 0QeiHVKPuI65HROrvUzw7dCAgRdWSSRyDAWA0bX+6co5vjL0Ze62g1nFjnQmiKwx8vTR I0bqnAuUj0+asbk/bGGlwKG+KdYKHEeiubOuYjpMTG+/P4UbkLXAiilNxm8+BPFDkcFv 95Vg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AKwUvBxrqFxkb0qxMWU0Hkyzy9D1n7rHgV+99lsUjo9VA9G8Ad4t3rCeS6mNZy83GCGvv1Laxek6@ilbers.de X-Gm-Message-State: AFq9FYKDxt1pS+GbdLCSAz3Oa2Xoj7vm/+78mRCzVizZ6pdqhMGElyCX blRu7Yz9bMLrCv0Q4i+lFRDqFX4MOyUSQMGAQRlTmx7LMUSuVtyd6j0J X-Received: by 2002:a05:600c:8012:b0:4a1:a39b:e75b with SMTP id 5b1f17b1804b1-4a1fdd2434cmr108263695e9.21.1792679288159; Thu, 22 Oct 2026 07:28:08 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="ATskLdfJ7fFt5sG211TajAf3mGimRu6It3qpOBqzJ1omQCUbcA==" Received: by 2002:a05:600c:3b9f:b0:4a1:f900:5506 with SMTP id 5b1f17b1804b1-4a202d33da4ls18109975e9.0.-pod-prod-03-eu; Thu, 22 Oct 2026 07:28:05 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBy3VcHbporoeEmiQj81qEh0jT315NQ2/Tj6NprxMDJS0g5dV849A214Yn+/RE8u4GFJROuBbh4zxcWw@googlegroups.com X-Received: by 2002:a05:600c:8b43:b0:4a1:d6db:1be0 with SMTP id 5b1f17b1804b1-4a1fdd0b185mr114661165e9.8.1792679284955; Thu, 22 Oct 2026 07:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1792679284; cv=none; d=google.com; s=arc-20260327; b=VDniKeqOhdiWj9Cqj5557/6ocAqmlhmviIbw1pySmchutL6q6P87HxArf1X/xtlrDC KZsxvmBSf7dUN0DSa+2X1bsnIJh5obl+x1aty7H1FrXULKstMKTfCPGZdzV8EEcyOVMc 2eBVR4YuS7jS1hj2QQ74PdAHEIezQuLNf4kHMtw953cxoAsZoCrcpMI4twseRwu3jP6g dsLFvYtihlX9Z+tLG+Kc038m0QMEQRuMVRb6VbYzG3SQOTniei39xo2HQsw0waLbb1ga XTNf2WoWqvHijbOltRgxT3dEYWqDlTCaZbaoq/h8UUNk9BzaaduLMG4EC744Rpyide0i +cqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id; bh=Lvb3UF0XQyt7xNvHMMKLnrNtWslqaGTVa5G0YfP1IzE=; fh=FowF3TMJ+lOZLCXQvONyEnyth6gr71YGDdjMePoC2V8=; b=WTRMHAAS/FzwBGD+DWLWo2OKDPK5VdGnw9NwMKIhqZda+Ey1TF1Cq5ryhrK0Ev/tiz Zl9e4ecsMEdRQHENkSIwg5+Xz3TPl6IMNXe+M4MzKykisbAaBvWs6qkMjhtKRBxUlZL1 +fDdl7GZLYhuLMPGEp7HV9NGol2G/5YY7g/2lEi0RI/ASaViYCqhA+Vsqc/thomKv7lo Jg/gdJFkJv7yg67shCfLSxch4/JdjvVkuEBLUpiRy3HjGDoZDlLoa8FxzRHieWmBkoW6 UH8YrfrVN/atu7bGbn5DJRq7rHxBlMCGWSnOWxOrYvn/sdmWUuc0nBLo8ZWxQ2vvtRfc yEeA==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4a21025b29esi2605e9.1.2026.10.22.07.28.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 22 Oct 2026 07:28:04 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 69MEQ3eH020078 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 22 Oct 2026 16:26:04 +0200 Message-ID: Date: Thu, 22 Oct 2026 16:26:03 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] dracut-module: add DRACUT_FORCE_DRIVERS To: Quirin Gylstorff , isar-users@googlegroups.com References: <20261019084817.399159-1-quirin.gylstorff@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20261019084817.399159-1-quirin.gylstorff@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, 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-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de 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-TUID: MtaPKdOwvpzY Applied to next, thanks. Zhihang On 10/19/26 10:48, 'Quirin Gylstorff' via isar-users wrote: > Some drivers are not loaded by udev in the initrd, e.g. watchdog drivers > which have to be serviced by systemd before the root file system is > mounted. dracut provides force_drivers for this, but it is a global > option. > > Add DRACUT_FORCE_DRIVERS to the dracut-module class. The listed drivers > are installed regardless of hostonly mode and loaded early via > rd.driver.pre, same as dracut's force_drivers, but only if the module > is part of the initrd. The module depends on kernel-modules, which > evaluates rd.driver.pre. > > Signed-off-by: Quirin Gylstorff > --- > doc/user_manual.md | 5 +++++ > meta/classes-recipe/dracut-module.bbclass | 14 ++++++++++++++ > .../dracut-module/files/module-setup.sh.tmpl | 10 ++++++++++ > 3 files changed, 29 insertions(+) > > diff --git a/doc/user_manual.md b/doc/user_manual.md > index a134903d..09ac080b 100644 > --- a/doc/user_manual.md > +++ b/doc/user_manual.md > @@ -1877,6 +1877,11 @@ It is controlled by following variables: > > - `DRACUT_REQUIRED_BINARIES` defines the binaries required by the module. > - `DRACUT_MODULE_DEPENDENCIES` defines dependencies to other dracut modules. > +- `DRACUT_FORCE_DRIVERS` defines kernel drivers which are installed into the > +initrd regardless of hostonly mode and loaded early via `rd.driver.pre`, > +like dracut's `force_drivers` option. It adds a dependency to the dracut > +module `kernel-modules`. A machine can set it with > +`DRACUT_FORCE_DRIVERS:pn- = "lpc_ich iTCO_wdt"`. > - `DRACUT_MODULE_NO` defines the module number which prefixes the module name > to determine the execution order. The default is `50`. > - `DRACUT_MODULE_NAME` defines the name of the module which is used to install the > diff --git a/meta/classes-recipe/dracut-module.bbclass b/meta/classes-recipe/dracut-module.bbclass > index 6fce979a..6d32a4ac 100644 > --- a/meta/classes-recipe/dracut-module.bbclass > +++ b/meta/classes-recipe/dracut-module.bbclass > @@ -22,6 +22,9 @@ DRACUT_MODULE_PATH = "${D}/usr/lib/dracut/modules.d/${DRACUT_MODULE_NO}${DRACUT_ > > DRACUT_REQUIRED_BINARIES ??= "" > DRACUT_MODULE_DEPENDENCIES ??= "" > +# Kernel drivers installed regardless of hostonly and loaded early via > +# rd.driver.pre (same semantics as dracut's force_drivers) > +DRACUT_FORCE_DRIVERS ??= "" > DRACUT_CHECK_CONTENT_FILE_NAME ??= "" > DRACUT_DEPENDS_CONTENT_FILE_NAME ??= "" > DRACUT_CMDLINE_CONTENT_FILE_NAME ??= "" > @@ -71,7 +74,18 @@ TEMPLATE_FILES:append = " \ > TEMPLATE_VARS:append = " \ > DRACUT_REQUIRED_BINARIES \ > DRACUT_MODULE_DEPENDENCIES \ > + DRACUT_FORCE_DRIVERS \ > + DRACUT_MODULE_NAME \ > " > + > +python do_validate_dracut_force_drivers() { > + import re > + for drv in (d.getVar('DRACUT_FORCE_DRIVERS') or '').split(): > + if not re.fullmatch(r'[A-Za-z0-9_-]+', drv): > + bb.fatal(f"Invalid driver name '{drv}' in DRACUT_FORCE_DRIVERS") > +} > +addtask validate_dracut_force_drivers before do_transform_template after do_patch > + > python do_add_additional_dracut_configuration() { > workdir = os.path.normpath(d.getVar('WORKDIR')) > module_setup = d.getVar('DRACUT_MODULE_SETUP') > diff --git a/meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl b/meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl > index b38ae50c..9fc5af93 100644 > --- a/meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl > +++ b/meta/recipes-initramfs/dracut-module/files/module-setup.sh.tmpl > @@ -15,11 +15,16 @@ check() { > # Module dependency requirements. > depends() { > echo "${DRACUT_MODULE_DEPENDENCIES}" > + # rd.driver.pre is evaluated by the kernel-modules module > + [ -z "${DRACUT_FORCE_DRIVERS}" ] || echo "kernel-modules" > # ISAR_DRACUT_DEPENDS > return 0 > > } > installkernel() { > + if [ -n "${DRACUT_FORCE_DRIVERS}" ]; then > + hostonly='' instmods -c ${DRACUT_FORCE_DRIVERS} || return 1 > + fi > # ISAR_DRACUT_KERNELINSTALL > return 0 > } > @@ -38,5 +43,10 @@ install() { > exit 1 > fi > done > + for driver in ${DRACUT_FORCE_DRIVERS}; do > + mkdir -p "$initdir/etc/cmdline.d" > + echo "rd.driver.pre=$driver" >> \ > + "$initdir/etc/cmdline.d/20-force-drivers-${DRACUT_MODULE_NAME}.conf" > + done > # ISAR_DRACUT_INSTALL > } -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/e54d1e0a-d51c-4d81-8a0b-b01b3ef0a760%40ilbers.de.