aboutsummaryrefslogtreecommitdiffstats
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:47:09 +0100
commitbded344a464bb854db3935da1f6a3320e5aa01e5 (patch)
treefb0febc9347ada5992ee9d88084b6ef3f602e2d5 /scripts/runqemu
parent9dde1ce547c8be064ff63ac832f62a08a9b00f10 (diff)
downloadopenembedded-core-bded344a464bb854db3935da1f6a3320e5aa01e5.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] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
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() {
OECORE_NATIVE_SYSROOT=$OE_TMPDIR/sysroots/$BUILD_SYS
fi
+
+ # Some recipes store the BIOS under $OE_TMPDIR/sysroots/$MACHINE,
+ # now defined as OECORE_MACHINE_SYSROOT. The latter is used when searching
+ # BIOS, VGA BIOS and keymaps.
+ if [ -z "$OECORE_MACHINE_SYSROOT" ]; then
+ OECORE_MACHINE_SYSROOT=$OE_TMPDIR/sysroots/$MACHINE
+ fi
}
# Locate a rootfs image to boot which matches our expected
@@ -494,7 +501,7 @@ fi
echo "FSTYPE: [$FSTYPE]"
setup_sysroot
-# OECORE_NATIVE_SYSROOT is now set for all cases
+# OECORE_NATIVE_SYSROOT and OECORE_MACHINE_SYSROOT are now set for all cases
INTERNAL_SCRIPT="$0-internal"
if [ ! -f "$INTERNAL_SCRIPT" -o ! -r "$INTERNAL_SCRIPT" ]; then
@@ -506,10 +513,14 @@ if [ ! -z "$CUSTOMBIOSDIR" ]; then
if [ -d "$OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR" ]; then
echo "Assuming biosdir is $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
+ elif [ -d "$OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR" ]; then
+ echo "Assuming biosdir is $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
+ SCRIPT_QEMU_OPT="$SCRIPT_QEMU_OPT -L $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
else
if [ ! -d "$CUSTOMBIOSDIR" ]; then
echo "Custom BIOS directory not found. Tried: $CUSTOMBIOSDIR"
echo "and $OECORE_NATIVE_SYSROOT/$CUSTOMBIOSDIR"
+ echo "and $OECORE_MACHINE_SYSROOT/$CUSTOMBIOSDIR"
exit 1;
fi
echo "Assuming biosdir is $CUSTOMBIOSDIR"