Add UEFI firmware for qemux86*
v2 cover Add UEFI firmware for qemux86*
From: Leonardo Sandoval <[email protected]>
These two patches include:
1. Recipe: Including the OVMF recipe (taken from luv-yocto repository) into OE-Core
2. Boot script: Instrumenting runqemu to include OECORE_MACHINE_SYSROOT, so the OVMF BIOS can be found.
[YOCTO #5654]
The following changes since commit 0aaa67a790ab211b35eed58173efa115ceb6e243:
oeqa/bbtests: Fix to ensure DL_DIR is set (2015-07-08 13:09:28 +0100)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib lsandov1/efi-qemux86
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lsandov1/efi-qemux86
Leonardo Sandoval (2):
ovmf: Recipe taken from luv-yocto repository
runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot
...s-Force-tools-variables-to-host-toolchain.patch | 50 ++++++++++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 61 ++++++++++++++++++++++ scripts/runqemu | 13 ++++- 3 files changed, 123 insertions(+), 1 deletion(-) create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch create mode 100644 meta/recipes-core/ovmf/ovmf_git.bb
Signature · 1 line
1.8.4.5
PATCH v2 1/2 ovmf: Recipe taken from luv-yocto repository
From: Leonardo Sandoval <[email protected]>
OVMF metadata taken from the luv-yocto[1] repository and copied into OE-Core meta/recipes-core folder.
[1] https://github.com/01org/luv-yocto/tree/master/meta-luv/recipes-core/ovmf
[YOCTO #5654]
--- ...s-Force-tools-variables-to-host-toolchain.patch | 50 ++++++++++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 61 ++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch create mode 100644 meta/recipes-core/ovmf/ovmf_git.bb
meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch new file +50 -0
@@ -0,0 +1,50 @@ +From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001 +From: Matt Fleming <[email protected]> +Date: Fri, 27 Jun 2014 11:12:18 +0100 +Subject: [PATCH] BaseTools: Force tools variables to host toolchain + +Upstream-Status: Pending + +Signed-off-by: Matt Fleming <[email protected]> +--- + BaseTools/Source/C/Makefiles/app.makefile | 7 +++++++ + BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +++++ + 2 files changed, 12 insertions(+) + +diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile +index 19269a1..62aad0f 100644 +--- a/BaseTools/Source/C/Makefiles/app.makefile ++++ b/BaseTools/Source/C/Makefiles/app.makefile +@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile + + APPLICATION = $(MAKEROOT)/bin/$(APPNAME) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld ++LINKER = $(CC) ++ + .PHONY:all + all: $(MAKEROOT)/bin $(APPLICATION) + +diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile +index 82005e1..5ac5f7e 100644 +--- a/BaseTools/Source/C/VfrCompile/GNUmakefile ++++ b/BaseTools/Source/C/VfrCompile/GNUmakefile +@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn + + VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld + LINKER = $(CXX) + + EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h +-- +1.9.0 +
meta/recipes-core/ovmf/ovmf_git.bb new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
1.8.4.5
Re: [PATCH V2 1/2] ovmf: Recipe taken from luv-yocto repository
Quoted 82 lines · On Wed, 2015-07-08 at 08:20 +0000, [email protected]…
From: Leonardo Sandoval <[email protected]>
OVMF metadata taken from the luv-yocto[1] repository and copied into OE-Core meta/recipes-core folder.
[1] https://github.com/01org/luv-yocto/tree/master/meta-luv/recipes-core/ovmf
[YOCTO #5654]
Signed-off-by Leonardo Sandoval <[email protected]>--- ...s-Force-tools-variables-to-host-toolchain.patch | 50 ++++++++++++++++++ meta/recipes-core/ovmf/ovmf_git.bb | 61 ++++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 meta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch create mode 100644 meta/recipes-core/ovmf/ovmf_git.bbmeta/recipes-core/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch new file +50
-0@@ -0,0 +1,50 @@ +From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001 +From: Matt Fleming <[email protected]> +Date: Fri, 27 Jun 2014 11:12:18 +0100 +Subject: [PATCH] BaseTools: Force tools variables to host toolchain + +Upstream-Status: Pending + +Signed-off-by: Matt Fleming <[email protected]> +--- + BaseTools/Source/C/Makefiles/app.makefile | 7 +++++++ + BaseTools/Source/C/VfrCompile/GNUmakefile | 5 +++++ + 2 files changed, 12 insertions(+) + +diff --git a/BaseTools/Source/C/Makefiles/app.makefile b/BaseTools/Source/C/Makefiles/app.makefile +index 19269a1..62aad0f 100644 +--- a/BaseTools/Source/C/Makefiles/app.makefile ++++ b/BaseTools/Source/C/Makefiles/app.makefile +@@ -16,6 +16,13 @@ include $(MAKEROOT)/Makefiles/header.makefile + + APPLICATION = $(MAKEROOT)/bin/$(APPNAME) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld ++LINKER = $(CC) ++ + .PHONY:all + all: $(MAKEROOT)/bin $(APPLICATION) + +diff --git a/BaseTools/Source/C/VfrCompile/GNUmakefile b/BaseTools/Source/C/VfrCompile/GNUmakefile +index 82005e1..5ac5f7e 100644 +--- a/BaseTools/Source/C/VfrCompile/GNUmakefile ++++ b/BaseTools/Source/C/VfrCompile/GNUmakefile +@@ -26,6 +26,11 @@ OBJECTS = AParser.o DLexerBase.o ATokenBuffer.o EfiVfrParser.o VfrLexer.o VfrSyn + + VFR_CPPFLAGS = -DPCCTS_USE_NAMESPACE_STD $(CPPFLAGS) + ++CC = gcc ++CXX = g++ ++AS = gcc ++AR = ar ++LD = ld + LINKER = $(CXX) + + EXTRA_CLEAN_OBJECTS = EfiVfrParser.cpp EfiVfrParser.h VfrParser.dlg VfrTokens.h VfrLexer.cpp VfrLexer.h VfrSyntax.cpp tokens.h +-- +1.9.0 +meta/recipes-core/ovmf/ovmf_git.bb new file +3
-0@@ -0,0 +1,61 @@ +DESCRIPTION = "OVMF - UEFI firmware for Qemu and KVM" +HOMEPAGE = "http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF" +LICENSE = "BSD"
meta/recipes-core/ovmf/ovmf_git.bb line 13
Quoted 10 lines
meta/recipes-core/ovmf/ovmf_git.bb new file +10
-0+LIC_FILES_CHKSUM = "file://OvmfPkg/License.txt;md5=ffd52cf9a8e0e036b9a61a0de2dc87ed" + +SRC_URI = "git://github.com/tianocore/edk2.git;branch=master \ + file://0001-BaseTools-Force-tools-variables-to-host-toolchain.patch" + +SRCREV="dc4ad1532e59fd1a185d6b90d1c2a92cf8713f40" + +S = "${WORKDIR}/git" + +DEPENDS_class-native="util-linux-native iasl-native"
Sorry, I didn't spot this before.
Does OE-Core have iasl?
Does this recipe not need iasl-native in the target case too?
Cheers,
Richard
A message that is not in the archive (sent off-list or not yet received): 1436373958.2639.44.camel@ranerica-desk01
Re: [PATCH V2 1/2] ovmf: Recipe taken from luv-yocto repository
The new set of patches are failing so I will send a V3! The reason is that the ovmf source code has ^M line endings and the .patch I send does not, so when bitbake is trying to patch, there are patch errors.
Quoted 9 lines · Ricardo
Quoted 5 lines · Richard Purdie
Sorry, I didn't spot this before.
Does OE-Core have iasl?
Does this recipe not need iasl-native in the target case too?
We also have those recipes in our meta-luv layer.
What does this mean? Do we need to add it also? It is not under OE-Core but I did not face any error when compiling the ovmf recipe under poky.
Quoted 3 lines
Thanks and BR,
Ricardo
Re: [PATCH V2 1/2] ovmf: Recipe taken from luv-yocto repository
Quoted 3 lines · Leonardo Sandoval
The new set of patches are failing so I will send a V3! The reason is that the ovmf source code has ^M line endings and the .patch I send does not, so when bitbake is trying to patch, there are patch errors.
You probably need to tell git to preserve the line endings, see something like
http://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf
and other info you can find on line endings and git with google.
Quoted 6 lines · Ricardo
Quoted 5 lines · Richard Purdie
Quoted 4 lines
Sorry, I didn't spot this before.
Does OE-Core have iasl?
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Does this recipe not need iasl-native in the target case too?
We also have those recipes in our meta-luv layer.
What does this mean? Do we need to add it also? It is not under OE-Core but I did not face any error when compiling the ovmf recipe under poky.
Try disabling the meta-luv layer, then run a build. OE-Core should not depend on meta-luv.
Cheers,
Richard
PATCH v2 2/2 runqemu: Define OECORE_MACHINE_SYSROOT on setup_sysroot
In reply to [email protected]From: Leonardo Sandoval <[email protected]>
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 core-image-minimal \
biosdir=usr/share/ovmf \
biosfilename=bios.bin \
nographicNote 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]
--- scripts/runqemu | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
scripts/runqemu +12 -1
@@ -397,6 +397,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
@@ -486,7 +493,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
@@ -498,10 +505,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"
Signature · 1 line
1.8.4.5