Kernelconfig from scratch

From SaruWiki
Revision as of 17:34, 25 May 2008 by Saruman! (talk | contribs) (config methods described)
Jump to navigation Jump to search

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.