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.
|
# bootstrap _this_ repo (toes-image-builder), not the image itself.
|
||||||
# should only have to do this once per host we run this on.
|
# should only have to do this once per host we run this on.
|
||||||
|
|
||||||
sudo apt-get update
|
packages=(
|
||||||
sudo apt-get install -y \
|
kpartx
|
||||||
qemu-user-static \
|
parted
|
||||||
binfmt-support \
|
fdisk
|
||||||
qemu-system-arm \
|
dosfstools
|
||||||
qemu-utils \
|
e2fsprogs
|
||||||
kpartx \
|
xz-utils
|
||||||
parted \
|
rsync
|
||||||
fdisk \
|
curl
|
||||||
dosfstools \
|
|
||||||
e2fsprogs \
|
|
||||||
xz-utils \
|
|
||||||
rsync \
|
|
||||||
curl \
|
|
||||||
ca-certificates
|
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
|
#! /bin/bash
|
||||||
set -ex
|
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'
|
sudo tee mnt/root/tmp/image-build.sh >/dev/null <<'EOF'
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user