uclibc: add support for uClibc-ng
cover uclibc: add support for uClibc-ng
Hello,
The following three set of patches add support for uClibc-ng. The main patch is based on previous work from Waldemar (thanks!).
I have build tested and runtime tested in Qemu the following
configurations: ARM Cortex-A9 EABIhf (qemu-vexpress) and Xtensa NPTL (qemu emulation). The build includes the toolchain, Busybox and the kernel.
Thomas
Thomas Petazzoni (3):
uclibc: cleanup handling of ARC uClibc version
uclibc: add ability to use uClibc-ng 1.0.0
uclibc: enable Xtensa NPTL support with uClibc-ng
package/uclibc/Config.in | 17 ++- package/uclibc/uClibc-ng-1.0.0.config | 280 ++++++++++++++++++++++++++++++++++ package/uclibc/uclibc.mk | 21 ++- 3 files changed, 314 insertions(+), 4 deletions(-) create mode 100644 package/uclibc/uClibc-ng-1.0.0.config
Signature · 1 line
2.1.0
PATCH 1/3 uclibc: cleanup handling of ARC uClibc version
This commit makes the ARC uClibc version handling explicit by adding a BR2_UCLIBC_VERSION_ARC_GIT option, rather than only relying on the selected architecture. This is needed in preparation to the introduction of uClibc-ng support, which also supports the ARC
architecture: so we will now have two uClibc versions capable of handling ARC.
--- package/uclibc/Config.in | 8 ++++++-- package/uclibc/uclibc.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)
package/uclibc/Config.in +6 -2
@@ -17,6 +17,10 @@ choice bool "uClibc 0.9.33.x" depends on !(BR2_arc || BR2_xtensa) + config BR2_UCLIBC_VERSION_ARC_GIT + bool "uClibc Git ARC" + depends on BR2_arc + config BR2_UCLIBC_VERSION_XTENSA_GIT bool "uClibc Git Xtensa" depends on BR2_xtensa
@@ -37,14 +41,14 @@ config BR2_USE_UCLIBC_SNAPSHOT config BR2_UCLIBC_VERSION_STRING string default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 - default "arc-2014.12" if BR2_arc + default "arc-2014.12" if BR2_UCLIBC_VERSION_ARC_GIT default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT config BR2_UCLIBC_CONFIG string "uClibc configuration file to use?" default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 - default "package/uclibc/uClibc-snapshot.config" if BR2_arc + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_ARC_GIT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_XTENSA_GIT help
package/uclibc/uclibc.mk +1 -1
@@ -11,7 +11,7 @@ UCLIBC_LICENSE_FILES = COPYING.LIB ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots -else ifeq ($(BR2_arc),y) +else ifeq ($(BR2_UCLIBC_VERSION_ARC_GIT),y) UCLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,uClibc,$(UCLIBC_VERSION)) UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz else ifeq ($(BR2_UCLIBC_VERSION_XTENSA_GIT),y)
Signature · 1 line
2.1.0
PATCH 1/3 uclibc: cleanup handling of ARC uClibc version
Thomas, All,
On 2015-02-14 22:01 +0100, Thomas Petazzoni spake thusly:
Quoted 8 lines
This commit makes the ARC uClibc version handling explicit by adding a
BR2_UCLIBC_VERSION_ARC_GIToption, rather than only relying on the selected architecture. This is needed in preparation to the introduction of uClibc-ng support, which also supports the ARC
architecture: so we will now have two uClibc versions capable of handling ARC.Signed-off-by Thomas Petazzoni <[email protected]>
Regards,
Yann E. MORIN.
Quoted 57 lines
--- package/uclibc/Config.in | 8 ++++++-- package/uclibc/uclibc.mk | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-)package/uclibc/Config.in +6
-2@@ -17,6 +17,10 @@ choice bool "uClibc 0.9.33.x" depends on !(BR2_arc || BR2_xtensa) + config BR2_UCLIBC_VERSION_ARC_GIT + bool "uClibc Git ARC" + depends on BR2_arc + config BR2_UCLIBC_VERSION_XTENSA_GIT bool "uClibc Git Xtensa" depends on BR2_xtensa@@ -37,14 +41,14 @@ config BR2_USE_UCLIBC_SNAPSHOT config BR2_UCLIBC_VERSION_STRING string default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 - default "arc-2014.12" if BR2_arc + default "arc-2014.12" if BR2_UCLIBC_VERSION_ARC_GIT default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT config BR2_UCLIBC_CONFIG string "uClibc configuration file to use?" default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 - default "package/uclibc/uClibc-snapshot.config" if BR2_arc + default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_ARC_GIT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_XTENSA_GIT helppackage/uclibc/uclibc.mk +1
-1@@ -11,7 +11,7 @@ UCLIBC_LICENSE_FILES = COPYING.LIB ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots -else ifeq ($(BR2_arc),y) +else ifeq ($(BR2_UCLIBC_VERSION_ARC_GIT),y) UCLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,uClibc,$(UCLIBC_VERSION)) UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz else ifeq ($(BR2_UCLIBC_VERSION_XTENSA_GIT),y)Signature · 6 lines
2.1.0 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/3 uclibc: cleanup handling of ARC uClibc version
In reply to Thomas PetazzoniHello,
Quoted 8 lines · Thomas Petazzoni
This commit makes the ARC uClibc version handling explicit by adding a
BR2_UCLIBC_VERSION_ARC_GIToption, rather than only relying on the selected architecture. This is needed in preparation to the introduction of uClibc-ng support, which also supports the ARC
architecture: so we will now have two uClibc versions capable of handling ARC.Signed-off-by Thomas Petazzoni <[email protected]>
Thanks to Yann's Acked-by, I've applied this patch to the next branch.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/3 uclibc: add ability to use uClibc-ng 1.0.0
In reply to Thomas PetazzoniThis commit adds support for a new uClibc version: uClibc-ng 1.0.0. Since its build system is for now exactly the same as the one of uClibc, we don't create a new package, but instead simply add it as a new uClibc version.
The only special trick needed is the creation of a symlink to the program interpreter, due to a mismatch between the program interpreter file name generated by uClibc-ng and the one used by gcc.
This patch is heavily based on previous work from Waldemar Brodkorb.
--- package/uclibc/Config.in | 5 + package/uclibc/uClibc-ng-1.0.0.config | 280 ++++++++++++++++++++++++++++++++++ package/uclibc/uclibc.mk | 19 +++ 3 files changed, 304 insertions(+) create mode 100644 package/uclibc/uClibc-ng-1.0.0.config
package/uclibc/Config.in +5 -0
@@ -21,6 +21,9 @@ choice bool "uClibc Git ARC" depends on BR2_arc + config BR2_UCLIBC_NG_VERSION_1_0_0 + bool "uClibc-ng 1.0.0" + config BR2_UCLIBC_VERSION_XTENSA_GIT bool "uClibc Git Xtensa" depends on BR2_xtensa
@@ -42,12 +45,14 @@ config BR2_UCLIBC_VERSION_STRING string default 0.9.33.2 if BR2_UCLIBC_VERSION_0_9_33 default "arc-2014.12" if BR2_UCLIBC_VERSION_ARC_GIT + default 1.0.0 if BR2_UCLIBC_NG_VERSION_1_0_0 default "7bf35c8b7d4a1f97174eb49f47f33946b282114c" if BR2_UCLIBC_VERSION_XTENSA_GIT default BR2_USE_UCLIBC_SNAPSHOT if BR2_UCLIBC_VERSION_SNAPSHOT config BR2_UCLIBC_CONFIG string "uClibc configuration file to use?" default "package/uclibc/uClibc-0.9.33.config" if BR2_UCLIBC_VERSION_0_9_33 + default "package/uclibc/uClibc-ng-1.0.0.config" if BR2_UCLIBC_NG_VERSION_1_0_0 default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_ARC_GIT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_SNAPSHOT default "package/uclibc/uClibc-snapshot.config" if BR2_UCLIBC_VERSION_XTENSA_GIT
package/uclibc/uClibc-ng-1.0.0.config new file +280 -0
280 lines not on this page · raw message
package/uclibc/uclibc.mk +19 -0
@@ -11,6 +11,9 @@ UCLIBC_LICENSE_FILES = COPYING.LIB ifeq ($(BR2_UCLIBC_VERSION_SNAPSHOT),y) UCLIBC_SITE = http://www.uclibc.org/downloads/snapshots +else ifeq ($(BR2_UCLIBC_NG_VERSION_1_0_0),y) +UCLIBC_SITE = http://downloads.uclibc-ng.org/releases/$(UCLIBC_VERSION)/ +UCLIBC_SOURCE = uClibc-ng-$(UCLIBC_VERSION).tar.xz else ifeq ($(BR2_UCLIBC_VERSION_ARC_GIT),y) UCLIBC_SITE = $(call github,foss-for-synopsys-dwc-arc-processors,uClibc,$(UCLIBC_VERSION)) UCLIBC_SOURCE = uClibc-$(UCLIBC_VERSION).tar.gz
@@ -475,6 +478,21 @@ define UCLIBC_INSTALL_UTILS_TARGET endef endif +# gcc produces binaries that use ld{64,}-uClibc.so.0 as the program +# interpreter, but since uClibc-ng version is 1.0.0, it generates +# ld{64,}-uClibc.so.1. In order to avoid changing gcc, we simply +# create the necessary symbolic links here. +ifeq ($(BR2_UCLIBC_NG_VERSION_1_0_0),y) +define UCLIBC_INSTALL_LDSO_SYMLINKS + if [ -e $(TARGET_DIR)/lib/ld64-uClibc.so.1 ]; then \ + (cd $(TARGET_DIR)/lib;ln -sf ld64-uClibc.so.1 ld64-uClibc.so.0) \ + fi + if [ -e $(TARGET_DIR)/lib/ld-uClibc.so.1 ]; then \ + (cd $(TARGET_DIR)/lib;ln -sf ld-uClibc.so.1 ld-uClibc.so.0) \ + fi +endef +endif + define UCLIBC_INSTALL_TARGET_CMDS $(MAKE1) -C $(@D) \ $(UCLIBC_MAKE_FLAGS) \
@@ -485,6 +503,7 @@ define UCLIBC_INSTALL_TARGET_CMDS $(UCLIBC_INSTALL_UTILS_TARGET) $(UCLIBC_BUILD_TEST_SUITE) $(UCLIBC_INSTALL_TEST_SUITE) + $(UCLIBC_INSTALL_LDSO_SYMLINKS) endef # STATIC has no ld* tools, only getconf
Signature · 1 line
2.1.0
PATCH 3/3 uclibc: enable Xtensa NPTL support with uClibc-ng
In reply to Thomas PetazzoniContrary to mainline uClibc, uClibc-ng has support for NPTL on Xtensa, so let's allow selecting NPTL when a uClibc version other than the Xtensa special uClibc version is used.
--- package/uclibc/Config.in | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
package/uclibc/Config.in +3 -1
@@ -129,7 +129,9 @@ choice select BR2_TOOLCHAIN_HAS_THREADS_NPTL depends on !BR2_arc depends on !BR2_bfin - depends on !BR2_xtensa + # There is NPTL support for Xtensa in uClibc-ng, but + # not in the main uClibc repository. + depends on !BR2_xtensa || !BR2_UCLIBC_VERSION_XTENSA_GIT depends on !BR2_x86_i386 endchoice
Signature · 1 line
2.1.0
cover uclibc: add support for uClibc-ng
In reply to Thomas PetazzoniHi Thomas,
Thomas Petazzoni wrote,
Quoted 9 lines
Hello,
The following three set of patches add support for uClibc-ng. The main patch is based on previous work from Waldemar (thanks!).
I have build tested and runtime tested in Qemu the following
configurations: ARM Cortex-A9 EABIhf (qemu-vexpress) and Xtensa NPTL (qemu emulation). The build includes the toolchain, Busybox and the kernel.
I have tested Qemu-Mips (le), Qemu-SH4, Qemu-Sparc and Qemu-ARM. All worked fine.
You can add
Best regards
Waldemar
cover uclibc: add support for uClibc-ng
Dear Waldemar Brodkorb,
Quoted 5 lines · Waldemar Brodkorb
I have tested Qemu-Mips (le), Qemu-SH4, Qemu-Sparc and Qemu-ARM. All worked fine.
You can add
Tested-by Waldemar Brodkorb <[email protected]>
Thanks for the testing, I've applied after adding your Tested-by!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover uclibc: add support for uClibc-ng
In reply to Thomas PetazzoniHello,
Quoted 2 lines · Thomas Petazzoni
uclibc: add ability to use uClibc-ng 1.0.0
uclibc: enable Xtensa NPTL support with uClibc-ng
Applied, with Waldemar's Tested-by.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com