mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 22:12:10 +01:00
build_library: Update qemu script to run on arm64 machines
Signed-off-by: Geoff Levand <geoff@infradead.org>
This commit is contained in:
parent
5e94a55069
commit
e76030e0e9
@ -147,14 +147,18 @@ if [ "${SAFE_ARGS}" -eq 1 ]; then
|
|||||||
# Disable KVM, for testing things like UEFI which don't like it
|
# Disable KVM, for testing things like UEFI which don't like it
|
||||||
set -- -machine accel=tcg "$@"
|
set -- -machine accel=tcg "$@"
|
||||||
else
|
else
|
||||||
case "${VM_BOARD}" in
|
case "${VM_BOARD}+$(uname -m)" in
|
||||||
amd64-usr)
|
amd64-usr+x86_64)
|
||||||
# Emulate the host CPU closely in both features and cores.
|
# Emulate the host CPU closely in both features and cores.
|
||||||
set -- -machine accel=kvm -cpu host -smp "${VM_NCPUS}" "$@" ;;
|
set -- -machine accel=kvm -cpu host -smp "${VM_NCPUS}" "$@" ;;
|
||||||
arm64-usr)
|
amd64-usr+*)
|
||||||
#FIXME(andrejro): tune the smp parameter
|
set -- -machine pc-q35-2.8 -cpu kvm64 -smp 1 -nographic "$@" ;;
|
||||||
set -- -machine virt -cpu cortex-a57 -machine type=virt -smp 1 "$@" ;;
|
arm64-usr+aarch64)
|
||||||
*) die "Unsupported arch" ;;
|
set -- -machine virt,accel=kvm,gic-version=3 -cpu host -smp "${VM_NCPUS}" -nographic "$@" ;;
|
||||||
|
arm64-usr+*)
|
||||||
|
set -- -machine virt -cpu cortex-a57 -smp 1 -nographic "$@" ;;
|
||||||
|
*)
|
||||||
|
die "Unsupported arch" ;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -218,7 +222,7 @@ case "${VM_BOARD}" in
|
|||||||
"$@"
|
"$@"
|
||||||
;;
|
;;
|
||||||
arm64-usr)
|
arm64-usr)
|
||||||
qemu-system-aarch64 -nographic \
|
qemu-system-aarch64 \
|
||||||
-name "$VM_NAME" \
|
-name "$VM_NAME" \
|
||||||
-m ${VM_MEMORY} \
|
-m ${VM_MEMORY} \
|
||||||
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
-netdev user,id=eth0,hostfwd=tcp::"${SSH_PORT}"-:22,hostname="${VM_NAME}" \
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user