From 91a2f0a180110a34fcbed5ce533bff91b6f1c0fa Mon Sep 17 00:00:00 2001 From: PM2D Date: Thu, 5 Mar 2026 19:55:07 +0700 Subject: [PATCH 1/3] rootfs/etc/resolv.conf is a symlink to /run/systemd/resolve/resolv.conf, so all it does is copy from same to same system. Also it fails build on systems without systemd-resolved. chmod +x ./setup-toolchain.sh --- build-rootfs.sh | 3 --- setup-toolchain.sh | 0 2 files changed, 3 deletions(-) mode change 100644 => 100755 setup-toolchain.sh diff --git a/build-rootfs.sh b/build-rootfs.sh index 496f0309c0..c189071a15 100755 --- a/build-rootfs.sh +++ b/build-rootfs.sh @@ -111,9 +111,6 @@ mount --bind /proc "$ROOTFS_DIR/proc" mount --bind /sys "$ROOTFS_DIR/sys" mount --bind /run "$ROOTFS_DIR/run" -# DNS resolution -cp /etc/resolv.conf "$ROOTFS_DIR/etc/resolv.conf" - log " ✓ Chroot environment ready" # Fix pacman for QEMU chroot environment diff --git a/setup-toolchain.sh b/setup-toolchain.sh old mode 100644 new mode 100755 From 145563408451c685f8be5214bc540fc507031a38 Mon Sep 17 00:00:00 2001 From: PM2D Date: Thu, 5 Mar 2026 20:51:06 +0700 Subject: [PATCH 2/3] There is no scripts/libvlc-stub-aarch64.so by default, build it directly to rootfs/tmp/libvlc-stub.so --- build-rootfs.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/build-rootfs.sh b/build-rootfs.sh index c189071a15..d1754e1727 100755 --- a/build-rootfs.sh +++ b/build-rootfs.sh @@ -1059,8 +1059,9 @@ SETUP_EOF chmod +x "$ROOTFS_DIR/tmp/setup.sh" -# Copy libvlc stub into chroot (needed by bloat cleanup — ES links against libvlc.so.5) -cp "$SCRIPT_DIR/scripts/libvlc-stub-aarch64.so" "$ROOTFS_DIR/tmp/libvlc-stub.so" +# Build libvlc stub into chroot (needed by bloat cleanup — ES links against libvlc.so.5) +aarch64-linux-gnu-gcc -shared -O2 -o "$ROOTFS_DIR/tmp/libvlc-stub.so" "$SCRIPT_DIR/scripts/vlc-stub.c" +aarch64-linux-gnu-strip "$ROOTFS_DIR/tmp/libvlc-stub.so" # Copy modules.bad into chroot (installed by setup.sh to /etc/archr/) cp "$SCRIPT_DIR/config/modules.bad" "$ROOTFS_DIR/tmp/modules.bad" From 9c1b04c630fd7e22a08c13f9743214ea24cc26a8 Mon Sep 17 00:00:00 2001 From: PM2D Date: Thu, 5 Mar 2026 22:12:17 +0700 Subject: [PATCH 3/3] Looks like the only way for DNS for now --- build-rootfs.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-rootfs.sh b/build-rootfs.sh index d1754e1727..5eefbb902f 100755 --- a/build-rootfs.sh +++ b/build-rootfs.sh @@ -111,6 +111,10 @@ mount --bind /proc "$ROOTFS_DIR/proc" mount --bind /sys "$ROOTFS_DIR/sys" mount --bind /run "$ROOTFS_DIR/run" +# DNS resolution +rm "$ROOTFS_DIR/etc/resolv.conf" +cp /etc/resolv.conf "$ROOTFS_DIR/etc/resolv.conf" + log " ✓ Chroot environment ready" # Fix pacman for QEMU chroot environment