Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
need to run two different kernel configs...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
uglyman
Apprentice
Apprentice


Joined: 21 Apr 2002
Posts: 216
Location: Seattle, WA USA

PostPosted: Mon May 23, 2005 5:25 am    Post subject: need to run two different kernel configs... Reply with quote

hiyas,
I have a new ibook 12" that I am running gentoo on. I am very happy with it. It is a drag that airport extreme isn't supported yet (thanks to those who are working on that driver), but everything else is working. To work around the lack of wifi I got in touch with a guy who just released a new driver for certain usb-wifi chipsets. The driver is available here: http://etudiants.insia.org/~jbobbio/ural-linux/

It is a very young project (ported from a BSD driver) and there are still locking problems. I have found that it generates a stack trace and segfaults unless I turn off preemtible in the kernel config. I have been in touch with the developer and he is working on the problem. For now I can just run a kernel that isn't preemtible when I need wifi. When I am using ethernet I would rather use a preemtible kernel. It really isn't a big deal, I can leave preemtible off until the driver is fixed... but it got me thinking that I don't know how to have more than one set of kernel modules.

What I mean is that, I know how to have different kernels and set up yaboot to let me choose one. But it seems that changing certain setttings in the kernel causes the modules to be rebuilt also.... if these modules were compiled from the same kernel version I don't know of a way to install them side by side. As I said I don't really NEED this, but I am curious how it can be done.

I am kinda tired and not sure if I am explaining myself very well. I mean that I know you can have sets of modules for different kernel versions but what about the same version with a couple different configs.

I am gonna go to bed before this post gets any longer.
g'night
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Mon May 23, 2005 5:41 am    Post subject: Reply with quote

Well, I think I understand you perfectly. :wink:

As you say, some configurations require recompilation of many dependencies. One of them is preemptivity, other could be the cpu type settings... Preemptivity need to modify all the modules, so they can be preempted if needed.

Thats the point why there is no easy way to accomplish what you want. At least not in the same source tree, because there would be to design a way to manage the .o files that are generated for one and other config in a separated way.

The most easy thing is to copy the full tree. For example, if you use /usr/src/gentoo-sources-2.6.11-r5 as your kernel source tree, you can copy it to /usr/src/gentoo-sources-2.6.11-r5_no_preempt, then modify there the config and compile, if you do a make install now the non-preemptive kernel will be named /boot/gentoo-sources-2.6.11-r5_no_preempt.
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
puggy
Bodhisattva
Bodhisattva


Joined: 28 Feb 2003
Posts: 1992
Location: Oxford, UK

PostPosted: Mon May 23, 2005 12:53 pm    Post subject: Reply with quote

I don't think you can really load preempt in and out of the kernel.
_________________
Where there's open source , there's a way.
Back to top
View user's profile Send private message
nixnut
Bodhisattva
Bodhisattva


Joined: 09 Apr 2004
Posts: 10974
Location: the dutch mountains

PostPosted: Mon May 23, 2005 1:36 pm    Post subject: Reply with quote

Quote:
What I mean is that, I know how to have different kernels and set up yaboot to let me choose one. But it seems that changing certain setttings in the kernel causes the modules to be rebuilt also.... if these modules were compiled from the same kernel version I don't know of a way to install them side by side. As I said I don't really NEED this, but I am curious how it can be done.

In /usr/src/linux there is a file called Makefile. In this file you can change the variable EXTRAVERSION. This way you can have to different kernels based on the same sources, but different configurations. The modules will be installed in seperate directories so one configuration doesn't trash the modules of the other configuration.
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


Joined: 30 Nov 2004
Posts: 10306
Location: Córdoba (Spain)

PostPosted: Mon May 23, 2005 6:56 pm    Post subject: Reply with quote

puggy wrote:
I don't think you can really load preempt in and out of the kernel.

No, you can't.

nixnut wrote:
Quote:
What I mean is that, I know how to have different kernels and set up yaboot to let me choose one. But it seems that changing certain setttings in the kernel causes the modules to be rebuilt also.... if these modules were compiled from the same kernel version I don't know of a way to install them side by side. As I said I don't really NEED this, but I am curious how it can be done.

In /usr/src/linux there is a file called Makefile. In this file you can change the variable EXTRAVERSION. This way you can have to different kernels based on the same sources, but different configurations. The modules will be installed in seperate directories so one configuration doesn't trash the modules of the other configuration.

Yes, they will be INSTALED in different version, but, as far as I understood in the first post, he wants not to have to compile the whole kernel for every little change. I dont know if this method can do that because I only used it a couple of times, and never recompiled. Can you answer this?

I mean, if you compile with preempt, then w/o, then change anything in the preempt config (a minor setting) and compile again, do you have to compile the whole kernel again? or, are the .o files for each version maintained appart, so you can take advantage of the previously compiled .o files? I really dont know that...

Thanks in advance. :D
_________________
Gentoo Handbook | My website
Back to top
View user's profile Send private message
uglyman
Apprentice
Apprentice


Joined: 21 Apr 2002
Posts: 216
Location: Seattle, WA USA

PostPosted: Mon May 23, 2005 8:58 pm    Post subject: Reply with quote

well I think what I wanted was the EXTRAVERSION variable.. actually I read about that some time ago and I should have thought of that. To clarify I want to sit down and compile the kernel and its modules twice, once with preemt and once without. Then I want to install both versions and be able to choose in yaboot which one I want. The problem I was having is that recompiling and installing would overwrite the modules from the previous compile/install.

thanks for the help!
Back to top
View user's profile Send private message
JoseJX
Retired Dev
Retired Dev


Joined: 28 Apr 2002
Posts: 2774

PostPosted: Tue May 24, 2005 10:55 am    Post subject: Reply with quote

I know I've told you before, but it's best to say this over and over:

*PLEASE* do not use preempt on PPC. It's not stable, even if it seems like it. You will eventually have cache corruption which will appear as random segfaults. The minimal gains are just not worth it at this point.

If it breaks, you get to keep the pieces. :)
_________________
Gentoo PPC FAQ: http://www.gentoo.org/doc/en/gentoo-ppc-faq.xml
Back to top
View user's profile Send private message
uglyman
Apprentice
Apprentice


Joined: 21 Apr 2002
Posts: 216
Location: Seattle, WA USA

PostPosted: Thu May 26, 2005 3:50 am    Post subject: Reply with quote

Hiya...

well I don't remember you telling _ME_ before, but Thanks for the info... I was not aware!
Jose perhaps you can just follow me around and keep me out of trouble from now on? :D

I have used gentoo for a long time but this is my first shot at it on ppc. I am sure I am missing a few other things like this... /me crosses fingers
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum