All of lore.kernel.org
 help / color / mirror / Atom feed
* Trying to find all the kernel modules needed for my machine using shell script
@ 2012-07-13 12:29 Aft nix
  2012-07-13 12:33 ` Aft nix
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Aft nix @ 2012-07-13 12:29 UTC (permalink / raw)
  To: kernelnewbies

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Trying to find all the kernel modules needed for my machine using shell script
  2012-07-13 12:29 Trying to find all the kernel modules needed for my machine using shell script Aft nix
@ 2012-07-13 12:33 ` Aft nix
  2012-07-13 12:42 ` Mulyadi Santosa
       [not found] ` <CABA31DqOZC2e=asAO5VqvhPmR3sep-e-fGSDGWZHJX66eGukbQ@mail.gmail.com>
  2 siblings, 0 replies; 6+ messages in thread
From: Aft nix @ 2012-07-13 12:33 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Jul 13, 2012 at 6:29 PM, Aft nix <aftnix@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.
> --
> -aft

You 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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Trying to find all the kernel modules needed for my machine using shell script
  2012-07-13 12:29 Trying to find all the kernel modules needed for my machine using shell script Aft nix
  2012-07-13 12:33 ` Aft nix
@ 2012-07-13 12:42 ` Mulyadi Santosa
  2012-07-13 13:03   ` Aft nix
       [not found] ` <CABA31DqOZC2e=asAO5VqvhPmR3sep-e-fGSDGWZHJX66eGukbQ@mail.gmail.com>
  2 siblings, 1 reply; 6+ messages in thread
From: Mulyadi Santosa @ 2012-07-13 12:42 UTC (permalink / raw)
  To: kernelnewbies

Hi :)

On Fri, Jul 13, 2012 at 7:29 PM, Aft nix <aftnix@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/

IMHO, first you need to experiment to get the best config. Like you
have found, make localmodconfig (is it?) will help.

Afterward, maybe what you need is compilation speed up? If so, have
you tried ccache?

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Trying to find all the kernel modules needed for my machine using shell script
  2012-07-13 12:42 ` Mulyadi Santosa
@ 2012-07-13 13:03   ` Aft nix
  2012-07-13 17:40     ` Mulyadi Santosa
  0 siblings, 1 reply; 6+ messages in thread
From: Aft nix @ 2012-07-13 13:03 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Jul 13, 2012 at 6:42 PM, Mulyadi Santosa
<mulyadi.santosa@gmail.com> wrote:
> Hi :)
>
> On Fri, Jul 13, 2012 at 7:29 PM, Aft nix <aftnix@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/
>
> IMHO, first you need to experiment to get the best config. Like you
> have found, make localmodconfig (is it?) will help.
>
> Afterward, maybe what you need is compilation speed up? If so, have
> you tried ccache?

No i've not. But after viewing their website, it seems very
interesting. I will definitely try that out.

Thanks for the tip.
>
> --
> regards,
>
> Mulyadi Santosa
> Freelance Linux trainer and consultant
>
> blog: the-hydra.blogspot.com
> training: mulyaditraining.blogspot.com



-- 
-aft

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [CentOS] Trying to find all the kernel modules needed for my machine using shell script
       [not found] ` <CABA31DqOZC2e=asAO5VqvhPmR3sep-e-fGSDGWZHJX66eGukbQ@mail.gmail.com>
@ 2012-07-13 14:39   ` Aft nix
  0 siblings, 0 replies; 6+ messages in thread
From: Aft nix @ 2012-07-13 14:39 UTC (permalink / raw)
  To: kernelnewbies

On Fri, Jul 13, 2012 at 7:34 PM, Akemi Yagi <amyagi@gmail.com> wrote:
> On Fri, Jul 13, 2012 at 5:29 AM, Aft nix <aftnix@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
>

So bottom line is, i can't get the patches other than src-rpms?


I better learn this thing, i guess.
cheers.
 _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos



-- 
-aft

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Trying to find all the kernel modules needed for my machine using shell script
  2012-07-13 13:03   ` Aft nix
@ 2012-07-13 17:40     ` Mulyadi Santosa
  0 siblings, 0 replies; 6+ messages in thread
From: Mulyadi Santosa @ 2012-07-13 17:40 UTC (permalink / raw)
  To: kernelnewbies

Hi :)

On Fri, Jul 13, 2012 at 8:03 PM, Aft nix <aftnix@gmail.com> wrote:
> No i've not. But after viewing their website, it seems very
> interesting. I will definitely try that out.

You welcome... :) have fun...

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-07-13 17:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-13 12:29 Trying to find all the kernel modules needed for my machine using shell script Aft nix
2012-07-13 12:33 ` Aft nix
2012-07-13 12:42 ` Mulyadi Santosa
2012-07-13 13:03   ` Aft nix
2012-07-13 17:40     ` Mulyadi Santosa
     [not found] ` <CABA31DqOZC2e=asAO5VqvhPmR3sep-e-fGSDGWZHJX66eGukbQ@mail.gmail.com>
2012-07-13 14:39   ` [CentOS] " Aft nix

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.