Hi, while studying the kernel-buildsystem from the Debian Kernel Team and their Wiki pages, I came accross of a known issue. [0] says: "Problem: In this case, linux-headers-2.6.24-1+foo.1-common will be missing. One needs to invoke the binary-arch_i386 target, which will yield all feature sets (Xen, VServer) and flavours to be generated, and obviously takes a lot longer." Unfortunately, my main faster notebook has some hardware problems, thus I am currently doing my daily job on an Intel Pentium-M "Banias" 1.7GHz with 1GByte RAM notebook. This is a step back for me (Core2Duo T7200 with 2GByte RAM). Personally, I am not interested in a full build of all i386 featuresets/flavours combinations. Furthermore, the build of the docs deb-files took 1.5hrs, totally the build-time was approx. 3.5hrs (following the Wiki). EXAMPLE: $ fakeroot make -f debian/rules.gen binary-arch_i386_none_686 binary-indep \ DEBIAN_KERNEL_JOBS=${NR_CPUS} Not using "binary-indep" supresses the build of docs and source deb-files, but also linux-base which is required by linux-image. Building a single kernel variant creates linux-{image,headers}-$(REAL_VERSION) packages. (See definition in debian/rules.real 'REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)'.) With UPSTREAMVERSION=2.6.35, ABINAME=-trunk and LOCALVERSION=686 you will get: linux-image-2.6.35-trunk-686 and linux-headers-2.6.35-trunk-686 But linux-headers-2.6.35-trunk-686 package requires linux-headers-2.6.35-trunk-common for installation. Invoking install-headers_$(ARCH)_$(FEATURESET) creates the missing binary file (see my patch). For more Details see debian/README.Debian and [1]. Last step for a "complete" linux-headers installation is to apt-get (or even to create) a linux-kbuild-2.6 package fitting to your Linux-kernel version. [2] has a step-by-step installation description and an official package is being prepared. Build instructions "Single Kernel Variant": ARCH="i386" FEATURESET="none" FLAVOUR="686" SINGLE_KERNEL_VARIANT="${ARCH}_${FEATURESET}_${FLAVOUR}" 1. fakeroot make -f debian/rules debian/control-real 2. fakeroot make -f debian/rules.gen setup_${SINGLE_KERNEL_VARIANT} 3. fakeroot make -f debian/rules.gen binary-arch_${SINGLE_KERNEL_VARIANT} 4. fakeroot make -f debian/rules.real install-linux-base 5. fakeroot make -f debian/rules.real install-firmware install-linux-base from Step #4 is required by linux-image package. For more Details see build_linux26.sh script (it has lots of comments). I did *not* check a full i386-arch build, so my patch might cause "unknown side-effects" there. Kind Regards, - Sedat - (aka dileks/dileX on IRC) [ REFERENCES ] [0] http://lists.debian.org/debian-kernel/2008/04/msg00190.html: "linux-headers...common in single variant build" [1] http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage -> "Building only a single kernel variant" [2] http://wiki.debian.org/HowToRebuildAnOfficialDebianKernelPackage -> "The story of linux-kbuild-2.6"
diff -rdup debian/rules.real.orig debian/rules.real --- debian/rules.real.orig 2010-08-10 21:52:30.844404812 +0200 +++ debian/rules.real 2010-08-11 00:39:50.628923634 +0200 @@ -258,6 +258,15 @@ install-headers_$(ARCH)_$(FEATURESET)_$( mkdir -p $(DIR)/arch/$(KERNEL_ARCH)/kernel cp -a $(SOURCE_DIR)/{.config,.kernel*,Module.symvers,include} $(DIR) cp -a $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/kernel/asm-offsets.s $(DIR)/arch/$(KERNEL_ARCH)/kernel +# Building a single kernel variant creates linux-{image,headers}-$(REAL_VERSION) packages. +# See definition 'REAL_VERSION = $(UPSTREAMVERSION)$(ABINAME)$(LOCALVERSION)'. +# Example: fakeroot make -f debian/rules.gen binary-arch_i386_none_686 +# With UPSTREAMVERSION=2.6.35, ABINAME=-trunk and LOCALVERSION=686 you will get: +# linux-image-2.6.35-trunk-686 and linux-headers-2.6.35-trunk-686 +# But linux-headers-2.6.35-trunk-686 package requires linux-headers-2.6.35-trunk-common for installation. +# Invoking install-headers_$(ARCH)_$(FEATURESET) creates the missing binary file. +# For more Details see debian/README.Debian. +install-headers_$(ARCH)_$(FEATURESET)_$(FLAVOUR): install-headers_$(ARCH)_$(FEATURESET) ifeq ($(ARCH),powerpc) if [ -f $(SOURCE_DIR)/arch/$(KERNEL_ARCH)/lib/crtsavres.o ]; then \ @@ -283,6 +292,7 @@ endif dh_link /usr/lib/$(PACKAGE_NAME_KBUILD)/scripts $(BASE_DIR)/scripts mkdir -p $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION) + rm -f $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/{build,source} ln -s /usr/src/$(PACKAGE_NAME) $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/build ln -s /usr/src/$(PACKAGE_NAME_COMMON) $(PACKAGE_DIR)/lib/modules/$(REAL_VERSION)/source
Attachment:
build_linux26.sh
Description: Bourne shell script