From patchwork Wed Mar 4 16:47:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zhihang Wei X-Patchwork-Id: 4954 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 04 Mar 2026 17:47:40 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-ed1-f63.google.com (mail-ed1-f63.google.com [209.85.208.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 624GldY3013480 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 4 Mar 2026 17:47:39 +0100 Received: by mail-ed1-f63.google.com with SMTP id 4fb4d7f45d1cf-65c1c72ecffsf6903130a12.3 for ; Wed, 04 Mar 2026 08:47:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1772642854; cv=pass; d=google.com; s=arc-20240605; b=WlS0AEluj6AN2crZJ0LeLFjd9A9eTsk7lASwUCSb2wvUM4FRt1lFXJuqlRX+h/Zuy7 GN3HTB1mjN/SQW52b6SBJqEBYZXNIQvqSBFNJtgF/8+OtOxMf9P/neMiem9PFlTIveTC O/AcWEqxJ6BD+8xhSmqw6qpctPWyspdORNsVu2E8k+UGGPfWqMwQTYtA/jGaxjqEwXJg dJOzPneEWbgefq71b5UwLVDrCoDAhh1MuXL07mYLohSXKM6sN8KeQrAQeKz3qeP0kIq5 yoyFTK7RZYreYqpAdTdJeE6rBEQtTkh9dEhf/RZ8CFDvK3VPvshv+Ci+wd9CEX80b8Q+ y0EQ== 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=TB4g4OIyb/8C4RP5BP71Rjh6nD6wFjQm+BfihapY+L8=; fh=zb5mNUMgBiNQQRiQMxKwZA7VsTEu39dyjEi8bXSxwoo=; b=gf/a+KCzntDWTS52DQnlfqYGml24PMSlH501D4eToq+iZ7PvnuF3lY9dBARJVPqLV2 qJgJ7NVsltbc+Dm4cJJZoBSxeWixyPB1C4EIcv7+kQY3i26FLaCbvx3OkF5lOUlb1xl6 uzaDQO0P9QNnydbHZybt7joPaelel8CNb03zOw2dHJ9OUGl86QSblEIuOgzb3w/rC7CR gu5fb3NcmiZCs2UA2OyhWrt/cO6Ua1TPJMv5QafG5+vt6YV98GUTR1Y3qqU6BiZ05NyW 3sie9fq78PGx1ZU5wNnIpRhOiO8sEyNBL7k59Z/k4v7PCmPpskUXhB3iUsrUX7jxcSzl phxg==; 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=1772642854; x=1773247654; 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=TB4g4OIyb/8C4RP5BP71Rjh6nD6wFjQm+BfihapY+L8=; b=st2hd8QLJAe2iSvnDlieKnE0pxadcWLjNtupY8aPjrjPezuwzD+dL+B58PzmcErvKX 7CryElWGt47J7N/Qm8nTUJz5WkrvnkviI4Ln0bC5t/4uV63MMFmUqZ7Lbd8z9pvBmwte vLRpm1RTbQ1Ex5aZwCKtpKhdZknvZy4j9DLWMX2YTf24EOstLDfPbqqaDs/SIfi+g4Oz IZ0YCMtPVCZOHtnLsdlhGu2sITijkcmQfl4UZxfUAt/ygzKTX7kl+UhxFItP1tKCaFhx wScSkUja5igA9KPqKCGFEzSozKm2NwTzp0bXbX6AE+YEZKJQMRkqI+98PPgjZ6PKqRbL rGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772642854; x=1773247654; 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=TB4g4OIyb/8C4RP5BP71Rjh6nD6wFjQm+BfihapY+L8=; b=imtxWIR8lrubLpkc65OuWDM1kva2eXLcLt0f0NJKvy6SrahSmAzwvzMqaDi6rBluub cKss1yIh/So5K48i9+H5cVEo8r78OVYNsMqFr+msESTSBH5yiV7dajtrrkVsmpKfFGbp 4E03rDkeAYQa+vXZK0bMMW5D+XEux5Z51v7x4/IjzSHepyvK0MlNna8eTZ9SObMI8Bea HH7D4ceKhPOpGZ061yXnnw10zxZ6mlZ3dHJz0iPF9y/2vca4OtE6WkVy7/EBlsp/6Wxk lEHWV6P3OW3z5kNYFF2jymJ21Ly5KlvlarysqEVbmRrOgF+sQzyQnO62CibKU+EVpcvN 30Tg== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCXpdRbZKT+dX37JMgj+B5zeXu2iESxZnZHjqmx5+WWZbXLuFLOT98tmkgj3L237KCPO1QrHVaI=@isar-build.org X-Gm-Message-State: AOJu0YzKHnzmX/jqhlTcSGlOih0revssxH7911420/lpdxv2r2HQKa91 FV2vVyz/zsBDxqDiIVcrwihTnRtlRlDLe3LV5OlIXPGmC2vwHm5yqV+d X-Received: by 2002:a05:6402:3893:b0:660:f98d:3ff3 with SMTP id 4fb4d7f45d1cf-660f98d417bmr1351401a12.29.1772642853810; Wed, 04 Mar 2026 08:47:33 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="AV1CL+FMtOnXBkgT+l+NC6ccY4F5tcIG+Sgj6FmoCBFLiQ3/fg==" Received: by 2002:a05:6402:5412:b0:65b:bfe0:916e with SMTP id 4fb4d7f45d1cf-6612eec3f94ls7148a12.0.-pod-prod-07-eu; Wed, 04 Mar 2026 08:47:31 -0800 (PST) X-Received: by 2002:a17:907:842:b0:b92:c91b:57d9 with SMTP id a640c23a62f3a-b93f15bdb82mr154764966b.58.1772642851575; Wed, 04 Mar 2026 08:47:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1772642851; cv=none; d=google.com; s=arc-20240605; b=J0l8awTDkYS/bgvvhN/x5y1ysrBX9a7CvbuwwpJRNmCaQlTsDBfCxwQwwdsH0eylCK TGbEh/z1Q0sFtImQ9/0WELgsbRfP1oFag0dm0PP40H+lHvCYmxKbMNwuFs5pDs1xxoju /97MkcwkXvuRfY/Vys3J5AimP/9Z3LLjtPP1tGbinETVFqJahGu7Zf1q+3/FCtKMjnxS S1V+pk2EnSoUJHirwhi/D+2NNMtMLbLQZfSnVzn5oQZua/jj1WdxTf3ueI7rgu7XNaFY cp84dRWqxuBf1kCW7JO/EHIR+5bI2DZsJmZYK9bA8GyWFXXj0NItlrmNc5+E0bALJ1T6 jx7g== 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=voERgECMMEJBa0DO8/oNpw2TNkMGE7AZqpB1zSTsd+A=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=AhI1MgE32s32P9Ux6Fpud/xKYy1uOL96FpjrEEM7oFCFmz1e3mNa5s/KlCQhydhMC9 Dl+I/t6FGAcl5WyQf15YSzFWD43elTi95Z0FFc/g0JY6tfb940MbilfjvvXnPX/5SVBn xYqilJ2JXo1aqyWKpQ0DV+KtFTrrvUBmvf8UvaXqA3gQH0zELWVsdRNN7gxUCLBs256/ 5k+lQqGzpkRUxlUhdjHww4xFxqKLTtUb/jDdrPOeHEPiMcvuJI5OZH3MrvKn406mTqbv btnFmjW/cOUbnZdX1P0aMQSteFA/YdFRh3OyKABFEx/tpc6GqO8VFOgtY7q3wPJ5kAK6 ETjg==; 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 4fb4d7f45d1cf-65fabe67acbsi595828a12.4.2026.03.04.08.47.31 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Mar 2026 08:47:31 -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 localhost.localdomain (dslb-088-074-195-131.088.074.pools.vodafone-ip.de [88.74.195.131]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPA id 624GlUST013466 for ; Wed, 4 Mar 2026 17:47:30 +0100 From: Zhihang Wei To: isar-users@googlegroups.com Subject: [PATCH v3] trixie: Workaround with missing drivers in initramfs Date: Wed, 4 Mar 2026 17:47:29 +0100 Message-Id: <20260304164729.2331113-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 Signed-off-by: Zhihang Wei --- To apply this patch, the DTB patch and the "Add Trixie support for various machines" patch are needed. .../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 | 50 +++++++++++++++++++ 4 files changed, 57 insertions(+), 1 deletion(-) create mode 100644 meta/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/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb b/meta/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb new file mode 100644 index 00000000..dc923e9f --- /dev/null +++ b/meta/recipes-initramfs/initramfs-trixie-armhf-hook/initramfs-trixie-armhf-hook_0.1.bb @@ -0,0 +1,50 @@ +# 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. +# ----------------------------------------------------------------------------- + +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"