about summary refs log tree commit diff
path: root/mkrootfs.sh.in
diff options
context:
space:
mode:
authorJuan RP <xtraeme@voidlinux.eu>2016-04-20 16:19:55 +0200
committerJuan RP <xtraeme@voidlinux.eu>2016-04-20 16:19:55 +0200
commit06f8beb62844d34e2c310d80f9f0721e34e0934f (patch)
tree2a0c43741e89dacde33c537e70eafb8aceb17bca /mkrootfs.sh.in
parenta15f8c0300399021d26b0428cfc441cbd237b43a (diff)
downloadhrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.tar.gz
hrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.tar.xz
hrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.zip
*rootfs: fix remaining x86 rootfs issues.
Diffstat (limited to 'mkrootfs.sh.in')
-rw-r--r--mkrootfs.sh.in17
1 files changed, 7 insertions, 10 deletions
diff --git a/mkrootfs.sh.in b/mkrootfs.sh.in
index bdd76e9..583044c 100644
--- a/mkrootfs.sh.in
+++ b/mkrootfs.sh.in
@@ -76,11 +76,10 @@ umount_pseudofs() {
 
 run_cmd_target() {
     info_msg "Running $@ for target $_ARCH ..."
-    if [ "${_TARGET_ARCH}" != "${_ARCH}" ]; then
-        eval XBPS_TARGET_ARCH=${_TARGET_ARCH:=${_ARCH}} "$@"
-    else
-        eval XBPS_ARCH=${_ARCH} "$@"
-    fi
+    case "${_TARGET_ARCH}" in
+        i686*|x86_64*) eval XBPS_ARCH=${_TARGET_ARCH} "$@";;
+        *) eval XBPS_TARGET_ARCH=${_TARGET_ARCH:=${_ARCH}} "$@";;
+    esac
     [ $? -ne 0 ] && die "Failed to run $@"
 }
 
@@ -127,10 +126,8 @@ PLATFORM="$1"
 SUBPLATFORM=$PLATFORM
 
 case "$PLATFORM" in
-    i686-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="i686-musl";;
-    i686) _TARGET_ARCH="$PLATFORM"; _ARCH="i686";;
-    x86_64-musl) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64-musl";;
-    x86_64) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64";;
+    i686*) _TARGET_ARCH="$PLATFORM"; _ARCH="i686";;
+    x86_64*) _TARGET_ARCH="$PLATFORM"; _ARCH="x86_64";;
     dockstar) _TARGET_ARCH="armv5tel"; _ARCH="armv5tel";;
     rpi-musl) _TARGET_ARCH="armv6l-musl"; _ARCH="armv6l";;
     rpi) _TARGET_ARCH="armv6l"; _ARCH="armv6l";;
@@ -218,7 +215,7 @@ if [ -n "${_ARCH}" ]; then
     info_msg "Reconfiguring packages for ${_ARCH} ..."
     case "$PLATFORM" in
         i686*|x86_64*)
-            run_cmd "XBPS_ARCH=$_ARCH xbps-reconfigure -r $rootfs base-files"
+            run_cmd "XBPS_ARCH=${PLATFORM} xbps-reconfigure -r $rootfs base-files"
             ;;
         *)
             register_binfmt