All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] OVMF recipe
@ 2014-08-13 13:03 Matt Fleming
  2014-08-13 13:03 ` [PATCH 1/2] recipes-extended: Add iasl recipe Matt Fleming
  2014-08-13 13:03 ` [PATCH v2 2/2] recipes-devtools: Add OVMF recipe Matt Fleming
  0 siblings, 2 replies; 7+ messages in thread
From: Matt Fleming @ 2014-08-13 13:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Matt Fleming

From: Matt Fleming <matt.fleming@intel.com>

This is v2 of the OVMF recipe patch. This version addresses some of the
comments from Martin Jansa on style, as documented in the openembedded
styleguide.

Additionally, iasl is a dependency of OVMF but no iasl recipe currently
exists in oe-core so one is included in this series.

Matt Fleming (2):
  recipes-extended: Add iasl recipe
  recipes-devtools: Add OVMF recipe

 ...s-Force-tools-variables-to-host-toolchain.patch | 48 ++++++++++++++++++++
 meta/recipes-devtools/ovmf/ovmf_git.bb             | 52 ++++++++++++++++++++++
 meta/recipes-extended/iasl/iasl_20120215.bb        | 27 +++++++++++
 3 files changed, 127 insertions(+)
 create mode 100644 meta/recipes-devtools/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
 create mode 100644 meta/recipes-devtools/ovmf/ovmf_git.bb
 create mode 100644 meta/recipes-extended/iasl/iasl_20120215.bb

-- 
1.9.3



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] recipes-extended: Add iasl recipe
  2014-08-13 13:03 [PATCH 0/2] OVMF recipe Matt Fleming
@ 2014-08-13 13:03 ` Matt Fleming
  2014-08-13 13:17   ` Richard Purdie
  2014-08-13 13:45   ` Martin Jansa
  2014-08-13 13:03 ` [PATCH v2 2/2] recipes-devtools: Add OVMF recipe Matt Fleming
  1 sibling, 2 replies; 7+ messages in thread
From: Matt Fleming @ 2014-08-13 13:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mihai Prica, Matt Fleming, Raymond Danks

From: Matt Fleming <matt.fleming@intel.com>

Import the Intel ACPI toolchain from the meta-virtualization layer.

Cc: Mihai Prica <mihai.prica@intel.com>
Cc: Raymond Danks <ray.danks@se-eng.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
---
 meta/recipes-extended/iasl/iasl_20120215.bb | 27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 meta/recipes-extended/iasl/iasl_20120215.bb

diff --git a/meta/recipes-extended/iasl/iasl_20120215.bb b/meta/recipes-extended/iasl/iasl_20120215.bb
new file mode 100644
index 0000000..a14d2ec
--- /dev/null
+++ b/meta/recipes-extended/iasl/iasl_20120215.bb
@@ -0,0 +1,27 @@
+DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
+HOMEPAGE = "http://www.acpica.org/"
+LICENSE = "Intel-ACPI"
+LIC_FILES_CHKSUM = "file://asldefine.h;endline=115;md5=d4d7cf809b8b5e03131327b3f718e8f0"
+SECTION = "console/tools"
+PR = "r1"
+
+DEPENDS = "flex-native bison-native"
+
+SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz"
+
+SRC_URI[md5sum] = "324c89e5bb9002e2711e0494290ceacc"
+SRC_URI[sha256sum] = "b2b497415f29ddbefe7be8b9429b62c1f1f6e1ec11456928e4e7da86578e5b8d"
+
+S = "${WORKDIR}/acpica-unix-${PV}/source/compiler"
+
+NATIVE_INSTALL_WORKS = "1"
+BBCLASSEXTEND = "native"
+
+do_compile() {
+	CFLAGS="-Wno-error=redundant-decls" $MAKE
+}
+
+do_install() {
+	mkdir -p ${D}${prefix}/bin
+	cp ${S}/iasl ${D}${prefix}/bin
+}
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v2 2/2] recipes-devtools: Add OVMF recipe
  2014-08-13 13:03 [PATCH 0/2] OVMF recipe Matt Fleming
  2014-08-13 13:03 ` [PATCH 1/2] recipes-extended: Add iasl recipe Matt Fleming
@ 2014-08-13 13:03 ` Matt Fleming
  1 sibling, 0 replies; 7+ messages in thread
From: Matt Fleming @ 2014-08-13 13:03 UTC (permalink / raw)
  To: openembedded-core; +Cc: Darren Hart, Matt Fleming

From: Matt Fleming <matt.fleming@intel.com>

The EDK2 project provides a UEFI firmware image for Qemu.

Import the OVMF recipe from the meta-luv layer.

Partial solution for [YOCTO #5654]

Cc: Max Eliaser <max.eliaser@intel.com>
Cc: Darren Hart <dvhart@linux.intel.com>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
---

v2: Put spaces around assignments and do config variable futzing in
do_configure_prepend() instead of do_patch_append().

 ...s-Force-tools-variables-to-host-toolchain.patch | 48 ++++++++++++++++++++
 meta/recipes-devtools/ovmf/ovmf_git.bb             | 52 ++++++++++++++++++++++
 2 files changed, 100 insertions(+)
 create mode 100644 meta/recipes-devtools/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
 create mode 100644 meta/recipes-devtools/ovmf/ovmf_git.bb

diff --git a/meta/recipes-devtools/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch b/meta/recipes-devtools/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
new file mode 100644
index 0000000..c0cc633
--- /dev/null
+++ b/meta/recipes-devtools/ovmf/ovmf/0001-BaseTools-Force-tools-variables-to-host-toolchain.patch
@@ -0,0 +1,48 @@
+From 6e24bde1979c2d7149b37d142fb882dfde0e9770 Mon Sep 17 00:00:00 2001
+From: Matt Fleming <matt.fleming@intel.com>
+Date: Fri, 27 Jun 2014 11:12:18 +0100
+Subject: [PATCH] BaseTools: Force tools variables to host toolchain
+
+Signed-off-by: Matt Fleming <matt.fleming@intel.com>
+---
+ 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
+
diff --git a/meta/recipes-devtools/ovmf/ovmf_git.bb b/meta/recipes-devtools/ovmf/ovmf_git.bb
new file mode 100644
index 0000000..b70142c
--- /dev/null
+++ b/meta/recipes-devtools/ovmf/ovmf_git.bb
@@ -0,0 +1,52 @@
+DESCRIPTION = "OVMF - UEFI firmware for Qemu and KVM"
+HOMEPAGE = "http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF"
+LICENSE = "BSD"
+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 = "util-linux-native iasl-native"
+
+# OVMF has trouble building with the default optimization of -O2.
+BUILD_OPTIMIZATION = "-pipe"
+
+# OVMF supports IA only, although it could conceivably support ARM someday.
+COMPATIBLE_HOST = '(i.86|x86_64).*'
+
+do_configure_prepend() {
+    sed -i -e 's#/usr/bin/iasl#${STAGING_BINDIR_NATIVE}/iasl#' ${S}/BaseTools/Conf/tools_def.template
+
+    sed -i -e 's#DEF(ELFGCC_BIN)/#${TARGET_PREFIX}#' ${S}/BaseTools/Conf/tools_def.template
+    sed -i -e 's#DEF(GCC.*PREFIX)#${TARGET_PREFIX}#' ${S}/BaseTools/Conf/tools_def.template
+    sed -i -e "s#^LINKER\(.*\)#LINKER\1\nLFLAGS += ${BUILD_LDFLAGS}#" ${S}/BaseTools/Source/C/Makefiles/app.makefile
+    sed -i -e "s#^LINKER\(.*\)#LINKER\1\nCFLAGS += ${BUILD_CFLAGS}#" ${S}/BaseTools/Source/C/Makefiles/app.makefile
+    sed -i -e "s#^LINKER\(.*\)#LINKER\1\nLFLAGS += ${BUILD_LDFLAGS}#" ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile
+    sed -i -e "s#^LINKER\(.*\)#LINKER\1\nCFLAGS += ${BUILD_CFLAGS}#" ${S}/BaseTools/Source/C/VfrCompile/GNUmakefile
+}
+
+GCC_VER = "$(${CC} -v 2>&1 | tail -n1 | awk '{print $3}' | awk -F. '{print $1$2}')"
+
+do_compile() {
+    export LFLAGS="${LDFLAGS}"
+    OVMF_ARCH="X64"
+    if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+        OVMF_ARCH="IA32"
+    fi
+    ${S}/OvmfPkg/build.sh -a $OVMF_ARCH -b RELEASE -t GCC${GCC_VER}
+}
+
+do_install() {
+    OVMF_DIR_SUFFIX="X64"
+    if [ "${TARGET_ARCH}" != "x86_64" ] ; then
+        OVMF_DIR_SUFFIX="Ia32" # Note the different capitalization
+    fi
+    install -d ${D}${datadir}/ovmf
+    build_dir="${S}/Build/Ovmf$OVMF_DIR_SUFFIX/RELEASE_GCC${GCC_VER}"
+    install -m 0755 ${build_dir}/FV/OVMF.fd \
+	${D}${datadir}/ovmf/bios.bin
+}
-- 
1.9.3



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] recipes-extended: Add iasl recipe
  2014-08-13 13:03 ` [PATCH 1/2] recipes-extended: Add iasl recipe Matt Fleming
@ 2014-08-13 13:17   ` Richard Purdie
  2014-08-13 13:24     ` Matt Fleming
  2014-08-13 13:45   ` Martin Jansa
  1 sibling, 1 reply; 7+ messages in thread
From: Richard Purdie @ 2014-08-13 13:17 UTC (permalink / raw)
  To: Matt Fleming; +Cc: Raymond Danks, Mihai Prica, Matt Fleming, openembedded-core

On Wed, 2014-08-13 at 14:03 +0100, Matt Fleming wrote:
>+NATIVE_INSTALL_WORKS = "1"
> +BBCLASSEXTEND = "native"

Please remove the NATIVE_INSTALL_WORKS, you don't need it!

You're making me feel old, I remember why that was added (by me iirc),
what it did and also removing it. Its never been needed with OE-Core and
if that is any any modern layers, it should be removed.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] recipes-extended: Add iasl recipe
  2014-08-13 13:17   ` Richard Purdie
@ 2014-08-13 13:24     ` Matt Fleming
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Fleming @ 2014-08-13 13:24 UTC (permalink / raw)
  To: Richard Purdie; +Cc: Matt Fleming, openembedded-core

On Wed, 13 Aug, at 02:17:16PM, Richard Purdie wrote:
> On Wed, 2014-08-13 at 14:03 +0100, Matt Fleming wrote:
> >+NATIVE_INSTALL_WORKS = "1"
> > +BBCLASSEXTEND = "native"
> 
> Please remove the NATIVE_INSTALL_WORKS, you don't need it!
> 
> You're making me feel old, I remember why that was added (by me iirc),
> what it did and also removing it. Its never been needed with OE-Core and
> if that is any any modern layers, it should be removed.

Sure, I'll get it removed in the next version (along with the Cc's since
they're bouncing anyway).

Thanks.

-- 
Matt Fleming, Intel Open Source Technology Center


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] recipes-extended: Add iasl recipe
  2014-08-13 13:03 ` [PATCH 1/2] recipes-extended: Add iasl recipe Matt Fleming
  2014-08-13 13:17   ` Richard Purdie
@ 2014-08-13 13:45   ` Martin Jansa
  2014-08-13 19:41     ` Matt Fleming
  1 sibling, 1 reply; 7+ messages in thread
From: Martin Jansa @ 2014-08-13 13:45 UTC (permalink / raw)
  To: Matt Fleming; +Cc: Raymond Danks, Mihai Prica, Matt Fleming, openembedded-core

[-- Attachment #1: Type: text/plain, Size: 2256 bytes --]

On Wed, Aug 13, 2014 at 02:03:42PM +0100, Matt Fleming wrote:
> From: Matt Fleming <matt.fleming@intel.com>
> 
> Import the Intel ACPI toolchain from the meta-virtualization layer.
> 
> Cc: Mihai Prica <mihai.prica@intel.com>
> Cc: Raymond Danks <ray.danks@se-eng.com>
> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
> ---
>  meta/recipes-extended/iasl/iasl_20120215.bb | 27 +++++++++++++++++++++++++++
>  1 file changed, 27 insertions(+)
>  create mode 100644 meta/recipes-extended/iasl/iasl_20120215.bb
> 
> diff --git a/meta/recipes-extended/iasl/iasl_20120215.bb b/meta/recipes-extended/iasl/iasl_20120215.bb
> new file mode 100644
> index 0000000..a14d2ec
> --- /dev/null
> +++ b/meta/recipes-extended/iasl/iasl_20120215.bb
> @@ -0,0 +1,27 @@
> +DESCRIPTION = "This is a cross development C compiler, assembler and linker environment for the production of 8086 executables (Optionally MSDOS COM)"
> +HOMEPAGE = "http://www.acpica.org/"
> +LICENSE = "Intel-ACPI"
> +LIC_FILES_CHKSUM = "file://asldefine.h;endline=115;md5=d4d7cf809b8b5e03131327b3f718e8f0"
> +SECTION = "console/tools"
> +PR = "r1"

Drop PR
> +
> +DEPENDS = "flex-native bison-native"
> +
> +SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz"

There is acpica-unix2 in meta-oe:
meta-oe/recipes-extended/acpica/acpica_20140424.bb:SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \

can we use that one instead?

> +
> +SRC_URI[md5sum] = "324c89e5bb9002e2711e0494290ceacc"
> +SRC_URI[sha256sum] = "b2b497415f29ddbefe7be8b9429b62c1f1f6e1ec11456928e4e7da86578e5b8d"
> +
> +S = "${WORKDIR}/acpica-unix-${PV}/source/compiler"
> +
> +NATIVE_INSTALL_WORKS = "1"

this variable isn't used by oe-core

> +BBCLASSEXTEND = "native"
> +
> +do_compile() {
> +	CFLAGS="-Wno-error=redundant-decls" $MAKE
> +}
> +
> +do_install() {
> +	mkdir -p ${D}${prefix}/bin
> +	cp ${S}/iasl ${D}${prefix}/bin
> +}
> -- 
> 1.9.3
> 
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa@gmail.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 188 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] recipes-extended: Add iasl recipe
  2014-08-13 13:45   ` Martin Jansa
@ 2014-08-13 19:41     ` Matt Fleming
  0 siblings, 0 replies; 7+ messages in thread
From: Matt Fleming @ 2014-08-13 19:41 UTC (permalink / raw)
  To: Martin Jansa; +Cc: Matt Fleming, openembedded-core

On Wed, 13 Aug, at 03:45:11PM, Martin Jansa wrote:
> 
> There is acpica-unix2 in meta-oe:
> meta-oe/recipes-extended/acpica/acpica_20140424.bb:SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix2-${PV}.tar.gz \
> 
> can we use that one instead?

Sure, I don't see why not. Though something like this is probably
required?

---

diff --git a/meta-luv/recipes-extended/acpica/acpica_20140424.bb b/meta-luv/recipes-extended/acpica/acpica_20140424.bb
index d10a31b..03f69ad 100644
--- a/meta-luv/recipes-extended/acpica/acpica_20140424.bb
+++ b/meta-luv/recipes-extended/acpica/acpica_20140424.bb
@@ -32,3 +32,5 @@ do_install() {
 }
 
 COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux"
+
+BBCLASSEXTEND = "native"

-- 
Matt Fleming, Intel Open Source Technology Center


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-08-13 19:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-13 13:03 [PATCH 0/2] OVMF recipe Matt Fleming
2014-08-13 13:03 ` [PATCH 1/2] recipes-extended: Add iasl recipe Matt Fleming
2014-08-13 13:17   ` Richard Purdie
2014-08-13 13:24     ` Matt Fleming
2014-08-13 13:45   ` Martin Jansa
2014-08-13 19:41     ` Matt Fleming
2014-08-13 13:03 ` [PATCH v2 2/2] recipes-devtools: Add OVMF recipe Matt Fleming

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.