11

I downloaded a Linux Kernel from www.kernel.org, then I used menuconfig to customize it.

After a lot of customizing it works just like I need it to, and I don't want to loose this actual configuration, so I could later (in another machine, by example) download the same kernel version, and use my configuration. How could I do that?

10

Just copy .config file from source directory. This file contains your current configuration.

Also when updating sources you can do make oldconfig to preserve old changes and only decide what to do with new stuff, it will only ask about new configuration options (updates current configuration). You still need to move in your old .config file before you can use this.

| improve this answer | |
  • and also archive the .config's in github? – Chris K Jun 20 '12 at 23:49
7

One option is:

make savedefconfig

which will create a file named defconfig in your current directory. You can now copy this file to arch/<architecture>/configs/my_defconfig (take care that the file name has to end with _defconfig), e.g.:

cp defconfig arch/x86/configs/my_defconfig

When you've done this you can type the following to generate the .config from your configuration (for the provided architecture):

export ARCH=x86
make my_defconfig

I think this is preferred way to store kernel configurations and once it is set up it is easier to maintain since you can easily switch from one configuration to another.

| improve this answer | |
4

You can either save the config file to a custom location directly in menuconfig and load a custom one there as well or you can save the .config file from the kernel source location eg /usr/src/linux/.config

To save directly in menuconfig scroll down to the last two options Load / Save an Alternate Configuration File

| improve this answer | |
1

into Kenrel Source Directory copy ".config" and replace in to destination directory.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.