[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Compiling testing/unstable kernels on sarge/stable was: Updated Howto needed



Horms wrote:
Horms,
Thank you for the summary. You have made the versioned patching system clearer to me. I tried the commands you suggested to build the kernel. I have had package versioning problems trying to compile etch kernel on sarge ( gcc (>= 4:4.0) kernel-package (>= 9.008.3) ).


I have been having very good luck building 2.6.14-2 with all of the folowing combinations, on sid:

Feedback:
Horms suggested the following commands;

apt-get source linux-2.6
cd linux-2.6-X.Y.Z-N
dpkg-buildpackage -B -us -uc -rfakeroot

When built with:
Etch: Works OK
Sarge: Fails as build dependencies are checked and fail with versions of gcc and kernel-package. If I disable build dependency checking (-d), build fails as the .config is not created.

-
http://kernel-handbook.alioth.debian.org/ch-common-tasks.html
suggests:
$ apt-get source linux-major
# apt-get install build-essential fakeroot
# apt-get build-dep linux-major
$ cd linux-major-version
$ fakeroot debian/rules debian/build debian/stamps
$ fakeroot make -f debian/rules.gen binary-arch-i386-none-686

Etch: Works OK
Sarge: 'apt-get build-dep linux-2.6' fails as no suitable gcc version.


-

It is still possible to build a testing or unstable kernel under sarge.
Assuming a pristine sarge without sources.list source entries for testing or unstable:
# apt-get build-dep kernel-source-2.6.8
# apt-get install fakeroot
# echo "deb-src http://ftp.debian.org/debian/ unstable main" >> /etc/apt/sources.list
# apt-get update
$ apt-get source linux-2.6
$ cd linux.xx.yy   #for example, cd linux-2.6-2.6.14
$ fakeroot debian/rules debian/build debian/stamps
$ fakeroot make -f debian/rules.gen binary-arch-i386-none-686

However, this does not use the build dependency information in the testing/unstable kernel source package, so is not officially supported and may break at any time. If creating distributable patch sets for a testing/unstable kernel, they must be tested against the current testing/unstable build tools.

A better way to build an unstable kernel is to make a chroot environment then build in there. The chroot environment can be any release, and is separate from the rest of your system.

Like:
# aptitude install debootstrap
# mkdir etch
# debootstrap sarge etch
# chroot etch /usr/sbin/base-config #set up your chrooted system
# nano etch/etc/apt/sources.list  #Change 'stable' to 'testing'
# chroot etch aptitude dist-upgrade
# chroot aptitude install locales
# chroot dpkg-reconfigure locales

A basic etch install takes around 150Mb.

You should now have a complete debian distribution in the etch directory. You can use the command

# chroot etch

to enter into the testing system. Any command will be performed inside your chrooted system including installing, removing packages, etc. Type exit to leave.

A '#' at the beginning of the command indicates command must be run as root. '$' indicates command can be run as a user.




Reply to: