summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--stage2-fhs-dirs.morph5
-rw-r--r--stage2-fhs-dirs.morph.yaml13
2 files changed, 11 insertions, 7 deletions
diff --git a/stage2-fhs-dirs.morph b/stage2-fhs-dirs.morph
index 0537ef0..2522400 100644
--- a/stage2-fhs-dirs.morph
+++ b/stage2-fhs-dirs.morph
@@ -4,10 +4,9 @@
"decription": "create the FHS 2.3 directory hierarchy and the usual files",
"install-commands": [
"sh ./create-fhs-dirs \"$DESTDIR\"",
- "rmdir \"$DESTDIR/bin\" \"$DESTDIR/lib\"",
+ "rmdir \"$DESTDIR/bin\"",
"ln -s \"$PREFIX/bin\" \"$DESTDIR/bin\"",
- "ln -s \"$PREFIX/lib\" \"$DESTDIR/lib\"",
- "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then\n mkdir -p \"$DESTDIR/lib64\"\n ln -s \"/lib/ld-linux-x86-64.so.2\" \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nfi\n",
+ "cpu=$(echo $TARGET | cut -d '-' -f 1)\nif [ \"$cpu\" == \"x86_64\" ]; then\n mkdir -p \"$DESTDIR/lib64\"\n ln -s \"$PREFIX/lib/ld-linux-x86-64.so.2\" \"$DESTDIR/lib64/ld-linux-x86-64.so.2\"\nelse\n loader=$(ls /lib/ld-linux-*)\n ln -s \"$PREFIX$loader\" \"$DESTDIR$loader\"\nfi\n",
"sh ./create-dev-nodes \"$DESTDIR\"",
"install -m 644 passwd \"$DESTDIR/etc/passwd\"",
"install -m 600 shadow \"$DESTDIR/etc/shadow\"",
diff --git a/stage2-fhs-dirs.morph.yaml b/stage2-fhs-dirs.morph.yaml
index e58fff6..d7f7d15 100644
--- a/stage2-fhs-dirs.morph.yaml
+++ b/stage2-fhs-dirs.morph.yaml
@@ -4,11 +4,13 @@ decription: create the FHS 2.3 directory hierarchy and the usual files
install-commands:
# We tweak this a little for stage 2 because everything is installed into
- # the one sysroot (/tools). We use symlinked versions of /bin and /lib.
+ # the one sysroot (/tools). We can symlink /bin. We can't symlink /lib
+ # because eglibc install files there that we need to built other stage 3
+ # chunks, but we can get away with just symlinking the loader.
- sh ./create-fhs-dirs "$DESTDIR"
- - rmdir "$DESTDIR/bin" "$DESTDIR/lib"
+
+ - rmdir "$DESTDIR/bin"
- ln -s "$PREFIX/bin" "$DESTDIR/bin"
- - ln -s "$PREFIX/lib" "$DESTDIR/lib"
# This path is hardcoded into eglibc in the file
# sysdeps/unix/sysv/linux/configure; this ugly hack is a compromise.
@@ -16,7 +18,10 @@ install-commands:
cpu=$(echo $TARGET | cut -d '-' -f 1)
if [ "$cpu" == "x86_64" ]; then
mkdir -p "$DESTDIR/lib64"
- ln -s "/lib/ld-linux-x86-64.so.2" "$DESTDIR/lib64/ld-linux-x86-64.so.2"
+ ln -s "$PREFIX/lib/ld-linux-x86-64.so.2" "$DESTDIR/lib64/ld-linux-x86-64.so.2"
+ else
+ loader=$(ls /lib/ld-linux-*)
+ ln -s "$PREFIX$loader" "$DESTDIR$loader"
fi
- sh ./create-dev-nodes "$DESTDIR"