about summary refs log tree commit diff
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
parenta15f8c0300399021d26b0428cfc441cbd237b43a (diff)
downloadhrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.tar.gz
hrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.tar.xz
hrmpf-06f8beb62844d34e2c310d80f9f0721e34e0934f.zip
*rootfs: fix remaining x86 rootfs issues.
-rw-r--r--build-rootfs.sh.in10
-rw-r--r--mkrootfs.sh.in17
2 files changed, 14 insertions, 13 deletions
diff --git a/build-rootfs.sh.in b/build-rootfs.sh.in
index 526ae96..ae6985e 100644
--- a/build-rootfs.sh.in
+++ b/build-rootfs.sh.in
@@ -3,10 +3,10 @@
 TARGET="$1"
 [ -n "$TARGET" ] && shift
 
-: ${PLATFORMS:="beaglebone cubieboard2 odroid-u2 rpi rpi2 usbarmory"}
+: ${PLATFORMS:="beaglebone cubieboard2 odroid-u2 rpi rpi2 usbarmory x86_64 i686"}
 DATE=$(date '+%Y%m%d')
 
-for f in ${PLATFORMS} x ${PLATFORMS} ; do
+for f in ${PLATFORMS} x ${PLATFORMS}; do
 	if [ "$f" = "x" ]; then
 		musl=1
 		continue
@@ -15,7 +15,11 @@ for f in ${PLATFORMS} x ${PLATFORMS} ; do
 	if [ -n "$musl" ]; then
 		target=${f}-musl
 	fi
-        if [ -z "$ARGET" -o "$TARGET" = "$target" ]; then
+	if [ "$target" = "i686-musl" ]; then
+		# XXX no i686-musl repo yet
+		continue
+	fi
+        if [ -z "$TARGET" -o "$TARGET" = "$target" ]; then
 		./mkrootfs.sh $@ $target
 	fi
 done
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