[Buildroot] [git commit] board/qemu/start-qemu.sh.in: support launching with host system's qemu

Yann E. MORIN yann.morin.1998 at free.fr
Mon Apr 10 21:16:57 UTC 2023


commit: https://git.buildroot.net/buildroot/commit/?id=5de78f181acc53959b0a446a3fb116ecdec13577
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Provides the ability to use a host system's QEMU. While a Buildroot
generated QEMU should work for most cases, a developer may wish to use
the system's QEMU for options which may not have been configured in the
Buildroot's QEMU build (e.g. configuring a different display mode).

Signed-off-by: James Knight <james.d.knight at live.com>
[yann.morin.1998 at free.fr:
  - use false/true instead of 0/1
]
Signed-off-by: Yann E. MORIN <yann.morin.1998 at free.fr>
---
 board/qemu/start-qemu.sh.in | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/board/qemu/start-qemu.sh.in b/board/qemu/start-qemu.sh.in
index cbc33a76d1..38024b449e 100644
--- a/board/qemu/start-qemu.sh.in
+++ b/board/qemu/start-qemu.sh.in
@@ -5,9 +5,11 @@ BINARIES_DIR="${0%/*}/"
 cd "${BINARIES_DIR}"
 
 mode_serial=false
+mode_sys_qemu=false
 while [ "$1" ]; do
     case "$1" in
     --serial-only|serial-only) mode_serial=true; shift;;
+    --use-system-qemu) mode_sys_qemu=true; shift;;
     --) shift; break;;
     *) echo "unknown option: $1" >&2; exit 1;;
     esac
@@ -19,5 +21,8 @@ else
     EXTRA_ARGS='@DEFAULT_ARGS@'
 fi
 
-export PATH="@HOST_DIR@/bin:${PATH}"
+if ! ${mode_sys_qemu}; then
+    export PATH="@HOST_DIR@/bin:${PATH}"
+fi
+
 exec @QEMU_CMD_LINE@ ${EXTRA_ARGS} "$@"



More information about the buildroot mailing list