fixed missing symlinks

This commit is contained in:
2026-03-20 13:44:07 +01:00
parent 094b55919a
commit 2ab24f9aea
2 changed files with 35 additions and 0 deletions

View File

@@ -23,6 +23,19 @@ echo "=== DarkForge: Creating essential files and symlinks ==="
[ -L /lib ] || { echo "ERROR: /lib should be a symlink to usr/lib"; exit 1; }
[ -L /sbin ] || { echo "ERROR: /sbin should be a symlink to usr/sbin"; exit 1; }
# --- Create toolchain cross-prefix symlinks -----------------------------------
# GCC pass 2 was configured with --target=x86_64-darkforge-linux-gnu, so it
# looks for the linker (ld) and assembler (as) at:
# /usr/x86_64-darkforge-linux-gnu/bin/ld
# But binutils pass 2 installed them to /usr/bin/ld. We need symlinks.
echo ">>> Creating cross-prefix symlinks for gcc to find ld/as..."
mkdir -pv /usr/x86_64-darkforge-linux-gnu/bin
for tool in ld ld.bfd ar as nm objcopy objdump ranlib readelf strip; do
if [ -f "/usr/bin/${tool}" ]; then
ln -sfv "../../bin/${tool}" "/usr/x86_64-darkforge-linux-gnu/bin/${tool}"
fi
done
# --- Create /etc/passwd -------------------------------------------------------
cat > /etc/passwd << "EOF"
root:x:0:0:root:/root:/bin/bash