LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 09-08-2004, 04:09 AM   #1
mbourne
LQ Newbie
 
Registered: Sep 2004
Location: England
Distribution: Fedora Core 2
Posts: 15

Rep: Reputation: 0
Kernel sources in Fedora Core 2


I am trying to use a software modem with Fedora Core 2, and the drivers require the kernel source to be installed. Most people I have spoken to, and the makefiles for the drivers, seem to expect this to be in a directory something like /usr/src/kernel-2.6.x-xxx.x/

After installing the source RPMs from Fedora, my directory structure looks like :-
/usr/src/
redhat/
SOURCES/
COPYING.modules
genkey
kernel-2.6.8-<arch>.config (several files)
linux-2.x.x-<description>.patch (several files)
linux-2.6.8.tar.bz2 (this contains the actual sources)
SPECS/
kernel-2.6.spec

That's all there is in /usr/src/. What do I need to do to get the sources in the right place? Do I just extract the .tar.bz2 to /usr/src/? And do I need to apply all the patches to the sources that are in the .tar.bz2, or are they for earlier kernels?
 
Old 09-08-2004, 05:01 AM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
hi there
go to /usr/src
extract the linux-2.6.8 file

then go to linux-2.6.8 directory and from here u can start compiling ur kernel
for 2.6.8 the patch u require is of 2.6.8.1 the next vrsuion which has been released
othr patches u do not require

also more on kernel compiling u can find at
"newbie guide to kernel compiling by Dr Ozz" in the linux general section in this forum

regards
 
Old 09-08-2004, 08:07 PM   #3
flyfishin
Member
 
Registered: Aug 2003
Location: KC, MO
Distribution: CentOS, RHEL, SuSE, Fedora
Posts: 243

Rep: Reputation: 30
Did you install the kernel-source.?.rpm or the kernel-2.?.src.rpm? If you don't have a linux-2.? directory under /usr/src I don't think you install the kernel-source rpm.
 
Old 09-09-2004, 09:01 AM   #4
mbourne
LQ Newbie
 
Registered: Sep 2004
Location: England
Distribution: Fedora Core 2
Posts: 15

Original Poster
Rep: Reputation: 0
It was kernel-2.6.5-1.358.src.rpm from the source discs. I thought they contained all the source code. There is a kernel-source-2.6.5-1.358.i386.rpm on disc 3 of the main discs, so I will try that and let you know. I hadn't realised it was there. Thanks.
 
Old 09-09-2004, 11:26 AM   #5
flyfishin
Member
 
Registered: Aug 2003
Location: KC, MO
Distribution: CentOS, RHEL, SuSE, Fedora
Posts: 243

Rep: Reputation: 30
That will do it. You want the kernel-source rpm. Also, the 2.6.5 kernel is old. Core 2 is up to 2.6.8.something.
 
Old 09-09-2004, 11:48 AM   #6
mbourne
LQ Newbie
 
Registered: Sep 2004
Location: England
Distribution: Fedora Core 2
Posts: 15

Original Poster
Rep: Reputation: 0
Yes- I was going to install the one from the CDs then use up2date to update to the latest (as I have the latest kernel binaries installed - 2.6.8-1.521), but it seems to need a lot of other packages as well, some of which I already have installed and need to download updates for ones they depend on that aren't installed already. I'm beginning to think it may be easier to download (using up2date --get) the latest versions of all the required packages and then install in one go.
The kernel seems to need a lot of other packages as well - I assume this is normal. So far I have :-
kernel-source
gtk2-devel
atk-devel
glib2-devel
pango-devel
fontconfig-devel
freetype-devel
qt-devel
libjpeg-devel
libmng-devel
libpng-devel
xorg-x11-devel
That seems to be it. Some are not direct dependancies of kernel-source. I'm surprised that the kernel does directly depend on gtk2-devel, as it seems to tie it to X?

Is this usual?
 
Old 10-04-2004, 04:59 AM   #7
johnvoisey
Member
 
Registered: Jun 2002
Location: UK
Distribution: Used many over the years, main ones now "CentOS", Slackware and Arch
Posts: 31

Rep: Reputation: 15
So what are the other patch files then

Sorry to poke my nose into someone else's thread but I have a similar problem and I am curious about all those patch files.

In the first reply "masand" says one of those patch files needs to be applied and the others aren't needed. Why aren't they needed ?

I ask because I need to patch the same kernel to make it work with my adsl modem (see the site www.flashtux.org for details) and I'm obviously keen to start from a source that's the same as the "official" 2.6.8.etc-etc as installed by the "up2date" tool
 
Old 10-04-2004, 08:41 AM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 58
Quote:
Originally posted by mbourne
Yes- I was going to install the one from the CDs then use up2date to update to the latest (as I have the latest kernel binaries installed - 2.6.8-1.521), but it seems to need a lot of other packages as well, some of which I already have installed and need to download updates for ones they depend on that aren't installed already. I'm beginning to think it may be easier to download (using up2date --get) the latest versions of all the required packages and then install in one go.
The kernel seems to need a lot of other packages as well - I assume this is normal. So far I have :-
kernel-source
gtk2-devel
atk-devel
glib2-devel
pango-devel
fontconfig-devel
freetype-devel
qt-devel
libjpeg-devel
libmng-devel
libpng-devel
xorg-x11-devel
That seems to be it. Some are not direct dependancies of kernel-source. I'm surprised that the kernel does directly depend on gtk2-devel, as it seems to tie it to X?

Is this usual?
hi there

well u need that files because when u run
make xconfig
for compiling ur kernel then it pops up a window where u choose ur setting for ur kernel so u can configure it accordingly
for that gtk2 is required and also X
if u get urself a kernel source from kernel.org then u can use that and use make config ,to confiugure ur kernel in text mode
u can do this hre also if u install that with --force option

like this
rpm -ivh --force kernel-2.6.8.src.rpm

then u will not be able to use make xconfig without the above dependencies

"make config" will work though

also u can try "make menuconfig"

regards
 
Old 10-04-2004, 09:35 AM   #9
FunkyRes
Member
 
Registered: Mar 2004
Distribution: CentOS
Posts: 174

Rep: Reputation: 30
Just a note on custome kernel compiling -

leave /usr/src/linux alone.
That's for the kernel headers that glibc was compiled against, messing with that could result in problems because if a header that glibc was compiled against changes, and you compile something that uses that header - you can end up with weird unexplained program bugs.

That might not be an issue anymore, but it was with kernel 2.4 and below - I know there was talk about putting the headers into glibc so that would never be a problem.

I build my custom kernels in /usr/local/src/linux - /usr/local/src is where you are suppose to have the source for locally compiled software. But the kernel you can even build in your home directory, it doesn't matter as long as you don't move the source directory after you build and install it.

/lib/modules/kernel-version/build will be a symlink to the directory where you compiled your kernel, and that is where any additional modules you compile are suppose to look for the kernel source (kernel-version is the same as `uname -r`)

If a module doesn't look there, it is broken. I haven't run across a third party module that doesn't look there in eons. Not since 2.2 days.

Also - if you build your own kernels, it's best to install gcc 2.95.3 and use that - simply because that compiler is the one specified as being the compiler they (kernel developers) recommend in the README.

Newer gcc versions will usually work, but gcc 2.95.3 is the benchmark - that's what they consider the source broken with if it doesn't properly work.

I installed gcc 2.95.3 in /opt/kernel_gcc - I only compiled the gcc part, that's the part needed for the kernel (you don't need g++ etc.)

Then when compiling a kernel -

export PATH=/opt/kernel_gcc/bin:$PATH
make oldconfig
make bzImage

yada yada.

I have a src.rpm for gcc-2.95.3 - if anyone is interested, I can post it for ya - whenever I install a new distro, that's one of the first things I do, rebuild my source rpm for gcc 2.95.3 and install it - so I can use gcc 2.95.3 for the kernel, and the occasional C program that doesn't like gcc 3.x
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel for fedora core 3 scripttron75 Linux - Software 3 10-21-2005 04:25 PM
APT sources for Fedora Core 3. excidy Linux - Software 3 04-27-2005 02:03 PM
Core 3 Kernel Sources sfwalter Fedora 20 03-06-2005 03:02 PM
Can't get kernel sources from apt/synaptic (Fedora 3) versaulis Linux - Software 0 01-15-2005 02:26 PM
installing fedora kernel sources wiz561 Linux - Newbie 2 07-30-2004 01:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration