Skip to content

Commit

Permalink
script/common: Handle aarch64 host builds
Browse files Browse the repository at this point in the history
  • Loading branch information
XECDesign committed Jun 7, 2019
1 parent e14a403 commit f86cb0d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scripts/common
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit f86cb0d

Please sign in to comment.