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.
Date: Sun Aug 5 03:50:40 PDT 2001
Workarea: sherman.melbourne.sgi.com:/build/kaos/2.4.x-xfs
The following file(s) were checked into:
bonnie.engr.sgi.com:/isms/slinx/2.4.x-xfs
Modid: 2.4.x-xfs:slinx:100219a
linux/Makefile.in.append - 1.1
linux/arch/i386/kdb/Makefile.in - 1.1
linux/fs/Makefile.in.append - 1.1
linux/fs/pagebuf/Makefile.in - 1.1
linux/fs/xfs/Makefile.in - 1.1
linux/fs/xfs/dmapi/Makefile.in - 1.1
linux/fs/xfs/linux/Makefile.in - 1.1
linux/fs/xfs_support/Makefile.in - 1.1
linux/kdb/Makefile.in - 1.1
linux/kdb/modules/Makefile.in - 1.1
linux/kernel/Makefile.in.append - 1.1
|