On Sunday 09 December 2007 00:44:59 Ivan Shmakov wrote:
> >>>>> Tino Keitel <[email protected]> writes:
>  >
>  > Package: kernel-package
>  > Version: 11.001
>  > Severity: wishlist
>  >
>  > Hi,
>  >
>  > it will be nice if KBUILD_OUTPUT is supported. That way, one
>  > source tree can be used to build kernels for differend computers
>  > with different machines without a clean and messing around with
>  > config files.
>
>       Well, I probably may say that I've some ``initial success'' with
>       building in a separate directory.  I'd like to mention a couple
>       of issues that I've stumbled upon:
>
>       * it seems to me that implementing the support for an
>           autoconf-like style of passing the source and build
>           directories location, e. g.:
>
> $ make-kpkg --kernel-source=/where/is/the/source
>
>           would require less time than a kbuild-like one
>           (assuming using the existing code base, of course);
> certainly, one'd need to prefix a number of filenames with
> `$(srctree)/', but it would be even worse to prefix almost
> everything with `$(KBUILD_OUTPUT)/';
>
>       * including build-toplevel Makefile has a little sense, since it
>         contains (almost) no variables, nor `include's (in the
>         separate build directory case); moreover, it defines a rule
>         which may interfere with `debian/rules'.
>
> [...]

Hi, Ivan, Manoj, anyone! The development time does not matter here, 
because building the package from the working directory of kernel 
build tree is inappropriate to the concept of kernel building. 
make-kpkg must be involved from kernel source tree as it were always 
before.

Though there is no problem with prefixing $(KBUILD_OUTPUT)/ as Ivan 
mentioned. kernel-package should get everything from kernel source 
directory and then perform switching to a build directory. It should 
create this directory if it not exists. The actual build invocation 
should be done back from source tree.

Any checks in kernel source should not taint the source tree as it 
occurs now with kernel_version.mk. The right method of including 
kernel Makefile is by setting KBUILD_SRC to avoid spawning fork and 
override rule warning and overriding dot-config to 0. This will give 
you VERSION, PATCHLEVEL, SUBLEVEL and EXTRAVERSION.

KERNELRELEASE and LOCALVERSION should be acquired after oldconfig was 
invoked. KERNELRELEASE by the same method as original Makefile does, 
LOCALVERSION by including .config.

Performance question: kernel-package should do as less forks as 
possible. Current implementation includes original Makefile 6(!) 
times. There is no need to be afraid of names conflict. Though it is 
possible to do 1 fork and get all 6 variables by using 
$(eval). .config may always be included without a fork because it has 
names prefix.

The feature of building in a separate tree is really a treasure. I 
currently did some symbiotic makefile that builds a package from 
already built tree (without any changes in kernel-package itself). 
kernel-package is a great at its flexibility of installation but is 
clumsy on the building side. I suppose, that it may (and should) be 
separated from the building process at all.



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to