Yes. But you have to understand the Debian policy with respect to headers.
The Debian C libraries are built with the most recent stable releases of the kernel headers.
For example, the Debian-1.2 release used version 5.4.13 of the headers. This practice contrasts with the Linux kernel source packages distributed at all Linux FTP archive sites, which uses even more recent versions of the headers. The kernel headers distributed with the kernel source are located in /usr/include/linux/include/.
If you need to compile a program with kernel headers that are newer than those
provided by libc6-dev
, then you must add
-I/usr/src/linux/include/ to your command line when compiling.
This came up at one point, for example, with the packaging of the automounter
daemon (amd
). When new kernels changed some internals dealing
with NFS, amd needed to know about them. This required the
inclusion of the latest kernel headers.
Users who wish to (or must) build a custom kernel are encouraged to download
the package kernel-package
. This package contains the script to
build the kernel package, and provides the capability to create a Debian
kernel-image package just by running the command
make-kpkg kernel_image
in the top-level kernel source directory. Help is available by executing the command
make-kpkg --help
and through the manual page make-kpkg(8)
.
Users must separately download the source code for the most recent kernel (or the kernel of their choice) from their favorite Linux archive site, unless a kernel-source-version package is available (where "version" stands for the kernel version).
Detailed instructions for using the kernel-package
package are
given in the file /usr/doc/kernel-package/README. Briefly, one
should:
libncurses5-dev
package must be
installed.
Any of the above steps generates a new .config in the top-level kernel source directory.