summaryrefslogtreecommitdiffstats
path: root/scripts/runqemu
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-07-14 20:07:12 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-09-12 22:48:34 +0100
commite0543d1094b690d42d7a6ae8a55f554f630ca9b0 (patch)
treebd64c350bf40ec684d41d9f5ac4cc5c75b1f6bb8 /scripts/runqemu
parent30dc71d7567fd8b65604da0e2656219016e607b5 (diff)
downloadpoky-e0543d1094b690d42d7a6ae8a55f554f630ca9b0.tar.gz
runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot
At least the OVFM (UEFI Firmware for Qemu and KVM) recipe stores the BIOS under $OE_TMPDIR/sysroots/$MACHINE, now defined as OECORE_MACHINE_SYSROOT. The latter is used when searching BIOS, VGA BIOS and keymaps. As a example, to boot a OVFM BIOS, one can run the following command: $ runqemu qemux86-64 core-image-minimal \ biosdir=usr/share/ovmf \ biosfilename=bios.bin \ nographic Note the bios* parameters: these two are needed to specify the subfolder (parent folder is OECORE_MACHINE_SYSROOT) and BIOS filename (without it, it picks a BIOS named bios-256k.bin). [YOCTO #5654] (From OE-Core rev: bded344a464bb854db3935da1f6a3320e5aa01e5) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/runqemu')
-rwxr-xr-xscripts/runqemu13
1 files changed, 12 insertions, 1 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index a4d9a2306b..f16af9ccf4 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -401,6 +401,13 @@ setup_sysroot() {
401 401
402 OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS 402 OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS
403 fi 403 fi
404
405 # Some recipes store the BIOS under $OE_TMPDIR/sysroots/$MACHINE,
406 # now defined as OECORE_MACHINE_SYSROOT. The latter is used when searching
407 # BIOS, VGA BIOS and keymaps.
408 if [ -z "$OECORE_MACHINE_SYSROOT" ]; then
409 OECORE_MACHINE_SYSROOT=$OE_TMPDIR/sysroots/$MACHINE
410 fi
404} 411}
405 412
406# Locate a rootfs image to boot which matches our expected 413# Locate a rootfs image to boot which matches our expected
@@ -494,7 +501,7 @@ fi
494echo "FSTYPE: [$FSTYPE]" 501echo "FSTYPE: [$FSTYPE]"
495 502
496setup_sysroot 503setup_sysroot
497# OECORE_NATIVE_SYSROOT is now set for all cases 504# OECORE_NATIVE_SYSROOT and OECORE_MACHINE_SYSROOT are now set for all cases
498 505
499INTERNAL_SCRIPT="$0-internal" 506INTERNAL_SCRIPT="$0-internal"
500if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then 507if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
@@ -506,10 +513,14 @@ if [ ! -z "$CUSTOMBIOSDIR" ]; then
506 if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then 513 if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then
507 echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" 514 echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
508 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" 515 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
516 elif [ -d "$OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR" ]; then
517 echo "Assuming biosdir is $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
518 SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
509 else 519 else
510 if [ ! -d "$CUSTOMBIOSDIR" ]; then 520 if [ ! -d "$CUSTOMBIOSDIR" ]; then
511 echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR" 521 echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR"
512 echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" 522 echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
523 echo "and $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
513 exit 1; 524 exit 1;
514 fi 525 fi
515 echo "Assuming biosdir is $CUSTOMBIOSDIR" 526 echo "Assuming biosdir is $CUSTOMBIOSDIR"