From patchwork Thu Mar 5 14:09:33 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihang Wei X-Patchwork-Id: 4958 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Thu, 05 Mar 2026 15:09:44 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-lj1-f186.google.com (mail-lj1-f186.google.com [209.85.208.186]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 625E9htJ019616 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 5 Mar 2026 15:09:43 +0100 Received: by mail-lj1-f186.google.com with SMTP id 38308e7fff4ca-389fc827bdasf58900641fa.2 for ; Thu, 05 Mar 2026 06:09:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1772719778; cv=pass; d=google.com; s=arc-20240605; b=QzGfKk0kZJRn96gf73ChFFZEuA4qxddlcsxQYLihTOHoyAOShp57FQFVJEDHDlwy90 py9dp7ldU6hI2vJSZrrdFyCiQNaM2ByXtx1NBpYzBszyBMW7cq25yk9/INgPEYMqfeyT CPGELXEVuOWPa/90M0xZgbkvNXQWIjUzw3+rG9R7YLT+uQWxnF33552GnIfRKTElMrwg rVs+C88s6TBCb0TRY5rbtuChOVIyFr63l8LqAZCoACd/722k0fSo4zog7Xr3Hkg5TQO0 eSyeY03Tp2mdJR2HrgC0MTX9jm9klOmtkjk89K8wx6eVuNlc6o5p9rfjcHnHY8Mn5PbQ emSg== 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:mime-version:message-id:date :subject:to:from:sender:dkim-signature; bh=v2FagRkMzLf0rwVAotTzm/O4jZJIZdUwX3iE2sRXxIU=; fh=rSVxMutC6EyXGq1/BPSPeL+uJbxbQN97fzsmLC2GBqY=; b=QMrLIgk6Kx02MfEWOYh/gwBqCmu081ceDgJT4nT3t92iIZdSRhCXjUnq2qaLtsRRYt MMrRobPzNWV2Adff94RVusmv/WyqyQQaBnp/r6DxhB5a/ze3kkJg5j0FuvVQiWlWXh5+ oMJO1b//TziGTXqaFUTyu0vV8VlZ7uteHtaAtCX9UkSvi98yeZrLFHXvCO3x3GZx04ow XAqF/cXRHhG/kYDi7uiL1sGthW3b53WoRnAbh9/fVVd7z2B5+HR2lPf+yLfasoauimPa +lSRVWtmBvnqYUl9+TqM/u6f5DCFOrkm1nIPJ6EqnJd8YAolnioC7Rwo/jhIuOJIYJj0 SEaA==; darn=isar-build.org 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=20230601; t=1772719778; x=1773324578; darn=isar-build.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:to:from :sender:from:to:cc:subject:date:message-id:reply-to; bh=v2FagRkMzLf0rwVAotTzm/O4jZJIZdUwX3iE2sRXxIU=; b=doKNwvd1xxTQ2hD1pxQpKYuFDbUVCykg6gnh4arrpnHYxYDLIs5YwavDaphW4uZr4E Z/2Ft17j3H2ZFbq5lmqIAFhJEfEmmeBmlH8ddj4TdG7BSSlq9Sd8tse/VTGvCQeUP9zc yznHmXU4921isYIWUkbWXoEmUVjOdwUHmC3eg3P+3LX51Nx8+w7CWlWzeoQds8Xj4e1M jmW5NWNY+kdRBUrvT9hyacSUcM0+3O2ybKCwYsk/Gi553XR7yzgWEOEtrDEEQRKn/XOe MvwQYD3OcBQAKHyWUeEMD20TbSEQ32EkYI/fhzOHHSzM/nsso3EPnojpO5vylY/VG+6W YS/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772719778; x=1773324578; 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:mime-version :message-id:date:subject:to:from:x-beenthere:x-gm-message-state :sender:from:to:cc:subject:date:message-id:reply-to; bh=v2FagRkMzLf0rwVAotTzm/O4jZJIZdUwX3iE2sRXxIU=; b=skrGdfrpR9xvgnuyJw0/Z/BTNV5Ljdf/tG51zKh+2qAWJdG1IScQfZ1g4A/rZ2NVE2 bcDqCY7HEDqHg+DStmr7x7ovWQBBCrgBVLiZnGkCgYuNFQLYi1Rp/TF/luePIVrJAQgF 9krFDcfaviut1aBFtADIFkn5xNVKJzx9smPKUWK0OGPJMhKZAgncYuJ22CZUFRDak7GA uwbOzi1x3b+RzHJg/hqBnO3IycNcwyExFhd8ZhTL85x7vQuABk7smQ09OJlOTXPqWAU1 bus35Ix5BdIaZfh/iLdpG8VwKN401D8clQ8daqhESPaUzkVVGbYOkCdJp+BxjqmI9Ms+ iwDA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCUVOYA2t3g/itj8/utA8z7Z7ttmc2XDvOQ/W58rBzvFX+qlC+JSs9yB7blGlk/enf2QM0uL/2Q=@isar-build.org X-Gm-Message-State: AOJu0YzFHuaH5sQX1J6aZgI3L2cfDB0PGb9NvhOl7QoA011w12e+y9bs pUW4AvUZtSdYT2pxycS84uubYAEAmzM26uYqoZViRsshL/94Nb9N42hp X-Received: by 2002:a2e:bc83:0:b0:38a:3a34:5f7 with SMTP id 38308e7fff4ca-38a3a3406demr2329961fa.11.1772719777367; Thu, 05 Mar 2026 06:09:37 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+FyMWw7WD55+c5BpOszSpg/Z6b/u+RZJsUF2Plt/66ong==" Received: by 2002:a2e:a494:0:b0:383:1a5f:713e with SMTP id 38308e7fff4ca-38a337d23d8ls1689871fa.0.-pod-prod-09-eu; Thu, 05 Mar 2026 06:09:34 -0800 (PST) X-Received: by 2002:a2e:a987:0:b0:383:547b:fa00 with SMTP id 38308e7fff4ca-38a2c55ff12mr34696261fa.6.1772719774372; Thu, 05 Mar 2026 06:09:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772719774; cv=none; d=google.com; s=arc-20240605; b=VhGTGJAxBa2ndrE62445YxXYTGVgs9UQd0HmOTZYkagpYXUAy9hxY0kfO2kukZT6e3 CZcSiB0M49jc/pFAkuoXhThfGyhfjjwcfnpN3Cg615uKiiQDr25sbHsu0zo8OPqYHMlh QOkcjvD+Jp1Pb9HT/DooWltQLH/i1ZSj17Ejop1h6Fq44YzAHeyszKfTeN7TaD2LFNA5 ZVwkg0XsasLkXk2MD5/e/bdikT8jQ+hpthFKrczHmk8J/ISEhrAa6GfDKvCejIqeXby4 jftJsBZcVy+3laeFs2/Vnm8CU9nQL1CLWJocIBywvTlNZMulQ3WsijmH6E7D6hGCIhMz Zz0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from; bh=I4xc3yLIdoaaTOqK8i3pKG2amB6R2LT6HslujV+G82U=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=lnFT5pST51zIknj2YSjZy2wHIGnrfjo7xo7MkRGlFBCP/bXc6jCqjV58hODTEON6US dHU2zwj9qsyusjmhfPI9PCg+1Ua0OQ02CuvXQfBYdDAn7ZnJEJ5qnEBYcTiQ4P5W+2ZA A0UjRnXzIcOMdZpsPOIXIiwBkw1jHDArtUOwdBGDE0S5c1r8feT6Ph2kOSB1+xk+CSNZ 8W9wICc0ZsPByw9mJZIhi4T81YMAvvtP09xrD22CDqhhje3yo9zzYYPNhNqn7ILdrFdx QPyUlgYzSMrM/9r92dHlxYV559zZ2ec8sc2fphY+lMIG84llB968HFc1ddjWjvrF0XH7 bwEg==; 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 38308e7fff4ca-389f2f9e2a4si4289931fa.6.2026.03.05.06.09.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Mar 2026 06:09:34 -0800 (PST) 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 debian-zwei.m.ilbers.de ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPA id 625E9Xim019600 for ; Thu, 5 Mar 2026 15:09:33 +0100 From: Zhihang Wei To: isar-users@googlegroups.com Subject: [PATCH v4] trixie: Workaround with missing drivers in initramfs Date: Thu, 5 Mar 2026 15:09:33 +0100 Message-Id: <20260305140933.1515497-1-wzh@ilbers.de> X-Mailer: git-send-email 2.39.5 MIME-Version: 1.0 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= This is a workaround for the booting issue on several Trixie targets, which is caused by missing drivers in their initramfs. Starting with Debian Trixie, update-initramfs invokes "dracut-install" to collect and install required drivers into the generated initramfs. "dracut-install" relies on fts_open() / fts_read() from glibc to traverse directories and locate drivers. Due to a long-standing bug [1] between qemu and glibc, the fts_* functions may fail to find files on certain 32-bit architectures. As a result, some required modules are not detected and not added to the initramfs. The produced image then fails to boot. It's known that at least these targets under Trixie are affected: - qemuarm (missing virtio_blk) - bananapi (missing sunxi_mmc) - nanopi-neo (missing sunxi_mmc) A similiar dracut bug report was filed in 2024 [2], pointing to this upstream glibc issue reported in 2018 [1]. No upstream fix has been applied, and the issue appears to affect only qemu builds for specific 32-bit targets. As a temporary workaround, use a customized initramfs-hook to append the neccessary drivers that are currently missed from the initramfs. For a complete fix, we either need to push for an upstream glibc/qemu fix, or convince dracut to avoid using these non-POSIX fts_* functions and use opendir() / readdir() instead. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960 [2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443 This workaround applies only to initramfs images generated with initramfs-tools. It does not apply to dracut-based initramfs generation. When using dracut, drivers may also be missing due to the same underlying issue, but the affected drivers may differ. Signed-off-by: Zhihang Wei Reviewed-by: Jan Kiszka --- Changes in v4: - Move the hook recipe to meta-isar. - Add notes on dracut. .../conf/multiconfig/bananapi-trixie.conf | 2 + .../conf/multiconfig/nanopi-neo-trixie.conf | 2 + .../conf/multiconfig/qemuarm-trixie.conf | 4 +- .../initramfs-trixie-armhf-hook_0.1.bb | 63 +++++++++++++++++++ 4 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 meta-isar/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb diff --git a/meta-isar/conf/multiconfig/bananapi-trixie.conf b/meta-isar/conf/multiconfig/bananapi-trixie.conf index 66f9db89..c2a9c667 100644 --- a/meta-isar/conf/multiconfig/bananapi-trixie.conf +++ b/meta-isar/conf/multiconfig/bananapi-trixie.conf @@ -3,3 +3,5 @@ MACHINE ?= "bananapi" DISTRO ?= "debian-trixie" + +IMAGE_INSTALL += "initramfs-trixie-armhf-hook" diff --git a/meta-isar/conf/multiconfig/nanopi-neo-trixie.conf b/meta-isar/conf/multiconfig/nanopi-neo-trixie.conf index 6e8f8a44..ee53e68d 100644 --- a/meta-isar/conf/multiconfig/nanopi-neo-trixie.conf +++ b/meta-isar/conf/multiconfig/nanopi-neo-trixie.conf @@ -3,3 +3,5 @@ MACHINE ?= "nanopi-neo" DISTRO ?= "debian-trixie" + +IMAGE_INSTALL += "initramfs-trixie-armhf-hook" diff --git a/meta-isar/conf/multiconfig/qemuarm-trixie.conf b/meta-isar/conf/multiconfig/qemuarm-trixie.conf index 5600ab23..5ec903a5 100644 --- a/meta-isar/conf/multiconfig/qemuarm-trixie.conf +++ b/meta-isar/conf/multiconfig/qemuarm-trixie.conf @@ -1,7 +1,9 @@ # This software is a part of Isar. -# Copyright (C) 2024 ilbers GmbH +# Copyright (C) 2024-2026 ilbers GmbH # # SPDX-License-Identifier: MIT MACHINE ?= "qemuarm" DISTRO ?= "debian-trixie" + +IMAGE_INSTALL += "initramfs-trixie-armhf-hook" diff --git a/meta-isar/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb b/meta-isar/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb new file mode 100644 index 00000000..1a8c85d9 --- /dev/null +++ b/meta-isar/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb @@ -0,0 +1,63 @@ +# This software is a part of Isar. +# Copyright (C) 2026 ilbers GmbH +# +# SPDX-License-Identifier: MIT + +MAINTAINER = "isar-users " + +inherit initramfs-hook + +# ----------------------------------------------------------------------------- +# This recipe serves as an example workaround to add missing drivers to +# the initramfs generated for Debian Trixie. The drivers are missing due +# to an upstream bug in glibc/qemu. This issue caused booting issue on +# several Trixie targets. +# +# Background: +# +# Starting with Debian Trixie, update-initramfs invokes "dracut-install" +# to collect and install required drivers into the generated initramfs. +# "dracut-install" relies on fts_open() / fts_read() from glibc to +# traverse directories and locate drivers. +# +# Due to a long-standing bug [1] between qemu and glibc, the fts_* +# functions may fail to find files on certain 32-bit architectures. As a +# result, some required modules are not detected and not added to the +# initramfs. The produced image then fails to boot. +# +# It's known that at least these targets under Trixie are affected: +# - qemuarm (missing virtio_blk) +# - bananapi (missing sunxi_mmc) +# - nanopi-neo (missing sunxi_mmc) +# +# A similiar dracut bug report was filed in 2024 [2], pointing to this +# upstream glibc issue reported in 2018 [1]. No upstream fix has been +# applied, and the issue appears to affect only qemu builds for specific +# 32-bit targets. +# +# [1] https://sourceware.org/bugzilla/show_bug.cgi?id=23960 +# [2] https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=1079443 +# +# Purpose of this recipe: +# +# This recipe provides a temporary workaround by using a customized +# initramfs hook to append drivers that are currently missing from +# the initramfs, allowing the target to boot. +# Notes for dracut users: +# +# This workaround applies only to initramfs images generated with +# initramfs-tools. It does not apply to initramfs images generated +# directly with dracut. +# +# When using dracut, drivers may also be missing due to the same +# underlying glibc/qemu issue. However, the set of missing drivers +# may differ from those observed with initramfs-tools. +# +# This hook recipe cannot be used together with dracut, as it requires +# initramfs-tools to be installed, and dracut conflicts with +# initramfs-tools. +# ----------------------------------------------------------------------------- + +HOOK_ADD_MODULES:append:qemuarm:debian-trixie = "virtio-blk" +HOOK_ADD_MODULES:append:bananapi:debian-trixie = "sunxi_mmc" +HOOK_ADD_MODULES:append:nanopi-neo:debian-trixie = "sunxi_mmc"