Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
Vadim Lobanov points out that EXPORT_SYMBOL_NOVERS is no longer used; in
fact, SH still uses it, but once we fix that, the kernel is clean. Remove
it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
For the kernel, it would be logical to use -ffreestanding. The kernel is
not a hosted environment with a standard C library.
The gcc option -ffreestanding is supported by both gcc 2.95 and 3.4, which
covers the whole range of currently supported compilers.
Regarding changes caused by this patch:
Andi Kleen reported:
Newer gcc rewrites sprintf(buf,"%s",str) to strcpy(buf,str) transparently.
This is only true with unit-at-a-time (disabled on i386 but enabled on
x86_64). The Linux kernel doesn't offer a standard C library, and such
transparent replacements of kernel functions with builtins are quite
fragile.
Even with -ffreestanding, it's still possilble to explicitely use a gcc
builtin if desired.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
Using "-nostdinc -isystem `gcc --print-file-name=include" let
us see full path to compiler specific files when compiling with make V=1
Furthermore it lets us use same definition for sparse (CHECKFLAGS) and the kernel.
Tested with gcc 3.3.4 only.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
The comment doesn't match the function name.
From: "Art Haas" <ahaas@airmail.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Idea from: Blaisorblade <blaisorblade_spam@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
This patch makes it easy to programmatically get at the kernel
makefile's idea of the kernel version from external scripts and
makefiles with something like V=`make kernelrelease`.
Alternatives include parsing Makefile (errorprone and broken by things
like localversion) and running the C preprocessor on version.h (which
requires a) building version.h somewhere and b) is really ugly).
From: Matt Mackall <mpm@selenic.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
The use of env is not needed, and caused the output makefile to be
created in some setups where it was not supposed to.
Seems to be an issue with GNU sh-utils version of env.
One user also reported env to be located in another place (/usr/local/bin/..).
This patch fixes bug: http://bugme.osdl.org/show_bug.cgi?id=3953
Thanks to "Mark Williams (MWP)" <mwp@internode.on.net> for helping tracking this down.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Merry Christmas everyone. Ho ho ho!
|
|
|
|
|
|
Avoid including as localversion-files the *~ files, i.e. backup files. If I
have localversion-a and localversion-a~, I don't want both to be used. Nor I
want to use localversion*~ anyway.
Don't code that as $(wildcard localversion*[^~]) as that would exclude
"localversion" from the wildcard expansion result, because it requires at
least one character after localversion to exist in the name file. I.e.,
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
|
|
For some architectures is does not make sense to maintain a single default
configuration - arm is a good example here.
KBUILD_DEFCONFIG is introduced allowing relevant architectures to point out
a configuration kept in arch/$(ARCH)/configs as the configuration
to be used when executing 'make defconfig'.
This patch selects versatile_defconfig as the default configuration for arm.
The reason to keep defconfig is that is has proved valuable in many testing
scenarios when one are doing a cross architecture build of the kernel to
do a simple compile-time check of some changes.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
If an arch Makefile overrides CROSS_COMPILE (e.g. parisc, mips, ...)
then the cc-option call in the main Makefile uses the wrong compiler
to check for options.
Signed-off-by: Randolph Chung <tausq@debian.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
|
|
into mars.ravnborg.org:/home/sam/bk/to-linus
|
|
New and Improved! "Woozy Numbat!"
Pick up the phone in the next two minutes and phone in your
order, and we'll throw in a second copy of Woozy Numbat,
ABSOLUTELY FREE! You too could start a Numbat farm!
|
|
|
|
With all alignment options set to 1 (minimum alignment),
I've got 5% smaller vmlinux compared to one built with
default code alignment.
Original implementation altered to use cc-option-align by sam.
From: Denis Vlasenko <vda@port.imtp.ilyichevsk.odessa.ua>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
gcc version >= 3.00 shifted from -malign-* to -falign-*. $(cc-option-align) will
based on current gcc version specify the right prefix for the align option.
Documented in Documentation/makefiles.txt
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Newer gcc versions automatically turns on -fomit-frame-pointer when
-O2 is specified thus breaking CONFIG_FRAME_POINTER option.
Explicitly specifying -fno-omit-frame-pointer fixes it.
From: Tejun Heo <tj@home-tj.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Modifies LOCALVERSION definition such that it uses
patsubst instead of subst to remove surrounding double quotes from
CONFIG_LOCALVERSION. This helps syntax-highlighting editors.
From: Tejun Heo <tj@home-tj.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Upon request from Andi Kleen the Makefile is now created for *config
targets also. So the MAkefile in the output directory is present when
it is expected (after kernel configuration).
Also tell user the Makefile is generated.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Let's try the 2.4.x release methodology
|
|
|
|
More recent versions of sparse do not define the Linux-specific
default defines, so we make the main Makefile default to the
regular Linux preprocessor defines (__linux__, linux, __STDC__
and unix, __unix__).
Also, sparse has long since fixed the default empty define to
be "1" as in regular C, so remove the unnecessary "=1" from
the architecture-specific sparse CHECKFLAGS.
|
|
|
|
|
|
The comments said so, so let the code refelct the comment.
First user is um that needs a non-standard link rule.
um patch will be submitted by the UML folks.
Also dropped a bogus comment.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Make did say:
make[1]: warning: jobserver unavailable: using -j1.
Added '+' flag in relevant places to supress this warning.
Also removed some trailing tabs in same area spotted by Adrian Bunk <bunk@fs.tum.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
built-in.o were introduced in top-level Makefile to saves us from
linking the same .o files several times when kallsyms were enabled.
Unfortunately this caused a hard lock-up on x86_64 - so this patch drops
built-in.o again. Please note is was working on i386.
This patch also fixes some wording/spellings noticed by: Horst von Brand <vonbrand@inf.utfsm.cl>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Last minute change to localversion patch were faulty.
filechk needs a valid '$^' file. In this case unused but make sure to supply one.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Generating vmlinux in top-level Makefile were getting a bit messy after kallsyms
support were added. Also the full link of all the .o files were duplicaed a number of times.
This patch does the following:
- Introduce built-in.o which is a prelink of most .o files
- Make the build process a bit more verbose telling when linking .tmpvmlinux*
- Use less magic when determing when to generate a new version
- Allow architectures to override the defineition of cmd_vmlinux__
- Add more comments to the MAkefile and clean up soem other comments
- Display more commends during V=1 builds
The resulting kernel boots and rn here.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Add LOCALVERSION so we can append strings that show up in uname
without having to fiddle with the Makefile and EXTRAVERSION, etc.
* localversion* files are read first
* config variable is appended last
* LOCALVERSION from the command line overrides all of this
* check is forced on build, since we can't really know when
the config or environment options change.
Signed-off-by: Ian Wienand <ianw@gelato.unsw.edu.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Please note that this patch, even if UML-related, should be immediately
discussed for merging in mainline, if possible. The UML patch to handle
this has therefore been separated.
Patch purpose:
If arch/$(ARCH)/Makefile is included before adding -O2 (and the rest) to
CFLAGS, I must duplicate the addition of it to USER_CFLAGS for UML.
So let's fix this.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
From: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
The LDFLAGS_BLOB var (which used to be defined in arch Makefiles) is now unused,as specified inside usr/initramfs_data.S. So this patch removes the remaining
references.
Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Added the tools that seems to be maintained.
There is a bunch that has not been touched for a while - ignore them for now.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
make namespacecheck lists globally visible symbols that are not used
outside the file that defines them. These symbols are candidates for
static declarations. It also lists multiply defined symbols.
namespace.pl knows about lots of special cases in the kernel code,
including exported symbols and conglomerate objects.
The patch also corrects the usage of scripts/reference*.pl, they need
$(src).
Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Index: 2.6.9-rc1/Makefile
===================================================================
|
|
Additional Makefile fixes for Solaris 2.8
On Solaris, 'head' doesn't take a -q argument. But we can use 'grep -h'
instead, so do that in Makefile.mod{inst,post}. The built-in test to
/bin/sh doesn't like 'if ! cmd' syntax, so when determining if we need
to do modversion stuff, invert the if/else cases. The built-in test
also doesn't understand -ef, so invoke a real version of test which does.
Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
cc-version needs to use $(shell to get the gcc version.
Before if gave the following error when building the kernel:
/bin/sh: line 1: [: too many arguments
And all checks for gcc version were broken.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
|
|
Added three function to top-level Makefile:
cc-option (replacing check_gcc)
cc-option-yn (as cc-option but return y or n)
cc-version (numeric version of $(CC))
Documentation added to Documentation/kbuild/makefiles.txt
The check_gcc version is still present, but now spit out a arning if used.
The new naming where chosen to get consistent naming of all three functions
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Using separate assignment for CHECKFLAGS allows convenient redefinition of CHECK
on the command line:
make CHECK=~/bin64/sparse C=2
to use a special 64 bit version.
Introduced usage in all archs that assined values to CHECK.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Makefile: remove obsolete HEAD
arch/cris/Makefile: replace HEAD with assignment to head-y
Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
With make C=2 sparse ($(CHECK)) will be run on all .c files also if they
do not need to be compiled.
Usefull to run sparse on a fully compiled kernel tree.
Implemented on request from Al Viro (although he liked to be able to
run sparse without building any source).
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Fixes the following error:
make: *** No rule to make target `.tmp_kallsyms2.S', needed by `.tmp_kallsyms2.o'.
Problem is that make does not know it have to visit scripts before it can use $(KALLSYMS)
$(KALLSYMS) is a dependency to .tmp_kallsyms% but make suddenly complains about
.tmp_kallsyms2 for some reasons.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
This patch removes unnecessary wildcard on KBUILD_OUTPUT
Signed-off-by: Coywolf Qi Hunt <coywolf@greatcn.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
into mars.ravnborg.org:/home/sam/bk/kbuild
|
|
When building a kernel on platforms where the filesytem do
not distingush between upper and lower case the rule:
.S -> .s did not work.
In a normal build this is only used for linker scripts.
So create a separate rule for .lds files, and use generic cpp flags.
Patch from: Dan Aloni <da-x@colinux.org>
Modified to use cpp flags + added documentation.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
into mars.ravnborg.org:/home/sam/bk/kbuild
|
|
David S. Miller <davem@redhat.com> wrote:
Shouldn't we be grepping __crc_ symbols out of the System.map file?
For one thing, these can confuse readprofile. It's algorithm is
to start at _stext, then stop when it sees a line in the System.map
which is not text (mode is one of 'T' 't' 'W' or 'w')
It will exit early if there are some intermixed __crc_* things in
there (since they are are mode 'A').
For example, in my current sparc64 kernel I have this:
00000000004cef80 t do_split
00000000004cf2a0 t add_dirent_to_buf
00000000004cf5a7 A __crc_init_special_inode
00000000004cf640 t make_indexed_dir
00000000004cf900 t ext3_add_entry
So no symbols after add_dirent_to_buf will be shown in the profiling
output of readprofile.
Implementation ported to mksysmap by Sam.
Included two System.map related fixes:
- Print "SYSMAP System.map" during build
- Sort symbols in System.map
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
|
|
|
|
|
|
Peter Chubb <peterc@gelato.unsw.edu.au> reported that building i386
on a non-i386 platform failed, because gcc could not locate boot.h.
Root cause was the extra include2 directory used when using O=
to specify the output directory.
Added LINUXINCLUDE as a portable way to specify the include/
directory, and changed the two users.
This avoids hardcoding 'include2' in non-kbuild core files.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
Do not build executables unless needed.
Same goes for scripts/mod/, descend only when CONFIG_MODULES are enabled.
With inputs form: Russell King <rmk+lkml@arm.linux.org.uk> and Brian Gerst <bgerst@quark.didntduck.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
At least one bin-utils version for ARM is know to ignore undefined
symbols when performing the final link of vmlinux.
Add an explicit check for undefined symbols to catch this.
The check is made in combination with generating the System.map file
and the actual algorithm is moved to a small shell script - mksysmap.
External symbols with three leading underscores are ignored - sparc
uses them for the BTFIXUP logic.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
|
|
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.
|