Help Compiling Linux Kernel

lbhskier37

Member
Oct 24, 2001
184
0
0
I am running Redhat 9 with the stock 2.4.20-8 kernel. I want to stick on the 2.4.21 kernel, but keep the same settings as the old kernel when i compile. Is there a way I can keep the same settings from my 2.4.20-8 kernel without going through and setting each option? I know when Redhat does an update to the kernel it keeps the settings the same, but there is one option I want to change to the kernel so I cant let Redhats automated thing do it. I would assume there is an easy way to set the config the same as the old one but im pretty new to this stuff.
 

Spyro

Diamond Member
Dec 4, 2001
3,366
0
0
I'm not really too familiar with red hat kernel's but there may be a config file in your /boot directory. After you get the kernel source just copy that to your source directory as .config and then when you make config (or menuconfig/xconfig) that file will be read from and you can work your way from the default red hat kernel config.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
After you copy the config to .config run 'make oldconfig' first, that'll go through and only ask you about stuff that isn't set in the old config.
 

Vadatajs

Diamond Member
Aug 28, 2001
3,475
0
0
Originally posted by: lbhskier37
You name the config .config when you copy it over to the source directory?

Not exactly, it is already called .config. You want to do something like:

cp /usr/src/<redhat linux version>/.config /usr/src/linux-2.4/

Provided you've changed the linux-2.4 symlink to point to your new 2.4.21 sources. The .config file is a hidden file in the source directory (the . makes it hidden).
 

Spyro

Diamond Member
Dec 4, 2001
3,366
0
0
Originally posted by: Nothinman
After you copy the config to .config run 'make oldconfig' first, that'll go through and only ask you about stuff that isn't set in the old config.

Hmmm, neat. I never knew about this! Thanks for the tip!
 

lbhskier37

Member
Oct 24, 2001
184
0
0
I just untared the 2.4.21 directory right into the /usr/src directory, so I guess I would do that copy, but copy it to 2.4.21 instead of 2.4.2, correct?
 

cleverhandle

Diamond Member
Dec 17, 2001
3,566
3
81
Sure, that works. Nothinman was just assuming you had a symlink from linux-2.4 to linux-2.4.21. But that's not required, just kind of conventional.
 

Spyro

Diamond Member
Dec 4, 2001
3,366
0
0
Originally posted by: lbhskier37
Nope, I was told on nforcershq to try the Alsa drivers, so I think ill do that tonight.

Oh O.k. then. Here ya go! And good luck, I had to do a lot of work to get this chipset working on one of my boxes (of course now that I know how to get it working its pretty straightforward :)). Pay special attention to this:

You can manually set the ac97 clock by adding to /etc/modules.conf (or equivalent):

options snd-intel-8x0 ac97_clock=41194

However. with an nforce2 board, the playback speed cycles between normal and too fast every time the sound device is closed then opened again. This is much better then previous releases (or the OSS driver) which changed speeds in mid-song, but it's still nagging.
 

lbhskier37

Member
Oct 24, 2001
184
0
0
Every different alsa tutorial seems to show a different way to set it up. Well, I think I have all the drivers setup, but when I try to unmute the sound by running alsamixer, i get an error:

alsamixer: fuction snd_ctl_open failed for default: No such file or device

I see that alsamixer shows up in the usr/bin directory, so what could be the problem?
BTW I am using tarball and not rpms, so it should be compiling it for my system right? Do I have to remove the old sound stuff first maybe?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
I don't think so... If you edited the modules.conf correctly and you do the lsmod and the alsa modules are all loaded up then you probably did it correctly.

WHat it probably is, is that you don't have the correct device files set up. I beleive they should be located in the /dev/snd/ directory.


Now I'll go on a limb here and assume that you didn't configure the kernel to use the /dev filesystem. That would of done it all automaticly, but is currently labled "experimental". I realy don't like it that much anyways. :)

In the source package you used to build the alsa-driver modules their should be a script called snddevices. Use that to make the new /dev/ files that alsa needs. Then try to unmute it.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
ALSA = Good Sound/Easier to Make good Drivers...


Why else is it replacing OSS in 2.6?
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
OSS = simple, simple = GOOD.

With OSS I need 1 module for my SBLive, with ALSA I need like 12.
 

lbhskier37

Member
Oct 24, 2001
184
0
0
Thanks Drag, I will try that tonight. Ive been without internet for the weekend so havent gotten a chance to try it, but hopefully it works:)
 

rjain

Golden Member
May 1, 2003
1,475
0
0
Originally posted by: Nothinman
ALSA = PITA

It's far easier (as easy as OSS was in 2.4) in 2.6. It's just the whole modules nonsense that gets messy, unless, of course, you use debian, which does 90% of the process for you.
 

lbhskier37

Member
Oct 24, 2001
184
0
0
I was seriously considering going to 2.6, if I cant get this sound working tonight I think I might just go to that. What would the benifits of 2.6 be?
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
There are far too many improvements to list here.
Most isn't stuff you'll notice with avarge desktop use though.

Try it out, if nothing else, the build system is much nicer.
I've been running it since the 2.6-test series came out, working fine.

But as allways, don't blame me, Linus, or anyone else if it blows your computer up :)
 

rjain

Golden Member
May 1, 2003
1,475
0
0
Originally posted by: lbhskier37
I was seriously considering going to 2.6, if I cant get this sound working tonight I think I might just go to that. What would the benifits of 2.6 be?

#1: Less tested. (no that's not a benefit, but it's point #1)

Better memory management, more organized device management, XFS on the latest release without waiting, and it's just cooler. :)

But seriously, if you're new enough to not understand how to build a stable kernel, I wouldn't play with an almost-out-of-development kernel. My comment was more specifically aimed at the comment I replied to, not to your original question.

Then again, if you don't mind reinstalling and losing all your data (or you have recent backups and don't mind restoring them) playing with 2.6 might be fun.
 

Nothinman

Elite Member
Sep 14, 2001
30,672
0
0
Most isn't stuff you'll notice with avarge desktop use though.

Actually Colin Kolivas (sp?) is working heavilly on interactive response, that coupled with the new I/O scheduler should make for a much smoother desktop under high CPU and/or disk load.

I couldn't get my 802.11b card working though, so I couldn't use it on my laptop much.

It's far easier (as easy as OSS was in 2.4) in 2.6. It's just the whole modules nonsense that gets messy, unless, of course, you use debian, which does 90% of the process for you

Yes, the init.d alsa scripts in Debian rock, but being able to rmmod/modprobe 1 module for my sound card with OSS is still better in my mind. But I'll probably reinstall ALSA later tonight as I'm thinking about trying out some 2.6 sh!t again too.
 

Sunner

Elite Member
Oct 9, 1999
11,641
0
76
Actually Colin Kolivas (sp?) is working heavilly on interactive response, that coupled with the new I/O scheduler should make for a much smoother desktop under high CPU and/or disk load.

I couldn't get my 802.11b card working though, so I couldn't use it on my laptop much.
Yeah I've read alot abou that, but frankly, I haven't seen all that much difference in terms of responsiveness.

Maybe that's cause my system is already uber fast, after all it's Gentoo, so it's compiled specifically for my machine, which makes it really fast ;)
 

lbhskier37

Member
Oct 24, 2001
184
0
0
Drag, thanks you hit it on the head, now I can unmute to my hearts content:) My one last problem(for tonight at least:) ) is that I still cant here any audio off CDs. I dont have one of those little cables from the cdrom to the board so I would think this is probably it, but can I set it up to not need this cable as I can in windows?