Kernelconfig from scratch: Difference between revisions

From SaruWiki
Jump to navigation Jump to search
(config methods described)
(added lspci hw scanning)
 
Line 9: Line 9:


Now, the task is on you to navigate through the whole set of kernel configuration menus, and change all settings from their default value that you need changed. This requires a lot of knowledge about all features that are available, both in hardware support and in features, and also it requires you to know enough to choose all features that you will be needing.
Now, the task is on you to navigate through the whole set of kernel configuration menus, and change all settings from their default value that you need changed. This requires a lot of knowledge about all features that are available, both in hardware support and in features, and also it requires you to know enough to choose all features that you will be needing.
A feature of interest is the following: to find out ''exactly'' which hardware components your system contains, in Linux terms, you can use the utility ''[[Big Bag'o'utilities | lspci]]'' This gives you a description of all the PCI devices in your server, which should include the chipset, videocard, network card, and most important of all, your storage controller. And if you issue the command in the form ''lspci -n'', then you get a numeric result (one line per device) like this:
00:00.0 0600: 8086:3590 (rev 0c)
00:00.1 ff00: 8086:3591 (rev 0c)
00:02.0 0604: 8086:3595 (rev 0c)
00:04.0 0604: 8086:3597 (rev 0c)
00:05.0 0604: 8086:3598 (rev 0c)
(etcetera)
This result can be pasted into the [http://kmuto.jp/debian/hcl/index.cgi Debian GNU/Linux device driver check page]. This site can translate the data into description of the devices, but more importantly it can tell you for each device which Linux driver works with it.

Latest revision as of 20:19, 26 May 2008

Creating a Kernel Config from scratch

If you've followed the "roll your own kernel" section, you wind up at a point where you have the Linux kernel source for a certain version of Linux, but no configuration file to compile that source into a viable kernel - more specifically, a kernel that is viable for your hardware and your purposes. Suppose you decide to make such a kernel configuration file from scratch, without any example file or other starting point. What do you have to do?

First off, there are three main ways in which to create the required kernel configuration file:

  • when in the source directory (e.g. /usr/src/linux-2.6.25.4), the command make config will prompt you with all the questions that need to be answered. Let me tell you: you don't want that. The list of questions to be answered is very, very long. I don't know any circumstance where you'd choose this method to configure the kernel over the following two.
  • make menuconfig
    when in the source directory (e.g. /usr/src/linux-2.6.25.4), the command make menconfig will start up a "curses-based" configuration menu. Here, you can enter submenus, and for each configurable item request help. This is the method we prefer for configuring a kernel.
  • when the server has an x-server available, the command make xconfig will open an X window, where you can configure the kernel almost exactly like with the previous method. The main difference is that you can click (radio)buttons to enable/disable features.

Now, the task is on you to navigate through the whole set of kernel configuration menus, and change all settings from their default value that you need changed. This requires a lot of knowledge about all features that are available, both in hardware support and in features, and also it requires you to know enough to choose all features that you will be needing.

A feature of interest is the following: to find out exactly which hardware components your system contains, in Linux terms, you can use the utility lspci This gives you a description of all the PCI devices in your server, which should include the chipset, videocard, network card, and most important of all, your storage controller. And if you issue the command in the form lspci -n, then you get a numeric result (one line per device) like this:

00:00.0 0600: 8086:3590 (rev 0c)
00:00.1 ff00: 8086:3591 (rev 0c)
00:02.0 0604: 8086:3595 (rev 0c)
00:04.0 0604: 8086:3597 (rev 0c)
00:05.0 0604: 8086:3598 (rev 0c)
(etcetera)

This result can be pasted into the Debian GNU/Linux device driver check page. This site can translate the data into description of the devices, but more importantly it can tell you for each device which Linux driver works with it.