Commit Graph

4638 Commits

Author SHA1 Message Date
Sam Ravnborg 66d609ec8a kbuild: fix make TAGS (for emacs use)
From: bongiojp@clarkson.edu <Jeremy Bongio>
make TAGS does not make source code tags for emacs. It instead
returns an error than "etags -" isn't valid. The problem is
easily remedied.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-28 23:11:34 +02:00
Paolo 'Blaisorblade' Giarrusso 49490571bc [PATCH] kbuild: describe Kbuild pitfall
Whitespace is significant for make, and I just fought against this... so
please apply this patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-28 22:58:21 +02:00
J.A. Magallon 61d9cdf2a9 [PATCH] kbuild: signed char fixes for scripts
This time I did not break anything... and they shut up gcc4 ;)

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-27 22:27:08 +02:00
Keenan Pepper 84c2a2eb34 [PATCH] kbuild: signed/unsigned char fix for make menuconfig
Quiet some silly warnings.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-27 22:17:30 +02:00
Sam Ravnborg db8c1a7b2c kbuild: fix building external modules
kbuild failed to locate Makefile for external modules.
This brought to my attention how the variables for directories
have different values in different usage scenarios.

Different kbuild usage scenarios:
make       - plain make in same directory where kernel source lives
make O=    - kbuild is told to store output files in another directory
make M=    - building an external module
make O= M= - building an external module with kernel output seperate from src

Value assigned to the different variables:

           |$(src)          |$(obj) |$(srctree)        |$(objtree)
make       |reldir to k src |as src |abs path to k src |abs path to k src
make O=    |reldir to k src |as src |abs path to k src |abs path to output dir
make M=    |abs path to src |as src |abs path to k src |abs path to k src
make O= M= |abs path to src |as src |abs path to k src |abs path to k output

path to kbuild file:

make       | $(srctree)/$(src), $(src)
make O=    | $(srctree)/$(src)
make M=    | $(src)
make O= M= | $(src)

From the table above it can be seen that the only good way to find the
home directory of the kbuild file is to locate the one of the two variants
that is an absolute path. If $(src) is an absolute path (starts with /)
then use it, otherwise prefix $(src) with $(srctree).

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-27 22:11:01 +02:00
Sam Ravnborg 72ba47c1b2 kbuild: silence mystery message
During last phase of the build the following message were displayed:
/bin/sh: +@: command not found

This message appears due to slightly changed semantics
of cmd and if_changed_rule.
The easy fix was to insert a dummy command first in rule_ksym_ld.
The alternative was to redo part of this processing in the top-level
Makefile - a volatile area that I try to avoid.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-27 11:39:37 +02:00
Sam Ravnborg 23a45e2c0a kbuild: pass less variables to second make invocation when using make O=...
make exports all variables assigned on the command-line, so no need to pass
them explicit.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=4725

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-27 09:12:07 +02:00
Sam Ravnborg e579d351b4 kbuild: KBUILD_VERBOSE was exported twice
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=4727

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-27 08:10:10 +02:00
Jesper Juhl f9f97bc014 [PATCH] kallsyms: clarify KALLSYMS_ALL help text
Clarify the KALLSYMS_ALL help text slightly.

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
2005-07-26 10:16:12 +00:00
Sam Ravnborg 2315c6e422 kbuild: define clean before including kbuild file
Defining clean before including the kbuild file give us knowledge when
the kbuild file is included for cleaning. This is rarey usefull - but in
a corner case in klibc this proved necessary.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-25 22:41:12 +00:00
Sam Ravnborg 2a69147034 kbuild: fix make O=...
kbuild failed to locate Kbuild.include.
Teach kbuild how to find Kbuild files when using make O=...

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-25 20:26:04 +00:00
Sam Ravnborg 8ec4b4ff1c kbuild: introduce Kbuild.include
Kbuild.include is a placeholder for definitions originally present in
both the top-level Makefile and scripts/Makefile.build.
There were a slight difference in the filechk definition, so the most videly
used version was kept and usr/Makefile was adopted for this syntax.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-25 20:10:36 +00:00
Sam Ravnborg 7c6b155fb4 kbuild: drop descend - converting existing users
There was only two users left of descend. Fix them so they
use $(clean)= and $(build)=.
Drop definition of descend.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-25 12:51:08 +00:00
Sam Ravnborg 43af5f2335 kbuild: drop -Wundef from HOSTCFLAGS for now
-Wundef caused warnings in the bison generated code in kconfig.
Updating to a newer bison (1.875d) did not fix it. The alternatives
was to correct the autogenerated code or drop -Wundef.
For now -Wundef is dropped from HOSTCFLAGS.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
2005-07-25 12:40:34 +00:00
Coywolf Qi Hunt d178817803 [PATCH] kbuild: make help binrpm-pkg fix
This fixes kbuild make help binrpm-pkg missing `''.

Signed-off-by: Coywolf Qi Hunt <coywolf@lovecn.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-21 21:45:47 +00:00
Olaf Hering 3c521e06fa [PATCH] kbuild: add -Wundef to global CFLAGS
A recent change to the aic scsi driver removed two defines to detect
endianness. cpp handles undefined strings as 0. As a result, the test turned
into #if 0 == 0 and the wrong code was selected.
Adding -Wundef to global CFLAGS will catch such errors.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-21 21:45:47 +00:00
Tom Rini ce454d4d72 [PATCH] kbuild: When checking depmod version, redirect stderr
When running depmod to check for the correct version number, extra
output we don't need to see, such as "depmod: QM_MODULES: Function not
implemented" may show up.  Redirect stderr to /dev/null as the version
information that we do care about comes to stdout.

Signed-off-by: Tom Rini <trini@kernel.crashing.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-17 21:00:22 +00:00
Sam Ravnborg 946dc121d7 kbuild: fix make O=... build
It fixes the following error:

make[1]: *** No rule to make target `include/asm', needed by `arch/alpha/kernel/asm-offsets.s'.  Stop.

Reported by:
From: Jan Dittmer <j.dittmer@portrix.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:28:49 +00:00
Sam Ravnborg a91f98a284 kbuild: Fix bug in make deb-pkg when using seperate source and output directories
From: Ryan Anderson <ryan@michonline.com>

When running "make O=something deb-pkg", I get a failure that claims I
haven't configured my kernel (I have).  Running it a second time tells
me to run "make mrproper"  (include/linux/version.h got built on the
first run)

Original patch from:
From: Ajay Patel <patela@gmail.com>

With modifications from:
Signed-off-By: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:26:09 +00:00
Sam Ravnborg dc5962fdf1 uml: Restore proper descriptions in make deb-pkg target
From: Ryan Anderson <ryan@michonline.com>

This pulls the description from the Debian user-mode-linux package, and
puts $version back in the appropriate places for both descriptions.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:24:56 +00:00
Sam Ravnborg 687c3dac59 uml: Make deb-pkg build target build a Debian-style user-mode-linux package
From: Ryan Anderson <ryan@michonline.com>

Make the deb-pkg build target understand the "um" arch and set up the
package and directory structure to match a mainline-Debian style
user-mode-linux package.

This is primarily so that it stops matching, exactly, the naming
convention used by normal, non-UML kernels generated by this command.

Installing "linux-2.6.11" and "linux-2.6.11", where one is a UML kernel
doesn't do the right thing.  This fixes that.

Signed-off-by: Ryan Anderson <ryan@michonline.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:24:00 +00:00
Sam Ravnborg d80e224609 kbuild: Don't fail if include/asm symlink exists
From: Andreas Gruenbacher <agruen@suse.de>

We're having the following situation: There are user-space applications
that include kernel headers directly. With a completely unconfigured
/usr/src/linux tree, including most headers fails because essential
files are not there:

	include/asm
	include/linux/autoconf.h
	include/linux/version.h

So we create these files. On the other hand, we want to use
/usr/src/linux as read-only source for building kernels or additional
modules. Now when building a kernel with a separate output directory
(O=), there is a check in the main makefile for the include/asm symlink.
There is no real need for this check: if we ensure that
$(objdir)/include/asm is always created as the patch does,
$(srctree)/include/asm becomes irrelevant.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:22:39 +00:00
Sam Ravnborg c5f75eca12 kbuild: fix buildcheck
From: Randy Dunlap <rddunlap@osdl.org>

I should not have added init.text test here;
it's more than useless, it actually degrades the output.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:20:13 +00:00
Sam Ravnborg 33bc25eae4 kbuild: Add target debug_kallsyms
From: Keith Owens <kaos@ocs.com.au>

Make it easier to generate maps for debugging kallsyms problems.
debug_kallsyms is only a debugging target so no help or silent mode.

Signed-off-by: Keith Owens <kaos@ocs.com.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:19:08 +00:00
Sam Ravnborg bd5bdd875b kbuild: "PREEMPT" in UTS_VERSION
From: Matt Mackall <mpm@selenic.com>

Add PREEMPT to UTS_VERSION where enabled as is done for SMP to make
preempt kernels easily identifiable.
Added SMP PREEMPT as comment in compile.h to force it to be
updated when they change (sam).

Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:18:07 +00:00
Sam Ravnborg 6d30e3a899 kbuild: Avoid inconsistent kallsyms data
Several reports on inconsistent kallsyms data has been caused by the aliased symbols
__sched_text_start and __down to shift places in the output of nm.
The root cause was that on second pass ld aligned __sched_text_start to a 4 byte boundary
which is the function alignment on i386.
sched.text and spinlock.text is now aligned to an 8 byte boundary to make sure they
are aligned to a function alignemnt on most (all?) archs.

Tested by: Paulo Marques <pmarques@grupopie.com>
Tested by: Alexander Stohr <Alexander.Stohr@gmx.de>

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:15:44 +00:00
Sam Ravnborg 53e88e03e6 buildcheck: reduce DEBUG_INFO noise from reference* scripts
From: Randy Dunlap <rddunlap@osdl.org>

Reduce noise in 'make buildcheck' that is caused by CONFIG_DEBUG_INFO=y.

Signed-off-by: Randy Dunlap <rddunlap@osdl.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:14:42 +00:00
Sam Ravnborg cfca82f217 kbuild: Fix build as root then user
From: Matthew Wilcox <matthew@wil.cx>
I inadvertently built a tree as root and then rebuilt it as a user.  I
got a lot of prompts ...

mv: overwrite `drivers/char/drm/drm_auth.o', overriding mode 0644?

Using mv -f fixes that.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-14 20:12:40 +00:00
Randy Dunlap 2283a117f6 [PATCH] scripts/kernel-doc: don't use uninitialized SRCTREE
Current kernel-doc (perl) script generates this warning:
Use of uninitialized value in concatenation (.) or string at scripts/kernel-doc line 1668.

So explicitly check for SRCTREE in the ENV before using it,
and then if it is set, append a '/' to the end of it, otherwise
the SRCTREE + filename can (will) be missing the intermediate '/'.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 23:18:36 +00:00
Jeff Mahoney 66da665ca3 [PATCH] Lindent: ignore .indent.pro
When I recently submitted a Lindent patch, it turned out that my .indent.pro
 options were also applied to the tree. This patch directs indent(1) to ignore
 the .indent.pro directives and only use options specified on the command
 line.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 23:09:16 +00:00
Yum Rayan be3cef986f [PATCH] kbuild: restrain output of "make help" to 80 columns
This patch fixes the output of "make help" to fit in a 80 column
screen. Please push upstream as part of your other patches.

Signed-off-by: Yum Rayan <yum.rayan@gmail.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 22:54:57 +00:00
Matthias Urlichs e0af0d85f5 [PATCH] kbuild: obey HOSTLOADLIBES_programname for single-file compilation
Single-file HOSTCC calls added the libraries from $(HOSTLOADLIBES),
but not from $(HOSTLOADLIBES_programname). Multi-file HOSTCC calls do
both.

This patch fixes that inconsistency.

Signed-Off-By: Matthias Urlichs <smurf@debian.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 22:11:14 +00:00
Ian Campbell a0674e88d9 [PATCH] kbuild: allow cscope to index multiple architectures
I have a single source tree which I cross compile for a couple of
different architectures using ARHC=foo O=blah etc.

The existing cscope target is very handy but only indexes the current
$(ARCH), which is a pain since inevitably I'm interested in the other
one at any given time ;-). This patch allows me to pass a list of
architectures for cscope to index. e.g.
	make ALLSOURCE_ARCHS="i386 arm" cscope

This change also works for etags etc, and I presume it is just as useful
there.

Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 22:07:04 +00:00
Karl Hegbloom acbef459a6 [PATCH] kbuild: make 'cscope -q' play well with cscope.el
I tried the Linux Makefile 'make cscope' target, and found that the
generated database is not compatible with 'cscope.el' under XEmacs.
The thing is that 'cscope.el' does not allow setting the command line
options to the 'cscope' commands it runs, and it errors with a message
about the options not matching the ones used to generate the index.

It turns out the cscope designers already thought of this.  The
options can be written into the "cscope.files".  The included patch
moves the "-q" and "-k" options from the 'cmd_cscope' to the
'cmd_cscope-file', echoing them into the top of the files listing.

Now the index is generated with the "-q" option, and when 'cscope.el'
performs it's search, it uses that argument as well.  Lookups are fast
and everyone is happy.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 21:45:57 +00:00
Greg Edwards d2cb1a95c5 [PATCH] kbuild: add ia64 support to rpm Makefile target
On ia64, only the EFI (fat) partition is available to boot from.  The rpm
needs to install the kernel under /boot/efi to be useable on ia64.

Signed-off-by: Greg Edwards <edwardsg@sgi.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 21:08:33 +00:00
Fabio Massimo Di Nitto b95d4fec89 [PATCH] kbuild: modpost needs to cope with new glibc elf header on sparc
Recently a change in the glibc elf.h header has been introduced causing
modpost to spawn tons of warnings (like the one below) building the kernel
on sparc:

[SNIP]
*** Warning: "current_thread_info_reg" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
*** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
*** Warning: "" [net/sunrpc/auth_gss/auth_rpcgss.ko] undefined!
[SNIP]

Ben Collins discovered that the STT_REGISTERED definition in glibc did change
and that this change needs to be propagated to modpost.

glibc change:
-#define STT_REGISTER   13              /* Global register reserved to app. */
+#define STT_SPARC_REGISTER     13      /* Global register reserved to app. */

I did and tested this simple patch to maintain compatibility with newer (>= 2.3.4)
and older (<= 2.3.2) glibc.

Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-13 17:05:32 +00:00
Jan-Benedict Glaw 6d983feab8 [PATCH] kbuild: create tarballs
It adds tarball packaging, which I prefer for distribution.
Also one of the two blanks after @echo is removed. One seems to be enough :)

Signed-off-by: Jan-Benedict Glaw <jbglaw@lug-owl.de>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
2005-07-12 22:40:17 +00:00
Linus Torvalds 7ac3db59fd Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-07-11 16:32:40 -07:00
Linus Torvalds 1604d9c8f8 Merge master.kernel.org:/pub/scm/linux/kernel/git/aegl/linux-2.6 2005-07-11 14:08:08 -07:00
David S. Miller 328f314a89 [SPARC64]: Add missing asm-sparc64/seccomp.h file.
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-11 13:44:56 -07:00
Kenji Kaneshige 3b5cc09033 [IA64] assign_irq_vector() should not panic
Current assign_irq_vector() will panic if interrupt vectors is running
out. But I think how to handle the case of lack of interrupt vectors
should be handled by the caller of this function. For example, some
PCI devices can raise the interrupt signal via both MSI and I/O
APIC. So even if the driver for these device fails to allocate a
vector for MSI, the driver still has a chance to use I/O APIC based
interrupt. But currently there is no chance for these driver to use
I/O APIC based interrupt because kernel will panic when
assign_irq_vector() fails to allocate interrupt vector.

The following patch changes assign_irq_vector() for ia64 to return
-ENOSPC on error instead of panic (as i386 and x86_64 versions do).

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-07-11 10:30:07 -07:00
Nishanth Aravamudan 699139279d [IA64] use msleep_interruptible() instead of schedule_timeout
Description: Replace schedule_timeout() with msleep_interruptible() to
guarantee the task delays as expected.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Acked-by: Dean Nelson <dcn@sgi.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-07-11 10:26:40 -07:00
Miles Bader a8400986fb [PATCH] v850: Update mmu.h header to match implementation changes
Signed-off-by: Miles Bader <miles@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-11 10:22:39 -07:00
Miles Bader 623cdf4a04 [PATCH] v850: Update checksum.h to match changed function signatures
Signed-off-by: Miles Bader <miles@gnu.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-07-11 10:22:39 -07:00
Linus Torvalds 200d481f28 Merge master.kernel.org:/pub/scm/linux/kernel/git/tglx/mtd-2.6 2005-07-11 10:18:18 -07:00
Linus Torvalds f43a64c5e1 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2005-07-11 10:09:59 -07:00
Olaf Hering d0feafbf14 [IA64] remove linux/version.h include from arch/ia64
changing CONFIG_LOCALVERSION rebuilds too much, for no appearent reason.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Tony Luck <tony.luck@intel.com>
2005-07-11 09:58:52 -07:00
Tony Luck e7578c08a4 Auto merge with /home/aegl/GIT/linus 2005-07-11 09:43:11 -07:00
David S. Miller f7ceba360c [SPARC64]: Add syscall auditing support.
Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-10 19:29:45 -07:00
David S. Miller 8d8a64796f [SPARC64]: Pass regs and entry/exit boolean to syscall_trace()
Also fix a bug in 32-bit syscall tracing.  We forgot to update
this code when we moved over to the convention that all 32-bit
syscall arguments are zero extended by default.

Signed-off-by: David S. Miller <davem@davemloft.net>
2005-07-10 16:55:48 -07:00