Browse Source

script/common: Handle aarch64 host builds

pull/295/head
Serge Schneider 2 years ago
parent
commit
f86cb0d54a
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      scripts/common

+ 3
- 3
scripts/common View File

@ -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+=("[email protected]")
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 "[email protected]"
setarch linux32 capsh --drop=cap_setfcap "--chroot=${ROOTFS_DIR}/" -- -e "[email protected]"
}
export -f on_chroot

Loading…
Cancel
Save