Re: [PATCH 2/2] init: ensure that /dev/null is (nearly) always available in initramfs
From: David Disseldorp
Date: Thu Feb 19 2026 - 19:26:40 EST
On Thu, 19 Feb 2026 21:03:12 +0000, Askar Safin wrote:
> Binaries linked with bionic libc require /dev/null to be present,
> otherwise they will crash before entering "main", as explained
> in https://landley.net/toybox/faq.html#cross3 .
It looks as though Bionic has extra logic to handle missing /dev/null
during early boot, although it's dependent on !is_AT_SECURE:
https://cs.android.com/android/platform/superproject/main/+/main:bionic/libc/bionic/libc_init_common.cpp;drc=a7637a8f06f103c53d61a400a6b66f48f2da32be;l=400
I think this would be better addressed via documentation (e.g. in Bionic
or ramfs-rootfs-initramfs.rst).
Thanks, David