aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Štetiar <ynezz@true.cz>2019-03-28 20:51:34 +0000
committerPetr Štetiar <ynezz@true.cz>2019-04-08 18:37:05 +0200
commitb0e5e32daa283c2686f529d57360fda828c758bb (patch)
treee7661b29ffe60b00f40292321744022865263630
parent8bf500eb79eba120a6db3a8fff1492d5174acce0 (diff)
downloadupstream-b0e5e32daa283c2686f529d57360fda828c758bb.tar.gz
upstream-b0e5e32daa283c2686f529d57360fda828c758bb.tar.bz2
upstream-b0e5e32daa283c2686f529d57360fda828c758bb.zip
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>
-rwxr-xr-xscripts/qemustart10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/qemustart b/scripts/qemustart
index 3b479860e9..2012d43a85 100755
--- a/scripts/qemustart
+++ b/scripts/qemustart
@@ -233,9 +233,10 @@ start_qemu_malta() {
}
start_qemu_x86() {
+ local qemu_exe
+ local kernel="$o_kernel"
local rootfs="$o_rootfs"
local mach="${o_mach:-pc}"
- local qemu_exe
[ -n "$rootfs" ] || {
rootfs="$o_bindir/openwrt-$o_target-${o_subtarget%-*}-combined-ext4.img"
@@ -257,6 +258,13 @@ start_qemu_x86() {
;;
esac
+ [ -n "$kernel" ] && {
+ o_qemu_extra+=( \
+ "-kernel" "$kernel" \
+ "-append" "root=/dev/vda console=ttyS0 rootwait" \
+ )
+ }
+
[ -n $o_nonetwork ] || {
o_qemu_extra+=( \
"-netdev" "bridge,id=lan,br=$BR_LAN,helper=$HELPER" \