mirror of https://github.com/hak5/openwrt.git
scripts/qemustart: Allow specifying custom kernel for x86
Currently it's not possible to test boot squashfs root images, so this patch now allows this use case as well. Cc: Yousong Zhou <yszhou4tech@gmail.com> Signed-off-by: Petr Štetiar <ynezz@true.cz>openwrt-19.07
parent
8bf500eb79
commit
b0e5e32daa
|
@ -233,9 +233,10 @@ start_qemu_malta() {
|
||||||
}
|
}
|
||||||
|
|
||||||
start_qemu_x86() {
|
start_qemu_x86() {
|
||||||
|
local qemu_exe
|
||||||
|
local kernel="$o_kernel"
|
||||||
local rootfs="$o_rootfs"
|
local rootfs="$o_rootfs"
|
||||||
local mach="${o_mach:-pc}"
|
local mach="${o_mach:-pc}"
|
||||||
local qemu_exe
|
|
||||||
|
|
||||||
[ -n "$rootfs" ] || {
|
[ -n "$rootfs" ] || {
|
||||||
rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-combined-ext4.img"
|
rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-combined-ext4.img"
|
||||||
|
@ -257,6 +258,13 @@ start_qemu_x86() {
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
[ -n "$kernel" ] && {
|
||||||
|
o_qemu_extra+=( \
|
||||||
|
"-kernel" "$kernel" \
|
||||||
|
"-append" "root=/dev/vda console=ttyS0 rootwait" \
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
[ -n $o_nonetwork ] || {
|
[ -n $o_nonetwork ] || {
|
||||||
o_qemu_extra+=( \
|
o_qemu_extra+=( \
|
||||||
"-netdev" "bridge,id=lan,br=$BR_LAN,helper=$HELPER" \
|
"-netdev" "bridge,id=lan,br=$BR_LAN,helper=$HELPER" \
|
||||||
|
|
Loading…
Reference in New Issue