Click to See Complete Forum and Search --> : src or no src


imehl
07-15-2004, 02:58 PM
just wanted to clarify a point. in the readme for kernel 2.6 it says:
INSTALLING the kernel:

- If you install the full sources, put the kernel tarball in a
directory where you have permissions (eg. your home directory) and
unpack it:

gzip -cd linux-2.6.XX.tar.gz | tar xvf -

Replace "XX" with the version number of the latest kernel.

Do NOT use the /usr/src/linux area! This area has a (usually
incomplete) set of kernel headers that are used by the library header
files. They should match the library, and not get messed up by
whatever the kernel-du-jour happens to be.

however, on your website:
http://www.justlinux.com/nhf/Compiling_Kernels//20_Steps_to_a_New_Kernel_with_Grub.html
it says to unpack the tarball in /usr/src

which is correct and why??

also, to add further confusion, later on in the kernel README it states:
To configure and build the kernel use:
cd /usr/src/linux-2.6.N

but this directory doesn't exist unless you unpacked the tarball in /usr/src in the first place.

Hayl
07-15-2004, 03:03 PM
it just means not to overwrite a /usr/src/linux-<some version> directory with new kernel source code.

if the directory /usr/src/linux-<whatever source version you have> doesn't already exist then go ahead.

bwkaz
07-15-2004, 07:28 PM
The part about "put the kernel tarball in a directory where you have permissions (eg. your home directory) and unpack it" is what to follow. The other comments in the kernel source README don't really apply to very many distros anymore, but you do need to be root to be able to unpack in /usr/src. Being root is not recommended if there's an easy way to avoid it, and compiling in your home directory is the easiest way to avoid it in this case. You will have to be root to install the kernel, but that's different (and won't take nearly as long as compiling it).

I'm not sure where our kernel HOWTO got /usr/src/linux from, but it's not required that you put the kernel sources there, not by a long shot. (Well, except for broken userspace packages, but IMHO those should be fixed, not pandered to. ;))