Skip to contentSkip to conversation

package/xenomai: Fixes, updates, enhancements

PATCH Superseded Jan Kiszka 2 participants 10 messages Dec 12, 2019 – Dec 13, 2019

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

cover package/xenomai: Fixes, updates, enhancements

Just a couple of improvements I came across while building me a virtual ppc32 test target.

Jan

PS: @CC, sorry, had to send twice as the list is not open.

Jan Kiszka (4):
package/xenomai: Smokey's not a skin
package/xenomai: Pull from git
package/xenomai: Bump version to 3.0.10
package/xenomai: Clean up wrappers cleanup

 package/xenomai/Config.in    |  5 -----
 package/xenomai/xenomai.hash |  2 +-
 package/xenomai/xenomai.mk   | 39 +++++++++++++++++++++------------------
 3 files changed, 22 insertions(+), 24 deletions(-)
Signature · 1 line
2.16.4
author
#1 lore raw

PATCH 1/4 package/xenomai: Smokey's not a skin

From: Jan Kiszka <[email protected]>

That's a testsuite tool.

Rename XENOMAI_REMOVE_SKIN_LIST at this chance as it's cleaning libraries.

---
 package/xenomai/Config.in  |  5 -----
 package/xenomai/xenomai.mk | 23 ++++++++++-------------
 2 files changed, 10 insertions(+), 18 deletions(-)
package/xenomai/Config.in +0 -5
index 83ba8ca162..0cb0b343de 100644
@@ -170,11 +170,6 @@ config BR2_PACKAGE_XENOMAI_RTAI_SKIN
 	help
 	  This option allows to install the RTAI Xenomai skin
 
-config BR2_PACKAGE_XENOMAI_SMOKEY_SKIN
-	bool "Smokey skin"
-	help
-	  This option allows to install the Smokey Xenomai skin
-
 config BR2_PACKAGE_XENOMAI_UITRON_SKIN
 	bool "uITRON skin"
 	help
package/xenomai/xenomai.mk +10 -13
index 16c486eb34..f25adf747b 100644
@@ -73,7 +73,7 @@ XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_UNNEEDED_FILES
 ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),)
 define XENOMAI_REMOVE_TESTSUITE
 	rm -rf $(TARGET_DIR)/usr/share/xenomai/
-	for i in clocktest gpiotest latency spitest switchtest \
+	for i in clocktest gpiotest latency smokey spitest switchtest \
 		xeno-test-run-wrapper dohell xeno-test-run xeno-test ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
 	done
@@ -109,24 +109,21 @@ endef
 XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY
 endif
 
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,alchemy)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_POSIX_SKIN),,posix)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_RTAI_SKIN),,rtai)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_SMOKEY_SKIN),,smokey)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_UITRON_SKIN),,uitron)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VXWORKS_SKIN),,vxworks)
-XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,alchemy)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_POSIX_SKIN),,posix)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_RTAI_SKIN),,rtai)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_TESTSUITE),,smokey)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_UITRON_SKIN),,uitron)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VXWORKS_SKIN),,vxworks)
+XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx)
 
 define XENOMAI_REMOVE_SKINS
-	for i in $(XENOMAI_REMOVE_SKIN_LIST) ; do \
+	for i in $(XENOMAI_REMOVE_LIBS_LIST) ; do \
 		rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \
 		if [ $$i == "posix" ] ; then \
 			rm -f $(TARGET_DIR)/usr/lib/posix.wrappers ; \
 		fi ; \
-		if [ $$i == "smokey" ] ; then \
-			rm -f $(TARGET_DIR)/usr/bin/smokey* ; \
-		fi ; \
 	done
 endef
 
Signature · 1 line
2.16.4
#2 lore raw

PATCH 1/4 package/xenomai: Smokey's not a skin

Quoted 6 lines · On Thu, 12 Dec 2019 19:44:37 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

That's a testsuite tool.

Rename XENOMAI_REMOVE_SKIN_LIST at this chance as it's cleaning libraries.

I am confused, aren't psos, rtai, uitron, vxworks and al. called "skins" in the Xenomai speak ?

Ideally, this variable rename should be done in a separate patch, since it's independent from the smokey option removal.

Quoted 11 lines
---
 package/xenomai/Config.in  |  5 -----
 package/xenomai/xenomai.mk | 23 ++++++++++-------------
 2 files changed, 10 insertions(+), 18 deletions(-)
package/xenomai/Config.in +0 -0
index 83ba8ca162..0cb0b343de 100644

package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_RTAI_SKIN · line 176

Quoted 7 lines
package/xenomai/Config.in +0 -4
@@ -170,11 +170,6 @@ config BR2_PACKAGE_XENOMAI_RTAI_SKIN
 	help
 	  This option allows to install the RTAI Xenomai skin
 
-config BR2_PACKAGE_XENOMAI_SMOKEY_SKIN
-	bool "Smokey skin"
-	help
-	  This option allows to install the Smokey Xenomai skin

We normally want to have Config.in.legacy handling when removing options, but in this case, the options was in fact not really doing anything useful, so I believe it's OK to just drop it like you did.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#3 lore raw

PATCH 1/4 package/xenomai: Smokey's not a skin

Quoted 5 lines · Thomas Petazzoni
Quoted 2 lines · On Thu, 12 Dec 2019 19:44:37 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

Quoted 7 lines
Quoted 4 lines

That's a testsuite tool.

Rename XENOMAI_REMOVE_SKIN_LIST at this chance as it's cleaning libraries.

I am confused, aren't psos, rtai, uitron, vxworks and al. called "skins" in the Xenomai speak ?

Yes, they are and remain so.

Quoted 3 lines

Ideally, this variable rename should be done in a separate patch, since it's independent from the smokey option removal.

We still use XENOMAI_REMOVE_LIBS_LIST to remove the smokey *lib* when the testsuite is disabled. Therefore, XENOMAI_REMOVE_SKIN_LIST ws not an appropriate name. Same context, therefore same patch.

Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#4 lore raw

PATCH 2/4 package/xenomai: Pull from git

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

This allows to pick also git revisions via XENOMAI_VERSION.

---
 package/xenomai/xenomai.hash |  2 +-
 package/xenomai/xenomai.mk   | 10 ++++++++--
 2 files changed, 9 insertions(+), 3 deletions(-)
package/xenomai/xenomai.hash +1 -1
index 0fc560f978..83994384eb 100644
@@ -1,2 +1,2 @@
 # Locally computed;
-sha256 9e4b879ee48e6423f76cba5882f41d129164fe977119080ff41ef531ee50dc4e  xenomai-3.0.9.tar.bz2
+sha256 be7a7a453a8d1f0763ed5feb3bee159fe60b8a42326b0ff564e94184bd4d0734  xenomai-v3.0.9.tar.bz2
package/xenomai/xenomai.mk +8 -2
index f25adf747b..1d38cffa30 100644
@@ -6,12 +6,12 @@
 
 XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
 ifeq ($(XENOMAI_VERSION),)
-XENOMAI_VERSION = 3.0.9
+XENOMAI_VERSION = v3.0.9
 else
 BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
 endif
 
-XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
+XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION)
 XENOMAI_SOURCE = xenomai-$(XENOMAI_VERSION).tar.bz2
 XENOMAI_LICENSE = GPL-2.0+ with exception (headers), LGPL-2.1+ (libraries), GPL-2.0+ (kernel), GFDL-1.2+ (docs), GPL-2.0 (ipipe patch, can driver)
 # GFDL is not included but refers to gnu.org
@@ -28,6 +28,12 @@ XENOMAI_INSTALL_STAGING = YES
 XENOMAI_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-user
 XENOMAI_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) install-user
 
+define XENOMAI_BOOTSTRAP
+	(cd $(@D); ./scripts/bootstrap)
+endef
+
+XENOMAI_PRE_CONFIGURE_HOOKS += XENOMAI_BOOTSTRAP
+
 XENOMAI_CONF_OPTS += --includedir=/usr/include/xenomai/ --disable-doc-install
 
 ifeq ($(BR2_PACKAGE_XENOMAI_MERCURY),y)
Signature · 1 line
2.16.4
#5 lore raw

PATCH 2/4 package/xenomai: Pull from git

Hello Jan,

Quoted 3 lines · On Thu, 12 Dec 2019 19:44:38 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

This allows to pick also git revisions via XENOMAI_VERSION.

You don't have tarballs for new releases? We generally prefer to use tarballs when available.

package/xenomai/xenomai.mk line 9

Quoted 4 lines

XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) ifeq ($(XENOMAI_VERSION),)

package/xenomai/xenomai.mk +1 -1
-XENOMAI_VERSION = 3.0.9
+XENOMAI_VERSION = v3.0.9

The version needs to stay 3.0.9, i.e without the "v" prefix.

package/xenomai/xenomai.mk line 14

Quoted 6 lines

else
BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
endif

package/xenomai/xenomai.mk +1 -1
-XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
+XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION)

.. which can be done by changing this to:

XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/v$(XENOMAI_VERSION)

We want this so that our XENOMAI_VERSION value matches the release-monitoring.org entry for Xenomai:
https://release-monitoring.org/project/18451/. BTW, it seems like they don't know about version 3.0.10, as they are checking
https://xenomai.org/downloads/xenomai/stable/ and there is no tarball for 3.0.10. I guess we need to change the Xenomai entry in release-monitoring.org to make it use the Git repository.

package/xenomai/xenomai.mk XENOMAI_INSTALL_STAGING = YES · line 35

Quoted 5 lines
package/xenomai/xenomai.mk +5 -0
+define XENOMAI_BOOTSTRAP
+	(cd $(@D); ./scripts/bootstrap)
+endef
+
+XENOMAI_PRE_CONFIGURE_HOOKS += XENOMAI_BOOTSTRAP

This is not good, because nothing guarantees you autoconf/automake are available. Our preferred way of handling this is to use:

XENOMAI_AUTORECONF = YES

which simply calls autoreconf on the project. However, I can imagine that Xenomai is a bit special, so if AUTORECONF = YES doesn't work, you can keep your PRE_CONFIGURE_HOOKS, but you need to add host-autoconf and host-automake to XENOMAI_DEPENDENCIES, and possibly host-libtool if libtool is used to build the libraries.

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
author
#6 lore raw

PATCH 2/4 package/xenomai: Pull from git

Quoted 11 lines · Thomas Petazzoni

Hello Jan,

Quoted 3 lines · On Thu, 12 Dec 2019 19:44:38 +0100 Jan Kiszka <[email protected]> wrote:

From: Jan Kiszka <[email protected]>

This allows to pick also git revisions via XENOMAI_VERSION.

You don't have tarballs for new releases? We generally prefer to use tarballs when available.

We do, but pulling those from git is more flexible as it allows to specify also non-release states.

Quoted 7 lines

package/xenomai/xenomai.mk line 9

Quoted 5 lines

XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION)) ifeq ($(XENOMAI_VERSION),)

package/xenomai/xenomai.mk +1 -1
-XENOMAI_VERSION = 3.0.9
+XENOMAI_VERSION = v3.0.9

The version needs to stay 3.0.9, i.e without the "v" prefix.

If that is a general requirement on <pkg>_VERSION variables, I need to model pulling git SHAs differently, likely as the kernel recipe does.

Quoted 11 lines

package/xenomai/xenomai.mk line 14

Quoted 7 lines

else
BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
endif

package/xenomai/xenomai.mk +1 -1
-XENOMAI_SITE = http://xenomai.org/downloads/xenomai/stable
+XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/$(XENOMAI_VERSION)

.. which can be done by changing this to:

XENOMAI_SITE = https://gitlab.denx.de/Xenomai/xenomai/-/archive/v$(XENOMAI_VERSION)

That breaks XENOMAI_VERSION=<branch> or <sha>, see above.

Quoted 8 lines

We want this so that our XENOMAI_VERSION value matches the release-monitoring.org entry for Xenomai:
https://release-monitoring.org/project/18451/. BTW, it seems like they don't know about version 3.0.10, as they are checking
https://xenomai.org/downloads/xenomai/stable/ and there is no tarball for 3.0.10. I guess we need to change the Xenomai entry in release-monitoring.org to make it use the Git repository.

We have some delay in updating the regular download area. There is also currently none of our 3.1-rc releases available under testing/.

Quoted 10 lines

package/xenomai/xenomai.mk XENOMAI_INSTALL_STAGING = YES · line 35

Quoted 6 lines
package/xenomai/xenomai.mk +5 -0
+define XENOMAI_BOOTSTRAP
+	(cd $(@D); ./scripts/bootstrap)
+endef
+
+XENOMAI_PRE_CONFIGURE_HOOKS += XENOMAI_BOOTSTRAP

This is not good, because nothing guarantees you autoconf/automake are available. Our preferred way of handling this is to use:

Quoted 7 lines

XENOMAI_AUTORECONF = YES

which simply calls autoreconf on the project. However, I can imagine that Xenomai is a bit special, so if AUTORECONF = YES doesn't work, you can keep your PRE_CONFIGURE_HOOKS, but you need to add host-autoconf and host-automake to XENOMAI_DEPENDENCIES, and possibly host-libtool if libtool is used to build the libraries.

$ cat scripts/bootstrap
#!/bin/sh

autoreconf -fi

Looks unspectacular. Will try AUTORECONF = YES.

Thanks,
Jan

Signature · 2 lines
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux
author
#7 lore raw

PATCH 3/4 package/xenomai: Bump version to 3.0.10

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

---
 package/xenomai/xenomai.hash | 2 +-
 package/xenomai/xenomai.mk   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
package/xenomai/xenomai.hash +1 -1
index 83994384eb..31a925f2c4 100644
@@ -1,2 +1,2 @@
 # Locally computed;
-sha256 be7a7a453a8d1f0763ed5feb3bee159fe60b8a42326b0ff564e94184bd4d0734  xenomai-v3.0.9.tar.bz2
+sha256 de72ef7a4522bf9ba5f72a674acac35a92eb38823d3631201a33bea958d9fb7d  xenomai-v3.0.10.tar.bz2
package/xenomai/xenomai.mk +1 -1
index 1d38cffa30..ac823407f2 100644
@@ -6,7 +6,7 @@
 
 XENOMAI_VERSION = $(call qstrip,$(BR2_PACKAGE_XENOMAI_VERSION))
 ifeq ($(XENOMAI_VERSION),)
-XENOMAI_VERSION = v3.0.9
+XENOMAI_VERSION = v3.0.10
 else
 BR_NO_CHECK_HASH_FOR += $(XENOMAI_SOURCE)
 endif
Signature · 1 line
2.16.4
author
#8 lore raw

PATCH 4/4 package/xenomai: Clean up wrappers cleanup

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

There is no posix.wrappers anymore, but cobalt and modechk. Those only play a role when building in combination with wrap-link.sh.

---
 package/xenomai/xenomai.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
package/xenomai/xenomai.mk +3 -3
index ac823407f2..fe0268b14c 100644
@@ -68,6 +68,9 @@ define XENOMAI_REMOVE_UNNEEDED_FILES
 	for i in xeno xeno-config xeno-info wrap-link.sh ; do \
 		rm -f $(TARGET_DIR)/usr/bin/$$i ; \
 	done
+	for i in cobalt modechk ; do \
+		rm -f $(TARGET_DIR)/usr/lib/$$i.wrappers ; \
+	done
 	for i in autotune corectl hdb rtnet nomaccfg rtcfg rtifconfig \
 		rtiwconfig rtping rtroute tdmacfg rtps slackspot version; do \
 		rm -f $(TARGET_DIR)/usr/sbin/$$i ; \
@@ -127,9 +130,6 @@ XENOMAI_REMOVE_LIBS_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx)
 define XENOMAI_REMOVE_SKINS
 	for i in $(XENOMAI_REMOVE_LIBS_LIST) ; do \
 		rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \
-		if [ $$i == "posix" ] ; then \
-			rm -f $(TARGET_DIR)/usr/lib/posix.wrappers ; \
-		fi ; \
 	done
 endef
 
Signature · 1 line
2.16.4
#9 lore raw

cover package/xenomai: Fixes, updates, enhancements

In reply to Jan Kiszka

Hello Jan,

Quoted 6 lines · On Thu, 12 Dec 2019 19:44:36 +0100 Jan Kiszka <[email protected]> wrote:

Just a couple of improvements I came across while building me a virtual ppc32 test target.

Jan

PS: @CC, sorry, had to send twice as the list is not open.

Thanks a lot for sending those patches, it's nice to see patches from you on our Xenomai package! I have a few comments/questions on the patches, I'll reply individually to the patches.

Quoted 5 lines

Jan Kiszka (4):
package/xenomai: Smokey's not a skin
package/xenomai: Pull from git
package/xenomai: Bump version to 3.0.10
package/xenomai: Clean up wrappers cleanup

A minor nit: we typically don't capitalize commit titles in Buildroot, i.e "pull from git" and not "Pull from git". I know, that's arbitrary, people like it one way or the other, we simply have more or less a convention.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com