G'day, Here's the patches to support the SuperH architecture in kbuild 2.5.
The patches are against kbuild-2.5 2.1 (Linux 2.5.8). See the README
for details. I'll start work on upgrading to kbuild-2.5 (Linux 2.5.10)
in the next couple of days.
Remaining issues:
* I can't figure out if arch/sh/overdrive/ is still used or not. Stuart?
* I haven't fixed LinuxSH to use asm-offsets yet. This will happen in
a second pass.
* Unfortunately I found a few places where the sh patch overlaps
with the kbuild common patch. I have isolated these into a
new "shcommon" patch which is applied *after* kbuild common.
* I had to hack Linux 2.5.8 to get it to build with CONFIG_SMP=n,
CONFIG_PCI=n, CONFIG_IDE=m. This is the "hacks" patch.
* There's an issue with Makefile.defs.{no,}config and drop-in trees
which I will pursue separately.
Greg.
--
the price of civilisation today is a courageous willingness to prevail,
with force, if necessary, against whatever vicious and uncomprehending
enemies try to strike it down. - Roger Sandall, The Age, 28Sep2001.
KBuild-2.5 for the SuperH Linux port
====================================
Here's how to build a LinuxSH kernel using kbuild-2.5.
Ingredients
-----------
linux-2.5.8.tar.bz2 Linus tarball from ftp.kernel.org
linuxsh-20020421/ CVS checkout of LinuxSH repository at
linuxsh.sf.net dated 21 April 2002
kbuild-2.5-core-6.bz2 KBuild 2.5 core patch from kbuild.sf.net
kbuild-2.5-common-2.5.8-3.bz2 KBuild 2.5 common patch from kbuild.sf.net
kbuild-2.5-sh-2.5.8-1gnb.bz2 KBuild SuperH patch, from here
kbuild-2.5-shcommon-2.5.8-1gnb.bz2 KBuild common intersection with SuperH
patch, from here
kbuild-2.5-hacks-2.5.8-1gnb.bz2 Hacks so 2.5.8 compiles, from here
Procedure
---------
1. Extract linux-2.5.8.tar.bz2 into a directory linux-2.5.8
2. Apply patches to linux-2.5.8 (the order matters)
* kbuild-2.5-core-6.bz2
* kbuild-2.5-common-2.5.8-3.bz2
* kbuild-2.5-sh-2.5.8-1gnb.bz2
* kbuild-2.5-shcommon-2.5.8-1gnb.bz2
* kbuild-2.5-hacks-2.5.8-1gnb.bz2
3. Checkout (or extract) linuxsh-20020421
4. Make the directory where all the build output will go
mkdir obj
5. Setup environment variables (in bash syntax). Note that the
full pathnames and trailing /s are significant.
export KBUILD_SRCTREE_000=$PWD/linux-2.5.8/
export KBUILD_SRCTREE_001=$PWD/linuxsh-20020421/
export KBUILD_OBJTREE=$PWD/obj/
6. Copy your .config into $KBUILD_OBJTREE and
make \
-f $KBUILD_SRCTREE_000/Makefile-2.5 \
ARCH=sh CROSS_COMPILE=sh-unknown-linux-gnu- \
oldconfig
7. Do the actual build
make \
-f $KBUILD_SRCTREE_000/Makefile-2.5 \
ARCH=sh CROSS_COMPILE=sh-unknown-linux-gnu- \
installable
8. Install the results
make \
-f $KBUILD_SRCTREE_000/Makefile-2.5 \
ARCH=sh CROSS_COMPILE=sh-unknown-linux-gnu- \
install
kbuild-2.5-sh-2.5.8-1gnb.bz2
Description: Binary data
kbuild-2.5-shcommon-2.5.8-1gnb.bz2
Description: Binary data
kbuild-2.5-hacks-2.5.8-1gnb.bz2
Description: Binary data
