xfs
[Top] [All Lists]

TAKE - Update XFS kbuild 2.5 support to release 1.5

Subject: TAKE - Update XFS kbuild 2.5 support to release 1.5
From: Keith Owens <kaos@xxxxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 7 Nov 2001 15:46:16 +1100
Sender: owner-linux-xfs@xxxxxxxxxxx
kbuild 2.5 release 1.5 (against kernel 2.4.14) removed some special
case commands.  Update the XFS files to reflect the change.

For the record, this is the process to compile XFS using kbuild 2.5.

==========

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.14-1.bz2.

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
# bzcat ~/kbuild-2.5-2.4.14-1.bz2 | 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:  Tue Nov  6 20:31:46 PST 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:106234a
linux/fs/Makefile.in.append - 1.3
linux/fs/xfs/Makefile.in - 1.5
linux/fs/xfs_support/Makefile.in - 1.2
linux/kdb/Makefile.in - 1.4
linux/kdb/modules/Makefile.in - 1.4
linux/drivers/md/Makefile.in - 1.3


<Prev in Thread] Current Thread [Next in Thread>
  • TAKE - Update XFS kbuild 2.5 support to release 1.5, Keith Owens <=