Skip to content

Commit

Permalink
scripts/qemustart: update malta to use MIPS64 R2 cpu
Browse files Browse the repository at this point in the history
Explicitly set the QEMU cpu type and support the MIPS R2 ISA, for both
64-bit and 32-bit targets. The later previously supported MIPS R2 by
implicit default.

This is needed after commit 9360869 ("malta: update MIPS64 ISA to R2"),
otherwise booting malta images with scripts/qemustart will hang.

Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
  • Loading branch information
guidosarducci authored and hauke committed Oct 11, 2020
1 parent 1b27591 commit 5b3ff53
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion scripts/qemustart
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ start_qemu_malta() {
local is64
local isel
local qemu_exe
local cpu
local rootfs="$o_rootfs"
local kernel="$o_kernel"
local mach="${o_mach:-malta}"
Expand All @@ -220,6 +221,7 @@ start_qemu_malta() {
is64="$(echo $o_subtarget | grep -o 64)"
[ "$(echo "$o_subtarget" | grep -o '^..')" = "le" ] && isel="el"
qemu_exe="qemu-system-mips$is64$isel"
[ -n "$is64" ] && cpu="MIPS64R2-generic" || cpu="24Kc"

[ -n "$kernel" ] || kernel="$o_bindir/openwrt-malta-${o_subtarget%-*}-vmlinux-initramfs.elf"

Expand All @@ -243,7 +245,7 @@ start_qemu_malta() {
)
}

"$qemu_exe" -machine "$mach" -nographic \
"$qemu_exe" -machine "$mach" -cpu "$cpu" -nographic \
-kernel "$kernel" \
"${o_qemu_extra[@]}"
}
Expand Down

0 comments on commit 5b3ff53

Please sign in to comment.