[oe-commits] Ricardo Neri : runqemu: Add option for custom BIOS directory

git at git.openembedded.org git at git.openembedded.org
Tue Mar 18 22:59:36 UTC 2014


Module: openembedded-core.git
Branch: master-next
Commit: ca0efb53deedabf94da87f460d153181b94fcacd
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=ca0efb53deedabf94da87f460d153181b94fcacd

Author: Ricardo Neri <ricardo.neri-calderon at linux.intel.com>
Date:   Sat Mar  8 00:30:10 2014 +0000

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
other qemuparams that the user might want to specify.

This new options assumes that the path provided is relative to
OECORE_NATIVE_SYSROOT and will check whether it exists before proceeding.

Signed-off-by: Ricardo Neri <ricardo.neri-calderon at linux.intel.com>
Signed-off-by: Saul Wold <sgw at linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>

---

 scripts/runqemu | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 573def1..b36f245 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -150,6 +150,9 @@ while true; do
             SCRIPT_KERNEL_OPT="$SCRIPT_KERNEL_OPT console=ttyS0"
             SERIALSTDIO="1"
             ;;
+	"biosdir="*)
+            CUSTOMBIOSDIR="${arg##biosdir=}"
+	    ;;
         "qemuparams="*)
             SCRIPT_QEMU_EXTRA_OPT="${arg##qemuparams=}"
 
@@ -484,5 +487,16 @@ if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
 INTERNAL_SCRIPT=`which runqemu-internal`
 fi
 
+# Specify directory for BIOS, VGA BIOS and keymaps
+if [ ! -z "$CUSTOMBIOSDIR" ]; then
+    if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then
+           echo "Assuming $CUSTOMBIOSDIR really means $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
+           SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
+       else
+           echo "Custom BIOS directory $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR not found."
+           exit 1;
+    fi
+fi
+
 . $INTERNAL_SCRIPT
 exit $?



More information about the Openembedded-commits mailing list