JDP : CrosscompilingKernel

Home :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are a guest

Crosscompiling a kernel, the Debian way


First, you'll have to make sure that you have installed the appropriate packages:
# dpkg --get-selections | grep sparc binutils-sparc install cpp-2.95-sparc install g++-2.95-sparc install gcc-2.95-sparc install libc6-dev-sparc-cross install libc6-sparc-cross install libstdc++2.10-dev-sparc install libstdc++2.10-glibc2.2-sparc install # dpkg --get-selections | grep kernel-package kernel-package install


Next, setup the kernel source:

# wget -O- ftp://ftp.snt.utwente.nl/pub/os/linux/kernel/v2.4/linux-2.4.23.tar.bz2 | tar jx # cd linux-2.4.23 # make ARCH=sparc menuconfig


Next, we build the kernel package:
# fakeroot make-kpkg --arch=sparc --cross-compile=sparc-linux --rev jdp.1 binary dpkg-architecture: warning: Specified GNU system type sparc-linux does not match gcc system type i386-linux. dpkg-architecture: warning: Specified GNU system type sparc-linux does not match gcc system type i386-linux. dpkg-architecture: warning: Specified GNU system type sparc-linux does not match gcc system type i386-linux. ...

You will see it complains that it's cross-compiling, don't worry about that.

Speeding things up

kernel-package is capable of parallel builds, using the make -j command. It is suggested you use a concurrency of nCPU + 1.
place a file in your homedir: ~/.kernel-pkg.conf:
maintainer := Your name email := name@somedomain.com priority := Low CONCURRENCY_LEVEL := 2
There is no comment on this page. [Display comments/form]