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

Re: Howto exactly reproduce kernel source tree compatible with binary kernel deb



as I meanwhile could figure out, compiling "linux-source-xxx" failed
because of a mismatch in the gcc versions (gcc 4.3 is installed
as the default C compiler, but the binary kernel packages have been
compiled using gcc 4.1). I still would like to know, what is the
"recommended" way to use the kernel source ...

Regards,
                             Peter

For a long time, I always used traditional "hand-made" kernels, so
whenever I needed it (compiling modules from external sources, changing
something in the kernel, ...), I naturally had the source tree and
configuration matching the currently running kernel lying under
"/usr/src/linux". Recently, I switched to Debian and also decided to
try using the distribution kernel wherever possible. This still looks
like a good idea to me, but it quickly turned out, that nevertheless,
I need for many purposes the kernel sources. I searched the web
(unfortunately, it seems like there were quite some changes in this
area, so must recommendations I found were obviously outdated; btw.,
I am using "lenny") and tried several different ways, but could not
really find something that works reliable.

One plausible-looking attempt for example was, that I installed the
package "linux-source-2.6.26", unpacked it and copied the configuration
from the installed binary kernel package. Unfortunately, the modules
compiled from this tree can't be loaded (I couldn't really understand,
why; as far as I could tell, everything matched the running kernel ...).
I also experimented with "kernel-package" (with similar results). For
the most common case of compiling an external module, I found that
the package "linux-headers-2.6.26-2-<arch>", symlinked to "/usr/src/linux"
will do what I need.

I am still looking for a way to get the complete kernel source/.config
that corresponds to the binary kernel packages, preferably in a way,
that it will get updated with every kernel updated and _exactly_
matching the binary kernel, so whatever I compile in this tree can be
combined with the binary package. Is there any way to accomplish that?
(first of all, "open source" is about source code ...)

Any suggestions are appreciated

Regards,
                        Peter




Reply to: