Aft nix
2012-Jul-13 12:29 UTC
[CentOS] Trying to find all the kernel modules needed for my machine using shell script
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. So i was looking for a way to build only the stuffs i need for my platform. Chapter 7 and 8 of "linux kernel in a nutshell" gave a good detail of how to do that by hand. Its a good read : http://www.kroah.com/lkn/ 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 There was also a proposed solution which apparently worked for others , is to run the script directly instead of using make's target. Although for me, make localmodconfig does not work at all. its because of the following : $make clean $make mrproper $cp /boo/config-'uname -r' .config $make localmodconfig 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". And the netfilter module might be a Distribution specific module(Lot of netfilter modules are not part of the mainline kernel, so its not a shock to me), which is not included in mainline kernel. 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. 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. 2) I've tried to run the script by myself. But running it directly fails with a error. [root at kernel-host-rh6 linux-2.6]# sh scripts/kconfig/streamline_config.pl scripts/kconfig/streamline_config.pl: line 45: my: command not found scripts/kconfig/streamline_config.pl: line 47: my: command not found scripts/kconfig/streamline_config.pl: line 48: chomp: command not found scripts/kconfig/streamline_config.pl: line 50: syntax error near unexpected token `(' scripts/kconfig/streamline_config.pl: line 50: `my @searchconfigs = (' Again my "zero" knowledge about perl does not helping my case. Additional info: I have faced the same thing in 2.6.32, 2.6.33, 2.6.35, 3.4, 3.4.rc1 .....(I constantly switch version for various reasons, everywhere the problem is same) You can access the script from kernel.org gitweb: http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=scripts/kconfig/streamline_config.pl;h=bccf07ddd0b67a0e2f761fd5721f274a49bf9bbb;hb=HEAD Its from 3.4.0. `git log --stat scripts/kconfig/streamline_config.pl` shows some activity recently on this file. But my problem persists. 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. -- -aft
Aft nix
2012-Jul-13 12:33 UTC
[CentOS] Trying to find all the kernel modules needed for my machine using shell script
On Fri, Jul 13, 2012 at 6:29 PM, Aft nix <aftnix at gmail.com> 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. > > So i was looking for a way to build only the stuffs i need for my > platform. Chapter 7 and 8 of "linux kernel in a nutshell" gave a good > detail of how to do that by hand. Its a good read : > http://www.kroah.com/lkn/ > > 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 > > There was also a proposed solution which apparently worked for others > , is to run the script directly instead of using make's target. > > Although for me, make localmodconfig does not work at all. its because > of the following : > > $make clean > $make mrproper > $cp /boo/config-'uname -r' .config > $make localmodconfig > > 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". > > And the netfilter module might be a Distribution specific module(Lot > of netfilter modules are not part of the mainline kernel, so its not a > shock to me), which is not included in mainline kernel. > > 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. > > 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. > > 2) I've tried to run the script by myself. But running it directly > fails with a error. > > [root at kernel-host-rh6 linux-2.6]# sh scripts/kconfig/streamline_config.pl > scripts/kconfig/streamline_config.pl: line 45: my: command not found > scripts/kconfig/streamline_config.pl: line 47: my: command not found > scripts/kconfig/streamline_config.pl: line 48: chomp: command not found > scripts/kconfig/streamline_config.pl: line 50: syntax error near > unexpected token `(' > scripts/kconfig/streamline_config.pl: line 50: `my @searchconfigs = (' > > Again my "zero" knowledge about perl does not helping my case. > > Additional info: > > I have faced the same thing in 2.6.32, 2.6.33, 2.6.35, 3.4, 3.4.rc1 > .....(I constantly switch version for various reasons, everywhere the > problem is same) > > You can access the script from kernel.org gitweb: > http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=scripts/kconfig/streamline_config.pl;h=bccf07ddd0b67a0e2f761fd5721f274a49bf9bbb;hb=HEAD > > Its from 3.4.0. `git log --stat scripts/kconfig/streamline_config.pl` > shows some activity recently on this file. But my problem persists. > > 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. > -- > -aftYou can ignore the "perl script" not running thing. I was trying trying run a perl script with "sh" in front of it. How horribly dumb i've been today :) cheers. -- -aft
Akemi Yagi
2012-Jul-13 13:34 UTC
[CentOS] Trying to find all the kernel modules needed for my machine using shell script
On Fri, Jul 13, 2012 at 5:29 AM, Aft nix <aftnix at gmail.com> 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)> 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.The CentOS way of "Build Your Own Kernel Modules" is described in this CentOS wiki article: http://wiki.centos.org/HowTos/BuildingKernelModules I suggest you try method 1 first to see if you can build your module. Once confirmed, you may want to proceed to method 3 to build a kABI-compatible module. You can ask further questions about kmods either here, or better yet, on the ELRepo's mailing list. ELRepo ( http://elrepo.org ) builds a number of kernel modules for RHEL/CentOS/SL. Akemi
m.roth at 5-cent.us
2012-Jul-13 13:48 UTC
[CentOS] Trying to find all the kernel modules needed for my machine using shell script
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"
Johnny Hughes
2012-Jul-14 21:07 UTC
[CentOS] Trying to find all the kernel modules needed for my machine using shell script
On 07/13/2012 07:29 AM, 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. > > So i was looking for a way to build only the stuffs i need for my > platform. Chapter 7 and 8 of "linux kernel in a nutshell" gave a good > detail of how to do that by hand. Its a good read : > http://www.kroah.com/lkn/ > > 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 > > There was also a proposed solution which apparently worked for others > , is to run the script directly instead of using make's target. > > Although for me, make localmodconfig does not work at all. its because > of the following : > > $make clean > $make mrproper > $cp /boo/config-'uname -r' .config > $make localmodconfig > > 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". > > And the netfilter module might be a Distribution specific module(Lot > of netfilter modules are not part of the mainline kernel, so its not a > shock to me), which is not included in mainline kernel. > > 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. > > 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. > > 2) I've tried to run the script by myself. But running it directly > fails with a error. > > [root at kernel-host-rh6 linux-2.6]# sh scripts/kconfig/streamline_config.pl > scripts/kconfig/streamline_config.pl: line 45: my: command not found > scripts/kconfig/streamline_config.pl: line 47: my: command not found > scripts/kconfig/streamline_config.pl: line 48: chomp: command not found > scripts/kconfig/streamline_config.pl: line 50: syntax error near > unexpected token `(' > scripts/kconfig/streamline_config.pl: line 50: `my @searchconfigs = (' > > Again my "zero" knowledge about perl does not helping my case. > > Additional info: > > I have faced the same thing in 2.6.32, 2.6.33, 2.6.35, 3.4, 3.4.rc1 > .....(I constantly switch version for various reasons, everywhere the > problem is same) > > You can access the script from kernel.org gitweb: > http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=blob;f=scripts/kconfig/streamline_config.pl;h=bccf07ddd0b67a0e2f761fd5721f274a49bf9bbb;hb=HEAD > > Its from 3.4.0. `git log --stat scripts/kconfig/streamline_config.pl` > shows some activity recently on this file. But my problem persists. > > 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.What are you doing to the kernel that we are not doing in the CentOSPlus kernel? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 262 bytes Desc: OpenPGP digital signature URL: <http://lists.centos.org/pipermail/centos/attachments/20120714/1e935a5f/attachment-0003.sig>