Click to See Complete Forum and Search --> : Red Hat Directory Structure


elam
03-10-2001, 01:42 AM
Hi folks,
I am looking in my /usr/src directory and the only thing showing up is a directory called redhat. Within this are 4 directories called BUILD, RPMS, SOURCES, SPECS, AND SRPMS.
I am trying to uprgrade PCMCIA-CS and it asks for the directory /usr/src/linux.
Where is all my source code? Is this the normal Red Hat directory structure?
Thanks,
Elam

ph34r
03-10-2001, 01:48 AM
Did you install the kernel source and/or headers? If not, you need to install those RPMS. They should end up something like /usr/src/linux/include. The /usr/src/linux directory is what is looked for for kernel compiles. I've personally gotten in a habit (as have others I'm sure) of using /usr/src/linux-<kernelver> for the actual files, and a appropriate symlink from /usr/src/linux-<kernelver> to /usr/sr/linux .

pbharris
03-10-2001, 01:51 AM
hello,
typically if you install the kernel source RPM then it installs a directory called /usr/src/linux-2.X.blah with a link called linux, so it looks like /usr/src/linux . personally i like the stuff from kernel.org and i get a copy of the linux kernel, say linux-2.4.2.tar.bz2 and then i do a bunzip on it then a quick tar -xf linux-2.4.2.tar and volia! a nice directory called /usr/src/linux of course you can select the kenrel source rpms to install too.

elam
03-10-2001, 01:58 AM
The install is brand new, straight off the RedHat 7.0 Cd.
When I installed Mandrake, it gave me a directory called linux-2.2.16 within /usr/src.
This isn't happening now. Did I miss something when I did a fresh install??
thanks
elam

flintstone
03-10-2001, 12:01 PM
Typically when you are doing a default install in RH, it doesn't include the kernel sources and headers.
use rpm -q kernel*.* to check what kernel files are installed.
If the sources are not there you probably have to install a host of other files as well.
The first time I did the install, I had to get some 6 other files seperately.

Dependancy checks can be a ***** in RH :(

flintstone
03-10-2001, 12:02 PM
Typically when you are doing a default install in RH, it doesn't include the kernel sources and headers.
use rpm -q kernel*.* to check what kernel files are installed.
If the sources are not there you probably have to install a host of other files as well.
The first time I wanted to recompile the kernel, I had to get some 6 other files seperately.

Dependancy checks can be a ***** in RH :(

kubfish
03-10-2001, 01:43 PM
Just throw in your redhat cd. Open GNORPM and install the kernel source.

It should be under development on the cd but I am not to sure.

Also if you look at www.evil3d.net (http://www.evil3d.net) under the redhat7.0 Nvidia how to it explains all that there.

elam
03-11-2001, 03:08 AM
Thanks for all the suggestions guys.
I took flintsone's advice and installed from the cd.
Now the whole point of this exercise is, I'm trying to compile the 2.4.0 kernel, so I can use XFree 4.0.2 so my steenking ATI will hopefully accelerate in 3 dimensions so I can have fun w/blender.
When I finally make a bzImage I get this error after about 5 seconds:

/home/elam/linux/include/linux/raid/md_k.h:39: warning: control reaches end of non-void function
make: *** [init/main.o] Error 1
I get some kind of error everytime I have tried to compile the 2.4 kernel. Off both Mandrake and Red Hat.
I followed the directions to a tee and installed the programs the are listed in the /Documentation/Changes file.
Any ideas?
Thanks,
elam