Re: [Xenomai-core] prepare-kernel options

2007-02-28 Thread Jan Kiszka
Paul wrote:
> On Wednesday 28 February 2007 13:02, Jan Kiszka wrote:
> 
>> [Related question from my side:]
>>
>> Would you be willing to provide debian package generation rules for
>> Xenomai? Something that would spit out .deb files when calling, say,
>> "make deb KERNEL=linux-2.6.x.tar.bz2 CONFIG=my-kernel-config" in a
>> configured userland build directory? That way we could automatise binary
>> package generation for kernel, user libs, development headers, and
>> documentation. And that would allow us to finally distribute them for
>> generic targets like x86 and x86_64 along with the usual tar files.
> 
> To have a Debian rule set is indeed my ultimate goal (but I wouldn't want t 
> tread on anyone's toes if it is already in hand). - I suspect a number of 

Romain once worked on this. Don't know what happened to his effort, if
something might be reusable or so. I CC'ed him.

> potential users would like to try Xenomai but are put off by kernel 
> compilation... But rather than a `make deb` rule, a small script would be 
> better - Debian's packaging system generates (amongst other things) a source 
> tarball, and to include auto-generated files doesn't feel right.. Calling the 
> `make dist` rule may solve that issue.
> 
>> I think such a feature (maybe later enhanceable by RPM) would both be
>> interesting for replicable custom installations as well as for a
>> reference kernel distribution to provide a Xenomai quick-start.
> 
> Indeed - Point a potential user to a repository, let them experiment with a 
> (hopefully) working kernel, and when they need/want specific vmlinuz options, 
> they have a reference point to work from. The "Debian way" also greatly 
> simplifies the task of building packages.
> 
> 
>> Would this build procedure already help you?
>> http://www.rts.uni-hannover.de/xenomai/lxr/source/README.INSTALL?a=i386#203
> 
> Ah, yes.. It's the same doc in the top level Xenomai tree ;)
> 
> As Gilles has pointed out, there are already a couple of options in 
> prepare-kernel.sh to aid package generation - If nobody else is working on 
> that area, I'll put a patch together over the next few days and submit it for 
> review.
> 

Great!

Jan



signature.asc
Description: OpenPGP digital signature
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] prepare-kernel options

2007-02-28 Thread Paul
On Wednesday 28 February 2007 13:02, Jan Kiszka wrote:

> [Related question from my side:]
>
> Would you be willing to provide debian package generation rules for
> Xenomai? Something that would spit out .deb files when calling, say,
> "make deb KERNEL=linux-2.6.x.tar.bz2 CONFIG=my-kernel-config" in a
> configured userland build directory? That way we could automatise binary
> package generation for kernel, user libs, development headers, and
> documentation. And that would allow us to finally distribute them for
> generic targets like x86 and x86_64 along with the usual tar files.

To have a Debian rule set is indeed my ultimate goal (but I wouldn't want t 
tread on anyone's toes if it is already in hand). - I suspect a number of 
potential users would like to try Xenomai but are put off by kernel 
compilation... But rather than a `make deb` rule, a small script would be 
better - Debian's packaging system generates (amongst other things) a source 
tarball, and to include auto-generated files doesn't feel right.. Calling the 
`make dist` rule may solve that issue.

> I think such a feature (maybe later enhanceable by RPM) would both be
> interesting for replicable custom installations as well as for a
> reference kernel distribution to provide a Xenomai quick-start.

Indeed - Point a potential user to a repository, let them experiment with a 
(hopefully) working kernel, and when they need/want specific vmlinuz options, 
they have a reference point to work from. The "Debian way" also greatly 
simplifies the task of building packages.


> Would this build procedure already help you?
> http://www.rts.uni-hannover.de/xenomai/lxr/source/README.INSTALL?a=i386#203

Ah, yes.. It's the same doc in the top level Xenomai tree ;)

As Gilles has pointed out, there are already a couple of options in 
prepare-kernel.sh to aid package generation - If nobody else is working on 
that area, I'll put a patch together over the next few days and submit it for 
review.


Regards, Paul.

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] prepare-kernel options

2007-02-28 Thread Gilles Chanteperdrix
Paul wrote:
> A little background - On Debian installations, a set of tools have been 
> provided to allow kernel packages to be quickly & simply generated. It is 
> something I do quite regularly with the following steps:
>  * Extract kernel sources in /tmp
>  * Apply patches
>  * Copy an existing .config over - Run `make oldconfig`
>  * make-kpkg binary-arch (produces kernel-image and kernel-header packages)
>  * Install/reboot
> 
> It may sound a long winded method, but it does allow me to use the generated 
> packages to install on any number of other machines.
> 
> The problem - prepare-kernel.sh creates symlinks to assorted files in the 
> Xenomai source tree. Not a problem if the same tree exists in the same 
> location on the target machine. As yet, there is no xenomai Debian package, 
> and the build location may not be the same as the install location - This 
> results in a large number of dangling symlinks which thwarts attempts to 
> compile out of tree modules using the kernel-headers package. I suspect the 
> same issues would exist for RPM packages and NFS mounted targets.
> 
> A solution - Instead of creating symlinks, the files need to be copied in to 
> the kernel source tree. Most people will use symlinks as it simplifies the 
> `svn up`/make process and avoids having to run prepare-kernel each time. I 
> propose a trivial patch that retains the original behaviour and provides an 
> option to turn off symlinks (patch attached).

In order to prepare for the Debianization, the options --outpatch,
--filterarch and --filterkvers were already added. That said, I see no
problem with your patch.

-- 
 Gilles Chanteperdrix

___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


Re: [Xenomai-core] prepare-kernel options

2007-02-28 Thread Jan Kiszka
Paul wrote:
> A little background - On Debian installations, a set of tools have been 
> provided to allow kernel packages to be quickly & simply generated. It is 
> something I do quite regularly with the following steps:
>  * Extract kernel sources in /tmp
>  * Apply patches
>  * Copy an existing .config over - Run `make oldconfig`
>  * make-kpkg binary-arch (produces kernel-image and kernel-header packages)
>  * Install/reboot
> 
> It may sound a long winded method, but it does allow me to use the generated 
> packages to install on any number of other machines.

[Related question from my side:]

Would you be willing to provide debian package generation rules for
Xenomai? Something that would spit out .deb files when calling, say,
"make deb KERNEL=linux-2.6.x.tar.bz2 CONFIG=my-kernel-config" in a
configured userland build directory? That way we could automatise binary
package generation for kernel, user libs, development headers, and
documentation. And that would allow us to finally distribute them for
generic targets like x86 and x86_64 along with the usual tar files.

I think such a feature (maybe later enhanceable by RPM) would both be
interesting for replicable custom installations as well as for a
reference kernel distribution to provide a Xenomai quick-start.

> 
> The problem - prepare-kernel.sh creates symlinks to assorted files in the 
> Xenomai source tree. Not a problem if the same tree exists in the same 
> location on the target machine. As yet, there is no xenomai Debian package, 
> and the build location may not be the same as the install location - This 
> results in a large number of dangling symlinks which thwarts attempts to 
> compile out of tree modules using the kernel-headers package. I suspect the 
> same issues would exist for RPM packages and NFS mounted targets.
> 
> A solution - Instead of creating symlinks, the files need to be copied in to 
> the kernel source tree. Most people will use symlinks as it simplifies the 
> `svn up`/make process and avoids having to run prepare-kernel each time. I 
> propose a trivial patch that retains the original behaviour and provides an 
> option to turn off symlinks (patch attached).
> 

Would this build procedure already help you?

http://www.rts.uni-hannover.de/xenomai/lxr/source/README.INSTALL?a=i386#203

Jan



signature.asc
Description: OpenPGP digital signature
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core


[Xenomai-core] prepare-kernel options

2007-02-28 Thread Paul

A little background - On Debian installations, a set of tools have been 
provided to allow kernel packages to be quickly & simply generated. It is 
something I do quite regularly with the following steps:
 * Extract kernel sources in /tmp
 * Apply patches
 * Copy an existing .config over - Run `make oldconfig`
 * make-kpkg binary-arch (produces kernel-image and kernel-header packages)
 * Install/reboot

It may sound a long winded method, but it does allow me to use the generated 
packages to install on any number of other machines.

The problem - prepare-kernel.sh creates symlinks to assorted files in the 
Xenomai source tree. Not a problem if the same tree exists in the same 
location on the target machine. As yet, there is no xenomai Debian package, 
and the build location may not be the same as the install location - This 
results in a large number of dangling symlinks which thwarts attempts to 
compile out of tree modules using the kernel-headers package. I suspect the 
same issues would exist for RPM packages and NFS mounted targets.

A solution - Instead of creating symlinks, the files need to be copied in to 
the kernel source tree. Most people will use symlinks as it simplifies the 
`svn up`/make process and avoids having to run prepare-kernel each time. I 
propose a trivial patch that retains the original behaviour and provides an 
option to turn off symlinks (patch attached).


Regards, Paul.

Index: scripts/prepare-kernel.sh
===
--- scripts/prepare-kernel.sh	(revision 2265)
+++ scripts/prepare-kernel.sh	(working copy)
@@ -95,6 +95,11 @@ patch_link() {
 if test x$link_makefiles = xm; then
 link_makefiles_opt="-name Makefile -o"
 fi
+if test x$no_symlinks = x1; then
+link_command="cp -f"
+else
+link_command="cp -sf"
+fi
 
 if test "x$output_patch" = "x" -a -e $linux_tree/$link_dir; then
 cd $linux_tree/$link_dir &&
@@ -116,7 +121,7 @@ patch_link() {
 if test x$forcelink = x1 -o \
 		   ! $xenomai_root/$target_dir/$f -ef $linux_tree/$link_dir/$f;
 		then
-ln -sf $xenomai_root/$target_dir/$f $linux_tree/$link_dir/$f
+$link_command $xenomai_root/$target_dir/$f $linux_tree/$link_dir/$f
 fi
 else
 if test `check_filter $link_dir/$f` = "ok"; then
@@ -168,7 +173,7 @@ generate_patch() {
 }
 
 
-usage='usage: prepare-kernel --linux= --adeos= [--arch=] [--outpatch=  [--filterkvers=y|n] [--filterarch=y|n]] [--forcelink]'
+usage='usage: prepare-kernel --linux= --adeos= [--arch=] [--outpatch=  [--filterkvers=y|n] [--filterarch=y|n]] [--forcelink] [--nosymlink]'
 me=`basename $0`
 
 while test $# -gt 0; do
@@ -198,6 +203,9 @@ while test $# -gt 0; do
 --forcelink)
 forcelink=1
 ;;
+--nosymlink)
+no_symlinks=1
+;;
 --verbose)
 	verbose=1
 	;;
___
Xenomai-core mailing list
Xenomai-core@gna.org
https://mail.gna.org/listinfo/xenomai-core