* [Buildroot] [PATCH 1/5] package: add a PRE_PATCH_HOOKS hook point
2011-09-19 20:10 [Buildroot] [pull request] Pull request for branch for-2011.11/xeno-rtai-fixes Thomas Petazzoni
@ 2011-09-19 20:10 ` Thomas Petazzoni
2011-09-20 20:17 ` Peter Korsgaard
2011-09-19 20:10 ` [Buildroot] [PATCH 2/5] rtai, xenomai: use the pre patch " Thomas Petazzoni
` (3 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 20:10 UTC (permalink / raw)
To: buildroot
This will be useful to integrate Xenomai and RTAI into Buildroot, so
that they can patch the kernel before the normal patching process
starts.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/Makefile.package.in | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/package/Makefile.package.in b/package/Makefile.package.in
index 66be0a2..e2d0e28 100644
--- a/package/Makefile.package.in
+++ b/package/Makefile.package.in
@@ -259,6 +259,7 @@ $(BUILD_DIR)/%/.stamp_extracted:
$(BUILD_DIR)/%/.stamp_patched: NAMEVER = $(RAWNAME)-$($(PKG)_VERSION)
$(BUILD_DIR)/%/.stamp_patched:
@$(call MESSAGE,"Patching $($(PKG)_DIR_PREFIX)/$(RAWNAME)")
+ $(foreach hook,$($(PKG)_PRE_PATCH_HOOKS),$(call $(hook))$(sep))
$(if $($(PKG)_PATCH),support/scripts/apply-patches.sh $(@D) $(DL_DIR) $($(PKG)_PATCH))
$(Q)( \
if test -d $($(PKG)_DIR_PREFIX)/$(RAWNAME); then \
@@ -443,6 +444,7 @@ $(2)_EXTRACT_CMDS ?= \
# post-steps hooks
$(2)_POST_DOWNLOAD_HOOKS ?=
$(2)_POST_EXTRACT_HOOKS ?=
+$(2)_PRE_PATCH_HOOKS ?=
$(2)_POST_PATCH_HOOKS ?=
$(2)_PRE_CONFIGURE_HOOKS ?=
$(2)_POST_CONFIGURE_HOOKS ?=
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 2/5] rtai, xenomai: use the pre patch hook point
2011-09-19 20:10 [Buildroot] [pull request] Pull request for branch for-2011.11/xeno-rtai-fixes Thomas Petazzoni
2011-09-19 20:10 ` [Buildroot] [PATCH 1/5] package: add a PRE_PATCH_HOOKS hook point Thomas Petazzoni
@ 2011-09-19 20:10 ` Thomas Petazzoni
2011-09-20 20:18 ` Peter Korsgaard
2011-09-19 20:10 ` [Buildroot] [PATCH 3/5] rtai: fix path to apply-patches Thomas Petazzoni
` (2 subsequent siblings)
4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 20:10 UTC (permalink / raw)
To: buildroot
The post extract hook point is not really correct as what RTAI and
Xenomai extensions are doing is patching the kernel.
The post patch hook point doesn't work, because RTAI and Xenomai
patches would be applied *after* all other patches, while it sounds
more logical to apply them first, and *then* allow the user to apply
some platform/board specific patches if needed.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
linux/linux-ext-rtai.mk | 2 +-
linux/linux-ext-xenomai.mk | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux/linux-ext-rtai.mk b/linux/linux-ext-rtai.mk
index a54230d..150f9e8 100644
--- a/linux/linux-ext-rtai.mk
+++ b/linux/linux-ext-rtai.mk
@@ -42,6 +42,6 @@ define RTAI_PREPARE_KERNEL
endef
endif
-LINUX_POST_PATCH_HOOKS += RTAI_PREPARE_KERNEL
+LINUX_PRE_PATCH_HOOKS += RTAI_PREPARE_KERNEL
endif #BR2_LINUX_EXT_RTAI
diff --git a/linux/linux-ext-xenomai.mk b/linux/linux-ext-xenomai.mk
index e855ded..9b6772e 100644
--- a/linux/linux-ext-xenomai.mk
+++ b/linux/linux-ext-xenomai.mk
@@ -25,6 +25,6 @@ define XENOMAI_PREPARE_KERNEL
--verbose
endef
-LINUX_POST_EXTRACT_HOOKS += XENOMAI_PREPARE_KERNEL
+LINUX_PRE_PATCH_HOOKS += XENOMAI_PREPARE_KERNEL
endif #BR2_LINUX_EXT_XENOMAI
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 2/5] rtai, xenomai: use the pre patch hook point
2011-09-19 20:10 ` [Buildroot] [PATCH 2/5] rtai, xenomai: use the pre patch " Thomas Petazzoni
@ 2011-09-20 20:18 ` Peter Korsgaard
0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2011-09-20 20:18 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> The post extract hook point is not really correct as what RTAI and
Thomas> Xenomai extensions are doing is patching the kernel.
Thomas> The post patch hook point doesn't work, because RTAI and Xenomai
Thomas> patches would be applied *after* all other patches, while it sounds
Thomas> more logical to apply them first, and *then* allow the user to apply
Thomas> some platform/board specific patches if needed.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 3/5] rtai: fix path to apply-patches
2011-09-19 20:10 [Buildroot] [pull request] Pull request for branch for-2011.11/xeno-rtai-fixes Thomas Petazzoni
2011-09-19 20:10 ` [Buildroot] [PATCH 1/5] package: add a PRE_PATCH_HOOKS hook point Thomas Petazzoni
2011-09-19 20:10 ` [Buildroot] [PATCH 2/5] rtai, xenomai: use the pre patch " Thomas Petazzoni
@ 2011-09-19 20:10 ` Thomas Petazzoni
2011-09-20 20:18 ` Peter Korsgaard
2011-09-19 20:10 ` [Buildroot] [PATCH 4/5] rtai: Install modules in /lib/modules/<version>/rtai Thomas Petazzoni
2011-09-19 20:10 ` [Buildroot] [PATCH 5/5] xenomai: install in /usr Thomas Petazzoni
4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 20:10 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
linux/linux-ext-rtai.mk | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/linux/linux-ext-rtai.mk b/linux/linux-ext-rtai.mk
index 150f9e8..78488af 100644
--- a/linux/linux-ext-rtai.mk
+++ b/linux/linux-ext-rtai.mk
@@ -25,7 +25,7 @@ ifeq ($(RTAI_PATCH),)
define RTAI_PREPARE_KERNEL
kver=`$(MAKE) $(LINUX_MAKE_FLAGS) -C $(LINUX_DIR) --no-print-directory -s kernelversion` ; \
if test -f $(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/hal-linux-$${kver}-*patch ; then \
- support/script/apply-patches.sh $(LINUX_DIR) \
+ support/scripts/apply-patches.sh $(LINUX_DIR) \
$(RTAI_DIR)/base/arch/$(RTAI_ARCH)/patches/ \
hal-linux-$${kver}-*patch ; \
else \
@@ -35,7 +35,7 @@ define RTAI_PREPARE_KERNEL
endef
else
define RTAI_PREPARE_KERNEL
- support/script/apply-patches.sh \
+ support/scripts/apply-patches.sh \
$(LINUX_DIR) \
$(dir $(RTAI_PATCH)) \
$(notdir $(RTAI_PATCH))
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 4/5] rtai: Install modules in /lib/modules/<version>/rtai
2011-09-19 20:10 [Buildroot] [pull request] Pull request for branch for-2011.11/xeno-rtai-fixes Thomas Petazzoni
` (2 preceding siblings ...)
2011-09-19 20:10 ` [Buildroot] [PATCH 3/5] rtai: fix path to apply-patches Thomas Petazzoni
@ 2011-09-19 20:10 ` Thomas Petazzoni
2011-09-20 20:19 ` Peter Korsgaard
2011-09-19 20:10 ` [Buildroot] [PATCH 5/5] xenomai: install in /usr Thomas Petazzoni
4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 20:10 UTC (permalink / raw)
To: buildroot
The /lib/modules/<version>/kernel/ is completely rewritten by the
kernel module installation, so third party modules should be outside
of this directory.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/rtai/rtai.mk | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/package/rtai/rtai.mk b/package/rtai/rtai.mk
index abba614..a4a69f9 100644
--- a/package/rtai/rtai.mk
+++ b/package/rtai/rtai.mk
@@ -8,7 +8,7 @@ RTAI_CONF_OPT = \
--with-linux-dir=$(LINUX_DIR) \
--disable-leds \
--disable-rtailab \
- --with-module-dir=/lib/modules/$(LINUX_VERSION_PROBED)/kernel/rtai
+ --with-module-dir=/lib/modules/$(LINUX_VERSION_PROBED)/rtai
RTAI_MAKE = $(MAKE1)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 5/5] xenomai: install in /usr
2011-09-19 20:10 [Buildroot] [pull request] Pull request for branch for-2011.11/xeno-rtai-fixes Thomas Petazzoni
` (3 preceding siblings ...)
2011-09-19 20:10 ` [Buildroot] [PATCH 4/5] rtai: Install modules in /lib/modules/<version>/rtai Thomas Petazzoni
@ 2011-09-19 20:10 ` Thomas Petazzoni
2011-09-20 20:20 ` Peter Korsgaard
4 siblings, 1 reply; 11+ messages in thread
From: Thomas Petazzoni @ 2011-09-19 20:10 UTC (permalink / raw)
To: buildroot
By default, Xenomai installs everything with --prefix=/usr/xenomai,
and passing --prefix=/usr doesn't work because installing Xenomai
headers in /usr/include creates conflicts with other headers. However,
passing --prefix=/usr and --includedir=/usr/include/xenomai just works
fine. This allows to use the default configure command of the
AUTOTARGETS infrastructure, and allows to install the Xenomai headers
and libraries into more usual locations. Furthermore, it allows to
remove the documentation/headers removal hooks, as well as the
ld.so.conf hook since now everything is installed in standard
locations.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
package/xenomai/xenomai.mk | 54 +++++++++-----------------------------------
1 files changed, 11 insertions(+), 43 deletions(-)
diff --git a/package/xenomai/xenomai.mk b/package/xenomai/xenomai.mk
index 52e0b4e..d2306c4 100644
--- a/package/xenomai/xenomai.mk
+++ b/package/xenomai/xenomai.mk
@@ -28,34 +28,12 @@ ifeq ($(BR2_PACKAGE_XENOMAI_SMP),y)
XENOMAI_CONF_OPT += --enable-smp
endif
-# The configure step needs to be overloaded, because Xenomai doesn't
-# support --prefix=/usr and the autotargets infrastructure enforces
-# this.
-define XENOMAI_CONFIGURE_CMDS
- (cd $(@D); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- CCFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
- ./configure \
- $(XENOMAI_CONF_OPT) \
- --host=$(GNU_TARGET_NAME) \
- )
-endef
-
-ifeq ($(BR2_HAVE_DOCUMENTATION),)
-define XENOMAI_REMOVE_DOCUMENTATION
- rm -rf $(TARGET_DIR)/usr/xenomai/share/doc
- rm -rf $(TARGET_DIR)/usr/xenomai/share/man
-endef
-
-XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_DOCUMENTATION
-endif
+XENOMAI_CONF_OPT += --includedir=/usr/include/xenomai/
ifeq ($(BR2_HAVE_DEVFILES),)
define XENOMAI_REMOVE_DEVFILES
- rm -rf $(TARGET_DIR)/usr/xenomai/include
for i in xeno-config xeno-info wrap-link.sh ; do \
- rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+ rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
endef
@@ -64,15 +42,13 @@ endif
ifeq ($(BR2_PACKAGE_XENOMAI_TESTSUITE),)
define XENOMAI_REMOVE_TESTSUITE
- rm -rf $(TARGET_DIR)/usr/xenomai/share/xenomai/testsuite/
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/xenomai/share/xenomai/
- rmdir --ignore-fail-on-non-empty $(TARGET_DIR)/usr/xenomai/share/
+ 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 \
- rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+ rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
endef
@@ -82,9 +58,9 @@ endif
ifeq ($(BR2_PACKAGE_XENOMAI_RTCAN),)
define XENOMAI_REMOVE_RTCAN_PROGS
for i in rtcanrecv rtcansend ; do \
- rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+ rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
- rm -f $(TARGET_DIR)/usr/xenomai/sbin/rtcanconfig
+ rm -f $(TARGET_DIR)/usr/sbin/rtcanconfig
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_RTCAN_PROGS
@@ -94,10 +70,10 @@ 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 \
- rm -f $(TARGET_DIR)/usr/xenomai/bin/$$i ; \
+ rm -f $(TARGET_DIR)/usr/bin/$$i ; \
done
- rm -f $(TARGET_DIR)/usr/xenomai/sbin/analogy_config
- rm -f $(TARGET_DIR)/usr/xenomai/lib/libanalogy.*
+ rm -f $(TARGET_DIR)/usr/sbin/analogy_config
+ rm -f $(TARGET_DIR)/usr/lib/libanalogy.*
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_ANALOGY
@@ -113,23 +89,15 @@ XENOMAI_REMOVE_SKIN_LIST += $(if $(BR2_PACKAGE_XENOMAI_VRTX_SKIN),,vrtx)
define XENOMAI_REMOVE_SKINS
for i in $(XENOMAI_REMOVE_SKIN_LIST) ; do \
- rm -f $(TARGET_DIR)/usr/xenomai/lib/lib$$i.* ; \
+ rm -f $(TARGET_DIR)/usr/lib/lib$$i.* ; \
if [ $$i == "posix" ] ; then \
- rm -f $(TARGET_DIR)/usr/xenomai/lib/posix.wrappers ; \
+ rm -f $(TARGET_DIR)/usr/lib/posix.wrappers ; \
fi ; \
done
endef
XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_REMOVE_SKINS
-define XENOMAI_ADD_LD_SO_CONF
- # Add /usr/xenomai/lib in the library search path
- grep -q "^/usr/xenomai/lib" $(TARGET_DIR)/etc/ld.so.conf || \
- echo "/usr/xenomai/lib" >> $(TARGET_DIR)/etc/ld.so.conf
-endef
-
-XENOMAI_POST_INSTALL_TARGET_HOOKS += XENOMAI_ADD_LD_SO_CONF
-
# If you use static /dev creation don't forget to update your
# device_table_dev.txt
ifeq ($(BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_UDEV),y)
--
1.7.4.1
^ permalink raw reply related [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 5/5] xenomai: install in /usr
2011-09-19 20:10 ` [Buildroot] [PATCH 5/5] xenomai: install in /usr Thomas Petazzoni
@ 2011-09-20 20:20 ` Peter Korsgaard
0 siblings, 0 replies; 11+ messages in thread
From: Peter Korsgaard @ 2011-09-20 20:20 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:
Thomas> By default, Xenomai installs everything with --prefix=/usr/xenomai,
Thomas> and passing --prefix=/usr doesn't work because installing Xenomai
Thomas> headers in /usr/include creates conflicts with other headers. However,
Thomas> passing --prefix=/usr and --includedir=/usr/include/xenomai just works
Thomas> fine. This allows to use the default configure command of the
Thomas> AUTOTARGETS infrastructure, and allows to install the Xenomai headers
Thomas> and libraries into more usual locations. Furthermore, it allows to
Thomas> remove the documentation/headers removal hooks, as well as the
Thomas> ld.so.conf hook since now everything is installed in standard
Thomas> locations.
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 11+ messages in thread