* [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch
@ 2016-12-05 23:07 Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name Erico Nunes
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Erico Nunes @ 2016-12-05 23:07 UTC (permalink / raw)
To: buildroot
uClibc support was recently added to efivar through a small
compatibility patch.
This commit updates a comment in the efivar recipe to reflect this, as
we no longer have glibc as the only supported C library.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/efivar/efivar.mk | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/package/efivar/efivar.mk b/package/efivar/efivar.mk
index 913322e..84735b8 100644
--- a/package/efivar/efivar.mk
+++ b/package/efivar/efivar.mk
@@ -12,8 +12,8 @@ EFIVAR_DEPENDENCIES = popt
EFIVAR_INSTALL_STAGING = YES
# BINTARGETS is set to skip efivar-static which requires static popt,
-# and since we depend on glibc, we will never be built in a
-# static-only environment.
+# and since we depend on dynamic libraries, efivar will never be built
+# in a static-only environment.
# -fPIC is needed at least on MIPS, otherwise fails to build shared
# -library.
EFIVAR_MAKE_OPTS = \
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name
2016-12-05 23:07 [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Erico Nunes
@ 2016-12-05 23:07 ` Erico Nunes
2016-12-06 21:58 ` Peter Korsgaard
2016-12-05 23:07 ` [Buildroot] [PATCH 2/3] efivar: introduce BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS Erico Nunes
` (2 subsequent siblings)
3 siblings, 1 reply; 7+ messages in thread
From: Erico Nunes @ 2016-12-05 23:07 UTC (permalink / raw)
To: buildroot
Buildroot references powerpc64 little endian as BR2_powerpc64le and not
BR2_powerpc64el.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
package/gcc/Config.in.host | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/gcc/Config.in.host b/package/gcc/Config.in.host
index 0fc1ec4..582f115 100644
--- a/package/gcc/Config.in.host
+++ b/package/gcc/Config.in.host
@@ -25,7 +25,7 @@ choice
# Unsupported for MIPS R6
depends on !BR2_MIPS_CPU_MIPS32R6 && !BR2_MIPS_CPU_MIPS64R6
# musl ppc64 unsupported
- depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el))
+ depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
# musl mips64 unsupported
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el))
select BR2_TOOLCHAIN_GCC_AT_LEAST_4_8
@@ -51,7 +51,7 @@ choice
# musl microblaze unsupported
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_microblazeel || BR2_microblazebe))
# musl ppc64 unsupported
- depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el))
+ depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
# musl mips64 unsupported
depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_mips64 || BR2_mips64el))
# PR60102 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60102
@@ -62,7 +62,7 @@ choice
# Broken or unsupported architectures
depends on !BR2_arc && !BR2_bfin
# musl ppc64 unsupported
- depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64el))
+ depends on !(BR2_TOOLCHAIN_USES_MUSL && (BR2_powerpc64 || BR2_powerpc64le))
# Unsupported MIPS cores
depends on !BR2_mips_interaptiv && !BR2_mips_m5150 && \
!BR2_mips_m6250 && !BR2_mips_i6400 && !BR2_mips_p6600
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 2/3] efivar: introduce BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
2016-12-05 23:07 [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name Erico Nunes
@ 2016-12-05 23:07 ` Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar Erico Nunes
2016-12-07 22:47 ` [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Thomas Petazzoni
3 siblings, 0 replies; 7+ messages in thread
From: Erico Nunes @ 2016-12-05 23:07 UTC (permalink / raw)
To: buildroot
efivar only makes sense on platforms that support UEFI.
UEFI is only supported by some architectures at the moment, being mostly
employed on platforms such as x86, x86_64 and aarch64. Some other
platforms such as MIPS and PowerPC may have some unofficial UEFI
support. UEFI is also limited to little endian architectures.
efivar was being supported in Buildroot without architecture
restrictions so far, however this has led to the creation of a number of
hacks in the recipes, mostly for architectures that are not supported by
UEFI.
In order to avoid spending more time to debug these failures and
maintaining more hacks for unsupported architectures, efivar can be
restricted to that platforms where it makes sense and where it is more
likely to receive some testing and actual usage.
The existing hacks for the now unsupported architectures are removed,
and the dependency is propagated to efibootmgr as it depends on efivar.
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/efibootmgr/Config.in | 8 ++++----
package/efivar/Config.in | 14 ++++++++++----
package/efivar/efivar.mk | 6 ------
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
index cd4bda1..a4011d6 100644
--- a/package/efibootmgr/Config.in
+++ b/package/efibootmgr/Config.in
@@ -1,11 +1,11 @@
config BR2_PACKAGE_EFIBOOTMGR
bool "efibootmgr"
+ depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS # efivar
depends on !BR2_STATIC_LIBS # efivar
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # efivar
depends on !BR2_TOOLCHAIN_USES_MUSL # efivar
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar
- depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
- !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII # efivar
+ depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
select BR2_PACKAGE_EFIVAR
help
@@ -17,9 +17,9 @@ config BR2_PACKAGE_EFIBOOTMGR
https://github.com/rhinstaller/efibootmgr
comment "efibootmgr needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9"
+ depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
BR2_TOOLCHAIN_USES_MUSL || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
- !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
+ depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
diff --git a/package/efivar/Config.in b/package/efivar/Config.in
index a97c766..0ec8360 100644
--- a/package/efivar/Config.in
+++ b/package/efivar/Config.in
@@ -1,5 +1,12 @@
+config BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
+ bool
+ depends on BR2_arm || BR2_aarch64 || BR2_i386 || BR2_x86_64 \
+ || BR2_powerpc64le || BR2_mipsel || BR2_mips64el
+ default y
+
config BR2_PACKAGE_EFIVAR
bool "efivar"
+ depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
depends on !BR2_STATIC_LIBS # dlfcn.h
depends on BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 # linux/nvme.h
# linux/nvme.h has been renamed to linux/nvme_ioctl.h since 4.4,
@@ -8,8 +15,7 @@ config BR2_PACKAGE_EFIVAR
# don't have that header file renamed, and that is causing build
# failures. So, prevent this package to be built using those
# toolchains.
- depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
- !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
+ depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
# doesn't build with musl due to lack of __bswap_constant_16
depends on !BR2_TOOLCHAIN_USES_MUSL
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
@@ -20,9 +26,9 @@ config BR2_PACKAGE_EFIVAR
https://github.com/rhinstaller/efivar
comment "efivar needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9"
+ depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
BR2_TOOLCHAIN_USES_MUSL || \
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
- depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS && \
- !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_NIOSII
+ depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
diff --git a/package/efivar/efivar.mk b/package/efivar/efivar.mk
index 84735b8..c31d87b 100644
--- a/package/efivar/efivar.mk
+++ b/package/efivar/efivar.mk
@@ -21,12 +21,6 @@ EFIVAR_MAKE_OPTS = \
BINTARGETS=efivar \
LDFLAGS="$(TARGET_LDFLAGS) -fPIC"
-# Explicitly linking with shared libgcc is required on MicroBlaze and
-# Nios II, otherwise it fails due to FDE encoding in static libgcc.
-ifeq ($(BR2_microblaze)$(BR2_nios2),y)
-EFIVAR_MAKE_OPTS += SOFLAGS="-shared -shared-libgcc"
-endif
-
define EFIVAR_BUILD_CMDS
# makeguids is an internal host tool and must be built separately with
# $(HOST_CC), otherwise it gets cross-built.
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar
2016-12-05 23:07 [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 2/3] efivar: introduce BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS Erico Nunes
@ 2016-12-05 23:07 ` Erico Nunes
2016-12-07 22:48 ` Thomas Petazzoni
2016-12-07 22:47 ` [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Thomas Petazzoni
3 siblings, 1 reply; 7+ messages in thread
From: Erico Nunes @ 2016-12-05 23:07 UTC (permalink / raw)
To: buildroot
After commit 3ae07b4746 recently, efibootmgr now selects
BR2_PACKAGE_GETTEXT if the toolchain requires it.
gettext depends on wchar, so this dependency should be propagated as
well.
menuconfig currently complains loudly if you select efibootmgr, with an
error such as:
warning: (... && BR2_PACKAGE_EFIBOOTMGR ... && ) selects
BR2_PACKAGE_GETTEXT which has unmet direct dependencies
(BR2_USE_WCHAR)
Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
---
This "select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT" is slightly
complicated to handle for the propagated wchar dependency, if the
unavailability Kconfig "comment" is added.
Looks like we don't need to always have the wchar dependency as the
dependency on gettext is optional, however this complicates the mention
to 'needs wchar' in the Kconfig comment.
Some packages seem to try to handle this in some smarter way
(BR2_PACKAGE_LINUX_TOOLS_CPUPOWER) but then the comment is not always
accurate.
Please let me know if there is a better way to do this, right now it
seems to be simpler to just require wchar always.
---
package/efibootmgr/Config.in | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/package/efibootmgr/Config.in b/package/efibootmgr/Config.in
index a4011d6..57874fc 100644
--- a/package/efibootmgr/Config.in
+++ b/package/efibootmgr/Config.in
@@ -6,6 +6,7 @@ config BR2_PACKAGE_EFIBOOTMGR
depends on !BR2_TOOLCHAIN_USES_MUSL # efivar
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # efivar
depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
+ depends on BR2_USE_WCHAR # gettext
select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT
select BR2_PACKAGE_EFIVAR
help
@@ -16,10 +17,11 @@ config BR2_PACKAGE_EFIBOOTMGR
https://github.com/rhinstaller/efibootmgr
-comment "efibootmgr needs a glibc or uClibc toolchain w/ dynamic library, headers >= 3.12, gcc >= 4.9"
+comment "efibootmgr needs a glibc or uClibc toolchain w/ wchar, dynamic library, headers >= 3.12, gcc >= 4.9"
depends on BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS
depends on BR2_STATIC_LIBS || \
!BR2_TOOLCHAIN_HEADERS_AT_LEAST_3_12 || \
BR2_TOOLCHAIN_USES_MUSL || \
- !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+ !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 || \
+ !BR2_USE_WCHAR
depends on !BR2_TOOLCHAIN_EXTERNAL_CODESOURCERY_MIPS
--
2.7.4
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name
2016-12-05 23:07 ` [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name Erico Nunes
@ 2016-12-06 21:58 ` Peter Korsgaard
0 siblings, 0 replies; 7+ messages in thread
From: Peter Korsgaard @ 2016-12-06 21:58 UTC (permalink / raw)
To: buildroot
On Tue, Dec 6, 2016 at 12:07 AM, Erico Nunes <nunes.erico@gmail.com> wrote:
> Buildroot references powerpc64 little endian as BR2_powerpc64le and not
> BR2_powerpc64el.
>
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch
2016-12-05 23:07 [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Erico Nunes
` (2 preceding siblings ...)
2016-12-05 23:07 ` [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar Erico Nunes
@ 2016-12-07 22:47 ` Thomas Petazzoni
3 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-12-07 22:47 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 6 Dec 2016 00:07:15 +0100, Erico Nunes wrote:
> uClibc support was recently added to efivar through a small
> compatibility patch.
> This commit updates a comment in the efivar recipe to reflect this, as
> we no longer have glibc as the only supported C library.
>
> Signed-off-by: Erico Nunes <nunes.erico@gmail.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
> package/efivar/efivar.mk | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
All three patches applied. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar
2016-12-05 23:07 ` [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar Erico Nunes
@ 2016-12-07 22:48 ` Thomas Petazzoni
0 siblings, 0 replies; 7+ messages in thread
From: Thomas Petazzoni @ 2016-12-07 22:48 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 6 Dec 2016 00:07:18 +0100, Erico Nunes wrote:
> This "select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT" is slightly
> complicated to handle for the propagated wchar dependency, if the
> unavailability Kconfig "comment" is added.
> Looks like we don't need to always have the wchar dependency as the
> dependency on gettext is optional, however this complicates the mention
> to 'needs wchar' in the Kconfig comment.
> Some packages seem to try to handle this in some smarter way
> (BR2_PACKAGE_LINUX_TOOLS_CPUPOWER) but then the comment is not always
> accurate.
> Please let me know if there is a better way to do this, right now it
> seems to be simpler to just require wchar always.
If you really want to be pedantic, you could write:
depends on !BR2_NEEDS_GETTEXT || BR2_USE_WCHAR
but it anyway makes the Config.in comment handling a bit annoying. And
it's in fact a bit useless:
- On glibc, BR2_USE_WCHAR is always 'y', and BR2_NEEDS_GETTEXT is false
- On musl, BR2_USE_WCHAR is always 'y', and BR2_NEEDS_GETTEXT is false
- On uClibc, BR2_NEEDS_GETTEXT is 'y', and indeed BR2_USE_WCHAR needs
to be set.
So in fact, a "depends on BR2_USE_WCHAR" is good enough.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-12-07 22:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-05 23:07 [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 1/1] gcc: fix powerpc64le arch config name Erico Nunes
2016-12-06 21:58 ` Peter Korsgaard
2016-12-05 23:07 ` [Buildroot] [PATCH 2/3] efivar: introduce BR2_PACKAGE_EFIVAR_ARCH_SUPPORTS Erico Nunes
2016-12-05 23:07 ` [Buildroot] [PATCH 3/3] efibootmgr: depends on wchar Erico Nunes
2016-12-07 22:48 ` Thomas Petazzoni
2016-12-07 22:47 ` [Buildroot] [PATCH 1/3] efivar: fix comment after uClibc compatibility patch Thomas Petazzoni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox