Ver código fonte

mkrootfs: update for musl support.

Juan RP 10 anos atrás
pai
commit
9261876718
1 arquivos alterados com 7 adições e 2 exclusões
  1. 7 2
      mkrootfs.sh.in

+ 7 - 2
mkrootfs.sh.in

@@ -75,7 +75,7 @@ umount_pseudofs() {
 
 run_cmd_target() {
     info_msg "Running $@ for target $_ARCH ..."
-    eval XBPS_TARGET_ARCH=${_ARCH} "$@"
+    eval XBPS_TARGET_ARCH=${_TARGET_ARCH:=${_ARCH}} "$@"
     [ $? -ne 0 ] && die "Failed to run $@"
 }
 
@@ -121,7 +121,7 @@ shift $(($OPTIND - 1))
 
 PLATFORM="$1"
 SUBPLATFORM=$PLATFORM
-: ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current}
+: ${XBPS_REPOSITORY:=--repository=http://repo.voidlinux.eu/current --repository=http://muslrepo.voidlinux.eu/current}
 
 if [ -z "$PLATFORM" ]; then
     echo "$PROGNAME: platform was not set!"
@@ -129,6 +129,11 @@ if [ -z "$PLATFORM" ]; then
 fi
 
 
+case "$PLATFORM" in
+    i686-musl|x86_64-musl) _TARGET_ARCH="$PLATFORM";;
+    *-musl) _TARGET_ARCH="armv7l-musl";;
+esac
+
 case "$PLATFORM" in
     bananapi*) _ARCH="armv7l"; SUBPLATFORM=${PLATFORM%-*}; QEMU_BIN=qemu-arm-static;;
     beaglebone*) _ARCH="armv7l"; SUBPLATFORM=${PLATFORM%-*}; QEMU_BIN=qemu-arm-static;;