[openwrt/openwrt] scripts/qemustart: update malta to use MIPS64 R2 cpu
LEDE Commits
lede-commits at lists.infradead.org
Sun Oct 11 10:38:28 EDT 2020
hauke pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/5b3ff53ebd6846a0f03bfa29d9aa5d22a6a05bfb
commit 5b3ff53ebd6846a0f03bfa29d9aa5d22a6a05bfb
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Thu Sep 24 20:52:37 2020 -0700
scripts/qemustart: update malta to use MIPS64 R2 cpu
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 93608697f3 ("malta: update MIPS64 ISA to R2"),
otherwise booting malta images with scripts/qemustart will hang.
Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
scripts/qemustart | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/qemustart b/scripts/qemustart
index 9ce03901aa..7a2878ea70 100755
--- a/scripts/qemustart
+++ b/scripts/qemustart
@@ -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}"
@@ -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"
@@ -243,7 +245,7 @@ start_qemu_malta() {
)
}
- "$qemu_exe" -machine "$mach" -nographic \
+ "$qemu_exe" -machine "$mach" -cpu "$cpu" -nographic \
-kernel "$kernel" \
"${o_qemu_extra[@]}"
}
More information about the lede-commits
mailing list