summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Neri <ricardo.neri-calderon@linux.intel.com>2014-03-20 12:35:33 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-03-21 12:05:54 +0000
commit68acafd7dc18f23707c95c90e871395ded81f84b (patch)
tree0253733e930dc5668fbfb05661eebcea08ce34e9
parente8bc7a136a81a0d8df2d32dfba0920c1b2835141 (diff)
downloadpoky-68acafd7dc18f23707c95c90e871395ded81f84b.tar.gz
runqemu: Add option for custom BIOS directory
Add support to specify a directory for custom BIOS, VGA BIOS and keymaps as supported by qemu (-L option). Even though this can be done through qemuparams, having this option provides better user experience by not having to specify a long and cluttered path along with other qemuparams that the user might want to specify. This new options assumes first that the path provided is relative to OECORE_NATIVE_SYSROOT and will check whether it exists before proceeding. If not, it will treat the provided path as absolute. This provides the user flexibility to use BIOS binaries generated inside or outside the OE build environment. (From OE-Core rev: d302f5683dd736ac4cd4b601a046d22000d41e68) Signed-off-by: Ricardo Neri <ricardo.neri-calderon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu19
1 files changed, 19 insertions, 0 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 573def151f..e270274a97 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -150,6 +150,9 @@ while true; do
150 SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0" 150 SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
151 SERIALSTDIO="1" 151 SERIALSTDIO="1"
152 ;; 152 ;;
153 "biosdir="*)
154 CUSTOMBIOSDIR="${arg##biosdir=}"
155 ;;
153 "qemuparams="*) 156 "qemuparams="*)
154 SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}" 157 SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"
155 158
@@ -484,5 +487,21 @@ if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
484INTERNAL_SCRIPT=`which runqemu-internal` 487INTERNAL_SCRIPT=`which runqemu-internal`
485fi 488fi
486 489
490# Specify directory for BIOS, VGA BIOS and keymaps
491if [ ! -z "$CUSTOMBIOSDIR" ]; then
492 if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then
493 echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
494 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
495 else
496 if [ ! -d "$CUSTOMBIOSDIR" ]; then
497 echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR"
498 echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
499 exit 1;
500 fi
501 echo "Assuming biosdir is $CUSTOMBIOSDIR"
502 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $CUSTOMBIOSDIR"
503 fi
504fi
505
487. $INTERNAL_SCRIPT 506. $INTERNAL_SCRIPT
488exit $? 507exit $?