LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-24-2008, 11:00 PM   #1
Cotobear
Member
 
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100

Rep: Reputation: 16
Compiling my first kernel


Hey everyone,

I've been spending the last bit researching and reading about compiling a kernel and am currently in the process of slimming down the kernel and playing with the options.

Yea sure, why mess with what is working so perfectly fine, but I'd like to learn.

One thing I'm having a problem with though is determining which support options I should be enabling. To give an example, there are many many options for Device Drivers -> Hardware Monitoring support (as well as many of the Device Drivers options) but I'm having troubles determining what exactly sits inside my system and I'm not even sure how to find out what it's composed of.

I'm running a Dell Inspiron 5150. Where would I go to find in depth information about what is inside? I've looked around on the web to find the very uninformative "52x cd-rom, pentium 4 3.06 GHz, ..." and was hoping there was some way to determine the specific hardware on the motherboard.

Thanks in advance,
Coto
 
Old 06-24-2008, 11:23 PM   #2
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
From a running system, the following commands can be helpful:
Code:
# lspci -vv
This lists all of the PCI interfaces on your computer in fairly good detail. It will tell you what the majority of your hardware is -- but not all of it.
Code:
# cat /proc/cpuinfo
Tells you about your CPU.
Code:
# lsmod
A very handy command. This lists all of the modules currently being used. If you run the generic-smp kernel, most things are built as modules -- so the module for most of your hardware will be listed here. If you use the huge kernel instead, then many modules are built into the kernel and will not be listed in lsmod output (unfortunately).

You should use the default Slackware kernel's .config file as a starting point to prevent accidentally missing a module (and therefore either reducing functionality or completely trashing the kernel). Advice for doing so is located here. That is a GREAT kernel compiling guide for Slackware.

If you're interested in hardware monitoring, running `sensors-detect` as root will output a list of modules that your system can use to monitor the hardware status (like temperature, etc.).

Beyond all of that, you may wish to go through your /var/log/dmesg file to see more details about what's in your system (dmesg output is often noisier than the other commands, but contains some valuable information).
 
Old 06-24-2008, 11:46 PM   #3
Cotobear
Member
 
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100

Original Poster
Rep: Reputation: 16
Exactly what I was looking for. Thanks T3. I've read the guide mentioned above as well. I was more or less searching for things I could get rid of that were being compiled into the kernel.
 
Old 06-25-2008, 01:21 PM   #4
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
I think you should take a look at chapter 7 of this free online book:
http://www.kroah.com/lkn/

It's a good book, recommend you read some of it.
 
Old 06-25-2008, 11:33 PM   #5
onebuck
Moderator
 
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: Slackware®
Posts: 13,925
Blog Entries: 44

Rep: Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159Reputation: 3159
Hi,

The 'Linux Kernel in a Nutshell' that 'H' recommended is a great desk reference to have on hand.

This link and others are available from 'Slackware-Links'. More than just Slackware® links!
 
Old 06-27-2008, 06:09 PM   #6
Cotobear
Member
 
Registered: Nov 2007
Location: Canada
Distribution: Slackware 12.0
Posts: 100

Original Poster
Rep: Reputation: 16
Thanks both. I just finished downloading.. I guess I'll make it a weekend project.
 
Old 06-28-2008, 02:16 AM   #7
Chaves
Member
 
Registered: Mar 2008
Posts: 33

Rep: Reputation: 15
Quote:
#!/bin/bash
#
# find_all_modules.sh
#
for i in `find /sys/ -name modalias -exec cat {} \;`; do
/sbin/modprobe --config /dev/null --show-depends $i ;
done | rev | cut -f 1 -d '/' | rev | sort -u
This Script will list all modules that are loaded in your system. I sometimes find it quite useful when recompiling a kernel.

In addition to that, you can boot from latest slax cd and see what settings are selected automatically. Slax usually gives a very good auto configuration of the system.

And read the linux kernel in a nutshell=) that helps as well=)

Make sure that you make a backup of your current kernel and you have internet access when booting from a new kernel. It might help you deal with kernel panic quikly=)
Good luck!
 
Old 06-30-2008, 05:56 PM   #8
dezza
Member
 
Registered: Nov 2004
Location: Denmark
Distribution: ArchLinux, Debian, Gentoo, Ubuntu, VoidLinux
Posts: 133

Rep: Reputation: 18
1. Be sure that all your device drivers are starred as built-in or M as Module.
2. Set CPU type, and review other configurations
3. Turn off any unessecary components (like experimental drivers for more than one gigabit netcards)
4. Patch it (Only if you have special configurations)
5. Make (Compiling...)
6. Copy
7. Add to grub menu.
8. Reboot.

If failed first do "make mrproper", this will clean up building directories and give you a second try.
 
  


Reply



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
/lib/modules/2.4.33.3/kernel/sound folder is missing after compiling kernel Paulo Góes Slackware - Installation 2 04-15-2007 08:42 PM
compiling kernel problem --- Kernel panic: unable to mount root fs ........ anthonymts123 Linux - General 5 07-31-2006 02:29 AM
Where Is Kernel Directory In Rh9(kernel 2.4.20-8), For Compiling HSP56 MR(pctel) Mode rudy3107 Linux - Software 1 07-25-2004 04:17 AM
Kernel compiling and module compiling tarballed Linux - General 1 12-22-2002 05:31 PM

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

All times are GMT -5. The time now is 07:39 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
Open Source Consulting | Domain Registration