On 03/07/2014 04:30 PM, Ricardo Neri wrote:
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 <[email protected]>
---
  scripts/runqemu | 14 ++++++++++++++
  1 file changed, 14 insertions(+)

diff --git a/scripts/runqemu b/scripts/runqemu
index 619ffb6..9eff90d 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -149,6 +149,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=}"

@@ -489,5 +492,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
I don't think we should be assuming anything here, if the direcotry is passed then it should be given that it is an accurate path to the directory that contains the customer bios, don't make people second gess that it needs to be in the native sysroot.

Sau!

+           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 $?

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to