LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Devices and Chipsets (https://www.linuxquestions.org/questions/linux-software-2/devices-and-chipsets-207166/)

0x86 07-19-2004 07:41 PM

Devices and Chipsets
 
Im setting up my new kernel and I have no idea what modules to include... I don't know exactly what chipsets are being used in my comp :P... Is there any way to autodetect... OR see what modules are loaded during a session and make sure that those same modules are inluded in the new kernel?

Edit: or do I have to use google and look up EVERY hardware and standard to see if mine is included?

m_yates 07-19-2004 09:07 PM

You don't need to optimize your kernel that much. Distributions ship with kernels that are meant to run on just about any hardware. Lots of things can be made as modules that are only used if needed and modules don't increase the size of your kernel. The easiest thing to do when upgrading/recompiling a kernel is to copy your existing configuration and use it as a starting point for changing things.

For your other questions, the command "lsmod" will list modules currently being used and "lspci" will give you some chipset information. Those aren't the only things needed to configure into the kernel however, so I'd suggest starting with a working configuration. I don't think you gain a lot by optimizing to your specific hardware and you will be out of luck if you add new hardware in the future. Good luck! I just upgraded and recompiled my kernel and it was definitely a learning experience:)

0x86 07-20-2004 12:14 AM

Well, then how would I copy my current configuration?

thx...

m_yates 07-20-2004 07:12 AM

The configuration will be in the /boot directory. Look for something named config-somename. When you get your kernel source, you will extract it to the /usr/src directory, then create a symbolic link to /usr/src/linux. Save the kernel archive to /usr/src then:
Code:

cd /usr/src
tar -jxf linux-2.6.7.tar.bz2
rm linux
ln -s linux-2.6.7 linux

You can then copy your existing configuration over to /usr/src/linux and rename it .config:
Code:

cd /usr/src/linux
cp /boot/config-SomeName .config
make oldconfig

Make oldconfig will highlight changes in kernel options since your old configuration version. It will pause at each new option and ask you to enter a selection (yes, no , or module). You can just hit enter to accept the default selection (usually default is N). Unless the option has something to do with hardware on your machine or specific funtionality you know you need, it is a good idea just to accept the default selection. After make oldconfig runs, you can enter:
Code:

make menuconfig
to open a window that allows you to change your kernel configuration to do some optimization, or add drivers you need, etc.

0x86 07-20-2004 05:03 PM

But wouldnt your drivers allread be selected because you are building off the old .config?

m_yates 07-20-2004 05:19 PM

Yes they would be. That is why I always start with a working configuration. But, for example, your kernel may be compiled for a 386 processor and you might want to optimize it for your 686 processor instead. Or, you may not use ISDN networking, so you can remove the ISDN subsystem from your kernel. Or, a newer version of the kernel may have a driver option that the old one didn't. As an example, I use an nforce2 motherboard that has integrated sound and networking that use proprietary nvidia drivers. When I installed linux, it used kernel 2.4.21. I had to manually add the drivers to get networking up and it is a real pain. When I upgraded to kernel, 2.4.26, "make oldconfig" showed a new option to use a reverse engineered network driver for nforce chips, so I enabled that in the kernel and my networking works. If I upgrade the kernel again and use my existing configuration, the new kernel will have that driver as well.


All times are GMT -5. The time now is 08:59 AM.