Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc
@ 2016-11-27 14:32 Andy Shevchenko
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Andy Shevchenko @ 2016-11-27 14:32 UTC (permalink / raw)
  To: buildroot

These patches make possible to use efibootmgr with uClibc. All patches sent to
upstream.

I have tested in my environment that doesn't use unicode characters. So, any
additional tests are appreciated.

Andy Shevchenko (3):
  efivar: bump to version 30
  efivar: allow build with uClibc
  efibootmrg: Allow build with uClibc

 .../efibootmgr/0001-Allow-build-with-uClibc.patch  | 38 ++++++++++++++++++++++
 package/efibootmgr/Config.in                       |  3 +-
 package/efibootmgr/efibootmgr.mk                   |  8 +++--
 ...fs-to-avoid-the-multiple-definitions-bug-.patch | 28 ++++++++++++++++
 package/efivar/0002-Allow-build-with-uClibc.patch  | 38 ++++++++++++++++++++++
 package/efivar/Config.in                           |  2 --
 package/efivar/efivar.hash                         |  2 +-
 package/efivar/efivar.mk                           |  2 +-
 8 files changed, 112 insertions(+), 9 deletions(-)
 create mode 100644 package/efibootmgr/0001-Allow-build-with-uClibc.patch
 create mode 100644 package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch
 create mode 100644 package/efivar/0002-Allow-build-with-uClibc.patch

-- 
2.10.2

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

* [Buildroot] [PATCH v1 1/3] efivar: bump to version 30
  2016-11-27 14:32 [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc Andy Shevchenko
@ 2016-11-27 14:32 ` Andy Shevchenko
  2016-11-27 15:48   ` Thomas Petazzoni
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc Andy Shevchenko
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow " Andy Shevchenko
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-11-27 14:32 UTC (permalink / raw)
  To: buildroot

Use newest release.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 ...fs-to-avoid-the-multiple-definitions-bug-.patch | 28 ++++++++++++++++++++++
 package/efivar/efivar.hash                         |  2 +-
 package/efivar/efivar.mk                           |  2 +-
 3 files changed, 30 insertions(+), 2 deletions(-)
 create mode 100644 package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch

diff --git a/package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch b/package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch
new file mode 100644
index 0000000..2caed5e
--- /dev/null
+++ b/package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch
@@ -0,0 +1,28 @@
+From 314eb67b239e60c2ed3700e2baf9cd0e590465f3 Mon Sep 17 00:00:00 2001
+From: Peter Jones <pjones@redhat.com>
+Date: Thu, 27 Oct 2016 09:19:18 -0400
+Subject: [PATCH 1/2] Use -z muldefs to avoid the multiple definitions bug
+ without -flto
+
+This fixes github issue #64
+
+Signed-off-by: Peter Jones <pjones@redhat.com>
+---
+ Make.defaults | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Make.defaults b/Make.defaults
+index aa974d9..c9d599f 100644
+--- a/Make.defaults
++++ b/Make.defaults
+@@ -32,6 +32,7 @@ cflags	= $(CFLAGS) -I${TOPDIR}/src/include/efivar/ \
+ clang_ccldflags =
+ gcc_ccldflags =
+ ccldflags = $(cflags) -L. $(CCLDFLAGS) $(LDFLAGS) \
++	-Wl,-z,muldefs \
+ 	$(if $(findstring clang,$(CCLD)),$(clang_ccldflags),) \
+ 	$(if $(findstring gcc,$(CCLD)),$(gcc_ccldflags),) \
+ 	$(call pkg-config-ccldflags)
+-- 
+2.10.2
+
diff --git a/package/efivar/efivar.hash b/package/efivar/efivar.hash
index 3671bbc..e337b96 100644
--- a/package/efivar/efivar.hash
+++ b/package/efivar/efivar.hash
@@ -1,2 +1,2 @@
 # locally computed hash
-sha256 7fed0b31fe796d7dfef40cccb97b8bb0b806f16e568074ad2d456be30e195f5e efivar-28.tar.gz
+sha256 20709c76311f8eb8be92977b7ac008ce62501fa9f7fe885a784321540fc352f9 efivar-30.tar.gz
diff --git a/package/efivar/efivar.mk b/package/efivar/efivar.mk
index cff3ac1..913322e 100644
--- a/package/efivar/efivar.mk
+++ b/package/efivar/efivar.mk
@@ -4,7 +4,7 @@
 #
 ################################################################################
 
-EFIVAR_VERSION = 28
+EFIVAR_VERSION = 30
 EFIVAR_SITE = $(call github,rhinstaller,efivar,$(EFIVAR_VERSION))
 EFIVAR_LICENSE = LGPLv2.1
 EFIVAR_LICENSE_FILES = COPYING
-- 
2.10.2

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

* [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc
  2016-11-27 14:32 [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc Andy Shevchenko
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
@ 2016-11-27 14:32 ` Andy Shevchenko
  2016-11-27 15:50   ` Thomas Petazzoni
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow " Andy Shevchenko
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-11-27 14:32 UTC (permalink / raw)
  To: buildroot

Details at https://github.com/rhinstaller/efivar/issues/76.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 package/efivar/0002-Allow-build-with-uClibc.patch | 38 +++++++++++++++++++++++
 package/efivar/Config.in                          |  2 --
 2 files changed, 38 insertions(+), 2 deletions(-)
 create mode 100644 package/efivar/0002-Allow-build-with-uClibc.patch

diff --git a/package/efivar/0002-Allow-build-with-uClibc.patch b/package/efivar/0002-Allow-build-with-uClibc.patch
new file mode 100644
index 0000000..7b62714
--- /dev/null
+++ b/package/efivar/0002-Allow-build-with-uClibc.patch
@@ -0,0 +1,38 @@
+From 2255601757a8a58baddad2d37d0bcc6b003a3732 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Fri, 25 Nov 2016 19:42:27 +0200
+Subject: [PATCH 2/2] Allow build with uClibc
+
+Basically this replaces type definitions in <uchar.h>.
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+---
+ src/export.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+diff --git a/src/export.c b/src/export.c
+index 7f2d4dd..72c02d1 100644
+--- a/src/export.c
++++ b/src/export.c
+@@ -21,11 +21,17 @@
+ #include <inttypes.h>
+ #include <stdint.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+ 
+ #include <efivar.h>
+ #include "lib.h"
+ 
++#ifdef __UCLIBC__
++typedef int_least16_t char16_t;
++typedef int_least32_t char32_t;
++#else
++#include <uchar.h>
++#endif
++
+ #define EFIVAR_MAGIC 0xf3df1597
+ 
+ #define ATTRS_UNSET 0xa5a5a5a5a5a5a5a5
+-- 
+2.10.2
+
diff --git a/package/efivar/Config.in b/package/efivar/Config.in
index 466a30a..5fd3360 100644
--- a/package/efivar/Config.in
+++ b/package/efivar/Config.in
@@ -11,7 +11,6 @@ config BR2_PACKAGE_EFIVAR
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
 	# doesn't build with uclibc due to lack of uchar.h
 	# doesn't build with musl due to lack of __bswap_constant_16
-	depends on BR2_TOOLCHAIN_USES_GLIBC
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	select BR2_PACKAGE_POPT
 	help
@@ -21,7 +20,6 @@ config BR2_PACKAGE_EFIVAR
 
 comment "efivar requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || \
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
-- 
2.10.2

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

* [Buildroot] [PATCH v1 3/3] efibootmrg: Allow build with uClibc
  2016-11-27 14:32 [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc Andy Shevchenko
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc Andy Shevchenko
@ 2016-11-27 14:32 ` Andy Shevchenko
  2016-11-27 15:51   ` Thomas Petazzoni
  2 siblings, 1 reply; 8+ messages in thread
From: Andy Shevchenko @ 2016-11-27 14:32 UTC (permalink / raw)
  To: buildroot

Details at https://github.com/rhinstaller/efibootmgr/issues/61.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 .../efibootmgr/0001-Allow-build-with-uClibc.patch  | 38 ++++++++++++++++++++++
 package/efibootmgr/Config.in                       |  3 +-
 package/efibootmgr/efibootmgr.mk                   |  8 +++--
 3 files changed, 44 insertions(+), 5 deletions(-)
 create mode 100644 package/efibootmgr/0001-Allow-build-with-uClibc.patch

diff --git a/package/efibootmgr/0001-Allow-build-with-uClibc.patch b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
new file mode 100644
index 0000000..1e3f9ec
--- /dev/null
+++ b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
@@ -0,0 +1,38 @@
+From bbfcc60497c326576bb23cb01d90115ef3cf6947 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Fri, 25 Nov 2016 20:26:52 +0200
+Subject: [PATCH 1/1] Allow build with uClibc
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+---
+ src/efibootdump.c | 1 -
+ src/eficonman.c   | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/efibootdump.c b/src/efibootdump.c
+index 6ff8360..7c5a1c5 100644
+--- a/src/efibootdump.c
++++ b/src/efibootdump.c
+@@ -19,7 +19,6 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+ #include <unistd.h>
+ 
+ #include "error.h"
+diff --git a/src/eficonman.c b/src/eficonman.c
+index 2c2be38..9bfae79 100644
+--- a/src/eficonman.c
++++ b/src/eficonman.c
+@@ -17,7 +17,6 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+ #include <unistd.h>
+ 
+ #define  _(String) gettext (String)
+-- 
+2.10.2
+
diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
index 988bf6d..8860e5d 100644
--- a/package/efibootmgr/Config.in
+++ b/package/efibootmgr/Config.in
@@ -1,10 +1,10 @@
 config BR2_PACKAGE_EFIBOOTMGR
 	bool "efibootmgr"
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # efivar
-	depends on BR2_TOOLCHAIN_USES_GLIBC # efivar
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII # efivar
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_EFIVAR
 	help
 	  A Linux user-space application to modify the Intel Extensible
@@ -16,7 +16,6 @@ config BR2_PACKAGE_EFIBOOTMGR
 
 comment "efibootmgr requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || \\
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
diff --git a/package/efibootmgr/efibootmgr.mk b/package/efibootmgr/efibootmgr.mk
index 731d6e9..487c8ca 100644
--- a/package/efibootmgr/efibootmgr.mk
+++ b/package/efibootmgr/efibootmgr.mk
@@ -8,7 +8,8 @@ EFIBOOTMGR_VERSION = 14
 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION))
 EFIBOOTMGR_LICENSE = GPLv2+
 EFIBOOTMGR_LICENSE_FILES = COPYING
-EFIBOOTMGR_DEPENDENCIES = efivar
+EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext)
+EFIBOOTMGR_LDFLAGS = $(TARGET_LDFLAGS) $(if $(BR2_NEEDS_GETTEXT),-lintl)
 
 define EFIBOOTMSR_PATCH_HEADER_PATH
 	$(SED) 's,-I/,-I$(STAGING_DIR)/,' $(@D)/Makefile
@@ -17,11 +18,12 @@ endef
 EFIBOOTMGR_POST_PATCH_HOOKS += EFIBOOTMSR_PATCH_HEADER_PATH
 
 define EFIBOOTMGR_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS)			\
+		LDFLAGS="$(EFIBOOTMGR_LDFLAGS)" $(MAKE1) -C $(@D)
 endef
 
 define EFIBOOTMGR_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)	\
 		DESTDIR=$(TARGET_DIR) install
 endef
 
-- 
2.10.2

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

* [Buildroot] [PATCH v1 1/3] efivar: bump to version 30
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
@ 2016-11-27 15:48   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-11-27 15:48 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 27 Nov 2016 16:32:02 +0200, Andy Shevchenko wrote:

> +++ b/package/efivar/0001-Use-z-muldefs-to-avoid-the-multiple-definitions-bug-.patch
> @@ -0,0 +1,28 @@
> +From 314eb67b239e60c2ed3700e2baf9cd0e590465f3 Mon Sep 17 00:00:00 2001
> +From: Peter Jones <pjones@redhat.com>
> +Date: Thu, 27 Oct 2016 09:19:18 -0400
> +Subject: [PATCH 1/2] Use -z muldefs to avoid the multiple definitions bug
> + without -flto

The subject should have contained [PATCH] and not [PATCH 1/2]. We don't
want numbers in the patches themselves, as they quickly become wrong.

Otherwise, applied to next, thanks!

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

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

* [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc Andy Shevchenko
@ 2016-11-27 15:50   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-11-27 15:50 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 27 Nov 2016 16:32:03 +0200, Andy Shevchenko wrote:
> Details at https://github.com/rhinstaller/efivar/issues/76.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

I've applied to next, but several things were wrong in there, see below.

> +++ b/package/efivar/0002-Allow-build-with-uClibc.patch
> @@ -0,0 +1,38 @@
> +From 2255601757a8a58baddad2d37d0bcc6b003a3732 Mon Sep 17 00:00:00 2001
> +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> +Date: Fri, 25 Nov 2016 19:42:27 +0200
> +Subject: [PATCH 2/2] Allow build with uClibc

[PATCH] instead of [PATCH 2/2].

Also, please submit this patch upstream if not already done.

> diff --git a/package/efivar/Config.in b/package/efivar/Config.in
> index 466a30a..5fd3360 100644
> --- a/package/efivar/Config.in
> +++ b/package/efivar/Config.in
> @@ -11,7 +11,6 @@ config BR2_PACKAGE_EFIVAR
>  		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
>  	# doesn't build with uclibc due to lack of uchar.h
>  	# doesn't build with musl due to lack of __bswap_constant_16
> -	depends on BR2_TOOLCHAIN_USES_GLIBC

Then what about musl? The build on musl continues to fail, so I've
changed this to:

	depends on !BR2_TOOLCHAIN_USES_MUSL

>  	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
>  	select BR2_PACKAGE_POPT
>  	help
> @@ -21,7 +20,6 @@ config BR2_PACKAGE_EFIVAR
>  
>  comment "efivar requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"

You forgot to update this comment, so I did it.

>  	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
> -		!BR2_TOOLCHAIN_USES_GLIBC || \

And I changed this to:
		BR2_TOOLCHAIN_USES_MUSL || \

Thanks,

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

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

* [Buildroot] [PATCH v1 3/3] efibootmrg: Allow build with uClibc
  2016-11-27 14:32 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow " Andy Shevchenko
@ 2016-11-27 15:51   ` Thomas Petazzoni
  0 siblings, 0 replies; 8+ messages in thread
From: Thomas Petazzoni @ 2016-11-27 15:51 UTC (permalink / raw)
  To: buildroot

Hello,

On Sun, 27 Nov 2016 16:32:04 +0200, Andy Shevchenko wrote:
> Details at https://github.com/rhinstaller/efibootmgr/issues/61.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Applied to next, after fixing a few issues, see below.

> diff --git a/package/efibootmgr/0001-Allow-build-with-uClibc.patch b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
> new file mode 100644
> index 0000000..1e3f9ec
> --- /dev/null
> +++ b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
> @@ -0,0 +1,38 @@
> +From bbfcc60497c326576bb23cb01d90115ef3cf6947 Mon Sep 17 00:00:00 2001
> +From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> +Date: Fri, 25 Nov 2016 20:26:52 +0200
> +Subject: [PATCH 1/1] Allow build with uClibc

[PATCH] instead of [PATCH 1/1]

Also, the subject "Allow build with uClibc" is not quite correct, it's
more "Remove unneeded header includes".

> diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
> index 988bf6d..8860e5d 100644
> --- a/package/efibootmgr/Config.in
> +++ b/package/efibootmgr/Config.in
> @@ -1,10 +1,10 @@
>  config BR2_PACKAGE_EFIBOOTMGR
>  	bool "efibootmgr"
>  	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # efivar
> -	depends on BR2_TOOLCHAIN_USES_GLIBC # efivar

Wrong, efivar still depends on !BR2_TOOLCHAIN_USES_MUSL

>  comment "efibootmgr requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"

You forgot to update this comment, so I did it.

>  	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
> -		!BR2_TOOLCHAIN_USES_GLIBC || \\

Here, I changed to:

		BR2_TOOLCHAIN_USES_MUSL

Thanks!

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

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

* [Buildroot] [PATCH v1 3/3] efibootmrg: Allow build with uClibc
  2016-11-28 16:35 [Buildroot] [PATCH v1 0/3] efibootmgr: " Andy Shevchenko
@ 2016-11-28 16:35 ` Andy Shevchenko
  0 siblings, 0 replies; 8+ messages in thread
From: Andy Shevchenko @ 2016-11-28 16:35 UTC (permalink / raw)
  To: buildroot

Details at https://github.com/rhinstaller/efibootmgr/issues/61.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 .../efibootmgr/0001-Allow-build-with-uClibc.patch  | 38 ++++++++++++++++++++++
 package/efibootmgr/Config.in                       |  3 +-
 package/efibootmgr/efibootmgr.mk                   |  8 +++--
 3 files changed, 44 insertions(+), 5 deletions(-)
 create mode 100644 package/efibootmgr/0001-Allow-build-with-uClibc.patch

diff --git a/package/efibootmgr/0001-Allow-build-with-uClibc.patch b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
new file mode 100644
index 0000000..1e3f9ec
--- /dev/null
+++ b/package/efibootmgr/0001-Allow-build-with-uClibc.patch
@@ -0,0 +1,38 @@
+From bbfcc60497c326576bb23cb01d90115ef3cf6947 Mon Sep 17 00:00:00 2001
+From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+Date: Fri, 25 Nov 2016 20:26:52 +0200
+Subject: [PATCH 1/1] Allow build with uClibc
+
+Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
+---
+ src/efibootdump.c | 1 -
+ src/eficonman.c   | 1 -
+ 2 files changed, 2 deletions(-)
+
+diff --git a/src/efibootdump.c b/src/efibootdump.c
+index 6ff8360..7c5a1c5 100644
+--- a/src/efibootdump.c
++++ b/src/efibootdump.c
+@@ -19,7 +19,6 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+ #include <unistd.h>
+ 
+ #include "error.h"
+diff --git a/src/eficonman.c b/src/eficonman.c
+index 2c2be38..9bfae79 100644
+--- a/src/eficonman.c
++++ b/src/eficonman.c
+@@ -17,7 +17,6 @@
+ #include <stdint.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+-#include <uchar.h>
+ #include <unistd.h>
+ 
+ #define  _(String) gettext (String)
+-- 
+2.10.2
+
diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
index 988bf6d..8860e5d 100644
--- a/package/efibootmgr/Config.in
+++ b/package/efibootmgr/Config.in
@@ -1,10 +1,10 @@
 config BR2_PACKAGE_EFIBOOTMGR
 	bool "efibootmgr"
 	depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # efivar
-	depends on BR2_TOOLCHAIN_USES_GLIBC # efivar
 	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII # efivar
+	select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
 	select BR2_PACKAGE_EFIVAR
 	help
 	  A Linux user-space application to modify the Intel Extensible
@@ -16,7 +16,6 @@ config BR2_PACKAGE_EFIBOOTMGR
 
 comment "efibootmgr requires a glibc toolchain w/ headers >= 3.12, gcc >= 4.9"
 	depends on !BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
-		!BR2_TOOLCHAIN_USES_GLIBC || \\
 		!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
 	depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
 		!BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
diff --git a/package/efibootmgr/efibootmgr.mk b/package/efibootmgr/efibootmgr.mk
index 731d6e9..487c8ca 100644
--- a/package/efibootmgr/efibootmgr.mk
+++ b/package/efibootmgr/efibootmgr.mk
@@ -8,7 +8,8 @@ EFIBOOTMGR_VERSION = 14
 EFIBOOTMGR_SITE = $(call github,rhinstaller,efibootmgr,$(EFIBOOTMGR_VERSION))
 EFIBOOTMGR_LICENSE = GPLv2+
 EFIBOOTMGR_LICENSE_FILES = COPYING
-EFIBOOTMGR_DEPENDENCIES = efivar
+EFIBOOTMGR_DEPENDENCIES = efivar $(if $(BR2_NEEDS_GETTEXT),gettext)
+EFIBOOTMGR_LDFLAGS = $(TARGET_LDFLAGS) $(if $(BR2_NEEDS_GETTEXT),-lintl)
 
 define EFIBOOTMSR_PATCH_HEADER_PATH
 	$(SED) 's,-I/,-I$(STAGING_DIR)/,' $(@D)/Makefile
@@ -17,11 +18,12 @@ endef
 EFIBOOTMGR_POST_PATCH_HOOKS += EFIBOOTMSR_PATCH_HEADER_PATH
 
 define EFIBOOTMGR_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS)			\
+		LDFLAGS="$(EFIBOOTMGR_LDFLAGS)" $(MAKE1) -C $(@D)
 endef
 
 define EFIBOOTMGR_INSTALL_TARGET_CMDS
-	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D) \
+	$(TARGET_MAKE_ENV) $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)	\
 		DESTDIR=$(TARGET_DIR) install
 endef
 
-- 
2.10.2

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

end of thread, other threads:[~2016-11-28 16:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-27 14:32 [Buildroot] [PATCH v1 0/3] efibootmgr: build with uClibc Andy Shevchenko
2016-11-27 14:32 ` [Buildroot] [PATCH v1 1/3] efivar: bump to version 30 Andy Shevchenko
2016-11-27 15:48   ` Thomas Petazzoni
2016-11-27 14:32 ` [Buildroot] [PATCH v1 2/3] efivar: allow build with uClibc Andy Shevchenko
2016-11-27 15:50   ` Thomas Petazzoni
2016-11-27 14:32 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow " Andy Shevchenko
2016-11-27 15:51   ` Thomas Petazzoni
  -- strict thread matches above, loose matches on Subject: below --
2016-11-28 16:35 [Buildroot] [PATCH v1 0/3] efibootmgr: " Andy Shevchenko
2016-11-28 16:35 ` [Buildroot] [PATCH v1 3/3] efibootmrg: Allow " Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox