diff --git a/build-vm b/build-vm index 48d8623b2..dd59f2657 100644 --- a/build-vm +++ b/build-vm @@ -907,14 +907,14 @@ vm_first_stage() { # some time has passed copying files, lets make sure we should not exit check_exit - # do vm specific fixups - vm_fixup - # update the hostarch if test -n "$VM_ROOT" ; then vm_update_hostarch fi + # do vm specific fixups + vm_fixup + # copy ccache archive if test -n "$CCACHE" -a -n "$CCACHE_ARCHIVE" -a "$CCACHE_ARCHIVE" = "${CCACHE_ARCHIVE#redis://}"; then mkdir -p "$BUILD_ROOT/.build.oldpackages" diff --git a/build-vm-qemu b/build-vm-qemu index 70a289a6d..9b8abd94f 100644 --- a/build-vm-qemu +++ b/build-vm-qemu @@ -40,7 +40,7 @@ vm_startup_qemu() { case $BUILD_HOST_ARCH in armv6l|armv7l) qemu_bin="/usr/bin/qemu-system-arm" - qemu_console=ttyAMA0 + qemu_console=${qemu_console:-ttyAMA0} qemu_options="-M virt" qemu_device=virtio-blk-device qemu_rng_device=virtio-rng-device @@ -48,7 +48,7 @@ vm_startup_qemu() { ;; armv8l|aarch32|aarch64|aarch64_ilp32) qemu_bin="/usr/bin/qemu-system-aarch64" - qemu_console=ttyAMA0 + qemu_console=${qemu_console:-ttyAMA0} qemu_cpu="-cpu cortex-a72" qemu_options="$qemu_options -M virt" qemu_device=virtio-blk-device @@ -56,7 +56,7 @@ vm_startup_qemu() { ;; ppc|ppcle|ppc64|ppc64le) qemu_bin="/usr/bin/qemu-system-ppc64" - qemu_console=hvc0 + qemu_console=${qemu_console:-hvc0} qemu_options="-M pseries" qemu_cpu="" grep -q PPC970MP /proc/cpuinfo && qemu_check_ppc970 @@ -65,7 +65,7 @@ vm_startup_qemu() { ;; riscv64) qemu_bin="/usr/bin/qemu-system-riscv64" - qemu_console=ttyS0 + qemu_console=${qemu_console:-ttyS0} qemu_cpu="-cpu rv64" qemu_options="$qemu_options -M virt -bios" if test -f /usr/share/qemu/opensbi-riscv64-generic-fw_dynamic.bin; then @@ -80,7 +80,7 @@ vm_startup_qemu() { s390|s390x) qemu_bin="/usr/bin/qemu-system-s390x" qemu_cpu="-cpu qemu" - qemu_console=hvc0 + qemu_console=${qemu_console:-hvc0} qemu_device=virtio-blk-ccw qemu_serial_device=virtio-serial-ccw qemu_rng_device=virtio-rng-ccw @@ -95,19 +95,19 @@ vm_startup_qemu() { # hppa) qemu_bin="/usr/bin/qemu-system-hppa" - qemu_console=ttyAMA0 + qemu_console=${qemu_console:-ttyAMA0} qemu_cpu="" qemu_options="$qemu_options -bios /usr/share/qemu/hppa-firmware.img" ;; m68k) qemu_bin="/usr/bin/qemu-system-m68k" - qemu_console=ttyAMA0 + qemu_console=${qemu_console:-ttyAMA0} qemu_cpu="-cpu m68000" qemu_options="$qemu_options -M none" ;; riscv32) qemu_bin="/usr/bin/qemu-system-riscv32" - qemu_console=ttyS0 + qemu_console=${qemu_console:-ttyS0} qemu_cpu="-cpu rv32" qemu_options="$qemu_options -M virt -bios /usr/share/qemu/opensbi-riscv32-virt-fw_jump.bin" qemu_device=virtio-blk-device @@ -212,9 +212,8 @@ vm_kill_qemu() { vm_fixup_qemu() { vm_fixup_kvm - - case $qemu_device in - virtio*) + case $BUILD_HOST_ARCH in + armv6l|armv7l|armv8l|aarch32|aarch64|aarch64_ilp32|ppc|ppcle|ppc64|ppc64le|riscv64|s390|s390x) VM_ROOTDEV=/dev/disk/by-id/virtio-0 VM_SWAPDEV=/dev/disk/by-id/virtio-1 ;;