Re: How to build only linux-image-2.6.18-6-686
On Sat, Jun 07, 2008 at 09:35:28PM +0000, Tzafrir Cohen wrote:
> On Sat, Jun 07, 2008 at 05:23:19PM -0400, Lennart Sorensen wrote:
> > On Sat, Jun 07, 2008 at 08:31:47PM +0000, Tzafrir Cohen wrote:
> > > My problem with make-kpkg has always been that I could never rely on its
> > > generated -headers packages to actually work.
> >
> > Odd, the headers it generated allways worked for me.
>
> Taken to another system?
>
> The problems I remember:
>
> 1. the "source" and "build" links pointed to an incorrect place. An
> invalid build link is a problem.
>
> 2. If I actually changed the source to make the base supplied
> linux-headers package not good enough, I found no way to generate a
> complete one (linux-headers-2.6.18-6 vs linux-headers-2.6.18-6-686).
I haven't tested this in quite a while, so I decided to test the
suggested procedure with current Lenny kernel. I diecided to at first
play dumb and mostly follow the path of least resistance. Documentation
is rather scarse (in /usr/share/doc of the relevant packages) or even in
the wiki. There are plenty of HOWTOs, but when there are plenty of
HOWTOs, I can't really tell which one is obsolete.
The man pages may be useful as references there, but each time I tried
to use them they confused me. Hence they are of no use for the "beginner
sysadmin" (the one who "should not mess with packages").
1. aptitude install linux-source-2.6.24
2. tar xf /usr/src/linux-source-2.6.24.tar.bz2
One small pitfalle here: I forgot I should do all of this in a new
directory. As packages will be created in a directory above the kernel
source directory.
3. aptitude install kernel-package
One possible pitfall: All the documentation and references mention the
name of the command "make-kpkg". It confused me a number of times that
there is no such package called "make-kpkg". But at least an "apt-cache
search" finds it.
4. Apply changes to source tree
In my case: 'make menuconfig' .
Possible pitfall: this means that version change will require a "clean"
in the next stage? I was dumb enough so it didn't hurt me.
5. what do I do next?
At this point the doucmentation is slightly confusing. The keyword to
find in the documentation is "target", which is easy to spot is you're
used to the cencept of a makefile.
make-kpkg --targets
Again, playing dumb and not really sure what each target means, I then
simply ran:
make-kpkg buildpackage
Which built everything fine. But failed when it tried to sign the
package. I could have been aufully confused by this failure.
But at this stage I have:
5.3M linux-doc-2.6.24_2.6.24-10.00.Custom_all.deb
8.7M linux-headers-2.6.24_2.6.24-10.00.Custom_amd64.deb
17M linux-image-2.6.24_2.6.24-10.00.Custom_amd64.deb
1.5M linux-manual-2.6.24_2.6.24-10.00.Custom_all.deb
4.0K linux-source-2.6.24
45M linux-source-2.6.24_2.6.24-10.00.Custom_all.deb
4.0K linux-source-2.6.24_2.6.24-10.00.Custom_amd64.changes
As you can see, the version number has nothing to do with the Debian
ones. In fact, the --add-to-version switch managed to confuse me each
time I tried to use it.
So let's try to use those. Installed a new Lenny chroot.
In order to get the build/ symlink in the kernel directory I needed to
install the headers package before the source one, or in the same
command.
Building a module with it almost worked: the include/asm symlink points
to asm-x86_64 rather than to asm-x86 (http://bugs.debian.org/475029 ).
--
Tzafrir Cohen | tzafrir@jabber.org | VIM is
http://tzafrir.org.il | | a Mutt's
tzafrir@cohens.org.il | | best
ICQ# 16849754 | | friend
Reply to: