Skip to contentSkip to conversation

package/xenomai: enable armv5tej support

PATCH New Romain Naour 3 participants 7 messages Mar 31, 2017 – Apr 15, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 package/xenomai: enable armv5tej support

Apply a patch from Xenomai 2.6 [1].

Fixes:
http://autobuild.buildroot.net/results/762/7623410a81b1587b33b4f4b9cf1572c872b8a6e9/build-end.log

[1] https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c

---
 .../xenomai/0002-arm-enable-armv5tej-support.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/xenomai/0002-arm-enable-armv5tej-support.patch
package/xenomai/0002-arm-enable-armv5tej-support.patch new file +32 -0
new file mode 100644
index 0000000..5feaa59
@@ -0,0 +1,32 @@
+From fcd06f42fef4d52bb0d9772fa71015988c828b1b Mon Sep 17 00:00:00 2001
+From: Romain Naour <[email protected]>
+Date: Fri, 31 Mar 2017 21:10:23 +0200
+Subject: [PATCH] arm: enable armv5tej support
+
+armv5tej are not detected in lib/cobalt/arch/arm/include/asm/xenomai/features.h
+
+Apply the same patch from xenomai-2.6:
+https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c
+
+Signed-off-by: Romain Naour <[email protected]>
+---
+ lib/cobalt/arch/arm/include/asm/xenomai/features.h | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff --git a/lib/cobalt/arch/arm/include/asm/xenomai/features.h b/lib/cobalt/arch/arm/include/asm/xenomai/features.h
+index 10bd0c7..e84b809 100644
+--- a/lib/cobalt/arch/arm/include/asm/xenomai/features.h
++++ b/lib/cobalt/arch/arm/include/asm/xenomai/features.h
+@@ -34,7 +34,8 @@
+ #endif /* armv4 */
+ 
+ #if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
+-	|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__)
++	|| defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
++	|| defined(__ARM_ARCH_5TEJ__)
+ #define __LINUX_ARM_ARCH__ 5
+ #endif /* armv5 */
+ 
+-- 
+2.9.3
+
Signature · 1 line
2.9.3
#1 lore raw

PATCH 2/2 package/xenomai: disable obstack support

Obstack support in Xenomai is broken when the libc doesn't support obstack support itself. Make sure we disable obstack support for all libc since it was removed in uClibc-ng since 1.0.21 release and it's always disabled with Glibc.

Fixes:
http://autobuild.buildroot.net/results/555/555d9cb9cb59fad6353516bed206e1117974e8cd/build-end.log

---
 package/xenomai/xenomai.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/xenomai/xenomai.mk +6 -0
index fc240f9..77889f0 100644
@@ -23,6 +23,12 @@ XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
 
 XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install
 
+# Obstack support in Xenomai is broken when the libc doesn't support
+# obstack support itself. Make sure we disable obstack support for all
+# libc since it was removed in uClibc-ng since 1.0.21 release and it's
+# always disabled with Glibc.
+XENOMAI_CONF_OPTS += CFLAGS="$(TARGET_CFLAGS) -DELIDE_CODE"
+
 define XENOMAI_REMOVE_DEVFILES
 	for i in xeno-config xeno-info wrap-link.sh ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
Signature · 1 line
2.9.3
#2 lore raw

PATCH 2/2 package/xenomai: disable obstack support

Hello,

Quoted 4 lines · Romain Naour

Obstack support in Xenomai is broken when the libc doesn't support obstack support itself. Make sure we disable obstack support for all libc since it was removed in uClibc-ng since 1.0.21 release and it's always disabled with Glibc.

What makes you say it's always disabled in glibc?

What's the status with musl?

Also, Xenomai seems to have some replacement code when obstack support is not available from the C library. How does that interfact with ELIDE_CODE ?

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#3 lore raw

PATCH 2/2 package/xenomai: disable obstack support

Hi Thomas, All,

Le 01/04/2017 ? 14:44, Thomas Petazzoni a ?crit :

Quoted 9 lines

Hello,

Quoted 4 lines · Romain Naour

Obstack support in Xenomai is broken when the libc doesn't support obstack support itself. Make sure we disable obstack support for all libc since it was removed in uClibc-ng since 1.0.21 release and it's always disabled with Glibc.

What makes you say it's always disabled in glibc?

From lib/boilerplate/obstack.c in Xenomai code:

#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1

# include <gnu-versions.h>
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
#  define ELIDE_CODE
# endif
#endif

While glibc is used, _GNU_OBSTACK_INTERFACE_VERSION is equal to OBSTACK_INTERFACE_VERSION so ELIDE_CODE is defined and the Xenomai Obstack support (the replacement code) is disabled.

While uClibc-ng >= 1.0.21 is used, _GNU_OBSTACK_INTERFACE_VERSION is not defined so the Xenomai Obstack support is used but break the build.

Quoted 2 lines

What's the status with musl?

Xenomai is disabled with musl toolchains

Quoted 4 lines

Also, Xenomai seems to have some replacement code when obstack support is not available from the C library. How does that interfact with ELIDE_CODE ?

This is precisely the replacement code that is broken...
It try to use "exitfail.h" and define obstack_exit_failure with exit_failure which is not defined.

The proposed fix define ELIDE_CODE to disable the Xenomai Obstack support completely.

Otherwise, we have to add a dependency on glibc toolchain only since Obstack support is missing in uClibc-ng... (maybe it's safer to do that?).

Best regards,
Romain

Quoted 5 lines

Thanks,

Thomas

#4 lore raw

PATCH 2/2 package/xenomai: disable obstack support

Hi,

2017-04-01 23:44 GMT+02:00 Romain Naour <[email protected]>:

Quoted 45 lines

Hi Thomas, All,

Le 01/04/2017 ? 14:44, Thomas Petazzoni a ?crit :

Quoted 9 lines

Hello,

Quoted 4 lines · Romain Naour

Obstack support in Xenomai is broken when the libc doesn't support obstack support itself. Make sure we disable obstack support for all libc since it was removed in uClibc-ng since 1.0.21 release and it's always disabled with Glibc.

What makes you say it's always disabled in glibc?

From lib/boilerplate/obstack.c in Xenomai code:

#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1

# include <gnu-versions.h>
# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
#  define ELIDE_CODE
# endif
#endif

While glibc is used, _GNU_OBSTACK_INTERFACE_VERSION is equal to OBSTACK_INTERFACE_VERSION so ELIDE_CODE is defined and the Xenomai Obstack support (the replacement code) is disabled.

While uClibc-ng >= 1.0.21 is used, _GNU_OBSTACK_INTERFACE_VERSION is not defined
so the Xenomai Obstack support is used but break the build.

Quoted 2 lines

What's the status with musl?

Xenomai is disabled with musl toolchains

Quoted 4 lines

Also, Xenomai seems to have some replacement code when obstack support is not available from the C library. How does that interfact with ELIDE_CODE ?

This is precisely the replacement code that is broken... It try to use "exitfail.h" and define obstack_exit_failure with exit_failure
which is not defined.

Quoted 7 lines

The proposed fix define ELIDE_CODE to disable the Xenomai Obstack support completely.

Otherwise, we have to add a dependency on glibc toolchain only since Obstack
support is missing in uClibc-ng... (maybe it's safer to do that?).

That's a good question, but I also think that we should add dependency from glibc,
at least until someone could say (Romain?) what would be the impact on uClibc-ng without
obstack support... and will test it, right?

..but until then, Thomas/All, what do you think?

Regards,
Pawel

Quoted 11 lines

Best regards,
Romain

Quoted 5 lines

Thanks,

Thomas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20170411/0ead8b36/attachment.html>

#5 lore raw

PATCH 2/2 package/xenomai: disable obstack support

In reply to Romain Naour

Hello,

Quoted 5 lines · Romain Naour

Obstack support in Xenomai is broken when the libc doesn't support obstack support itself. Make sure we disable obstack support for all libc since it was removed in uClibc-ng since 1.0.21 release and it's always disabled with Glibc.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/555/555d9cb9cb59fad6353516bed206e1117974e8cd/build-end.log

---
 package/xenomai/xenomai.mk | 6 ++++++
 1 file changed, 6 insertions(+)

Since nobody proposed a better solution, I applied your patch. However, could you report the issue upstream? Hopefully they will have a look and propose a better solution.

Thanks a lot!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#6 lore raw

PATCH 1/2 package/xenomai: enable armv5tej support

In reply to Romain Naour

Hello,

Quoted 5 lines · Romain Naour

Apply a patch from Xenomai 2.6 [1].

Fixes:
http://autobuild.buildroot.net/results/762/7623410a81b1587b33b4f4b9cf1572c872b8a6e9/build-end.log

Quoted 7 lines

[1] https://git.xenomai.org/xenomai-2.6.git/commit/?id=ebc2779baa222db4a5936c3d3022803355585b8c

---
 .../xenomai/0002-arm-enable-armv5tej-support.patch | 32 ++++++++++++++++++++++
 1 file changed, 32 insertions(+)
 create mode 100644 package/xenomai/0002-arm-enable-armv5tej-support.patch

Applied to master, thanks. Please submit the patch upstream, thanks!

Thomas

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