On Sat, 06 Oct 2001 02:45:45 +1000,
Keith Owens <kaos@xxxxxxxxxxxxxxxxx> wrote:
>On Fri, 05 Oct 2001 15:56:33 +0200,
>Harald Wagener <hwagener@xxxxxxxxxxxxxxx> wrote:
>>just another question: I came to like the new kbuild Makefile and would like
>>to
>>check out cml2 as well. Does anyone have experience to share about this?
>
>The XFS tree is already kbuild 2.5 ready. Just apply the
>kbuild-2.5-2.4.10 patch and enjoy. AFAIK there is no CML2 support for
>XFS yet, just CML1.
Note to self - avoid sending mail at 2:45 AM. The real story is :-
Date: Sun, 5 Aug 2001 21:53:28 +1000
From: Keith Owens <kaos@xxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: TAKE - kbuild 2.5 support for XFS
Add XFS specific files for kbuild 2.5 support to the XFS tree. This is
not the full kbuild 2.5 code, just the XFS and KDB specific bits.
Using kbuild 2.5 with the current XFS tree is a little unusual because
it must not disturb the existing kbuild 2.4 code, XFS must still build
using the old method. To build XFS using kbuild 2.5 you need 3
directories, source tree 000 containing the main kbuild 2.5 code,
source tree 001 containing XFS, KDB plus the full kernel and an object
tree. This is not the normal configuration but it works without
including all of kbuild 2.5 in the XFS tree.
Create a file which sets and exports the required variables, replacing
/build/kaos with your build area, and source that file to set the
variables. Note that source tree 001 is the linux sub directory of
your XFS workarea or CVS tree, do not point at the top of the workarea
or CVS tree.
# cat trees-2.4.x-xfs
export KBUILD_SRCTREE_000=/build/kaos/2.4.x-xfs-kbuild-2.5
export KBUILD_SRCTREE_001=/build/kaos/2.4.x-xfs/linux
export KBUILD_OBJTREE=/build/kaos/object-2.4.x-xfs
# source trees-2.4.x-xfs
Remove any files in the main kbuild 2.5 tree and the object tree.
Create the object tree and copy in an initial config.
# rm -rf $KBUILD_SRCTREE_000 $KBUILD_OBJTREE
# mkdir $KBUILD_OBJTREE
# cp .config $KBUILD_OBJTREE
Fetch the kbuild 2.5 patch that corresponds to the current XFS kernel
from http://sourceforge.net/projects/kbuild/. This was tested on
kbuild-2.5-2.4.8-pre4-1.gz.
kbuild 2.5 is designed to patch a current kernel but we want a separate
tree containing just the kbuild 2.5 code plus the critical files that
kbuild 2.5 needs, leaving the XFS tree untouched.
# cp -al $KBUILD_SRCTREE_001 $KBUILD_SRCTREE_000
# cd $KBUILD_SRCTREE_000
# zcat ~/kbuild-2.5-2.4.8-pre4-1.gz | patch -p1
# find \( -path ./scripts -prune \) -o \( -type f -links +1 \! -name Makefile
-print \) | xargs rm
# find -type d -depth | xargs rmdir 2>/dev/null
That leaves source tree 000 containing just the main kbuild 2.5 files
plus the scripts (for make *config) and the kbuild 2.4 top level
Makefile (for kernel version). You can now build XFS+KDB using kbuild
2.5. On a 4 way processor with plenty of memory, I do this
# make -j8 -f $KBUILD_SRCTREE_000/Makefile-2.5 oldconfig installable
# sudo make -j8 -f $KBUILD_SRCTREE_000/Makefile-2.5 install
The only disadvantage with this approach is that the configure help is
read from the XFS tree so you do not get help for the kbuild 2.5
specific options. Can't have everything. You can browse
$KBUILD_SRCTREE_000/Documentation/Configure.help for the kbuild 2.5
entries.
As always, Documentation/kbuild/kbuild-2.5.txt is your friend.
Enjoy.
|