handle being on an arm64 system
This commit is contained in:
parent
99430cf113
commit
d33aafa677
|
|
@ -4,18 +4,26 @@ set -ex
|
|||
# bootstrap _this_ repo (toes-image-builder), not the image itself.
|
||||
# should only have to do this once per host we run this on.
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
qemu-user-static \
|
||||
binfmt-support \
|
||||
qemu-system-arm \
|
||||
qemu-utils \
|
||||
kpartx \
|
||||
parted \
|
||||
fdisk \
|
||||
dosfstools \
|
||||
e2fsprogs \
|
||||
xz-utils \
|
||||
rsync \
|
||||
curl \
|
||||
packages=(
|
||||
kpartx
|
||||
parted
|
||||
fdisk
|
||||
dosfstools
|
||||
e2fsprogs
|
||||
xz-utils
|
||||
rsync
|
||||
curl
|
||||
ca-certificates
|
||||
)
|
||||
|
||||
case "$(uname -m)" in
|
||||
aarch64|arm64)
|
||||
echo "native arm64 host detected; skipping qemu user emulation packages"
|
||||
;;
|
||||
*)
|
||||
packages=(qemu-user-static binfmt-support "${packages[@]}")
|
||||
;;
|
||||
esac
|
||||
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y "${packages[@]}"
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#! /bin/bash
|
||||
set -ex
|
||||
|
||||
# runs setup commands inside the image, under qemu arm64.
|
||||
# runs setup commands inside the arm64 image rootfs.
|
||||
|
||||
sudo tee mnt/root/tmp/image-build.sh >/dev/null <<'EOF'
|
||||
#! /bin/bash
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user