Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux Timesaving Techniques For Dummies.pdf
Скачиваний:
59
Добавлен:
15.03.2015
Размер:
15.98 Mб
Скачать

162 Technique 24: Creating a Custom Kernel

Figure 24-3: The Configuration help screen.

3.Make any changes that you want.

A couple of useful features to point out are alternate file systems and USB support for otherwise unsupported devices (such as cameras or USB scanners).

If you have a single CPU in your machine, (which is likely), you should choose to disable SMP support in your new kernel. This feature is included on the Processor Type and Features menu and is labeled Symmetric Multiprocessing Support. Click the button next to the n before continuing.

4. When you’ve chosen the options you want to include in your new kernel, choose <Exit> and save your work.

Step 5: Building the Kernel

Now it’s time to start building the kernel. (Note: Some of these steps will run for quite some time, so you better grab a donut.) Follow these steps:

1. At the command line, enter the following command and press Enter:

# make dep

The make dep command computes dependencies for the features that have changed.

2. Enter the following command and press Enter:

# make clean

This command cleans up old unwanted files to prepare for the build.

3. Choose a name for your new kernel (typically, just add the current date to the end of the name). Use your favorite editor to change the

EXTRAVERSION variable in the Makefile file. To use kate (a KDE-friendly editor), type in the following command and press Enter:

#kate Makefile

4.Add the date to the end of the EXTRAVERSION variable (after the word custom).

EXTRAVERSION=-1.2115.nptlcustom012504

Save the file and close the editor.

5.At the command line, type the following command and press Enter:

#make bzImage

This step takes quite a while, possibly a few hours, because you’re compiling most of the kernel source code here.

6. Type the following command and press Enter:

# make modules

This compiles the source code for the kernel modules that you selected. This step also takes some time.

You did make a boot disk and test it, right? If not, stop what you’re doing, go back to “Step 1: Making an Emergency Plan, or Boot Disk,” earlier in this technique, and follow the steps there.

7. Type the following command and press Enter:

# make modules_install

This step installs the new kernel modules. Don’t worry — you’re not replacing your current kernel; you’re just adding another choice.

Step 5: Building the Kernel 163

8.

9.

Type the following command and press Enter:

# make install

This step copies the new kernel into place and adds the kernel to your boot menu.

To use the new kernel, reboot and highlight the new kernel in the list of choices. Then press Enter.

Your system boots with the newly built kernel.

Building kernels can be a tricky business. If you experience trouble at boot time (kernel panic!), reboot into your old kernel, and try building the new kernel again.

Write down error messages! You can Google for them later to see if other Linux users have had similar problems and published workarounds on the Web.

Соседние файлы в предмете Операционные системы