]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 21:11:28 +0000 (13:11 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 7 Jan 2009 21:11:28 +0000 (13:11 -0800)
* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes:
  kbuild: fix typos (s/bin_shipped/bin.o_shipped/) in Documentation
  kbuild: add a symlink to the source for separate objdirs
  kconfig: add script to manipulate .config files on the command line
  kbuild: reintroduce ALLSOURCE_ARCHS support for tags/cscope
  bootchart: improve output based on Dave Jones' feedback
  fix modules_install via NFS
  qnx: include <linux/types.h> for definitions of __[us]{8,16,32,64} types

13 files changed:
Documentation/kbuild/kbuild.txt
Documentation/kbuild/modules.txt
Makefile
firmware/.gitignore
firmware/Makefile
include/linux/qnx4_fs.h
include/linux/qnxtypes.h
scripts/.gitignore
scripts/Makefile
scripts/bootgraph.pl
scripts/config [new file with mode: 0755]
scripts/ihex2fw.c [moved from firmware/ihex2fw.c with 100% similarity]
scripts/tags.sh

index 51771847e816d8905fc74465f0a82c75a5ccd0d9..923f9ddee8f6c4f5d90d74bb2dea3407dc43c428 100644 (file)
@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS
 --------------------------------------------------
 For modules use symbols from another modules.
 See more details in modules.txt.
+
+ALLSOURCE_ARCHS
+--------------------------------------------------
+For tags/TAGS/cscope targets, you can specify more than one archs
+to be included in the databases, separated by blankspace. e.g.
+
+    $ make ALLSOURCE_ARCHS="x86 mips arm" tags
index 1821c077b435cd64eac847dc1ec69d5386dc6ad6..b1096da953c8a9c5105686b7702bde502113b3d1 100644 (file)
@@ -253,7 +253,7 @@ following files:
 
                # Module specific targets
                genbin:
-                       echo "X" > 8123_bin_shipped
+                       echo "X" > 8123_bin.o_shipped
 
 
        In example 2, we are down to two fairly simple files and for simple
@@ -279,7 +279,7 @@ following files:
 
                # Module specific targets
                genbin:
-                       echo "X" > 8123_bin_shipped
+                       echo "X" > 8123_bin.o_shipped
 
                endif
 
index c9ac008377874e012fc09d9bb0de8cf316474162..28331288341fb79fb539fac5d68b680e5ae3298f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -965,6 +965,7 @@ ifneq ($(KBUILD_SRC),)
            mkdir -p include2;                                          \
            ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm;     \
        fi
+       ln -fsn $(srctree) source
 endif
 
 # prepare2 creates a makefile if using a separate output directory
index d9c69017bc9affb03b2519d1dbb1e5cc88abfcdc..f89a21fffbf1c268d355fc526c4635a0a015a3cc 100644 (file)
@@ -3,4 +3,3 @@
 *.bin
 *.csp
 *.dsp
-ihex2fw
index d872b7942a30384a64896eaaac17dea128effaa8..55d3082ea13e1d4d96fb49ff7f566e52f9c3b5e8 100644 (file)
@@ -99,10 +99,10 @@ quiet_cmd_ihex  = IHEX    $@
       cmd_ihex  = $(OBJCOPY) -Iihex -Obinary $< $@
 
 quiet_cmd_ihex2fw  = IHEX2FW $@
-      cmd_ihex2fw  = $(objtree)/$(obj)/ihex2fw $< $@
+      cmd_ihex2fw  = $(objtree)/scripts/ihex2fw $< $@
 
 quiet_cmd_h16tofw  = H16TOFW $@
-      cmd_h16tofw  = $(objtree)/$(obj)/ihex2fw -w $< $@
+      cmd_h16tofw  = $(objtree)/scripts/ihex2fw -w $< $@
 
 quiet_cmd_fwbin = MK_FW   $@
       cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)";               \
@@ -165,11 +165,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
 # is actually meaningful, because the firmware has to be loaded in a certain
 # order rather than as a single binary blob. Thus, we convert them into our
 # more compact binary representation of ihex records (<linux/ihex.h>)
-$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
+$(obj)/%.fw: $(obj)/%.HEX  | $(objtree)/$(obj)/$$(dir %)
        $(call cmd,ihex2fw)
 
 # .H16 is our own modified form of Intel HEX, with 16-bit length for records.
-$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %)
+$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
        $(call cmd,h16tofw)
 
 $(firmware-dirs):
@@ -186,5 +186,3 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
 # Without this, built-in.o won't be created when it's empty, and the
 # final vmlinux link will fail.
 obj-n := dummy
-
-hostprogs-y := ihex2fw
index 34a196ee794182a01ef26e4a9acba7df444875e7..787d19ea9f46a35b4fcbd12e91b597e56587bccb 100644 (file)
@@ -2,14 +2,12 @@
  *  Name                         : qnx4_fs.h
  *  Author                       : Richard Frowijn
  *  Function                     : qnx4 global filesystem definitions
- *  Version                      : 1.0.2
- *  Last modified                : 2000-01-31
- *
  *  History                      : 23-03-1998 created
  */
 #ifndef _LINUX_QNX4_FS_H
 #define _LINUX_QNX4_FS_H
 
+#include <linux/types.h>
 #include <linux/qnxtypes.h>
 #include <linux/magic.h>
 
index a3eb1137857b15ab616ab6a5e1352fe7e5a87eaf..bebbe5cc4fb8f463c0532ac2fc1f44037834f3ec 100644 (file)
@@ -2,9 +2,6 @@
  *  Name                         : qnxtypes.h
  *  Author                       : Richard Frowijn
  *  Function                     : standard qnx types
- *  Version                      : 1.0.2
- *  Last modified                : 2000-01-06
- *
  *  History                      : 22-03-1998 created
  *
  */
@@ -12,6 +9,8 @@
 #ifndef _QNX4TYPES_H
 #define _QNX4TYPES_H
 
+#include <linux/types.h>
+
 typedef __le16 qnx4_nxtnt_t;
 typedef __u8  qnx4_ftype_t;
 
index b939fbd0119539f38b6c4f34e211223d9d8b4a45..09e2406f3b78eeb78be3fe99c712f3e19d08f0e2 100644 (file)
@@ -1,6 +1,7 @@
 #
 # Generated files
 #
+ihex2fw
 conmakehash
 kallsyms
 pnmtologo
index aafdf064feefdf49bc98d66c72199907e30ca921..035182e16afb732d40b05c5a55df4ac79e6d2a96 100644 (file)
@@ -2,11 +2,12 @@
 # scripts contains sources for various helper programs used throughout
 # the kernel for the build process.
 # ---------------------------------------------------------------------------
+# ihex2fw:       Parser/loader for IHEX formatted data
 # kallsyms:      Find all symbols in vmlinux
 # pnmttologo:    Convert pnm files to logo files
-# conmakehash:   Create chartable
 # conmakehash:  Create arrays for initializing the kernel console tables
 
+hostprogs-y                      := ihex2fw
 hostprogs-$(CONFIG_KALLSYMS)     += kallsyms
 hostprogs-$(CONFIG_LOGO)         += pnmtologo
 hostprogs-$(CONFIG_VT)           += conmakehash
index f0af9aa9b243bcb1892ede765a44b2b225921046..0a498e33b30b5293019b007ae001de63dec01208 100644 (file)
@@ -88,7 +88,7 @@ END
 }
 
 print "<?xml version=\"1.0\" standalone=\"no\"?> \n";
-print "<svg width=\"1000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
+print "<svg width=\"2000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
 
 my @styles;
 
@@ -105,8 +105,9 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0
 $styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
 $styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
 
-my $mult = 950.0 / ($maxtime - $firsttime);
-my $threshold = ($maxtime - $firsttime) / 60.0;
+my $mult = 1950.0 / ($maxtime - $firsttime);
+my $threshold2 = ($maxtime - $firsttime) / 120.0;
+my $threshold = $threshold2/10;
 my $stylecounter = 0;
 my %rows;
 my $rowscount = 1;
@@ -116,7 +117,7 @@ foreach my $key (@initcalls) {
        my $duration = $end{$key} - $start{$key};
 
        if ($duration >= $threshold) {
-               my ($s, $s2, $e, $w, $y, $y2, $style);
+               my ($s, $s2, $s3, $e, $w, $y, $y2, $style);
                my $pid = $pids{$key};
 
                if (!defined($rows{$pid})) {
@@ -125,6 +126,7 @@ foreach my $key (@initcalls) {
                }
                $s = ($start{$key} - $firsttime) * $mult;
                $s2 = $s + 6;
+               $s3 = $s + 1;
                $e = ($end{$key} - $firsttime) * $mult;
                $w = $e - $s;
 
@@ -138,7 +140,11 @@ foreach my $key (@initcalls) {
                };
 
                print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n";
-               print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
+               if ($duration >= $threshold2) {
+                       print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
+               } else {
+                       print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n";
+               }
        }
 }
 
diff --git a/scripts/config b/scripts/config
new file mode 100755 (executable)
index 0000000..68b9761
--- /dev/null
@@ -0,0 +1,150 @@
+#!/bin/bash
+# Manipulate options in a .config file from the command line
+
+usage() {
+       cat >&2 <<EOL
+Manipulate options in a .config file from the command line.
+Usage:
+config options command ...
+commands:
+       --enable|-e option   Enable option
+       --disable|-d option  Disable option
+       --module|-m option      Turn option into a module
+       --state|-s option       Print state of option (n,y,m,undef)
+
+       --enable-after|-E beforeopt option
+                             Enable option directly after other option
+       --disable-after|-D beforeopt option
+                             Disable option directly after other option
+       --module-after|-M beforeopt option
+                             Turn option into module directly after other option
+
+       commands can be repeated multiple times
+
+options:
+       --file .config file to change (default .config)
+
+config doesn't check the validity of the .config file. This is done at next
+ make time.
+The options need to be already in the file before they can be changed,
+but sometimes you can cheat with the --*-after options.
+EOL
+       exit 1
+}
+
+checkarg() {
+       ARG="$1"
+       if [ "$ARG" = "" ] ; then
+               usage
+       fi
+       case "$ARG" in
+       CONFIG_*)
+               ARG="${ARG/CONFIG_/}"
+               ;;
+       esac
+       ARG="`echo $ARG | tr a-z A-Z`"
+}
+
+replace() {
+       sed -i -e "$@" $FN
+}
+
+if [ "$1" = "--file" ]; then
+       FN="$2"
+       if [ "$FN" = "" ] ; then
+               usage
+       fi
+       shift
+       shift
+else
+       FN=.config
+fi
+
+while [ "$1" != "" ] ; do
+       CMD="$1"
+       shift
+       case "$CMD" in
+       --enable|-e)
+               checkarg "$1"
+               replace "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
+               shift
+               ;;
+
+       --disable|-d)
+               checkarg "$1"
+               replace "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
+               shift
+               ;;
+
+       --module|-m)
+               checkarg "$1"
+               replace "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
+                       -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
+               shift
+               ;;
+
+       --state|-s)
+               checkarg "$1"
+               if grep -q "# CONFIG_$ARG is not set" $FN ; then
+                       echo n
+               else
+                       V="$(grep "^CONFIG_$ARG=" $FN)"
+                       if [ $? != 0 ] ; then
+                               echo undef
+                       else
+                               V="${V/CONFIG_$ARG=/}"
+                               V="${V/\"/}"
+                               echo "$V"
+                       fi
+               fi
+               shift
+               ;;
+
+       --enable-after|-E)
+               checkarg "$1"
+               A=$ARG
+               checkarg "$2"
+               B=$ARG
+               replace "/CONFIG_$A=[my]/aCONFIG_$B=y" \
+                       -e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=y" \
+                       -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
+               shift
+               shift
+               ;;
+
+       --disable-after|-D)
+               checkarg "$1"
+               A=$ARG
+               checkarg "$2"
+               B=$ARG
+               replace "/CONFIG_$A=[my]/a# CONFIG_$B is not set" \
+               -e "/# CONFIG_$ARG is not set/a/# CONFIG_$ARG is not set" \
+               -e "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
+               shift
+               shift
+               ;;
+
+       --module-after|-M)
+               checkarg "$1"
+               A=$ARG
+               checkarg "$2"
+               B=$ARG
+               replace "/CONFIG_$A=[my]/aCONFIG_$B=m" \
+                       -e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=m" \
+                       -e "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
+                       -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
+               shift
+               shift
+               ;;
+
+       # undocumented because it ignores --file (fixme)
+       --refresh)
+               yes "" | make oldconfig
+               ;;
+
+       *)
+               usage
+               ;;
+       esac
+done
+
similarity index 100%
rename from firmware/ihex2fw.c
rename to scripts/ihex2fw.c
index 9e3451d2c3a1d608b401c01685b841df02ae0550..fdbe78bb5e2b6ad8359aeabb26b0fcf98af44957 100755 (executable)
@@ -24,6 +24,11 @@ else
        tree=${srctree}/
 fi
 
+# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
+if [ "${ALLSOURCE_ARCHS}" = "" ]; then
+       ALLSOURCE_ARCHS=${SRCARCH}
+fi
+
 # find sources in arch/$ARCH
 find_arch_sources()
 {
@@ -54,26 +59,29 @@ find_other_sources()
 find_sources()
 {
        find_arch_sources $1 "$2"
-       find_include_sources "$2"
-       find_other_sources "$2"
 }
 
 all_sources()
 {
-       find_sources $SRCARCH '*.[chS]'
+       for arch in $ALLSOURCE_ARCHS
+       do
+               find_sources $arch '*.[chS]'
+       done
        if [ ! -z "$archinclude" ]; then
                find_arch_include_sources $archinclude '*.[chS]'
        fi
+       find_include_sources '*.[chS]'
+       find_other_sources '*.[chS]'
 }
 
 all_kconfigs()
 {
-       find_sources $SRCARCH 'Kconfig*'
+       find_sources $ALLSOURCE_ARCHS 'Kconfig*'
 }
 
 all_defconfigs()
 {
-       find_sources $SRCARCH "defconfig"
+       find_sources $ALLSOURCE_ARCHS "defconfig"
 }
 
 docscope()