[PATCH] start-qemu.sh: Set console when using qemu-amd64 with nographic


Akihiro Suzuki
 

Signed-off-by: Akihiro Suzuki <akihiro27.suzuki@...>
---
start-qemu.sh | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/start-qemu.sh b/start-qemu.sh
index b71ba32..46b7961 100755
--- a/start-qemu.sh
+++ b/start-qemu.sh
@@ -83,8 +83,15 @@ fi

shift 1

+QEMU_EXTRA_ARGS="${QEMU_EXTRA_ARGS} $@"
+if [ -n "`echo ${QEMU_EXTRA_ARGS} | grep -- -nographic`" ]; then
+ if [ ${DISTRO_ARCH} = "amd64" ]; then
+ KERNEL_CMDLINE="${KERNEL_CMDLINE} console=ttyS0"
+ fi
+fi
+
${QEMU_PATH}${QEMU} \
-drive file=${IMAGE_FILE},discard=unmap,if=none,id=disk,format=raw \
-m 1G -serial mon:stdio -netdev user,id=net \
-kernel ${KERNEL_FILE} -append "${KERNEL_CMDLINE}" \
- -initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS} "$@"
+ -initrd ${INITRD_FILE} ${QEMU_EXTRA_ARGS}
--
2.17.1

Join cip-dev@lists.cip-project.org to automatically receive all group messages.