summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSerge Schneider <serge@raspberrypi.org>2019-06-07 16:34:17 +0100
committerSerge Schneider <serge@raspberrypi.org>2019-06-07 19:51:08 +0100
commitf86cb0d54a597cf18032cb013f404c77f9ef90dd (patch)
tree2df82a131399bd9d0dc0149634f65552c3169d96
parente14a4035331f23a73cc8ee99d0ffa7bba58e915f (diff)
script/common: Handle aarch64 host builds
-rw-r--r--scripts/common6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/common b/scripts/common
index bb75a7e..f264755 100644
--- a/scripts/common
+++ b/scripts/common
@@ -9,7 +9,7 @@ bootstrap(){
export http_proxy=${APT_PROXY}
- if [ "$(dpkg --print-architecture)" != "armhf" ]; then
+ if [ "$(dpkg --print-architecture)" != "armhf" ] && [ "$(dpkg --print-architecture)" != "aarch64" ]; then
BOOTSTRAP_CMD=qemu-debootstrap
fi
@@ -18,7 +18,7 @@ bootstrap(){
BOOTSTRAP_ARGS+=(--keyring "${STAGE_DIR}/files/raspberrypi.gpg")
BOOTSTRAP_ARGS+=("$@")
- capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" "${BOOTSTRAP_ARGS[@]}" || true
+ setarch linux32 capsh --drop=cap_setfcap -- "${BOOTSTRAP_CMD}" "${BOOTSTRAP_ARGS[@]}" || true
if [ -d "$2/debootstrap" ]; then
rmdir "$2/debootstrap"
@@ -89,7 +89,7 @@ on_chroot() {
mount --bind /sys "${ROOTFS_DIR}/sys"
fi
- capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
+ setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "$@"
}
export -f on_chroot