Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] efivar: new package
Date: Wed, 30 Mar 2016 18:06:59 +0200	[thread overview]
Message-ID: <20160330180659.6d57ea5e@free-electrons.com> (raw)
In-Reply-To: <1459016732-27843-1-git-send-email-nunes.erico@gmail.com>

Hello,

This patch looks mostly good. There are only a few nits, see below.

On Sat, 26 Mar 2016 15:25:31 -0300, Erico Nunes wrote:
> efivar contains tools and libraries to manipulate EFI variables.
> 
> This package has some restrictions to build. First, it needs uchar.h
> which apparently does not come in uclibc, so it has been disabled for
> uclibc.
> It has also been found that in some systems it failed to build due to
> not generating the .pc files. This has been tracked to the use of make
> 3.81, so a patch was prepared for it. I have also sent this patch to the
> upstream development.

We try to avoid first person sentences in commit log. Can you rephrase
as: "so a patch was prepared for it, and was submitted upstream".

> diff --git a/package/efivar/Config.in b/package/efivar/Config.in
> new file mode 100644
> index 0000000..baddddd
> --- /dev/null
> +++ b/package/efivar/Config.in
> @@ -0,0 +1,14 @@
> +config BR2_PACKAGE_EFIVAR
> +	bool "efivar"

Does it build on all architectures, or is it somehow x86/x86-64
specific ?

> diff --git a/package/efivar/efivar.mk b/package/efivar/efivar.mk
> new file mode 100644
> index 0000000..9775777
> --- /dev/null
> +++ b/package/efivar/efivar.mk
> @@ -0,0 +1,43 @@
> +################################################################################
> +#
> +# efivar
> +#
> +################################################################################
> +
> +EFIVAR_VERSION = 0.23
> +EFIVAR_SITE = $(call github,rhinstaller,efivar,$(EFIVAR_VERSION))
> +EFIVAR_LICENSE = GPLv2.1

GPLv2.1 doesn't exist. It's either GPLv2 or LGPLv2.1. Looking at the
code, it seems to be LGPLv2.1.

> +EFIVAR_LICENSE_FILES = COPYING
> +EFIVAR_DEPENDENCIES = popt
> +EFIVAR_INSTALL_STAGING = YES
> +
> +define EFIVAR_BUILD_CMDS
> +	# makeguids is an internal host tool and must be built separately with
> +	# $(HOST_CC), otherwise it gets cross-built.
> +	$(HOST_MAKE_ENV) $(HOST_CONFIGURE_OPTS) CFLAGS+=-std=c99 \
> +		$(MAKE1) -C $(@D)/src makeguids

Please use CFLAGS="$(HOST_CFLAGS) -std=c99" instead of CFLAGS+=

> +
> +	# skip efivar-static build, otherwise we always require static popt
> +	$(SED) 's/^BINTARGETS=.*/BINTARGETS=efivar/g' \
> +		$(@D)/src/Makefile

This should be done in a post-patch hook, or maybe even by a patch
itself? Or maybe you don't need any patch at all, by just passing
BINTARGETS=efivar when building/installing ?

Since you also need libdir at each step, shall I suggest that you do
something like:

EFIVAR_MAKE_OPTS = \
	BINTARGETS=efivar \
	libdir=/usr/lib

and then use $(EFIVAR_MAKE_OPTS) at build and install time ?

Could you address those issues and send an updated version?

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  parent reply	other threads:[~2016-03-30 16:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-26 18:25 [Buildroot] [PATCH 1/2] efivar: new package Erico Nunes
2016-03-26 18:25 ` [Buildroot] [PATCH 2/2] efibootmgr: " Erico Nunes
2016-03-30 16:06 ` Thomas Petazzoni [this message]
2016-04-21  0:31   ` [Buildroot] [PATCH 1/2] efivar: " Erico Nunes

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=20160330180659.6d57ea5e@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox