diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-09-11 16:01:32 +0200 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2003-09-11 16:01:32 +0200 |
commit | 5a808876e2f204cefdca16040d1d3662f4a503c3 (patch) | |
tree | d4d6e5b46ffcfec1a33d8ae8dcecaf1518504203 /README | |
parent | 7bc26fada41338caf7ff83732e137c0c967e06df (diff) | |
download | history-5a808876e2f204cefdca16040d1d3662f4a503c3.tar.gz |
kbuild: Separate output directory
Separate output directory support enables the following (at least):
o Building several configurations from the same SRC base, and in parrallel
o Building from a RO media
o More efficient build if files are retreived via NFS (files stored locally)
Usage is simple:
cd /path/to/kernel/src
mkdir ~/build/kernel
make O=~/build/kernel [Make options]
Please note: The O= syntax must be used for ALL invocations of make.
As an alternative you may set KBUILD_OUTPUT to the directory where
to put the output files.
The patch works for me, and I have tried with various configurations,
including allnoconfig and defconfig.
How it works:
If the O= option is used, or KBUILD_OUTPUT is set then a second invocation
of make happens in the output directory.
The second invocation of make uses VPATH to tell make where to locate
the files. Furthermore include options for gcc is modifyied to point
both in the directory where the kernel src is located, and in the
directory where the output files are located. The latter is used for
generated .h files.
When building the kernel the asm symlink is created. To support this
a new 'include2' directory is created. Within include2/ asm is a symlink to
the asm-$(ARCH) directory in the kernel src.
Also when building the kernel the asm-offset.h file is created, and
located in the include/asm-$(ARCH) directory, but included via
<asm/asm-offset.h>.
Therefore within include/ another asm symlink is created pointing to
the asm-$(ARCH) directory located in the output directory.
In Makefile.build the output directory is created if not already present.
This was needed to support xfs, and oprofile.
The patch is loosly based on ideas from Kai G. Roman Zippel
introduced support for this in kconfig long time ago
Diffstat (limited to 'README')
-rw-r--r-- | README | 23 |
1 files changed, 19 insertions, 4 deletions
@@ -108,11 +108,26 @@ SOFTWARE REQUIREMENTS you can just update packages when obvious problems arise during build or operation. -CONFIGURING the kernel: +BUILD directory for the kernel: + + When compiling the kernel all output files will per default be + stored together with the kernel source code. + Using the option "make O=output/dir" allow you to specify an alternate + place for the output files (including .config). + Example: + kernel source code: /usr/src/linux-2.6.N + build directory: /home/name/build/kernel + + To configure and build the kernel use: + cd /usr/src/linux-2.6.N + make O=/home/name/build/kernel menuconfig + make O=/home/name/build/kernel + sudo make O=/home/name/build/kernel install_modules install - - Do a "make config" to configure the basic kernel. "make config" needs - bash to work: it will search for bash in $BASH, /bin/bash and /bin/sh - (in that order), so one of those must be correct for it to work. + Please note: If the 'O=output/dir' option is used then it must be + used for all invocations of make. + +CONFIGURING the kernel: Do not skip this step even if you are only upgrading one minor version. New configuration options are added in each release, and |