from debian-admin

 Luckily I found a script by Steven Rostedt that did
almost what was needed – it did the hard part of mapping from module names to config settings –
and I adapted it to (local copy). Run this at
the root of your kernel tree; it will write the new .config to stdout.

really nice script