All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Stanacar, StefanX" <stefanx.stanacar@intel.com>
To: "sgw@linux.intel.com" <sgw@linux.intel.com>
Cc: "dvhart@linux.intel.com" <dvhart@linux.intel.com>,
	"openembedded-core@lists.openembedded.org"
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/3] recipes-bsp: Add gummiboot and gnu-efi recipes
Date: Sun, 9 Mar 2014 15:34:47 +0000	[thread overview]
Message-ID: <1394379293.12559.1.camel@firebird.rb.intel.com> (raw)
In-Reply-To: <531C1F8D.2050000@linux.intel.com>




On Sun, 2014-03-09 at 00:00 -0800, Saul Wold wrote:
> On 03/06/2014 10:15 AM, Stefan Stanacar wrote:
> > gummiboot is  is a simple UEFI boot manager (not a boot loader ;-) )
> >
> > These recipes are imported from meta-intel with these changes:
> >   - drop PR and update configure options
> >   - gummiboot was upgraded to latest version
> >
> > A couple of notes:
> >   - If you wish you can install the gummiboot package on the target and
> > use 'gummiboot install' to add the payload to the ESP (see gummiboot --help,
> > just make sure the ESP partition has the boot flag on as gummiboot won't accept it
> > otherwise). However the point of this recipe is to be used by bootimg.bbclass and
> > generate images with gummiboot instead of grub-efi.
> >   - You need a kernel which has CONFIG_EFI_STUB=y at least
> >   - The default linux-yocto kernel config does not enable that, easiest way
> > to enable is to build with KERNEL_FEATURES_append = " cfg/efi-ext" in local.conf
> >
> > Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
> > ---
> >   .../gnu-efi/gnu-efi/parallel-make-archives.patch   | 48 ++++++++++++++++++++++
> >   .../gnu-efi/gnu-efi/parallel-make.patch            | 22 ++++++++++
> >   meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb           | 33 +++++++++++++++
> >   meta/recipes-bsp/gummiboot/gummiboot_git.bb        | 25 +++++++++++
> >   4 files changed, 128 insertions(+)
> >   create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
> >   create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
> >   create mode 100644 meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
> >   create mode 100644 meta/recipes-bsp/gummiboot/gummiboot_git.bb
> >
> > diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
> > new file mode 100644
> > index 0000000..e5b47c1
> > --- /dev/null
> > +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make-archives.patch
> > @@ -0,0 +1,48 @@
> > +Fix parallel make failure for archives
> > +
> > +Upstream-Status: Pending
> > +
> > +The lib and gnuefi makefiles were using the lib.a() form which compiles
> > +and ar's as a pair instead of compiling all and then ar'ing which can
> > +parallelize better. This was resulting in build failures on larger values
> > +of -j.
> > +
> > +See http://www.chemie.fu-berlin.de/chemnet/use/info/make/make_toc.html#TOC105
> > +for details.
> > +
> > +Signed-off-by: Saul Wold <sgw@linux.intel.com>
> > +Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> > +---
> > +---
> > + gnuefi/Makefile |    3 ++-
> > + lib/Makefile    |    3 ++-
> > + 2 files changed, 4 insertions(+), 2 deletions(-)
> > +
> > +Index: gnu-efi-3.0/lib/Makefile
> > +===================================================================
> > +--- gnu-efi-3.0.orig/lib/Makefile
> > ++++ gnu-efi-3.0/lib/Makefile
> > +@@ -66,7 +66,8 @@ all: libsubdirs libefi.a
> > + libsubdirs:
> > + 	for sdir in $(SUBDIRS); do mkdir -p $$sdir; done
> > +
> > +-libefi.a: $(patsubst %,libefi.a(%),$(OBJS))
> > ++libefi.a: $(OBJS)
> > ++	$(AR) rv $@ $(OBJS)
> > +
> > + clean:
> > + 	rm -f libefi.a *~ $(OBJS) */*.o
> > +Index: gnu-efi-3.0/gnuefi/Makefile
> > +===================================================================
> > +--- gnu-efi-3.0.orig/gnuefi/Makefile
> > ++++ gnu-efi-3.0/gnuefi/Makefile
> > +@@ -51,7 +51,8 @@ TARGETS	= crt0-efi-$(ARCH).o libgnuefi.a
> > +
> > + all:	$(TARGETS)
> > +
> > +-libgnuefi.a: $(patsubst %,libgnuefi.a(%),$(OBJS))
> > ++libgnuefi.a: $(OBJS)
> > ++	$(AR) rv $@ $(OBJS)
> > +
> > + clean:
> > + 	rm -f $(TARGETS) *~ *.o $(OBJS)
> > diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
> > new file mode 100644
> > index 0000000..27c94e8
> > --- /dev/null
> > +++ b/meta/recipes-bsp/gnu-efi/gnu-efi/parallel-make.patch
> > @@ -0,0 +1,22 @@
> > +Fix parallel make failure
> > +
> > +Upstream-Status: Submitted [Maintainer directly]
> > +
> > +Add a missing dependency which resulted in a race leading to failure
> > +on larger values of -j.
> > +
> > +Signed-off-by: Darren Hart <dvhart@linux.intel.com>
> > +
> > +Index: gnu-efi-3.0/Makefile
> > +===================================================================
> > +--- gnu-efi-3.0.orig/Makefile
> > ++++ gnu-efi-3.0/Makefile
> > +@@ -42,6 +42,8 @@ include $(SRCDIR)/Make.defaults
> > +
> > + SUBDIRS = lib gnuefi inc apps
> > +
> > ++gnuefi: lib
> > ++
> > + all:	check_gcc $(SUBDIRS)
> > +
> > + $(SUBDIRS):
> > diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
> > new file mode 100644
> > index 0000000..0dbdba2
> > --- /dev/null
> > +++ b/meta/recipes-bsp/gnu-efi/gnu-efi_3.0u.bb
> > @@ -0,0 +1,33 @@
> > +SUMMARY = "Libraries for producing EFI binaries"
> > +HOMEPAGE = "http://sourceforge.net/projects/gnu-efi/"
> > +SECTION = "devel"
> > +LICENSE = "GPLv2+"
> > +LIC_FILES_CHKSUM = "file://debian/copyright;md5=5fb358a180f484b285b0d99acdc29666"
> > +
> > +SRC_URI = "http://downloads.sourceforge.net/gnu-efi/gnu-efi_3.0u.orig.tar.gz \
> > +           file://parallel-make.patch \
> > +           file://parallel-make-archives.patch \
> > +          "
> > +SRC_URI[md5sum] = "d15d3c700e79a1e2938544d73edc572d"
> > +SRC_URI[sha256sum] = "3c0d450d5829204ca05dcb3b2aae772e52c379b7c7e09146759c6315606f934e"
> > +
> > +COMPATIBLE_HOST = "(x86_64.*|i.86.*)-linux"
> > +
> > +S = "${WORKDIR}/gnu-efi-3.0"
> > +
> > +def gnu_efi_arch(d):
> > +    import re
> > +    tarch = d.getVar("TARGET_ARCH", True)
> > +    if re.match("i[3456789]86", tarch):
> > +        return "ia32"
> > +    return tarch
> > +
> > +EXTRA_OEMAKE = "'ARCH=${@gnu_efi_arch(d)}' 'CC=${CC}' 'AS=${AS}' 'LD=${LD}' 'AR=${AR}' \
> > +                'RANLIB=${RANLIB}' 'OBJCOPY=${OBJCOPY}' 'PREFIX=${prefix}'\
> > +                "
> > +
> > +do_install() {
> > +        oe_runmake install INSTALLROOT="${D}"
> > +}
> > +
> > +FILES_${PN} += "${libdir}/*.lds"
> > diff --git a/meta/recipes-bsp/gummiboot/gummiboot_git.bb b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
> > new file mode 100644
> > index 0000000..b55064f
> > --- /dev/null
> > +++ b/meta/recipes-bsp/gummiboot/gummiboot_git.bb
> > @@ -0,0 +1,25 @@
> > +SUMMARY = "Gummiboot is a simple UEFI boot manager which executes configured EFI images."
> > +HOMEPAGE = "http://freedesktop.org/wiki/Software/gummiboot"
> > +
> > +LICENSE = "LGPLv2.1"
> > +LIC_FILES_CHKSUM = "file://LICENSE;md5=4fbd65380cdd255951079008b364516c"
> > +
> > +DEPENDS = "gnu-efi util-linux"
> > +
> > +inherit autotools
> > +inherit deploy
> > +
> > +PV = "43+git${SRCPV}"
> > +SRCREV = "4062c51075ba054d4949c714fe06123f9ad3097d"
> > +SRC_URI = "git://anongit.freedesktop.org/gummiboot"
> > +
> > +S = "${WORKDIR}/git"
> > +
> > +EXTRA_OECONF = "--disable-manpages --with-efi-includedir=${STAGING_INCDIR} \
> > +                --with-efi-ldsdir=${STAGING_LIBDIR} \
> > +                --with-efi-libdir=${STAGING_LIBDIR}"
> > +
> > +do_deploy () {
> > +        install ${S}/gummiboot*.efi ${DEPLOYDIR}/
> > +}
> 
> With the potential introduction of split source (S) and build (B) 
> directories, this should be ${B} not ${S}.
> 
> This should be 2 commit.

Okay, v2 incoming soon with:
 - change that to ${B} in deploy
 - split this in two commits, one for each recipe
 - change the function names in bootimg/grub-efi instead of using a
prefix, as Darren suggested.

Cheers,
Stefan

> 
> Sau!
> 
> > +addtask deploy before do_build after do_compile
> >


  reply	other threads:[~2014-03-09 15:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-06 18:15 [PATCH 0/3] Add gummiboot boot manager alongside grub-efi Stefan Stanacar
2014-03-06 18:15 ` [PATCH 1/3] recipes-bsp: Add gummiboot and gnu-efi recipes Stefan Stanacar
2014-03-06 22:27   ` Darren Hart
2014-03-09  8:00   ` Saul Wold
2014-03-09 15:34     ` Stanacar, StefanX [this message]
2014-03-06 18:15 ` [PATCH 2/3] bootimg/grub-efi.bbclass: allow using a different class for EFI images Stefan Stanacar
2014-03-06 22:31   ` Darren Hart
2014-03-06 18:15 ` [PATCH 3/3] classes: Add gummiboot class Stefan Stanacar
2014-03-06 22:36   ` Darren Hart
2014-03-07  9:57     ` Stanacar, StefanX
2014-03-11 21:38       ` Darren Hart
2014-03-12  6:18         ` Koen Kooi
2014-03-12 10:04           ` Stanacar, StefanX
2014-03-12  9:39         ` Matt Fleming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1394379293.12559.1.camel@firebird.rb.intel.com \
    --to=stefanx.stanacar@intel.com \
    --cc=dvhart@linux.intel.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sgw@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.