FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-13-2012, 01:34 PM
Akemi Yagi
 
Default 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@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
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 01:48 PM
 
Default 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"

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 02:37 PM
Aft nix
 
Default Trying to find all the kernel modules needed for my machine using shell script

On Fri, Jul 13, 2012 at 7:48 PM, <m.roth@5-cent.us> wrote:
<snip>
> #1: archlinux? Are you working in CentOS or arch linux?

I'm using CentOS. But the problem was "make localmodconfig" is not
working. I don't see how a question related to "building kernel.org
kernel" relates to distribution, just because the problem was
discussed in a distribution's forum. Same kind of discussion can be
found(about faulty behaviour of "make localmodconfig") in
debian/ubuntu forums if use try google.

>>
>> 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.

Not understanding how this relates to ignorance of "make". may be you
are pointing about the environment variables and stuffs.

>>
>> 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.
>

I'm trying to tune up my kernel build. so i need to see which way it
performs the best. During development i dont "clean". I dont even make
the whole tree. i just build the part of the tree i'm developing.


>> $make mrproper
>> $cp /boo/config-'uname -r' .config
>
> #4: Have you looked at the contents of .config to verify they're what you
> expect?

Yep, i have run make menuconfig to see what's enabled. But you there
is thousands of options, its not practical to go through all of them.
I just see common options. Like if the driver for my ethernet card is
enabled "only". stuffs like that.

>
>> $make localmodconfig
>
> #5: How is .config used in the makefile?

Its used by default.

>>
>> 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?

Yes.

> <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?

I managed to make it through without "perl" till now.

>>
>> 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?

Honestly i've never checked it. i've just checked. nothing comes up
with --help, -h -?. All are unknown options.


>
> <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?
>

trying not involve *rpm*. I like my git tree .

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

English is not my native language. When i type quickly sometimes,
correcting all the spelling mistake seems like a burden. Sorry for the
annoyance in caused.

>
> mark "and maybe your makefile needs a VPATH corrected"
>

Thanks for your insight.

cheers.
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos



--
-aft
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 02:39 PM
Aft nix
 
Default Trying to find all the kernel modules needed for my machine using shell script

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@centos.org
> http://lists.centos.org/mailman/listinfo/centos



--
-aft
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 03:01 PM
 
Default Trying to find all the kernel modules needed for my machine using shell script

Aft nix wrote:
> 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.
>
> So bottom line is, i can't get the patches other than src-rpms?

That's why I mentioned yum update <package>. Yum will get the dependencies
as well.
>
> I better learn this thing, i guess.

You're on CentOS and not using yum to update the system? You very much
need to learn it.

mark

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 05:48 PM
Aft nix
 
Default Trying to find all the kernel modules needed for my machine using shell script

On Fri, Jul 13, 2012 at 9:01 PM, <m.roth@5-cent.us> wrote:
> Aft nix wrote:
>> 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.
>>
>> So bottom line is, i can't get the patches other than src-rpms?
>
> That's why I mentioned yum update <package>. Yum will get the dependencies
> as well.
>>
>> I better learn this thing, i guess.
>
> You're on CentOS and not using yum to update the system? You very much
> need to learn it.
>

I know how yum works. i'm a long time centos user. I'm talking about
the "centos specific patches" for the kernel. if i roll
these patches over vanilla kernel, it will become the kernel source
where kernel rpms are built. Now centos distributes its kernel sources
through src-rpms(srpms). Which is "already patched" kernel source.
What i want is just the patches. so i that i can roll it over vanilla
kernel
and get identical source as those distributed through srpms.

I hope i'm clear now.

cheers.

> mark
>
> _______________________________________________
> CentOS mailing list
> CentOS@centos.org
> http://lists.centos.org/mailman/listinfo/centos



--
-aft
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-13-2012, 06:17 PM
Patrick Lists
 
Default Trying to find all the kernel modules needed for my machine using shell script

On 13-07-12 19:48, Aft nix wrote:
> I know how yum works. i'm a long time centos user. I'm talking about
> the "centos specific patches" for the kernel.

Afaik they are not CentOS specific patches. They are Red Hat patches
(unless CentOS add additional patches).

> if i roll
> these patches over vanilla kernel, it will become the kernel source
> where kernel rpms are built. Now centos distributes its kernel sources
> through src-rpms(srpms). Which is "already patched" kernel source.
> What i want is just the patches. so i that i can roll it over vanilla
> kernel
> and get identical source as those distributed through srpms.

Afaik you can't get the individual patches since that is not how Red Hat
distributes their kernel src rpm which CentOS rebuilds. So you could ask
Red Hat for the individual patches. Good luck with that. They started
distributing pre-patched kernel sources to make competitors live (not
necessarily CentOS) a bit more difficult. There's a long discussion
about this on the Intertubes. Don't have the link anymore so Google is
your friend.

If all else fails, you could do a diff between the vanilla kernel and
the one distributed by Red Hat.

Regards,
Patrick
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-14-2012, 08:55 PM
Johnny Hughes
 
Default Trying to find all the kernel modules needed for my machine using shell script

On 07/13/2012 01:57 PM, Leonard den Ottolander wrote:
> Hello Aft,
>
> On Fri, 2012-07-13 at 23:48 +0600, Aft nix wrote:
>> Now centos distributes its kernel sources
>> through src-rpms(srpms). Which is "already patched" kernel source.
>> What i want is just the patches. so i that i can roll it over vanilla
>> kernel
>> and get identical source as those distributed through srpms.
> As CentOS is essentially a rebuild of RHEL the SRPMs are mostly the same
> as upstreams. Which sadly means that since v.6 the kernel source is
> distributed as a pre patched tarball.

The latest CentOS-5 kernels are also now shipped this way as well ...
one big Red Hat patch against the kernel tarball.

CentOS only makes 2 minor changes to the spec file before we build the
kernel (so that the generated signing key for modules says "CentOS" and
not Red Hat, Inc). We do not roll in any additional patches into the
main kernel. We do roll in patches into the CentOSPlus kernel ... so
you can look at the SRPM to see how we roll in our patches there.

Here is an article for you to read concerning the way Red Hat now ships
their kernel:

http://www.channelregister.co.uk/2011/03/04/red_hat_twarts_oracle_and_novell_with_change_to_so urce_code_packaging/

And here is our response:

http://centosnow.blogspot.com/2011/03/how-new-kernel-srpm-distribution.html

Thanks,
Johnny Hughes


_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-14-2012, 09:07 PM
Johnny Hughes
 
Default 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@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=bccf07ddd0b67a0e2f761fd5721 f274a49bf9bbb;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?

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 03:48 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org