LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices

Reply
 
LinkBack Search this Thread
Old 10-22-2012, 07:44 AM   #1
drimades
Member
 
Registered: Jun 2006
Posts: 60

Rep: Reputation: 15
Kernel configuration according to hardware


I'm trying to build a small kernel image with the minimal requirements based on the hardware I have in my laptop. Any idea about how to deal with that? How can I get info about my hardware and somehow translate it in kernel configuration settings?
 
Old 10-22-2012, 07:56 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Basic tools to get hardware info:
Code:
lspci
lsusb
lshw
dmesg
Some of the above command might not yet be installed on your system.

Also: When compiling the kernel you might want to run make defconfig, which sets entries to the default symbol values from either arch/$ARCH/defconfig or arch/$ARCH/configs/${PLATFORM}_defconfig, depending on the architecture.

This means doing one extra step when building the kernel:
Code:
make mrproper   # as stated in the LFS book
make defconfig  # the extra step
make menuconfig # as stated in the book
Use the make menuconfig step to tweak with the info found by the hardware info commands.
 
Old 10-22-2012, 08:17 AM   #3
drimades
Member
 
Registered: Jun 2006
Posts: 60

Original Poster
Rep: Reputation: 15
Thanks for your answer!
I've used lspci -k to have a list of the PCI device drivers in use. I used it to configure the kernel, but it helps only for the PCI devices. Is there any similar option for the other commands you mentioned?
 
Old 10-22-2012, 09:00 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371Reputation: 2371
Quote:
Originally Posted by drimades View Post
I've used lspci -k to have a list of the PCI device drivers in use. I used it to configure the kernel, but it helps only for the PCI devices.
This only shows drivers that are used and thus present and set as kernel option.

You might use this info if the command was given on a system that actually recognizes and sets-up all(??) hardware/devices.

Quote:
Originally Posted by drimades View Post
Is there any similar option for the other commands you mentioned?
Assuming that options are set to be modular, you might have a look at the following output:
Code:
cat /proc/modules
Some info on character/block devices can be found here:
Code:
cat /proc/devices
 
Old 10-22-2012, 10:23 AM   #5
Keith Hedger
Member
 
Registered: Jun 2010
Location: Devon,UK
Distribution: Linux From Scratch, Slackware64,
Posts: 734

Rep: Reputation: 166Reputation: 166
This : http://kmuto.jp/debian/hcl/ might be useful
 
  


Reply

Tags
configuration, kernel, lfs


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel hardware configuration file.............? pointdexter67 Linux - Software 1 01-13-2010 02:28 AM
Best Kernel version/configuration for this hardware trepatudo Linux - Server 2 09-29-2009 01:02 PM
Hardware configuration alint7 Linux - Hardware 0 02-11-2005 07:07 PM


All times are GMT -5. The time now is 07:32 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration