Bug 4533 - reusing the already compiled linux source
: reusing the already compiled linux source
Status: CLOSED FIXED
Product: Codex
Classification: Unclassified
Component: kernels
: devel grimoire
: All Linux
: P2 enhancement
Assigned To: Grimoire Bug List
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2003-10-13 14:51 UTC by Eric Sandall
Modified: 2007-04-01 02:02 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Sandall 2003-10-13 14:51:27 UTC
It would be nice if the linux spell didn't remove an existing source code
directory (or give the option of starting clean would be good as well), that way
if you're just recompiling to change a driver, say, then it will only recompile
what is needed, rather than the entire code again.  The 2.6 kernels are setup to
support this fairly well, from what I understand.
Comment 1 Treeve Jelbert 2003-10-14 05:58:13 UTC
I like this as an idea.  In fact I think all big spells should have a RESUME feature. 
 
For instance, I have  sometimes  added a dummy PRE_BUILD , so that I could play 
around with a part-built spell, without long running unpack, configure and make. 
processes. 
 
Possibly an option to cast to enable such behaviour? 
 
And another option in sorcery to save the entire contents of /usr/src/xyz instead of 
caching the installed files? 
Comment 2 Wolfgang Scheicher 2003-10-14 12:43:27 UTC
I allready pondered about such a feature. 
however - i'm not sure how to change the linux spell to do so. 
 
*) A option for cast would be cool to trigger that, but not possible. Need to ask the user. 
Phew - linux spell is going to ask a LOT of questions! 
 
*) Would have to bypass removing old source and extraction of new one (ok - that can 
be done for linux spell) 
 
*) Would need to find out what needs to be done after menuconfig: Did the kernel get 
modifyed? did the modules get modifyed? do i need to run make dep? (when do i 
actually need to run make dep?) 
 
*) how do i get a consistent install log? If i don't install only modules and not the kernel, 
how would the install log contain all files? propably split up into linux-source, linux-kernel 
and linux-modules spells? (or somthing like that) 
 
Suggestions? 
Comment 3 Eric Sandall 2003-10-14 14:42:05 UTC
Ask the user if they want to use the previously compiled kernel source (if it
exists) and store this in USE_OLD, otherwise USE_OLD should be unset.

For PRE_BUILD:

if [ -z USE_OLD ]
then
  do current PRE_BUILD
else
then
  do nothing, use what's there now
  actually, this should make sure that /usr/src/linux points to the version
  chosen to be compiled for
fi

For menuconfig:
I think you always need to run 'make dep' after the *config is run to check for
dependencies which may have changed ('make dep' is deprecated the 2.6 kernels).
The Makefiles for the linux source tree will only recompile what needs to
(IIRC), including the kernel image, if needed.

For the install log, I'd say use ARCHIVE="off" for the linux spell.  I think
it's a waste to have a third copy of the linux binaries (one in
/usr/src/linux-<version> and another spread out in /usr/include, /boot, and
/lib/modules/linux-<version>).
Comment 4 Eric Sandall 2003-11-15 14:56:22 UTC
Also, if the user sets USE_OLD, then they should not be given the option to
reconfigure the kernel, that way it is sure to use the last settings and we
don't have to worry about them adding a new patch and expecting everything to be
hunky-dorey. As for the install log, if you don't want to use ARCHIVE="off", you
could just have linux conflict with itself, then the old installed files would
be removed and everything would be reinstalled, and so tracked.
Comment 5 Wolfgang Scheicher 2003-11-18 18:39:54 UTC
i only partially agree. 
having a archive of the kernel and it's modules can be important, especially 
if some stupid driver or something broke everything. I'd rather 
have /usr/src/linux optionally cleaned. 
pondering the possibilities... 
Comment 6 Eric Sandall 2004-02-02 11:34:48 UTC
Could we just remove the prepare_install? Or in some way disallow dispelling
linux? But then how would we remove the old, no longer used modules/files?
Perhaps make a copy of /usr/src/linux to /usr/src/linux.old, dispel the old
linux, untar, copy /usr/src/linux.old back into /usr/src/linux, then do the make
steps. Thoughts?
Comment 7 Wolfgang Scheicher 2004-02-28 07:34:29 UTC
Treeve sent me some changes how he did fix this for him 
I now submitted this to devel and test - let's see what people say. 
Comment 8 Jeremy Blosser 2007-03-31 01:15:36 UTC
closing fixed bugs
Comment 9 Jeremy Blosser 2007-04-01 01:02:26 UTC
reassign to sm-grimoire-bugs