2012年3月15日 星期四

Generating config for new kernel from old kernel config

  1. In new kernel source,
    make allmodconfig KCONFIG_ALLCONFIG=/boot/config-of-old-kernel
    This will create a kernel config of the new kernel, and answered all with "m" based on the old config.

  2. Build the kernel and boot. Go on if it boot without issues.
  3. Disable all the modules not used currently in .config.
    make localmodconfig
  4. Have all modules (m) in .config become built-in (y)
    make localyesconfig
  5. Save the .config as minimal config to ./defconfig
    make savedefconfig


"make help" in kernel source:
localmodconfig - Update current config disabling modules not loaded
localyesconfig - Update current config converting local mods to core

savedefconfig - Save current config as ./defconfig (minimal config)

allnoconfig - New config where all options are answered with no
allyesconfig - New config where all options are accepted with yes
allmodconfig - New config selecting modules when possible
alldefconfig - New config with all symbols set to default
KCONFIG_ALLCONFIG
To specify a filename that contains config options that the user requires to be set to a specific value

1 則留言:

Ange 提到...

太好用的東西...感謝..0rz