return 1
}
[ -n "$o_subtarget" ] || o_subtarget="generic"
- o_bindir="bin/targets/$o_target/$o_subtarget"
+ eval "$(grep ^CONFIG_BINARY_FOLDER= .config 2>/dev/null)"
+ o_bindir="${CONFIG_BINARY_FOLDER:-bin}/targets/$o_target/$o_subtarget"
}
start_qemu_armvirt() {
local is64
local isel
local qemu_exe
+ local cpu
local rootfs="$o_rootfs"
local kernel="$o_kernel"
local mach="${o_mach:-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"
)
}
- "$qemu_exe" -machine "$mach" -nographic \
+ "$qemu_exe" -machine "$mach" -cpu "$cpu" -nographic \
-kernel "$kernel" \
"${o_qemu_extra[@]}"
}
local mach="${o_mach:-pc}"
[ -n "$rootfs" ] || {
- rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-generic-ext4-combined.img"
+ rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-generic-squashfs-combined.img"
if [ ! -f "$rootfs" -a -s "$rootfs.gz" ]; then
gunzip "$rootfs.gz"
fi