[plug] Debian Kernel Compile
MICHAEL HUNT
michael.j.hunt at usa.net
Wed Apr 10 15:36:34 WST 2002
To the debianites on this list,
OK last night I did a stupid thing and rather than going to be straight away
after the PLUG meeting I stayed up until 1:00am recompiling my kernel the
debian way as according to the instructions below:
<-- snipped from
http://www.debian.org/doc/manuals/quick-reference/ch-kernel.en.html -->
7.1.1 Debian standard method
Use the new kernel-package in unstable (7/2001). Also, some arguments to the
tar command changed between Potato and Woody, so use -j instead of -I for
.bz2. Also watch out for bug reports on gcc, binutils, and modutils.
Compiling a custom kernel from source under a Debian system requires special
care. Use the new --append_to_version with make-kpkg to build multiple
kernel-images.
# apt-get install debhelper modutils kernel-package libncurses5-dev
# apt-get install kernel-source-2.4.18 # use latest version
# vi /etc/kernel-pkg.conf # input my name and email
$ cd /usr/src # build directory
$ tar -xvjf kernel-source-2.4.12.tar.bz2
$ cd kernel-source-2.4.12 # if this is your kernel
source
$ rm -rf */pcmcia
# [OPTIONAL] if one wants to use modules from pcmcia-cs or no pcmcia
$ cp /boot/config-2.4.12-386 .config # get current config as
default
$ make menuconfig # customize as one wishes
$ make-kpkg clean # must run (per: man
make-kpkg)
$ fakeroot make-kpkg --append_to_version -486 --initrd +AFw
--revision=rev.01 kernel_image
$ cd ../modules/pcmcia
$ fakeroot ./debian/rules
$ cd ../..
# dpkg -i kernel-image*.deb pcmcia-cs*.deb # install
make-kpkg kernel_image actually does make oldconfig and make dep. Do not use
--initrd if initrd is not used.
One can avoid rm -fr */pcmcia by selecting "General setup +IBQ>" to
"PCMCIA/CardBus support +IBQ>" in make menuconfig and setting configuration as
"< > PCMCIA/CardBus support".
<--end snip -->
Thinking that this was a short and relatively easy task was my major mistake
but I seem also to have made some others as well. Basically I have 4 questions
to ask that hopefully someone can help me with
1. According to the above instructions I should be able to complete the kernel
compile and creation of the package as a non-root user but when I try this I
find all the permissions are incorrectly set. I noticed a src group and added
myself to it but this didn't seem to work either. In the end I just did
everything as root but does anyone know what the 'debian' way of doing this is
???
2. When I run make-kpkg clean (or fakeroot) I get perl warnings about it being
unable to work out locales and that it is going to use the default 'C' one.
Does anyone know what these should be set to and how to set them the 'debian'
way ??? (Sorry I haven't got the exact output as I am not at the machine right
at the moment).
3. Fakeroot was not installed by default but by doing an apt-get install
fakeroot I was once again on my way, however I'm not sure as to what
--append_to_version -486 and --revision=rev.01 do apart from changing the
package name. My plan is to name the deb file
kernel-image-2.4.18-586-smp-ext3-mjh.deb (Pentium SMP ext3 kernel by mjh - my
initials). Can I just change the append to version parameter and do I need to
have the revision one set ???
4. dpkg -i kernel-image*.deb prompted me for a number of things one being to
insert and initrd entry into my lilo.conf file (which I did) and another being
to insert an initrd entry into /etc/kernel-pkg.conf (which I didn't). After
spitting out messages about perl and other stuff it said it could don't the
post install stuff because it failed to copy initrd (or something to that
effect). Given that the other problems appear to be only cosmetic what can I
do to get this to work ??? Do I even need to use initrd ??? Will just adding
the initrd entry mentioned above and make the pkg again fix the problem ???
Stay tunned for this and even more exciting Linux questions to be answered by
members of the Perth Linux User group community !!!
Michael Hunt
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http:+AC8ALw-lists.plug.org.au+AC8-pipermail+AC8-plug+AC8-attachments+AC8-20020410+AC8-b5f26f7f+AC8-attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image+AC8-gif
Size: 5238 bytes
Desc: not available
URL: <http:+AC8ALw-lists.plug.org.au+AC8-pipermail+AC8-plug+AC8-attachments+AC8-20020410+AC8-b5f26f7f+AC8-attachment.gif>
More information about the plug
mailing list