Duplicating an Old Configuration

One issue that crops up repeatedly when configuring a kernel is how to transfer a working kernel configuration to a new kernel. If you've already compiled a kernel once, or if you've installed your distribution's kernel source and want to duplicate that configuration in a new kernel, follow these steps:

1. Copy the .config file from the old kernel's source code directory to the new kernel's source code directory.

2. Type make oldconfig. This command works much like make config, except that it asks only about options that are supported by the new kernel but that aren't present in the .config file—that is, new options.

If you're uncertain about any of the new options, make a note about them and, when the make oldconfig process finishes, type make menuconfig or make xconfig and examine the help text for the option to help you decide whether to include it.

This procedure can greatly simplify configuring a new kernel if you've already configured an earlier kernel. The best feature of this procedure is that it reduces the odds of a configuration error creeping into the process—you're less likely to overlook a critical option while re-creating a configuration when you use this process, compared to using make config or some other conventional configuration process.

Duplicating the old configuration works best when you're moving between kernels that are not too different in version number. For instance, moving between kernels that differ by just one or two in their final (c) numbers is likely to work well and produce very few prompts. Moving between more widely separated numbers, such as a 2.0.x kernel and a 2.5.x kernel, will produce a huge number of prompts for new options. Performing such a transfer might conceivably produce a configuration that doesn't work, particularly if some of the new options are critical for your system but you pick the wrong value.

Team LiB

1 previous

Team LiB

^ previous

0 0

Post a comment