[CentOS] Trying to find all the kernel modules needed for my machine using shell script

m.roth at 5-cent.us m.roth at 5-cent.us
Fri Jul 13 13:48:12 UTC 2012


Aft nix wrote:
> Hi,
>
> I'm developing kernel modules right now, and the build times are
> starting to get under my skin. As a side effect i'm taking way too
> many "coffee" breaks during builds.
<snip>
> But Although i understand the stuffs, this is still a lot of tweaks to
> make that work.
>
> 2.6.32 and later kernels added a new target "make localmodconfig".
> which scans through "lsmod" and change the .config appropriately. So i
> thought i found my "automation". But this perl script has some problem
> too.
>
> This thread describes the problems :
> https://bbs.archlinux.org/viewtopic.php?pid=845113

#1: archlinux? Are you working in CentOS or arch linux?
>
> There was also a proposed solution which apparently worked for others
> , is to run the script directly instead of using make's target.

#2: That's because people don't understand make at all. Go read the
O'Reilly book on Make: <http://shop.oreilly.com/product/9780596006105.do>.
Grok it.
>
> Although for me, make localmodconfig does not work at all. its because
> of the following :
>
>     $make clean

#3: you complain about how long it takes to build, yet you're doing a make
clean *first*. See #2. Then *DO* *NOT* use make clean unless it's
absolutely necessary.

>     $make mrproper
>     $cp /boo/config-'uname -r' .config

#4: Have you looked at the contents of .config to verify they're what you
expect?

>     $make localmodconfig

#5: How is .config used in the makefile?
>
> and it haults with
>
>     vboxguest config not found!!
>     nf_defrag_ipv6 config not found!!
>     vboxsf config not found!!
>     vboxvideo config not found!!
>
> The thing is my kernel development environment is inside virtualbox.
> These vbox modules were installed when i chose to install "virtualbox
> guest addtion".

#6: Did you install the dev modules *in* the virtualbox, as opposed to the
host?
<snip>
> Now the workaround this obviously unloading these module and trying
> again. But I'm thinking if there is patch for the
> "streamline_config.pl" which will enable the user to exclude certain
> modules if s/he wants. Problem is i have "zero" knowledge about perl
> and i like it that way.

#7: You're building kernel mods, and don't want to know about perl?
>
> So my problems in "nutshell"
>
> 1) Patching streamline_config.pl so i can give a list of module name
> as argument which it will exclude from processing the config file.

#8: Perhaps if you looked at the perl script, or ran it with -? or -h or
--help, it might *tell* you?

<snip due to your followup email>
>
> Additional info:
<snip>
> 3) Is there any way i can get the "Centos specific" patches in "plain
> patch" format? That means i dont wanna do things in src-rpm way.
> If the patches are available in normal patch format i can keep
> everything tidy in my kernel git tree.

#9: yum update [package], perhaps?

#10: And under annoyances, turn on your damn spellchecking. "Stuffs",
"hault"....

         mark "and maybe your makefile needs a VPATH corrected"




More information about the CentOS mailing list