Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
|
|
|
|
In the top-level Makefile a number of locale related environment
variables were preset to give a small speed up when building the kernel.
Unfortunately this had the bad sideeffect that the variable
CFLAGS_vmlinux.lds.o lost the exported vaule in some setups (obviously
not mine). This smells like a make issue - but the best solution is
simply to drop presetting the locale related variables.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
Traditionally when building a kernel the source and the
output files are mixed.
When building a kernel using the O= syntax to save output
files in a separate directory a way is needed to locate
the kernel source.
The implemented solution is a new symlink 'source' being
added to /lib/modules/.../
used to locate source for an installed kernel.
The original symlink build points to the directory
containing the output files.
Please note that when the kernel is build with source and
output files mixed the two symlinks 'build' and 'source'
will point to the same directory, thus no changes
compared to before.
Two options was considered:
a) Adding a new symlink pointing to the output files "object"
=> All external modules have to specify O= to build
=> External modules grepping in .config or .h files
in include/asm needs to be updated
=> External modules that do grep in source code and
ordinary header files just works
b) Let the build symlink point to the output files and introduce a new
symlink "source" pointing to the kernel source
=> External module can be build without specifying O=
=> External modules grepping in .config or .h files
in include/asm just works
=> External modules that do grep in source code and
ordinary header files needs to be updated
Based on the above option b) is considered the least painfull alternative.
So to sum up:
- If a distro does not use separate output dir => no change
- If a distro uses separate output dir =>
- Trivial external module just builds
- Non-trivial (build-wise) external modules are probarly broken
Without this patch
- If a distro does not use separate output dir => no change
- If a distro uses separate output dir =>
- Trivial external modules had to specify O= to build,
and the directory being pointed at was not obvious
- grep in .config or include files in asm/ required
knowledge where to locate output files
Preferred syntax for building external modules are the following:
make -C /lib/modules/`uname -r`/build M=`pwd`
[Substituting 'M=...' with 'SUBDIRS=... modules' give same effect].
When the kernel is built using separate output directory the above
invocation of make will invoke the generated Makefile located in the output
directory - that again will invoke the Makefile located in the kernel
source tree root.
Patch includes contributions from:
Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
When building a kernel using the O= syntax to save output
files in a separate output directory now create a small Makefile in
that same dir.
This Makefile allow one to use make in the output directory without
the hassle of going back to the kernel source tree.
The O= option is added by this Makefile stub.
Please note that the Makefile silently overwrite an old one, so changes
will be lost if modified.
If there is a need to tweak a Makefile in the output directory it is recommended
to use the filename 'makefile', which GNU Make will try first.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
foo1.patch: spelling correction in Makefile
foo2.patch: replace SUBDIRS with M in Documentation/kbuild/modules.txt
From: Kornilios Kourtis <kkourt@cslab.ece.ntua.gr>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
The locale override caused problems for some people with locale setiings
different from 'C'. make menuconfig was looking bad / unuseable.
This patch limit the override of locales to the part where we actually descend the kernel
doing the full build of the kernel.
The speed improvement is the same.
make menuconfig should now be useable for all locale settings again.
Thanks to Marcel Sebek <sebek64@post.cz> for pointing out this problem and being
paitent in testing.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Allow `make O=<obj> {cscope,tags}` to work
|
|
Ready for the kernel summit in Ottawa...
|
|
|
|
From: David Gibson <david@gibson.dropbear.id.au>
This patch excludes the .pc directory from the same things that
SCCS/BitKeeper/.svn/CVS files are excluded from. The .pc directory is used
for backup/reference files by quilt, a patch mangling system conceptually
derived from akpm's patch scripts. Excluding the .pc directory is handy,
because otherwise old versions of files found in there tend to end up at the
front of the TAGS index.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
- fix documentation
- use $(src) in Makefile (fixes cross-compilation)
Both spottet by Geert Uytterhoeven
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
I just find a bug that ``make distclean'' cannot remove the editor backup
files and the like when using build directory. That is because the find
command is improperly searching the build directory instead of the
$(srctree) it should.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Verify that linking kallsyms into vmlinux generates a stable System.map,
instead of assuming that it is stable.
Add CONFIG_KALLSYMS_EXTRA_PASS as a temporary workaround for unstable maps,
so users can proceed while waiting for kallsyms to be fixed.
Signed-off-by: Keith Owens <kaos@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
To prepare kbuild for more kernel packaging formats move all packaging support
to scripts/package.
In top-level Makefile introduce generic support for all package formats using
target names *-pkg. Included the old rpm target for backward compatibility.
A new variable KBUILD_IMAGE is used to specify what kernel image will be part
of the final package, and is to be set by the arch specific makefile.
KBUILD_IMAGE may be overridden from command line or environment. KBUILD_IMAGE
will see wider usage later, mainly when installing kernel images.
Introducing KBUILD_IMAGE allowed arch specific details to be deleted from the
mkspec and builddeb scripts.
While in the process added the deb packet format. Script is From: Wichert
Akkerman <wichert@wiggy.net>
To create a RPM packet use 'make rpm-pkg'.
To create a deb packet use 'make deb-pkg'.
Both targets are included in 'make help'
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
Forgot to update the top-level makefile to invoke the new reference_init
script.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
From: Diego Calleja =?ISO-8859-15?Q?Garc=EDa?= <diegocg@teleline.es>
It'll be much better if the world can know about the existence of
checkstacks.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
|
|
Jorn Engel <joern@wohnheim.fh-wedel.de>
Adds a `make checkstack' target. This disassembles and parses vmlinux and
*.ko, generating a sorted list of stack hogs, eg:
0xc0100663 huft_build: 1456
0xc01022d3 huft_build: 1456
0xc0103127 inflate_dynamic: 1328
0xc0101487 inflate_dynamic: 1324
0xc010131f inflate_fixed: 1168
0xc0102fb7 inflate_fixed: 1168
0x00000003 sha512_transform: 984
0xc024aee3 Vpd: 952
0x00000003 twofish_setkey: 804
0x000060c3 isd200_action: 792
0x0000e6cb nfsd4_proc_compound: 760
0xc0249087 SkPnmiGetStruct: 712
....
Supported architectures are alleged to be arm, x86, ia64, mips, mips64, ppc,
ppc64 and s390x.
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
From: Christoph Hellwig <hch@lst.de>
From: Debian kernel package, author probably Herbert Xu.
* Fixed bashism in Makefile
|
|
|
|
From: Rusty Russell <rusty@rustcorp.com.au>
kallsyms contains only function names, but some debuggers (eg. xmon on
PPC/PPC64) use it to lookup symbols: it'd be much nicer if it included data
symbols too.
|
|
From: Andreas Gruenbacher <agruen@suse.de>
Here is a patch that re-adds support for more than one directory in SUBDIRS.
We have a number of packages that use this.
The FORCE dependency of crmodverdir seems unnecessary; removing.
(acked by Sam)
|
|
From: Arjan van de Ven <arjanv@redhat.com>
the patch below adds a "make buildcheck" target which checks for the "uses
exit in init" bug using Keith Owen's script. In the future other similar
sanity checks can be added to this target, but even just this one has been
quite useful already. I use it in the kernel rpm build process for
example, and I'm sure the OSDL build testers can/want to use it too.
From: Keith Owens <kaos@ocs.com.au>
They commented out the progress print statements, I prefer to have them
present but no big deal. The licence is missing.
|
|
From: Olaf Hering <olh@suse.de>
make tags skips security/selinux/include because of find . -name include
-prune This patch does just add it later. No idea if it can be done
better.
|
|
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
The external module support recently introduced caused a number of problems:
- To build an external module the Module.symvers file was needed
- To create the Module.symvers file a module was required
- If Module.symvers was missing kbuild boiled out with an error
- If vmlinux was missing also the stage 2 of module build failed (make -k)
- It was not documented what was needed to actually bauild a module
The following patch addresses this by adding the following functionality:
- Always generate the Module.symvers file
- Ignore a missing Module.symvers file
- Add a new target modules_prepare, it prepares the kernel for building
external modules, and is also usefull with O=
- And it adds some more comments to Makefile.modpost, so others may follow
it with some luck
- .modpost.cmd is no longer generated
This should close all reports on issues with respect to building external
modules with current kernel - which has been identified as kernel problems.
|
|
|
|
|
|
The directory .tmp_versions/ was deleted during make vmlinux.
This eliminated the list of modules used for moudles_install.
The effect was that the following scenario failed:
make
make install
make modules_install
The solution is to only cleanup .tmp_versions when building modules.
|
|
From: Sam Ravnborg <sam@ravnborg.org>
When building external modules the $PWD/.tmp_versions directory is used.
The .tmp_versions directory in the kernel tree cannot be used because this
would clutter up the kernel tree especially when more than one external
module is being build for the same kernel tree.
This patch make sure to create $PWD/.tmp_versions, and to delete it during
make clean. It also removes warning about 'messed with SUBDIRS', this is
no longer relevant when .tmp_versions is made outside the kernel tree.
|
|
From: Sam Ravnborg <sam@ravnborg.org>
Based on initial patch from Andreas Gruenbacher there is now better support
for building external modules with kbuild.
The preferred syntax is now:
make -C $KERNELSRC M=$PWD
but the old syntax:
make -C $KERNELSRC SUBDIRS=$PWD modules
will remain supported.
The major differences compared to before are that:
1) No attempt is made to neither check nor update any files in $KERNELSRC
2) Module versions are now supported
During stage 2 of kernel compilation where the modules are built, a new file
Module.symvers is created. This file contains the version for all symbols
exported by the kernel and any module compiled within the kernel tree.
When the external module is build the Module.symvers file is being read and
symbol versions are used from that file.
The purpose of avoiding any updates in the kernel src is that usually in a
distribution the kernel src will be read-only, and there is no need to try to
update it. And when building an external module the focus is on the module,
not the kernel.
I expect the distributions will start using something like this:
kernel src - with no generated files. Not even .config:
/usr/src/linux-<version>
Output from build:
/lib/modules/linux-<version>/build
where build is a real directory with relevant output files and the
appropriate .config.
I have some Documentation in the pipe-line, but wants to see how this
approach is received before completing it.
This patch is made on top of the previously posted patch to divide
make clean in three steps.
And you may need to edit the following line in the patch to make it apply:
%docs: scripts_basic FORCE
to
%docs: scripts FORCE
|
|
From: Sam Ravnborg <sam@ravnborg.org>
Previously 'make clean' deleted all automatically generated files. The
following patch revert this behaviour, and now 'make clean' leaves enough
behind to allow external modules to be built.
The cleaning is now done in three steps:
make clean - delete everything not needed for building external modules
make mrproper - delete all generated files, including .config
make distclean - delete all temporary files such as *.orig, *~, *.rej etc.
This fixes reports about nvidia and vmware build issues.
|
|
From: Sam Ravnborg <sam@ravnborg.org>
From: Herbert Xu <herbert@gondor.apana.org.au>
It seems that the %docs targets only needs scripts_basic. The following
patch does just that. This removes its dependency on the existence of a
.config file.
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
Fix this:
Building modules, stage 2.
MODPOST
LANG := en_US.UTF-8
make: LANG: Command not found
make: *** [all] Error 127
by removing the tab in front of the LANG assignment.
|
|
into ppc970.osdl.org:/home/torvalds/v2.6/linux
|
|
People were getting quite excited about this.
|
|
From: Martin Schaffner <maschaffner@gmx.ch>
|
|
From: Bjorn Helgas <bjorn.helgaas@hp.com>
|
|
|
|
From: Jasper Spaans <jasper@vs19.net>
Presetting locale to 'C' gives slight improved compilation speed,
when for example using "LANG=nl_NL.UTF-8@euro".
Error message still appear with correct locale.
|
|
From: Sam Ravnborg <sam@ravnborg.org>
In the i386 case we need to generate asm-offset.h, before starting building
the kernel tree. Building asm-offset.h causes us to use one of the
shorthands in the top-level makefile, namely the one for .s files. The one
that allows us to do: make some/dir/file.s
And this shorthand happens to have a dependency to scripts, therefore I did
not see this problem on i386. But David hit it with sparc64, because there
is no asm-offset.h file. No parallel stuff involved here, just an ordinary
error.
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
Ingo said:
Starting at around 2.6.4-rc2-mm1, I keep seeing 'scripts/fixdep: Text
file busy' messages when doing a -j10 bzImage build - which seems to
suggest that by the time fixdep is used by the build system it's not
built yet.
Sam said:
I was pretty sure it was something I had caused, so I gave it a spin. What
actually happened was that we tried to build the target 'silentoldconfig'
in parrallel with 'scripts'. Since 'silentoldconfig' started a new make
and then the config target needed 'scripts' we saw two parallel runs.
The way I decided to fix it was to split scripts/ in two parts. The first
part is now the very basic stuff - moved to scripts/basic/. The second
part is dependent on kernel config etc. and kept in scripts/
In the 2.7 timeframe i will redo this initial stuff - it's becoming too
messy for anyone to understand today.
Description:
Fix dependencies in early phases of kernel build. This solves a few
problems nively: modpost is no longer rebuild twicewhen reaching the
'target' state 'make -j10' now works nicely again
The patch is rather large due to the following file moves:
mkdir scripts/basic
mv scripts/fixdep.c scripts/basic
mv scripts/split-include.c scripts/basic
mv scripts/docproc.c scripts/basic
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
Make the difference between 'make clean' and 'make distclean/mrproper' more
explicit.
make clean now removes all generated files except .config* and .version.
The result is much easier to understand now.
make clean deletes all generated files (except .config* and .version).
make mrproper deletes configuration and all temporary files left by patch,
editors and the like.
Example output:
> make mrproper
CLEAN init
CLEAN usr
CLEAN scripts/kconfig
CLEAN scripts
CLEAN .tmp_versions include/config
CLEAN include/asm-i386/asm_offsets.h include/linux/autoconf.h include/linux/version.h include/asm .tmp_versions
CLEAN .version .config
Form the list of files/directories deleted during make clean, removed all
references that is no longer relevant for the current kernel.
|
|
|
|
|
|
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
List all entries in arch/$(ARCH)/configs/*_defconfig when doing 'make
help'.
Results in output like this (ppc64 as example):
g5_defconfig - Build for g5
pSeries_defconfig - Build for pSeries
The implementation is generic and enables this for all users of _defconfig.
|
|
|
|
|
|
|
|
|
|
|
|
From: Louis Zhuang <louis_zhuang@linux.co.intel.com>
enable fast symbol lookup via an inverted index.
|
|
See http://www.cse.unsw.edu.au/~gernot/persona/hobbies/dunnart.html
for more information about Dunnarts, in case you've never heard of
them before. Courtesy of Gernot Heiser.
|
|
|
|
From: Sam Ravnborg <sam@ravnborg.org>
cscope expect to find the list of files used for the database in a file
named cscope.files. Generate this file as part of 'make cscope'. This
solves http://bugme.osdl.org/show_bug.cgi?id=1948.
|
|
|
|
I did a s/2.5/2.6/ a while ago, as it made more sense when 2.6 appeared.
The old URL will continue to work (symlink to the new file). If I move
this again, whack me.
|
|
|
|
|
|
|
|
|
|
|
|
From: "Zhu, Yi" <yi.zhu@intel.com>
The "make rpm" rule in top Makefile isn't aware of the enviorment ARCH. For
example, people issue "make ARCH=ia64" to compile the ia64 kernel on i386
platform for cross compilation. This works pretty well now. But if one uses
"make rpm ARCH=ia64", it will fail. Because current rpm rule in Makefile and
mkspec are not aware of ARCH.
|
|
From: Adrian Bunk <bunk@fs.tum.de>
Allow the kernel to be built with `-Os'.
It requires CONFIG_EMBEDDED. This is to make it "hard to get at" because
one gcc version (3.2.x I think) from RH9 generates crashy kernels with this
option set.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
into mars.ravnborg.org:/home/sam/bk/kbuild
|
|
- Error out if specified directory does not exist
- Do not build the kernel three times wheh specifying "defconfig all"
- Removed warning when the target all was specified
|
|
From: GOTO Masanori <gotom@debian.or.jp>
cscope generaltes various files, with different extension.
Make sure to delete all cscope files during mrproper
|
|
|
|
From: John Levon <levon@movementarian.org>
Not that many people are going to be using GCC 3.4 currently, but it
might help a bit to prevent compilation bugs like that just witnessed
in procfs.
(And it consolidates the check_gcc implementation nicely)
|
|
into mars.ravnborg.org:/home/sam/bk/sepout
|
|
Simplify 'make rpm' a bit, and enable use of rpm in combination with separate
output directory.
Also added kernel.spec to ignore list
|
|
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
|
|
From: "Nathan T. Lynch" <ntl@pobox.com>
The attached patch fixes the toplevel Makefile to remove cscope.out
during make mrproper. The default name for the database that cscope
creates is cscope.out, and this is what the cscope rule in the
makefile uses. Currently, mrproper will leave cscope.out behind,
which can make for interesting diffs...
|
|
From: Ricky Beam <jfbeam@bluetronic.net>, me
With the increasing amount of programs located in scripts/, several
of which is dependent on the kernel configuration, it makes sense to
avoid building these too often.
With this patch only fixdep is build, the minimal requirement for running
any *config target
|
|
|
|
into home.osdl.org:/home/torvalds/v2.5/linux
|
|
This solves 1193 in bugme as reported by ak@suse.de
AFLAGS and CFLAGS contained duplicate entries, both generic and
architecture specific flags
|
|
rename make check* targets to make *check (per Sam) since 'make
checkconfig' currently doesn't work; add versioncheck and
scripts/checkversion.pl;
|
|
From: Valdis.Kletnieks@vt.edu, Sam Ravnborg <sam@ravnborg.org>
Adds an explicit check for the new modutils in the build system.
Generally we should avoid these sorts of hardwired checks for the right
versions of things, but we are still getting a significant number of problem
reports due to people not having the new tools. Let's help them out.
|
|
From: Sam Ravnborg <sam@ravnborg.org>
When building a kernel right after 'make mrproper' resulted in a very short
run, and no sign that .config was missing. This has been fixed by adding a
new rule for .config in the top-level Makefile, and a new target
'silentoldconfig' in scripts/kconfig/Makefile.
Cleaned up a bit in scripts/kconfig/Makefile
|
|
|
|
into home.osdl.org:/home/torvalds/v2.5/linux
|
|
This fixes a bug with multiple targets.
Olaf Hering reported that the build failed for PowerPc if used like
this: make oldconfig zImage
The reason for this was that .config was not present for any targets
specified in arch/$(ARCH)/Makefile and below.
That's because .config would not be included when oldconfig is present
in the list of targets. The fix is to move handling of *config task to
the kconfig/Makefile. Furthermore the logic in top-level makefile has
changed a bit, creating a more logial structure. When building a fresh
kernel, the user is now told that .config is missing, not an anonymous
report that .config did not exist.
The error has survided this long because the targets used in i386/boot
in general does not use CONFIG_ symbols.
Olaf Hering has tested this patch with success.
|
|
|
|
Currently, vmlinux.lds.s is generated by the top-level Makefile.
Unfortunately, this causes the automatic CONFIG dependencies to
not work correctly, the reason being that make caches the timestamps
of include/config/* so even after split-include updated the
timestamps, make still uses the cached stamps to decide whether to
rebuild vmlinux.lds.s.
The simple fix is to move generation of vmlinux.lds.s into the
arch/$(ARCH)/kernel subdirectories, where we build other files
for the final link (like head.o) anyway. This also means some
special code in the top-level Makefile for preprocessing can go
away, since we now just use the standard rules during the recursive
phase.
This patches fixes up all archs for this change (untested).
|
|
into germaschewski.name:/home/kai/kernel/v2.5/linux-2.5.make
|
|
|
|
|
|
|
|
First "test" kernel. Same naming we used for 2.4.0 - there it took
from May to December to get to the real version. Let's see if we
can do it faster this time.
|
|
parisc64 machines should build parisc kernels.
|
|
Making ready for the pre-2.6.x series ...
|
|
|
|
Since KALLSYMS is defined, might aswell use it somewhere.
|
|
into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.isdn
|
|
make doesn't recognize itself that it does a recursive call, so we have
to use a leading '+' to let it know.
(reported by Steven Cole)
|
|
In some cases (notably ia64) changes to CPPFLAGS is needed, and
relevant both for AS and CC. Make sure changes to CPPFLAGS propagate
back to CFLAGS and AFLAGS
|
|
|
|
|
|
Documentation/kbuild are now limited to kernel development information,
so there is no point asking people to look there, when
searching information about building the kernel.
Pinting to README makes most sense
|
|
Originally by Michael Still <mikal@stillhq.com>
This patch adds two new targets to the docbook makefile -- mandocs, and
installmandocs. The targets require two new perl scripts in the scripts/
directory, but in return we get a series of man pages for kernel
functions, which are installed in man section 9. This is a good thing, as
many programmers expect documentation to be available with man, and
hunting through various PS or PDF documents to find the documentation for
the function you want can be quite frustrating.
The man pages are just extracted from the various existing DocBook SGML
documents, which are generated by kernel-doc. You also need to have
docbook2man installed on your machine.
Please note the formatting is not perfect, but I will tweak
other stuff later with further patches -- this is just an initial
implementation.
Sample output (HTMLised) can be found at
http://www.stillhq.com/linux/mandocs/2.5.68/ and
http://www.stillhq.com/linux/mandocs/2.5.70/
|
|
When CONFIG_DEBUG_INFO is set to Y, -g will be added to CFLAGS.
Several architectures already put -g in CFLAGS, often via a patch
to the top-level makefile.
This option is put in the kernel hacking menu, guarded by CONFIG_DEBUG_KERNEL.
Added CONFIG_DEBUG_INFO in Kconfig for the architectures that
already had CONFIG_DEBUG_KERNEL
|
|
|
|
|
|
into tp1.ruhr-uni-bochum.de:/home/kai/kernel/v2.5/linux-2.5.make
|
|
so hackish.
|
|
into mars.ravnborg.org:/home/sam/src/linux/kernel/bk/kbuild
|
|
Previously modules could be build using the make dir/module.ko syntax,
but this has been broken for a while.
Now the directory notation includes modules as well.
|
|
New makefile variable introduced: lib-y
The lib-y syntax allows you to do the usual tricks such as:
lib-$(CONFIG_SMP) += percpu_counter.o
A built-in.o is always present in a directory that list .o files in
either obj-* or lib-*.
In contrast, lib.a is made only when lib-y is defined.
I also updated lib/Makefile, so that crc32.o is now always built-in
if selected.
|
|
In the top-level makefile escaped two lines to avoid launching a second subshell.
This make the build a bit less verbose with make V=0
|
|
Patch originally by Jesse Barnes <jbarnes@sgi.com>
Previously the user were required to supply CROSS_COMPILE and ARCH on the
commandline to make, alternatively they patched the Makefile direct.
The following patch allows the user to specify the value of these in
a variable assigned during init or similar.
|
|
Patches originally by Adrian Bunk and Rudmer van Dijk.
Included "make V=0|1" and "make C=1"
|
|
|
|
Make the default kernel build less verbose, to make warnings show up
more clearly.
|
|
user-supplied source checker on all C files before compiling
them.
I'll release the actual checker once I've cleaned it up a
bit more (yay, all the copyright paperwork completed!)
|
|
|
|
|
|
Merge s390x and s390 to one architecture.
|
|
Now that sparc64 is using gcc-3.x we can disallow gcc-2.91, etc.
Documentation/Changes already says 2.95.3, which is working fine for me.
With this change, we no longer require that per-cpu data definitions be
initialised. That was a workaround for a bug in older gccs. So remove the
build infrastructure which was checking for that.
Also, mention that nfs-utils-1.0.3 is required. It isn't required yet, but
will be once we enable larger dev_t: there is an interface for exportfs which
passes dev_t's into the kernel which breaks with larger dev_t. That
interface is old, deprecated and is not used in nfs-utils-1.0.3.
|
|
|
|
|
|
|
|
|
|
gen-asm-offsets, the most common user of the new filechk function, needs
to be fed input from $< (the first prerequisite).
|
|
|
|
make's line continuation without explicit backslashes is a mystery
to me, and in this case, vmlinux got linked, but the linker command
was not written to the screen. Works again now.
|
|
This adds the gtk front end by Romain Liévin <roms@tilp.info>
|
|
Added a new rule filechk used to check when a generated file
actually is changed. If there is no actual changes the file
is left without updating the timestamp.
When building a kernel from scratch two printouts occurs:
CHK file-to-generate
UPD file-to-generate
The first line tell that kbuild checks the file, second line tell that
the file is being updated (or created).
On successive runs only the first line is printed.
Output is the same in verbose and non-verbose mode.
This replaces the former update-if-changed which has been deleted.
generate-asm-offsets.h has been renamed as well.
All users are updated in next patch.
Output when generating compile.h follow above style
|
|
Create a nice shorthand to enable the non-verbose output mode.
make V=1 => Gives verbose output (default)
make V=0 => Gives non-verbose output
One of the reasons why people does not use KBUILD_VERBOSE=0 that
much is simply the typing needed.
This notation should make it acceptable to type it.
The usage of "make V=0" is restricted to the command line.
Anyone that wants to enable the non-verbose mode pr. default shall
set KBUILD_VERBOSE in the shell.
|
|
set -e is needed for each (continued) line.
|
|
|
|
We had a dummy dependency on include/linux/compile.h, but it really caused
more trouble than benefits. It's not actually needed for the module
postprocessing, it was only put there to make sure we recognize when
gcc changed under us. However, we really can only do so much, and
the rest of kbuild won't notice a changed gcc either, so if the user replaces
gcc during a build, he just can't rely on the build doing the right thing.
The common cases are still covered, anyway. When the command to invoke
gcc changes ("CC=gcc32") we notice, and when the path to
/usr/lib/gcc-lib/i386-redhat-linux/2.96/include/stdarg.h
changes (which luckily contains the "2.96", we'll notice and handle that,
too.
|
|
1) Remove dep from "make help", it is no longer useful
2) replace Generating with GEN when generating version.h
|
|
When a rule in the top-level Makefile includes scripts as one
of the prerequisites it inherits FORCE, and thus is always build.
include/linux/autoconf.h recently included scripts hereby forcing
split-include to be run for each compilation.
Fix all rules that lists scripts as a prerequisite but did not list FORCE.
Fixed by listing the executable needed direct.
|
|
1) Define comma so dependency files does not include a '_' in the filename
2) Use correct path for mkspec and mkversion
3) Removed checkhelp - corresponding perl script is no longer present
4) Spelling correction (reported on lkml)
|
|
For some people (though not me), the '+' indicating that a command will
invoke a sub-make didn't propagated properly, and caused a warning.
Putting the command all into one line should fix that.
Plus some cosmetics and clean up the per_cpu check.
|
|
|
|
|
|
Yet another "make -j" race fixed, and
print the right number of spaces for consisting output
|
|
make rpm has been broken in several kernel versions, fix it. Solves
http://bugme.osdl.org/show_bug.cgi?id=373 which Paolo Ciarrocchi pushed
me to fix.
1) Moved make rpm to the noconfig section, thus allowing it to see
the clean target.
2) Fixed the commandline for find
3) Use rpmbuild if present
4) In mkspec use the generic all target, and drop the dep target
This made the build command arch independent
|
|
|
|
This puts genksyms into scripts/genksyms/.
genksyms used to be maintained externally, though the only possible user
was the kernel build. Moving it into the kernel sources makes it easier to
keep it uptodate, like for example updating it to generate linker scripts
directly instead of postprocessing the generated header file fragments
with sed, as we do currently.
Also, genksyms does not handle __typeof__, which needs to be fixed since
some of the exported symbol in the kernel are defined using __typeof__.
(Rusty Russell/me)
|
|
From Richard Henderson:
> The compiler.h fragment should describe the problem well enough.
(I tested egcs 2.91.66, even there no problem)
|
|
Patch from Rolf Eike Beer:
> Linus asked for typo fixes, so here is one...
|
|
For the modversions case, we need vmlinux to be built before postprocessing
modules can start, since we need to extract the checksums from it.
For the non-modversions case, we use vmlinux if it's available (so we can
sensibly give warnings about unresolved symbols), but otherwise not.
However, this could race with vmlinux being built at the exact same time as
being processed.
Fixed by waiting until vmlinux is finished before starting module
postprocessing.
|
|
|
|
Remove the generated *.mod.c files in make clean.
|
|
Since it's now not only used for modversioning but generally, rename
the Makefile .modver -> .modpost and the generated files to
<module>.ver.[co].
Also, when there's now vmlinux during module postprocessing, don't print
warnings on unresolved symbols (there's just too many, then).
|
|
Since we rely on our list of all modules for building anyway, we
can as well use it to install the modules. So we don't need to
descend in that step anymore, speeding it up, though it's not
a particularly performance-critical area.
|
|
Since we'll have to always do module postprocessing shortly, we can as well
get rid of the special cased init/vermagic.o which needed to be compiled
before descending, and instead include the current version magic string
during post processing. For that purpose, the generation of the string is
moved from init/vermagic.c to include/linux/vermagic.h.
People who externally maintain modules will also be happy about that.
|
|
Currently, we are doing the final module link (.ko) at different places
(Makefile.build vs Makefile.modver) depending on CONFIG_MODVERSIONS.
Apart from being confusing, that also means we have this code path
duplicated, and the modversions path most likely gets little testing.
It's actually cleaner to just do the final link from Makefile.modver always,
performance-wise it's not a noticable difference, since we don't descend
in that step, but just use the list of modules generated during the build.
This step is also preliminary for doing additional postprocessing, e.g.
generating module alias information from PCI / USB device tables.
|
|
|
|
Quote ',$ before passing them to the shell - ' must be escaped for
echo, $$ will be converted to $ by make.
This allows to use e.g. perl commands in the build with support
from the generic $(call if_changed,...).
by Konrad Eisele
|
|
From ram <ram@curvesoft.com>:
> Appended below is a small patch to the top-level makefile; it
> -- replaces a call to $(shell/echo/sed) with $(subst) and adds a
> comment
> -- fixes some typos.
|
|
|
|
We need to collect a list of all modules during the recursive build. I used
a "touch .tmp_versions/<path/to/module.ko>" to do so, which however doesn't
work so well, when path/to isn't inside the kernel tree.
The best way to build external modules is currently using kbuild by saying
"make SUBDIRS=/some/external/dir modules", which was thus broken. While this
way is not all that optimal and I hope to come up with something better
before 2.6, it works and should keep working, so this patch fixes the usage
above.
Instead of touching files with the entire path added, we just create a
<module>.mod file in $(MODVERDIR) now, and save the path to the module.ko
in it. Since module names are unique, a flat hierarchy is actually fine here.
|
|
Defaulting to building modules together with vmlinux when just doing
"make" or "make all" is only a good choice when "CONFIG_MODULES" is set.
|
|
|
|
o Build modules with CONFIG_MODVERSIONS when just saying "make"
o Ignore generated *.ver.c files
o Fix a typo (Sam Ravnborg)
o Fix another typo (Paul Marinceu)
|
|
into tp1.ruhr-uni-bochum.de:/scratch/kai/kernel/v2.5/linux-2.5.make
|
|
CONFIG_MODVERSIONING was a temporary name introduced to distinguish
between the old and new module version implementation. Since the
traces of the old implementation are now gone from the build system,
we rename the config option back in order to not confuse users more
than necessary in 2.6.
Also, remove some historic modversions cruft throughout the tree.
|
|
"make dir/" is used to build a subsystem without going through the
full kernel tree, neither completing the build.
This is solely useful during development, when focus is on a
single subsystem.
This is the counterpart to "make dir/module.ko"
|
|
In arch/$(ARCH)/Makefile the objects to be linked as the very first are specified with HEAD.
To make more consistent naming, and to allow smarter kbuild style declarations
HEAD is replaced with head-y.
Support for the old notaion is kept for now.
Only i386 updated.
|
|
archmrproper and archclean is declared .PHONY in top-level Makefile,
therefore they are no longer mandatory in arch/$(ARCH)/Makefile.
|
|
MODVERDIR was defined in the build-only section, but it's needed for
"make mrproper" as well.
|
|
We support tags and TAGS already, so...
by Louis Zhuang
|
|
In the case of CONFIG_MODVERSIONING, the build step will only
generate preliminary <module>.o objects, and an additional
postprocessing step is necessary to record the versions of the unresolved
symbols and add them into the final <module>.ko
The version information for unresolved symbols is again recorded into
a special section, "__versions", which contains an array of symbol
name strings and checksum (struct modversion_info). Size is here not
an issue, since this section will not be stored permanently in kernel
memory.
Makefile.modver takes care of the following steps:
o Collect the version information for all exported symbols from vmlinux
and all modules which export symbols.
o For each module, generate a C file which contains the modversion
information for all unresolved symbols in that module.
o For each module, compile that C file to an object file
o Finally, link the <module>.ko using the preliminary <module.o> + the
version information above.
The first two steps are currently done by not very efficient scripting,
so there's room for performance improvement using some helper C code.
|
|
With CONFIG_MODVERSIONING, we need to record the versions of the unresolved
symbols in the final <module>.ko, which we only know after we finished
the descending build. So we only build <module>.o in that case.
Also, keep track of the modules we built, the post-processing step needs
a list of all modules. Keeping track is done by touching
.tmp_versions/path/to/module.ko
|
|
Though the CONFIG_MODVERSIONS option was removed with rusty's module
rewrite and the associated code broken, a lot of that code was still
living on here and there. Now it's gone for good.
|
|
rusty's module rewrite removed the reference to EXPORT_SYMTAB
from linux/module.h, and it's not used anywhere else, either.
|
|
|
|
This patch, based on Rusty's implementation, adds a special section
to vmlinux and all modules, which contain the kernel version
string, values of some particularly important config options
(SMP,preempt,proc family) and the gcc version.
When inserting a module, the version string is checked against the
kernel version string and loading is rejected if they don't match.
The version string is actually added to the modules during the
final .ko generation, so that a changed version string does only
cause relinking, not recompilation, which is a major performance
improvement over the old 2.4 way of doing things.
|
|
|
|
|
|
|
|
|
|
|
|
Now that we have a unique suffix for kernel modules (.ko), we
can extend to former "make some/object.o" to work for kernel modules
as well, even composite ones.
It's as easy as "make some/dir/module.ko".
(Sam Ravnborg/me)
|
|
arch/$(ARCH)/Makefile already contains the kbuild required additions
to allow the kernel to be built for the architecture in question.
Moving archhelp centralise this information, and no longer require a
boot directory to exist to utilise this feature.
Update i386 to define archhelp in arch/$(ARCH)/Makefile
Other architectures will be updated in next cset.
|
|
The former macro $(descend ...) hide for make the fact that a recursively make was
invoked. The replacement $(Q)$(MAKE) -f scripts/Makefile.build obj=dir was too verbose.
Introduced $(build) and $(clean) allowing the following syntax:
$(Q)$(MAKE) $(build)=arch/i386/boot target
and similar for clean.
Introduced $(build) and $(clean) in general, and for i386 architecture.
|
|
Add $(srctree)/ etc. to some more places where it was still missing.
|
|
|
|
|