home | list info | list archive | date index | thread index

[OCLUG-Tech] how to configure a kernel *minimally* based on running system?

  • Subject: [OCLUG-Tech] how to configure a kernel *minimally* based on running system?
  • From: "Robert P. J. Day" <rpjday [ at ] crashcourse [ dot ] ca>
  • Date: Fri, 26 Apr 2013 12:48:37 -0400 (EDT)
  if there's a simple way to do this, i've managed to miss it. i want
to configure and build a new kernel for my 64-bit ubuntu laptop to
prep for writing and loading numerous kernel modules for an upcoming
device driver course, so i did the obvious:

  $ make defconfig

which used the currently supplied x86_64 kernel source defconfig file
which, unbeknownst to me, configures almost *nothing* as modules
(anymore?). in fact (and i'm not sure i should have noticed this
before now), the shipped file arch/arm/configs/x86_64_defconfig
selects absolutely *nothing* to be built as a module, and the only
settings that end up that way are ones where modular is the default
setting in the Kconfig file.

  the end result was that, before i realized it, i'd configured, built
and booted to a kernel that was missing most of what i needed -- the
output from "lsmod" was empty, no loaded modules.

  that won't work for me since, on my original kernel, i have 70+
loaded modules -- graphics driver, iptables, etc, etc. so i clearly
need to add some module selections, but i'd like to keep it minimal in
the sense of saying, "i want to start with a minimal kernel, but add
in module selections for whatever you currently see loaded", although
i'm unaware of any easy way to do that.

  am i just missing something trivially obvious?

rday

p.s.  i don't want to use the existing .config and run "make
oldconfig" since i don't want to select stuff to be built that i'm not
using. in short, i want the minimal kernel that does everything the
current kernel is doing, without building anything that has no value.

-- 

========================================================================
Robert P. J. Day                                 Ottawa, Ontario, CANADA
                        http://crashcourse.ca

Twitter:                                       http://twitter.com/rpjday
LinkedIn:                               http://ca.linkedin.com/in/rpjday
========================================================================