* [PATCH v3] trixie: Workaround with missing drivers in initramfs
@ 2026-03-04 16:47 Zhihang Wei
2026-03-04 17:59 ` 'Jan Kiszka' via isar-users
0 siblings, 1 reply; 2+ messages in thread
From: Zhihang Wei @ 2026-03-04 16:47 UTC (permalink / raw)
To: isar-users
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 <wzh@ilbers.de>
---
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 <isar-users@googlegroups.com>"
+
+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"
--
2.39.5
--
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/20260304164729.2331113-1-wzh%40ilbers.de.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH v3] trixie: Workaround with missing drivers in initramfs
2026-03-04 16:47 [PATCH v3] trixie: Workaround with missing drivers in initramfs Zhihang Wei
@ 2026-03-04 17:59 ` 'Jan Kiszka' via isar-users
0 siblings, 0 replies; 2+ messages in thread
From: 'Jan Kiszka' via isar-users @ 2026-03-04 17:59 UTC (permalink / raw)
To: Zhihang Wei, isar-users
On 04.03.26 17:47, Zhihang Wei wrote:
> 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 <wzh@ilbers.de>
> ---
>
> 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
meta-isar/, please - you are referring to machines here which are not
known to meta/.
> @@ -0,0 +1,50 @@
> +# This software is a part of Isar.
> +# Copyright (C) 2026 ilbers GmbH
> +#
> +# SPDX-License-Identifier: MIT
> +
> +MAINTAINER = "isar-users <isar-users@googlegroups.com>"
> +
> +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"
So, we are ignoring the dracut-native initramfs case. Please document
that at least because users can still configure that.
Jan
--
Siemens AG, Foundational Technologies
Linux Expert Center
--
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/c649ab81-71a6-4fcd-bbf7-f63a57fdbc44%40siemens.com.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-04 18:00 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-04 16:47 [PATCH v3] trixie: Workaround with missing drivers in initramfs Zhihang Wei
2026-03-04 17:59 ` 'Jan Kiszka' via isar-users
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox