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

Re: building 2.6.26 kernel source fails on squeeze

On Mon, 18 Apr 2011, Ben Hutchings wrote:

On Mon, 2011-04-18 at 05:58 +0530, Faheem Mitha wrote:

On Mon, 18 Apr 2011, Ben Hutchings wrote:

On Mon, 2011-04-18 at 02:39 +0530, Faheem Mitha wrote:

On Sun, 17 Apr 2011, Ben Hutchings wrote:

On Sun, 2011-04-17 at 16:51 +0100, Ben Hutchings wrote:
On Sun, 2011-04-17 at 20:42 +0530, Faheem Mitha wrote:

Compilation of 2.6.26 Debian sources from lenny on squeeze fails with the
following below. The only change I made was to set
CONFIG_SYSFS_DEPRECATED_V2=n. See patch below. The command I used was

fakeroot make KDEB_PKGVERSION=custom.1.0  -f debian/rules.gen binary-arch_i386_none_686-bigmem

Am I missing something obvious? Please CC me on any reply. I'm not
subscribed. Thanks in advance.

KDEB_PKGVERSION has no effect.  You need to change the ABI version in

I'm just trying to change the name of the package (from the default of
linux-image-2.6.26-2-686-bigmem to presumably something like
linux-image-2.6.26.custom.1.0-2-686-bigmem) so that it does not replace my
currently installed 2.6.26 version, and I can distinguish it from the
stock Debian kernels. I was attempting to follow Section 4.5 in

It doesn't look like a good fit with the other instructions in 4.2.4, but
I tried to mix them together.

These are in different sections for a good reason!

No doubt. However, I want to rebuild the Debian stock kernel with the one
minor alteration to the config I've already mentioned, and produce a
binary linux-image package with a different name. How do I do this?

Follow section 4.2.

I don't see how to alter debian/config/defines to do this. To be honest, I
don't even know what this file is for.

It defines certain parameters for the Debian packaging.  The ABI number
is set on the second line of the file.

Ok. In that case, I don't see how this is relevant to what I'm trying to

Firstly, your initial build failed at the ABI check: the new kernel will
not be compatible with out-of-tree modules built for 2.6.26-2-686-bigmem
and the kernel version (as shown by uname -r; not the package version)
must be changed.

Secondly, you want to be able to install the new package in parallel
with the old one.  Therefore the package name must change.

The solution to both of these is to change the ABI number (or name,
rather; we use numbers but you don't have to).

Well, I followed your instructions, and they seemed to work, though I have not tested the resulting kernel.

Ok, taking it from the top:

I first note that Section 4.5 uses linux-source, which is a different package which is presumably set up differently. So I guess that section should be ignored for the purposes of this exercise.

If I understand this correctly, altering the config changes the kernel ABI. Question: wouldn't patching the kernel also change the ABI?

Therefore it is required to also change the ABI name, otherwise this is detected by the build process (Question: how does it do this?) which aborts.

So I set 'abiname: custom1.0' and ran

fakeroot debian/rules debian/control-real

and then

fakeroot debian/rules source
fakeroot make -f debian/rules.gen binary-arch_i386_none_686

BTW, what does

fakeroot debian/rules source


The resulting kernel package looks like linux-image-2.6.26-custom1.0-686-bigmem_2.6.26-26lenny1_i386.deb.

I get warnings of the form

Compatibility levels before 5 are deprecated.

See extract from build log below. Does this mean it expected the abiname to start with 5, for some reason?

I've attempted to document this, since it currently does not appear to be. See patch to kernel handbook below. I'm sure I'm made errors, so corrections, please.

                                                          Regards, Faheem

diff -r 657cba972ce9 chapter-common-tasks.sgml
--- a/chapter-common-tasks.sgml	Mon Apr 18 11:54:22 2011 +0530
+++ b/chapter-common-tasks.sgml	Tue Apr 19 01:56:33 2011 +0530
@@ -139,6 +139,22 @@
+	  <heading>Modifying the kernel config</heading>
+	  <p>
+	    When changing the kernel config, it is necessary to also
+	    change the ABI. This can be done by changing
+	    the <tt>abiname</tt> in
+	    <tt>debian/config/defines</tt>. For
+		example, <tt><em>abiname: custom1.0</em></tt>. Then
+		run the command
+	    <example>
+	      $ fakeroot debian/rules debian/control-real
+	    </example>
+	    Then follow instructions as explained in previous sub-sections
+	    of <ref id="common-official">.
+	  </p>
+	</sect1>
+	<sect1>
 	  <heading>Simplified patching and building</heading>
 	    Starting from version 2.6.32-6, the source package includes


cd debian/build/build_i386_none_686-bigmem; \
        for dir in asm-generic ; do \
ln -s --target-directory='/usr/local/src/linux-2.6.26/linux-2.6-2.6.26'/debian/linux-headers-2.6.26-custom1.0-686-bigmem//usr/src/linux-headers-2.6.26-custom1.0-686-bigmem/include ../../linux-headers-2.6.26-custom1.0-common/include/$dir; \
ln -s ../linux-kbuild-2.6.26/scripts debian/linux-headers-2.6.26-custom1.0-686-bigmem//usr/src/linux-headers-2.6.26-custom1.0-686-bigmem mkdir -p debian/linux-headers-2.6.26-custom1.0-686-bigmem/lib/modules/2.6.26-custom1.0-686-bigmem ln -s /usr/src/linux-headers-2.6.26-custom1.0-686-bigmem debian/linux-headers-2.6.26-custom1.0-686-bigmem/lib/modules/2.6.26-custom1.0-686-bigmem/build
make -f debian/rules.real install-base
make[2]: Entering directory `/usr/local/src/linux-2.6.26/linux-2.6-2.6.26'
dh_installchangelogs: Compatibility levels before 5 are deprecated.
dh_installdocs: Compatibility levels before 5 are deprecated.
dh_compress: Compatibility levels before 5 are deprecated.
dh_fixperms: Compatibility levels before 5 are deprecated.
dh_installdeb: Compatibility levels before 5 are deprecated.
dh_gencontrol --
dh_gencontrol: Compatibility levels before 5 are deprecated.
dh_md5sums: Compatibility levels before 5 are deprecated.
dh_builddeb: Compatibility levels before 5 are deprecated.
dpkg-deb: building package `linux-headers-2.6.26-custom1.0-686-bigmem' in `../linux-headers-2.6.26-custom1.0-686-bigmem_2.6.26-26lenny1_i386.deb'.
make[2]: Leaving directory `/usr/local/src/linux-2.6.26/linux-2.6-2.6.26'
make[1]: Leaving directory `/usr/local/src/linux-2.6.26/linux-2.6-2.6.26'

Reply to: