xenomai 3.x fixups and extra config options
cover xenomai 3.x fixups and extra config options
From: Thomas De Schampheleire <[email protected]>
Between Xenomai 2.x and 3.x a number of changes happened in the Xenomai sources, which were not taken into account in Buildroot. This would e.g. result in extra unwanted files on the target root filesystem, or missing license files.
The first part of this series, patches 1 to 7 deals with this problem. Patches 8 and 9 cover additional config options for Xenomai.
Thomas De Schampheleire (9):
xenomai: update LICENSE_FILES
xenomai: native skin is now called alchemy
xenomai: group skin selection in separate menu and cleanup
xenomai: add option for Smokey skin
xenomai: update list of Analogy installed files
xenomai: update list of testsuite files
xenomai: restrict installed files further
xenomai: add support for registry
xenomai: add string option for additional configure options
package/xenomai/Config.in | 64 ++++++++++++++++++++++++++++++++++++---------- package/xenomai/xenomai.mk | 52 +++++++++++++++++++++++++++---------- 2 files changed, 88 insertions(+), 28 deletions(-)
Signature · 1 line
2.10.2
PATCH 1/9 xenomai: update LICENSE_FILES
From: Thomas De Schampheleire <[email protected]>
Xenomai sources contain much more license files than we currently list, so complete the current list.
Based on:
find | grep -Ei 'copying|license|copyright' | sort
--- package/xenomai/xenomai.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
package/xenomai/xenomai.mk +6 -1
@@ -15,7 +15,12 @@ XENOMAI_SITE = https://xenomai.org/downloads/xenomai/stable 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 -XENOMAI_LICENSE_FILES = debian/copyright include/COPYING lib/trank/COPYING kernel/cobalt/COPYING +XENOMAI_LICENSE_FILES = debian/copyright include/COPYING kernel/cobalt/COPYING \ + kernel/cobalt/posix/COPYING kernel/cobalt/rtdm/COPYING \ + lib/alchemy/COPYING lib/analogy/COPYING \ + lib/boilerplate/iniparser/LICENSE lib/boilerplate/COPYING \ + lib/cobalt/COPYING lib/copperplate/COPYING lib/psos/COPYING \ + lib/smokey/COPYING lib/trank/COPYING lib/vxworks/COPYING XENOMAI_DEPENDENCIES = host-pkgconf
Signature · 1 line
2.10.2
PATCH 2/9 xenomai: native skin is now called alchemy
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Since the introduction of Xenomai 3, the native skin is dubbed Alchemy. Update the config menu (but leave the symbol name to avoid hurting existing users needlessly) and fix the unselected-skin cleanup code.
--- package/xenomai/Config.in | 5 +++-- package/xenomai/xenomai.mk | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-)
package/xenomai/Config.in +3 -2
@@ -113,10 +113,11 @@ config BR2_PACKAGE_XENOMAI_ANALOGY and libraries config BR2_PACKAGE_XENOMAI_NATIVE_SKIN - bool "Native skin library" + bool "Alchemy (native) skin library" default y help - This option allows to install the Native Xenomai skin + This option allows to install the Alchemy Xenomai skin, previously + called 'native' config BR2_PACKAGE_XENOMAI_POSIX_SKIN bool "POSIX skin library"
package/xenomai/xenomai.mk +1 -1
@@ -92,7 +92,7 @@ endef XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY endif -XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_NATIVE_SKIN),,native) +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_VXWORKS_SKIN),,vxworks) XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_PSOS_SKIN),,psos)
Signature · 1 line
2.10.2
PATCH 3/9 xenomai: group skin selection in separate menu and cleanup
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Clarify the Xenomai config options by grouping the skin-related options in a separate menu.
Additionally:
- update proper capitalization of skin names
- sort entries
- replace 'skin library' by 'skin' to match the terminology in Xenomai sources
--- package/xenomai/Config.in | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-)
package/xenomai/Config.in +17 -13
@@ -112,42 +112,46 @@ config BR2_PACKAGE_XENOMAI_ANALOGY This option allows to install the Xenomai Analogy utilities and libraries +menu "Skin selection" + config BR2_PACKAGE_XENOMAI_NATIVE_SKIN - bool "Alchemy (native) skin library" + bool "Alchemy (native) skin" default y help This option allows to install the Alchemy Xenomai skin, previously called 'native' config BR2_PACKAGE_XENOMAI_POSIX_SKIN - bool "POSIX skin library" + bool "POSIX skin" default y help This option allows to install the POSIX Xenomai skin -config BR2_PACKAGE_XENOMAI_VXWORKS_SKIN - bool "VX-Works skin library" - help - This option allows to install the VX-Works Xenomai skin - config BR2_PACKAGE_XENOMAI_PSOS_SKIN - bool "PSOS skin library" + bool "pSOS skin" help - This option allows to install the PSOS Xenomai skin + This option allows to install the pSOS Xenomai skin config BR2_PACKAGE_XENOMAI_RTAI_SKIN - bool "RTAI skin library" + bool "RTAI skin" help This option allows to install the RTAI Xenomai skin config BR2_PACKAGE_XENOMAI_UITRON_SKIN - bool "uiTron skin library" + bool "uITRON skin" help - This option allows to install the uiTron Xenomai skin + This option allows to install the uITRON Xenomai skin config BR2_PACKAGE_XENOMAI_VRTX_SKIN - bool "VRTX skin library" + bool "VRTX skin" help This option allows to install the VRTX Xenomai skin +config BR2_PACKAGE_XENOMAI_VXWORKS_SKIN + bool "VxWorks skin" + help + This option allows to install the VxWorks Xenomai skin + +endmenu + endif
Signature · 1 line
2.10.2
PATCH 4/9 xenomai: add option for Smokey skin
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Xenomai has a skin 'Smokey' that Buildroot is currently unaware of, which means that the associated files are present on target even though most users will not need them.
Add a config option and associated logic to remove the skin if not selected.
Additionally, fixup order of VxWorks skin removal entry.
--- package/xenomai/Config.in | 5 +++++ package/xenomai/xenomai.mk | 6 +++++- 2 files changed, 10 insertions(+), 1 deletion(-)
package/xenomai/Config.in +5 -0
@@ -137,6 +137,11 @@ 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 +5 -1
@@ -94,10 +94,11 @@ 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_VXWORKS_SKIN),,vxworks) 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) define XENOMAI_REMOVE_SKINS
@@ -106,6 +107,9 @@ define XENOMAI_REMOVE_SKINS 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.10.2
PATCH 5/9 xenomai: update list of Analogy installed files
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Since Xenomai 3, the list of files installed for Analogy is longer, causing the extra files to remain on the target filesystem even if Analogy is not selected.
--- package/xenomai/xenomai.mk | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
package/xenomai/xenomai.mk +5 -3
@@ -81,11 +81,13 @@ endif ifeq ($(BR2_PACKAGE_XENOMAI_ANALOGY),) define XENOMAI_REMOVE_ANALOGY - for i in cmd_bits cmd_read cmd_write insn_write \ - insn_bits insn_read ; do \ + for i in cmd_read cmd_write cmd_bits insn_read insn_write insn_bits \ + wf_generate ; do \ rm -f $(TARGET_DIR)/usr/bin/$$i ; \ done - rm -f $(TARGET_DIR)/usr/sbin/analogy_config + for i in analogy_config analogy_calibrate ; do \ + rm -f $(TARGET_DIR)/usr/sbin/$$i ; \ + done rm -f $(TARGET_DIR)/usr/lib/libanalogy.* endef
Signature · 1 line
2.10.2
PATCH 6/9 xenomai: update list of testsuite files
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Since Xenomai 3, the list of installed binaries/scripts of the testsuite is different than before.
--- package/xenomai/xenomai.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
package/xenomai/xenomai.mk +3 -5
@@ -56,13 +56,11 @@ XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DEVFILES ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),) define XENOMAI_REMOVE_TESTSUITE rm -rf $(TARGET_DIR)/usr/share/xenomai/ - for i in klatency rtdm xeno xeno-load check-vdso \ - irqloop cond-torture-posix switchtest arith \ - sigtest clocktest cyclictest latency wakeup-time \ - xeno-test cond-torture-native mutex-torture-posix \ - mutex-torture-native ; do \ + for i in clocktest gpiotest latency spitest switchtest \ + xeno-test-run-wrapper dohell xeno-test-run xeno-test ; do \ rm -f $(TARGET_DIR)/usr/bin/$$i ; \ done + rm -rf $(TARGET_DIR)/usr/demo/ endef XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_TESTSUITE
Signature · 1 line
2.10.2
PATCH 7/9 xenomai: restrict installed files further
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Xenomai 3 installs quite some utils and other programs to the target filesystem, many of which will not be used by most users.
As it is currently unclear which utils are effectively useful, and as it is undesirable to create config options for each individual util, remove all remaining utils such that only the Xenomai libraries remain.
At the point it becomes clear that certain utils _are_ desired by some users, we can identify how to group them in relevant config options.
--- package/xenomai/xenomai.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-)
package/xenomai/xenomai.mk +9 -3
@@ -45,13 +45,19 @@ else XENOMAI_CONF_OPTS += --disable-smp endif -define XENOMAI_REMOVE_DEVFILES - for i in xeno-config xeno-info wrap-link.sh ; do \ +# Some of these files may be desired by some users -- at that point specific +# config options need to be added to keep a particular set. +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 autotune corectl hdb rtnet nomaccfg rtcfg rtifconfig \ + rtiwconfig rtping rtroute tdmacfg rtps slackspot version; do \ + rm -f $(TARGET_DIR)/usr/sbin/$$i ; \ + done endef -XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DEVFILES +XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_UNNEEDED_FILES ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),) define XENOMAI_REMOVE_TESTSUITE
Signature · 1 line
2.10.2
PATCH 8/9 xenomai: add support for registry
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Add a config option to enable the Xenomai registry, which allows accessing internal Xenomai state.
--- package/xenomai/Config.in | 20 ++++++++++++++++++++ package/xenomai/xenomai.mk | 7 +++++++ 2 files changed, 27 insertions(+)
package/xenomai/Config.in +20 -0
@@ -96,6 +96,26 @@ config BR2_PACKAGE_XENOMAI_ENABLE_SMP http://xenomai.org/troubleshooting-a-dual-kernel-configuration/#feature_mismatch_missing8221smpnosmp8221 +config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY + bool "Enable registry" + select BR2_PACKAGE_LIBFUSE + depends on !BR2_STATIC_LIBS # libfuse + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse + help + Xenomai APIs can export their internal state through a + pseudo-filesystem, whose files may be read to obtain information about + the existing real-time objects, such as tasks, semaphores, message + queues and so on. + +config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH + string "Custom registry root path" + depends on BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY + help + Specify the root path of the registry here. + To use the Xenomai default (currently: /var/run/xenomai), leave this + option empty. + config BR2_PACKAGE_XENOMAI_TESTSUITE bool "Install testsuite" help
package/xenomai/xenomai.mk +7 -0
@@ -45,6 +45,13 @@ else XENOMAI_CONF_OPTS += --disable-smp endif +ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY),y) +XENOMAI_DEPENDENCIES += libfuse +XENOMAI_CONF_OPTS += --enable-registry$(if $(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH)),=$(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH))) +else +XENOMAI_CONF_OPTS += --disable-registry +endif + # Some of these files may be desired by some users -- at that point specific # config options need to be added to keep a particular set. define XENOMAI_REMOVE_UNNEEDED_FILES
Signature · 1 line
2.10.2
PATCH 9/9 xenomai: add string option for additional configure options
In reply to Thomas De SchampheleireFrom: Thomas De Schampheleire <[email protected]>
Xenomai has many configure options that users may or may not want to set. Providing individual Buildroot config options for every single one of them is not maintainable.
Therefore, add a string option to allow the needed flexibility. Important options, or those that have 'select/depends on' impact, can still be turned into real Buildroot config options.
--- package/xenomai/Config.in | 6 ++++++ package/xenomai/xenomai.mk | 2 ++ 2 files changed, 8 insertions(+)
package/xenomai/Config.in +6 -0
@@ -116,6 +116,12 @@ config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH To use the Xenomai default (currently: /var/run/xenomai), leave this option empty. +config BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS + string "Additional configure options" + help + Specify any additional options to pass to the configure script here. + See Xenomai documentation for details. + config BR2_PACKAGE_XENOMAI_TESTSUITE bool "Install testsuite" help
package/xenomai/xenomai.mk +2 -0
@@ -52,6 +52,8 @@ else XENOMAI_CONF_OPTS += --disable-registry endif +XENOMAI_CONF_OPTS += $(call qstrip,$(BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS)) + # Some of these files may be desired by some users -- at that point specific # config options need to be added to keep a particular set. define XENOMAI_REMOVE_UNNEEDED_FILES
Signature · 1 line
2.10.2
cover xenomai 3.x fixups and extra config options
In reply to Thomas De SchampheleireHello,
Quoted 10 lines · Thomas De Schampheleire
Thomas De Schampheleire (9):
xenomai: updateLICENSE_FILES
xenomai: native skin is now called alchemy
xenomai: group skin selection in separate menu and cleanup
xenomai: add option for Smokey skin
xenomai: update list of Analogy installed files
xenomai: update list of testsuite files
xenomai: restrict installed files further
xenomai: add support for registry
xenomai: add string option for additional configure options
I've applied the entire series, with some changes on PATCH 8/9 and 9/9. I'll reply to the patches themselves.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 8/9 xenomai: add support for registry
In reply to Thomas De SchampheleireHello,
package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_ENABLE_SMP · line 104
Quoted 6 lines · Thomas De Schampheleire
package/xenomai/Config.in +6
-0+config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY + bool "Enable registry" + select BR2_PACKAGE_LIBFUSE + depends on !BR2_STATIC_LIBS # libfuse + depends on BR2_TOOLCHAIN_HAS_THREADS # libfuse + depends on BR2_USE_MMU # libfuse
Some "depends on" -> a Config.in comment is needed, so I've added one.
package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_ENABLE_SMP · line 107
Quoted 3 lines
package/xenomai/Config.in +3
-0+ help + Xenomai APIs can export their internal state through a + pseudo-filesystem, whose files may be read to obtain information about
Line too long. Please run check-package! :-)
package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_ENABLE_SMP · line 116
Quoted 2 lines
package/xenomai/Config.in +2
-0+ Specify the root path of the registry here. + To use the Xenomai default (currently: /var/run/xenomai), leave this
Line too long. Please run check-package! :-)
package/xenomai/xenomai.mk else · line 50
Quoted 3 lines
package/xenomai/xenomai.mk +3
-0+ifeq ($(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY),y) +XENOMAI_DEPENDENCIES += libfuse +XENOMAI_CONF_OPTS += --enable-registry$(if $(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH)),=$(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH)))
Gah, this is really not pretty. I've changed this to:
XENOMAI_REGISTRY_PATH = $(call qstrip,$(BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH)) ifeq ($(XENOMAI_REGISTRY_PATH),)XENOMAI_CONF_OPTS += --enable-registry
elseXENOMAI_CONF_OPTS += --enable-registry=$(XENOMAI_REGISTRY_PATH)
endif
which I believe is a lot more readable.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
PATCH 9/9 xenomai: add string option for additional configure options
In reply to Thomas De SchampheleireHello,
package/xenomai/Config.in config BR2_PACKAGE_XENOMAI_ENABLE_REGISTRY_PATH · line 122
Quoted 4 lines · Thomas De Schampheleire
package/xenomai/Config.in +4
-0+config BR2_PACKAGE_XENOMAI_ADDITIONAL_CONF_OPTS + string "Additional configure options" + help + Specify any additional options to pass to the configure script here.
Line too long. Please use check-package! :-)
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com
cover xenomai 3.x fixups and extra config options
In reply to Thomas Petazzoni2017-04-20 23:11 GMT+02:00 Thomas Petazzoni
<[email protected]>:
Quoted 15 lines
Hello,
Quoted 10 lines · Thomas De Schampheleire
Thomas De Schampheleire (9):
xenomai: updateLICENSE_FILES
xenomai: native skin is now called alchemy
xenomai: group skin selection in separate menu and cleanup
xenomai: add option for Smokey skin
xenomai: update list of Analogy installed files
xenomai: update list of testsuite files
xenomai: restrict installed files further
xenomai: add support for registry
xenomai: add string option for additional configure options
Quoted 2 lines
I've applied the entire series, with some changes on PATCH 8/9 and 9/9. I'll reply to the patches themselves.
Thanks!
Sorry about the line lengths, I'm used to 80 character limits and didn't realize a different limit is used here, nor was I already used to using checkpackage. I'll remember it for next time!
Best regards,
Thomas