* [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories
@ 2013-01-09 13:47 Jan Kiszka
2013-01-12 17:12 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2013-01-09 13:47 UTC (permalink / raw)
To: Xenomai
Only remove files from the target directory of patch_link if they are
missing in Xenomai AND are actually symbolic links. This is required
when merging Xenomai directories into non-empty kernel dirs.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
This is not required for the current patch workload but helps us in 2.6
with integrating ftrace (we patch into include/trace/events there).
Would reduce our queue length by one if this could be merged
nevertheless.
scripts/prepare-kernel.sh | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/scripts/prepare-kernel.sh b/scripts/prepare-kernel.sh
index 36f9a4a..5f4043a 100755
--- a/scripts/prepare-kernel.sh
+++ b/scripts/prepare-kernel.sh
@@ -103,7 +103,7 @@ patch_link() {
find . $recursive_opt \( $directorytype_opt \
$link_makefiles_opt -name $config_file -o -name '*.[chS]' \) |
while read f; do
- if test ! -e $xenomai_root/$target_dir/$f; then rm -Rf $f; fi
+ if test -L $f -a ! -e $xenomai_root/$target_dir/$f; then rm -Rf $f; fi
done
fi
--
1.7.3.4
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories
2013-01-09 13:47 [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories Jan Kiszka
@ 2013-01-12 17:12 ` Gilles Chanteperdrix
2013-01-13 11:17 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2013-01-12 17:12 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
On 01/09/2013 02:47 PM, Jan Kiszka wrote:
> Only remove files from the target directory of patch_link if they are
> missing in Xenomai AND are actually symbolic links. This is required
> when merging Xenomai directories into non-empty kernel dirs.
>
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>
> This is not required for the current patch workload but helps us in 2.6
> with integrating ftrace (we patch into include/trace/events there).
> Would reduce our queue length by one if this could be merged
> nevertheless.
Despite the fact that it is a one-liner, I do not understand what this
patch does, and I am not sure it is not going to break things.
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories
2013-01-12 17:12 ` Gilles Chanteperdrix
@ 2013-01-13 11:17 ` Jan Kiszka
2013-01-13 11:50 ` Gilles Chanteperdrix
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2013-01-13 11:17 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai
On 2013-01-12 18:12, Gilles Chanteperdrix wrote:
> On 01/09/2013 02:47 PM, Jan Kiszka wrote:
>
>> Only remove files from the target directory of patch_link if they are
>> missing in Xenomai AND are actually symbolic links. This is required
>> when merging Xenomai directories into non-empty kernel dirs.
>>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>
>> This is not required for the current patch workload but helps us in 2.6
>> with integrating ftrace (we patch into include/trace/events there).
>> Would reduce our queue length by one if this could be merged
>> nevertheless.
>
>
> Despite the fact that it is a one-liner, I do not understand what this
> patch does, and I am not sure it is not going to break things.
One way to install Xenomai into a kernel source tree is by adding
symbolic links to the individual source files. In preparation of this
step, the prepare-kernel script first purges all files from affected
directories that are not present in the Xenomai sources (anymore). That
works fine for our current Xenomai dirs as they are exclusively used but
fails once we have to patch dirs that are also used by the original
kernel (like the cited trace event dir).
This patch addresses the issue by only purging symbolic links, not
regular files. We will also need it in forge once we add ftrace support
over there.
HTH,
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130113/ffd0ce13/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories
2013-01-13 11:17 ` Jan Kiszka
@ 2013-01-13 11:50 ` Gilles Chanteperdrix
2013-01-13 11:54 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: Gilles Chanteperdrix @ 2013-01-13 11:50 UTC (permalink / raw)
To: Jan Kiszka; +Cc: Xenomai
On 01/13/2013 12:17 PM, Jan Kiszka wrote:
> On 2013-01-12 18:12, Gilles Chanteperdrix wrote:
>> On 01/09/2013 02:47 PM, Jan Kiszka wrote:
>>
>>> Only remove files from the target directory of patch_link if they are
>>> missing in Xenomai AND are actually symbolic links. This is required
>>> when merging Xenomai directories into non-empty kernel dirs.
>>>
>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>> ---
>>>
>>> This is not required for the current patch workload but helps us in 2.6
>>> with integrating ftrace (we patch into include/trace/events there).
>>> Would reduce our queue length by one if this could be merged
>>> nevertheless.
>>
>>
>> Despite the fact that it is a one-liner, I do not understand what this
>> patch does, and I am not sure it is not going to break things.
>
> One way to install Xenomai into a kernel source tree is by adding
> symbolic links to the individual source files. In preparation of this
> step, the prepare-kernel script first purges all files from affected
> directories that are not present in the Xenomai sources (anymore). That
> works fine for our current Xenomai dirs as they are exclusively used but
> fails once we have to patch dirs that are also used by the original
> kernel (like the cited trace event dir).
The thing I do not understand is why Xenomai would patch the trace event
dir? This is the I-pipe's job.
--
Gilles.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories
2013-01-13 11:50 ` Gilles Chanteperdrix
@ 2013-01-13 11:54 ` Jan Kiszka
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kiszka @ 2013-01-13 11:54 UTC (permalink / raw)
To: Gilles Chanteperdrix; +Cc: Xenomai
On 2013-01-13 12:50, Gilles Chanteperdrix wrote:
> On 01/13/2013 12:17 PM, Jan Kiszka wrote:
>
>> On 2013-01-12 18:12, Gilles Chanteperdrix wrote:
>>> On 01/09/2013 02:47 PM, Jan Kiszka wrote:
>>>
>>>> Only remove files from the target directory of patch_link if they are
>>>> missing in Xenomai AND are actually symbolic links. This is required
>>>> when merging Xenomai directories into non-empty kernel dirs.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>> ---
>>>>
>>>> This is not required for the current patch workload but helps us in 2.6
>>>> with integrating ftrace (we patch into include/trace/events there).
>>>> Would reduce our queue length by one if this could be merged
>>>> nevertheless.
>>>
>>>
>>> Despite the fact that it is a one-liner, I do not understand what this
>>> patch does, and I am not sure it is not going to break things.
>>
>> One way to install Xenomai into a kernel source tree is by adding
>> symbolic links to the individual source files. In preparation of this
>> step, the prepare-kernel script first purges all files from affected
>> directories that are not present in the Xenomai sources (anymore). That
>> works fine for our current Xenomai dirs as they are exclusively used but
>> fails once we have to patch dirs that are also used by the original
>> kernel (like the cited trace event dir).
>
>
> The thing I do not understand is why Xenomai would patch the trace event
> dir? This is the I-pipe's job.
Xenomai has to deliver its own trace event headers to be recognized by
ftrace, see e.g. my old ftrace patch:
http://git.xenomai.org/?p=xenomai-jki.git;a=commitdiff;h=66c011b0de4cc4bd0bc50b521308aad13f53ec21
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 261 bytes
Desc: OpenPGP digital signature
URL: <http://www.xenomai.org/pipermail/xenomai/attachments/20130113/b2d55133/attachment.pgp>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-01-13 11:54 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-09 13:47 [Xenomai] [PATCH] prepare-kernel: Only purge links from target directories Jan Kiszka
2013-01-12 17:12 ` Gilles Chanteperdrix
2013-01-13 11:17 ` Jan Kiszka
2013-01-13 11:50 ` Gilles Chanteperdrix
2013-01-13 11:54 ` Jan Kiszka
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.