Skip to contentSkip to conversation

linux: let to work with xenomai in override mode

RFC PATCH New Michael Trimarchi 3 participants 5 messages Sep 12, 2018 – Oct 28, 2018

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 linux: let to work with xenomai in override mode

We would like to patch xenomai in override mode. Xenomai create symlink in order to build the kernel and those links are absolute one. The adeos patch is not applied if it is found so we can change the connect hook from PRE_PATCH to PRE_CONFIGURE. The xenomi dependence should be explicit set

Change-Id Idc5189047451bb9ac3019d3f35674d5332159918
---
 linux/linux.mk | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
linux/linux.mk +5 -1
index 675e790..2303923 100644
@@ -351,6 +351,10 @@ define LINUX_KCONFIG_FIXUP_CMDS
 		$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))
 endef
 
+ifneq ($(BR2_LINUX_KERNEL_EXT_XENOMAI_ADEOS_PATCH),)
+LINUX_DEPENDENCIES += xenomai
+endif
+
 ifeq ($(BR2_LINUX_KERNEL_DTS_SUPPORT),y)
 # Starting with 4.17, the generated dtc parser code is no longer
 # shipped with the kernel sources, so we need flex and bison. For
@@ -485,7 +489,7 @@ include $(sort $(wildcard linux/linux-ext-*.mk))
 LINUX_PATCH_DEPENDENCIES += $(foreach ext,$(LINUX_EXTENSIONS),\
 	$(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),$(ext)))
 
-LINUX_PRE_PATCH_HOOKS += $(foreach ext,$(LINUX_EXTENSIONS),\
+LINUX_PRE_CONFIGURE_HOOKS += $(foreach ext,$(LINUX_EXTENSIONS),\
 	$(if $(BR2_LINUX_KERNEL_EXT_$(call UPPERCASE,$(ext))),\
 		$(call UPPERCASE,$(ext))_PREPARE_KERNEL))
 
Signature · 1 line
2.7.4
#1 lore raw

RFC PATCH 1/1 linux: let to work with xenomai in override mode

Hello,

Quoted 8 lines · Michael Trimarchi

We would like to patch xenomai in override mode. Xenomai create symlink in order to build the kernel and those links are absolute one. The adeos patch is not applied if it is found so we can change the connect hook from PRE_PATCH to PRE_CONFIGURE. The xenomi dependence should be explicit set

Change-Id Idc5189047451bb9ac3019d3f35674d5332159918

As I explained in our previous e-mail discussion, when you use <pkg>_OVERRIDE_SRCDIR, you should handle any needed patching yourself.

Doing what you suggest here means that all patches from Linux kernel extensions will be applied in the configure step, which is:

(1) Contrary to common sense: why should patching happen outside of the patching step ?

(2) Completely inconsistent with what happens in all other packages that use <pkg>_OVERRIDE_SRCDIR.

(3) Inconsistent with the initial principle of <pkg>_OVERRIDE_SRCDIR, which is that the user *controls* the source code, and Buildroot will not touch it all.

Best regards,

Thomas

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

RFC PATCH 1/1 linux: let to work with xenomai in override mode

Hi Thomas

Quoted 13 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Michael Trimarchi

We would like to patch xenomai in override mode. Xenomai create symlink in order to build the kernel and those links are absolute one. The adeos patch is not applied if it is found so we can change the connect hook from PRE_PATCH to PRE_CONFIGURE. The xenomi dependence should be explicit set

Change-Id Idc5189047451bb9ac3019d3f35674d5332159918
Quoted 9 lines

As I explained in our previous e-mail discussion, when you use <pkg>_OVERRIDE_SRCDIR, you should handle any needed patching yourself.

Doing what you suggest here means that all patches from Linux kernel extensions will be applied in the configure step, which is:

(1) Contrary to common sense: why should patching happen outside of the patching step ?

Xenomai create symlinks, and it's not only a patch by provide links to the package. Adeos
patch xenomai but another part is connect to those symlinks. Now you can not let to have
a complete developement project without move this is a patching step. Xenomai check if the
patch applied correspond to the one that you are going to apply and if they are the same
the symlink are created.

Now suppose to have a manifest and repo describe your buildroot project and your override
and you want to have the kernel already patched but with symlink not created. I don't going to
git commit symlink but I want them created automatic.

Is now more clear?

Michael

Quoted 14 lines

(2) Completely inconsistent with what happens in all other packages that use <pkg>_OVERRIDE_SRCDIR.

(3) Inconsistent with the initial principle of <pkg>_OVERRIDE_SRCDIR, which is that the user *controls* the source code, and Buildroot will not touch it all.

Best regards,

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

Signature · 4 lines
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |
#3 lore raw

RFC PATCH 1/1 linux: let to work with xenomai in override mode

Hi Michael,

Quoted 37 lines · Michael Nazzareno Trimarchi

Hi Thomas

Quoted 13 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Michael Trimarchi

We would like to patch xenomai in override mode. Xenomai create symlink in order to build the kernel and those links are absolute one. The adeos patch is not applied if it is found so we can change the connect hook from PRE_PATCH to PRE_CONFIGURE. The xenomi dependence should be explicit set

Change-Id Idc5189047451bb9ac3019d3f35674d5332159918
Quoted 9 lines

As I explained in our previous e-mail discussion, when you use <pkg>_OVERRIDE_SRCDIR, you should handle any needed patching yourself.

Doing what you suggest here means that all patches from Linux kernel extensions will be applied in the configure step, which is:

(1) Contrary to common sense: why should patching happen outside of the patching step ?

Xenomai create symlinks, and it's not only a patch by provide links to the package. Adeos
patch xenomai but another part is connect to those symlinks. Now you can not let to have
a complete developement project without move this is a patching step. Xenomai check if the
patch applied correspond to the one that you are going to apply and if they are the same
the symlink are created.

Quoted 7 lines

Now suppose to have a manifest and repo describe your buildroot project and your override
and you want to have the kernel already patched but with symlink not created. I don't going to
git commit symlink but I want them created automatic.

Is now more clear?

Your intention is fairly clear, but we still disagree :-)

The problem is that when you have an OVERRIDE_SRCDIR (or local site method), it
is impossible for Buildroot to know what you intend to do with each patching step. One person may already have the adeos stuff applied in their repo, another one may not.

To be consistent, we have chosen to never do any patching when OVERRIDE_SRCDIR
is used. Whatever the patching step is doing, you can always do that manually, either in a script that is called before running Buildroot, or just committing the patched/modified/symlinked tree into your repo.

In case of the Adeos patch, it is not even a problem to do it this way, because
Xenomai is fairly independent of the Adeos patch (i.e. you can have a different version of the Adeos patch and Xenomai usually still works).

Therefore, we've marked your patch as Rejected in patchwork.

Regards,
Arnout

#4 lore raw

RFC PATCH 1/1 linux: let to work with xenomai in override mode

Hi

Quoted 46 lines · Arnout Vandecappelle,

Hi Michael,

Quoted 43 lines · Michael Nazzareno Trimarchi

Hi Thomas

Quoted 13 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Michael Trimarchi

We would like to patch xenomai in override mode. Xenomai create symlink in order to build the kernel and those links are absolute one. The adeos patch is not applied if it is found so we can change the connect hook from PRE_PATCH to PRE_CONFIGURE. The xenomi dependence should be explicit set

Change-Id Idc5189047451bb9ac3019d3f35674d5332159918
Quoted 9 lines

As I explained in our previous e-mail discussion, when you use <pkg>_OVERRIDE_SRCDIR, you should handle any needed patching yourself.

Doing what you suggest here means that all patches from Linux kernel extensions will be applied in the configure step, which is:

(1) Contrary to common sense: why should patching happen outside of the patching step ?

Xenomai create symlinks, and it's not only a patch by provide links to the package. Adeos
patch xenomai but another part is connect to those symlinks. Now you can not let to have
a complete developement project without move this is a patching step. Xenomai check if the
patch applied correspond to the one that you are going to apply and if they are the same
the symlink are created.

Now suppose to have a manifest and repo describe your buildroot project and your override
and you want to have the kernel already patched but with symlink not created. I don't going to
git commit symlink but I want them created automatic.

Quoted 4 lines
Quoted 1 line

Is now more clear?

Your intention is fairly clear, but we still disagree :-)

No problem. Right now I'm using buildroot as an element on more complex bsp build where is a part of continue integration process connected to repo and multi project. Even the patch was having a minor problem. I will keep only on my private tree

Thanks for kind answer

Michael

Quoted 23 lines

The problem is that when you have an OVERRIDE_SRCDIR (or local site
method), it
is impossible for Buildroot to know what you intend to do with each patching
step. One person may already have the adeos stuff applied in their repo, another
one may not.

To be consistent, we have chosen to never do any patching when
OVERRIDE_SRCDIR
is used. Whatever the patching step is doing, you can always do that manually,
either in a script that is called before running Buildroot, or just committing
the patched/modified/symlinked tree into your repo.

In case of the Adeos patch, it is not even a problem to do it this way,
because
Xenomai is fairly independent of the Adeos patch (i.e. you can have a different
version of the Adeos patch and Xenomai usually still works).

Quoted 5 lines

Therefore, we've marked your patch as Rejected in patchwork.

Regards,
Arnout

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