Bugzilla – Bug 4533
reusing the already compiled linux source
Last modified: 2007-04-01 02:02:26 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.
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?
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?
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>).
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.
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...
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?
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.
closing fixed bugs
reassign to sm-grimoire-bugs