Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
how to automatically build kernel after gentoo-src update ?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 12:48 am    Post subject: how to automatically build kernel after gentoo-src update ? Reply with quote

when emerge world updates both gentoo-sources and lirc, lirc complains /usr/src/linux points to non built tree.

After updating gentoo-sources, is there a way to run genkernel all on a predefined conf ? or better, could it be possible to run a home made script ?

I already have a script that:
- insert apropriate conf in linux tree
- run genkernel
- update modules

I was hoping for a USE flag for gentoo-sources, but there seems to be none.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Jan 17, 2007 1:24 am    Post subject: Re: how to automatically build kernel after gentoo-src updat Reply with quote

doublehp wrote:
I was hoping for a USE flag for gentoo-sources, but there seems to be none.

This is probably not what you are looking for, but
Code:
# echo "sys-kernel/gentoo-sources -symlink" >> /etc/portage/package.use

would fix the problem you are having with lirc by pointing /usr/src/linux to the old kernel sources.
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 1:47 am    Post subject: Reply with quote

No it's not. Cause it would never upgrade my kernel. Let's put it an other way: some how, emerge always compiles and update everything, so that as soon as emerge terminates (sucessfully, + revdeps and some other cheries ...), the system is almost "up to date", configured, and have brand new versions of every thing.

Updateing kernel requires a reboot; that due to Linux not being a uK. Still, if I emerge world and reboot, everything *is* up to date *except* the kernel. Still, all tools are ready for this: genkernel has options to catch an old conf.

In other words: when we emerge, we recompile EVERYTHING EWCEPT the kernel.

- We dont want that ? => why not ?
- why would Linux be the only component not automatically recompiled on Gentoo ?
- it may produce unstable system, or it build breaks, system wont reboot ? => genkernel has a conf to bother about this: recompile or not, get non-interactive or interactive, update grub/lilo or not ...

So, if you fear the worst, you could even let genkernel build and install kernel in /boot but NOT update boot manager.

I consider this gentoo-sources/lirc as a certain bug to occur any time, with a reproductibility of 100% !

If nobody can propose better solution, I will open bug against gentoo-sources.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Wed Jan 17, 2007 2:33 am    Post subject: Reply with quote

I think it would be a bug with portage, not gentoo-sources. In fact, it has nothing to do with the gentoo-sources, but in certaint packages figuring that there will be a .config file in /usr/src/linux. The fix to this is to not update the symlink, or to emerge the sources, compile (or copy the .config file) the kernel, then emerge the offending package.

Suggestion - don't update the symlink. Its the quickest, and more then likely is the suggestion you will get from bugzilla.

You could suggest an enhancement to bugzilla, though, suggesting that if a program needs a .config file, then have Portage cp /usr/src/old-linux-version/.config /usr/src/linux/. . I wouldn't hold my breath, though.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Jan 17, 2007 2:34 am    Post subject: Reply with quote

doublehp wrote:
If nobody can propose better solution, I will open bug against gentoo-sources.

Maybe you should file the bug against sys-kernel/genkernel for a feature request :
    Genkernel should run all by itself, whenever new kernel sources are spotted in /usr/src

:roll:
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Wed Jan 17, 2007 2:37 am    Post subject: Reply with quote

cyrillic wrote:
doublehp wrote:
If nobody can propose better solution, I will open bug against gentoo-sources.

Maybe you should file the bug against sys-kernel/genkernel for a feature request :
    Genkernel should run all by itself, whenever new kernel sources are spotted in /usr/src

:roll:

genkernel --modall would be nice, too. Never have to worry about having the right things in there, since they will all be compiled as modules and will load as-needed.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


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

PostPosted: Wed Jan 17, 2007 2:42 am    Post subject: Reply with quote

doublehp wrote:

- We dont want that ? => why not ?


Maybe because there is a world beyond genkernel. I would not like portage automatically compiling my kernel, even more, I would not like portage automatically mounting boot to put things into it. And, definitelly, I would highly dislike portage editing my grub.conf.

Quote:

- why would Linux be the only component not automatically recompiled on Gentoo ?


Probably cause all the above, plus the fact that gentoo is a metadistro that uses the linux kernel as a core, and not the other way :P

Probably this could be easily solved by adding a crapton of use flags for each specific issue to each kernel in portage. I particularly do not care at all unless they force me to use genkernel. But I see no point in doing so. When you upgrade your kernel you definitely want to know it. If you don't... well, there is knoppix, redhat, fedora, mandr*...
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 2:44 am    Post subject: Reply with quote

No, bug has to be against gentoo-sources, for an obvious reason: kernel has to be rebuild when a new kernel is available, not when genkernel get updated :D

That's why it's gentoo-source ebuild which has to call for an external (possibly configurable) application.

How else could genkernel be aware that a new kernel is "un-compiled" ?

And for me, the compile command should NOT be genkernel, but a home made script. For exampl, if gentoo-sources only calls genkernel, system will miss 3rd party drivers, such as video fox X, and things like USBIrBoy ... because genkernal has actually no option to call "module-rebuild rebuild".

Dralnu: whats "genkernel --modall" ? cant find it in manpage nor --help.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
cyrillic
Watchman
Watchman


Joined: 19 Feb 2003
Posts: 7313
Location: Groton, Massachusetts USA

PostPosted: Wed Jan 17, 2007 2:51 am    Post subject: Reply with quote

doublehp wrote:
How else could genkernel be aware that a new kernel is "un-compiled" ?

The same way that lirc is aware that the new kernel is "un-compiled".

ps. I agree with 6thpink in that I would never want a kernel updated on one of my machines unless I was doing it manually.
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 2:57 am    Post subject: Reply with quote

6thpink: I have ALWAYS tell about a new USE flag to be created ! and which should be defaulted to disabled because people like you are likely to be

My points remains definitly: gentoo-source is the ONLY ebuild that "compiles nothing", even when there are things to compile.

> When you upgrade your kernel you definitely want to know it.

Before getting kernel update automated, it would require for user:
- activate the flag
- configure genkernel to do all that

So, it seems impossible to me to have kernel updated in my back. Furthermore, the fact the kernel "has been updated" can be send back to user using ewarns. LOADS of informations are send using this process. Not reading enotices is quiet dangerous. For example, it happens that some gcc upgrade can break the system if you dont read enotices; dictionaries and Mozilla can also break after partial aspell and libXML update if you dont run revdeprebuild.

So, if we assume the root HAS TO / is responsible for reading enotices, then, as long as kernel update process is notified by ewarns, and considering activation of the process required several voluntary steps, I really cant see whats wrong with doing what we chossed to.

I think that refusing me this option would be like refusing to insert vim in portage by arguing emacs is already there : a religious fight.

gentoo-sources' maint will decide.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 3:03 am    Post subject: Reply with quote

cyrillic wrote:
ps. I agree with 6thpink in that I would never want a kernel updated on one of my machines unless I was doing it manually.


Why this remark for the kernel and not for X, bash, or DRI driver ?

Of course the kernel is a bit a "special case"; but, on high end machines, option will stay default to no, and, genkernel leaves the old working kernels in /boot anyway. The single fact I run "emerge world" already implies I want everything updated; why would the kernel be an exception ?. Ewarn/enotice will notify anyway !

The fact you dont want to use this option does not mean it shall not exist :D

And am OK/happy to read your cons as long as I remain free to propose a pached ebuild :)
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


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

PostPosted: Wed Jan 17, 2007 3:18 am    Post subject: Reply with quote

doublehp wrote:

> When you upgrade your kernel you definitely want to know it.

Before getting kernel update automated, it would require for user:
- activate the flag
- configure genkernel to do all that



Yes, that is why I said that as long as it is an option, I really do not care at all. I did not oppose myself to this, though it is clear that I would not use such a feature, but there are already lots of fancy things that I do not use and I don't feel bad at all about that. Anyway, I use vanilla-kernel, and while that ebuilds remain as true "vanilla", I don't care what happens to the gentoo-sources one.

Quote:

So, it seems impossible to me to have kernel updated in my back. Furthermore, the fact the kernel "has been updated" can be send back to user using ewarns. LOADS of informations are send using this process. Not reading enotices is quiet dangerous. For example, it happens that some gcc upgrade can break the system if you dont read enotices; dictionaries and Mozilla can also break after partial aspell and libXML update if you dont run revdeprebuild.


True.

Quote:

I think that refusing me this option would be like refusing to insert vim in portage by arguing emacs is already there : a religious fight.


I can't see the relation (i don't like either of them, by the way :P ). But, as I said, I don't feel religious about adding new options. I personally do not care at all about the "religion" of the rest of the persons around, anyone can use his/her own bible to compile whatever they want. That is, as long as they respect my right to be agnostic :P That has been already explained, and you and I agree. I think that it was just a confussion.

doublehp wrote:
cyrillic wrote:
ps. I agree with 6thpink in that I would never want a kernel updated on one of my machines unless I was doing it manually.


Why this remark for the kernel and not for X, bash, or DRI driver ?


Maybe because no one of these do have a menuconfig script :P. Think about it a bit: any program can be easily setup in which regards pieces of code that will be compiled with a few use flags. For the kernel, this is impossible. You NEED to do it manually if you want to know what is inside your kernel, you dont need that if you are compiling xorg since the settings are already in package.use or your make.conf. It would be scary to see how many use flags would we need to set the whole .config via portage. Besides that, no ebuild ever needs to mount a partition (that I know of), or do such critical tasks. This will have to do so.

Of course, options are always good.


Last edited by i92guboj on Wed Jan 17, 2007 3:21 am; edited 1 time in total
Back to top
View user's profile Send private message
Dralnu
Veteran
Veteran


Joined: 24 May 2006
Posts: 1919

PostPosted: Wed Jan 17, 2007 3:20 am    Post subject: Reply with quote

It won't happen. It is your job to manage your kernel. If you don't like that, then put into an overlay a new ebuild for the kernel and snatch debians or something and have it run through and compile the kernel for you.

As for it being a bug with gentoo-sources:

I call bullshit on this one. The kernel itself isn't supposed to compile itself. If you wanted it to be self-compiling, then you would need a third party app to handle such (genkernel), in which case the need to compile would be sent to the new app. If you want a home-made script, then just make yourself a good one that will handle all your updating for you, run etc-update, and all that, and just cron it. If you want, you could update once a month or so, and instead of just updating:

emerge -uDN world && emerge -e system && emerge -e world

and that way you know everything will be compiled for your new kernel.

You also have the option of masking the kernels, then unmask the version you want to upgrade to so that you can do the update (if you ever want to) to the new kernel at your leisure, or you could have your script handle that for you by running through and comparing the new version to whatever uname -r returns, and if the new version is diffrent then the old version, sed the package.unmask file to change the name, emerge gentoo-sources, then cd /usr/src/linux, then cp /proc/config.gz /usr/src/linux && cd /usr/src/linux && gzip -d config.gz && mv config .config && make && make install. Then you could emerge -e world to make sure everything is setup to run on the new kernel.

Simple enough. I could probably provide you with a script to do such if needed.
_________________
The day Microsoft makes a product that doesn't suck, is the day they make a vacuum cleaner.
Back to top
View user's profile Send private message
i92guboj
Bodhisattva
Bodhisattva


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

PostPosted: Wed Jan 17, 2007 3:26 am    Post subject: Reply with quote

By the way, even though I am all for options, I can't see any advantage in compiling your kernel with genkernel versus having it precompiled a la debian or mandrake. Really, let's think about it one second: you are going to include everything, and the kernel compilation does not use the portage cflags nor any other fancy portage optimization. So: what is the point in compiling that package at all???

If you know that all options will be on and you know the arch, you just need a binary package, to recompile it is just a waste of time. We could better use a "bin" use flag in the gentoo-sources ebuild which automatically guesses the correct arch and download the correct kernel.

Just some thoughts.
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Wed Jan 17, 2007 5:19 am    Post subject: Reply with quote

6thpink wrote:

doublehp wrote:
cyrillic wrote:
ps. I agree with 6thpink in that I would never want a kernel updated on one of my machines unless I was doing it manually.


Why this remark for the kernel and not for X, bash, or DRI driver ?


Maybe because no one of these do have a menuconfig script :P. Think about it a bit: any program can be easily setup in which regards pieces of code that will be compiled with a few use flags. For the kernel, this is impossible. You NEED to do it manually if you want to know what is inside your kernel, you dont need that if you are compiling xorg since the settings are already in package.use or your make.conf. It would be scary to see how many use flags would we need to set the whole .config via portage. Besides that, no ebuild ever needs to mount a partition (that I know of), or do such critical tasks. This will have to do so.


You are right on this: one point for you about requirering menuconfig script. But I have to moderate this:
- make can have many other options, like oldconfig, random, all, ... thus, the use of "make oldconfig" is by nature non-interactive config. The last problem would then to introduce an old config in the tree. That can be done by a script, or by genkernel itself (with a pach, or reading the config at specified place).
- using an old config in a new tree VERY RARELY fails. It failed between 2.6.6 and 2.6.8 because ... for strange reasons some people decided to introduce major changes (hmmm ...), and more recently between 2.6.18 and 2.6.19 (I get a compatibility problem some where around USB: my old conf does not allow to build a working USBIrBoy driver). But, rougly, a .config written for 2.6.0 should be working for actual 2.6.19.

I mean: as long as hardware dos not change, and Linux team does not break API, there is no reason an oldconfig would not work.

About mounting ... some people put /boot in a seperate partition that is often ReadOnly, so that even root could very hardly accidentaly erease kernels. Rarely, some people dont mount /boot at all. In both case, adding a fresh kernel to /boot requires manual (re)mount.

Quote:
If you wanted it to be self-compiling, then you would need a third party app to handle such (genkernel)


My intention was that the option would call either genkernel, or a very similar thing.

6thpink : kernel build will use the compile options YOU give; and those can be recorded in a conf file. The admin is then responsible to keeping these options synchronised with make.conf. MANY packages ignore make.conf options, such as deprecated Xorg 0.6 (disable distcc), gcc (ignore various FEATURES), OOo (disable distcc, dont take care about gcc-eselect) ... I mean, kernel would just be "one more". And genkernel alows to tweak almost anything (for example, I proposed a patch tu support "-j" option ; working on a way to inherit it from make.conf).

And NO there is no way for me to turn all options on. General example: I want vim NOT to support gpm flag. In particular for kernel, I want to chosse between drievrs; some drivers are uncompatible; other have years old bugs; so no I NEVER want all drivers for my kernel (SMP on some, not other, sometimes I want an SCSI driver to be loaded even when card is out, and on other box I want to have the card without the driver ... so NO a -bin package for kernel would NEVER fit my needs).

I moved to Gentoo precisely because Debian was not enough tweakable. Debian hang with SMP when QLA1020 cards were inserted, and the only way to fix was to remove the hardware ... what was not acceptable for me since things work fine with non SMP, 2.4, or BSD , or Gentoo !!! So, no a -bin with everything "on" would not make me happy at all.

I am happy to read so many cons; will help me setting up my list of pros and details when opening the bug :)
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Tue Mar 27, 2007 8:12 pm    Post subject: Reply with quote

https://bugs.gentoo.org/show_bug.cgi?id=172458
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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