Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pycheribuild/projects/cross/busybox.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def write_busybox_init(self, init_path: Path, hostname: str, prompt: str, welcom
echo "Hello from BusyBox"

# Ensure required mount points exist
mkdir -p /proc /dev/pts /dev/mqueue /dev/shm /sys /sys/fs/cgroup /etc
mkdir -p /proc /dev/pts /dev/mqueue /dev/shm /sys /sys/fs/cgroup /etc /tmp
ln -sf /proc/mounts /etc/mtab

# Mount essential filesystems
Expand All @@ -116,6 +116,13 @@ def write_busybox_init(self, init_path: Path, hostname: str, prompt: str, welcom
mount -t tmpfs none /dev/shm
mount -t sysfs none /sys
mount -t cgroup none /sys/fs/cgroup
mount -t tmpfs none /tmp

# Create special character devices
mknod -m 666 /dev/null c 1 3
mknod -m 666 /dev/zero c 1 5
mknod -m 666 /dev/random c 1 8
mknod -m 666 /dev/urandom c 1 9

# Attach stdio to kernel console
if [ -c /dev/console ]; then
Expand Down