aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 16:11:28 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-07 16:11:28 -0500
commitc6906a2cb7cc318a56f6c335a2c4a3b004dd9e04 (patch)
tree387eb7a58f56e5138040831fe931ff067cebb947
parent8903709b054a8dafe4e8c6d9a6444034d7aba36f (diff)
parentbaa91878ab9b0f1cdb7ab03b53ee2e4389245644 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-fixes
* 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
-rw-r--r--Documentation/kbuild/kbuild.txt7
-rw-r--r--Documentation/kbuild/modules.txt4
-rw-r--r--Makefile1
-rw-r--r--firmware/.gitignore1
-rw-r--r--firmware/Makefile10
-rw-r--r--include/linux/qnx4_fs.h4
-rw-r--r--include/linux/qnxtypes.h5
-rw-r--r--scripts/.gitignore1
-rw-r--r--scripts/Makefile3
-rw-r--r--scripts/bootgraph.pl16
-rwxr-xr-xscripts/config150
-rw-r--r--scripts/ihex2fw.c (renamed from firmware/ihex2fw.c)0
-rwxr-xr-xscripts/tags.sh18
13 files changed, 194 insertions, 26 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt
index 51771847e816..923f9ddee8f6 100644
--- a/Documentation/kbuild/kbuild.txt
+++ b/Documentation/kbuild/kbuild.txt
@@ -124,3 +124,10 @@ KBUILD_EXTRA_SYMBOLS
124-------------------------------------------------- 124--------------------------------------------------
125For modules use symbols from another modules. 125For modules use symbols from another modules.
126See more details in modules.txt. 126See more details in modules.txt.
127
128ALLSOURCE_ARCHS
129--------------------------------------------------
130For tags/TAGS/cscope targets, you can specify more than one archs
131to be included in the databases, separated by blankspace. e.g.
132
133 $ make ALLSOURCE_ARCHS="x86 mips arm" tags
diff --git a/Documentation/kbuild/modules.txt b/Documentation/kbuild/modules.txt
index 1821c077b435..b1096da953c8 100644
--- a/Documentation/kbuild/modules.txt
+++ b/Documentation/kbuild/modules.txt
@@ -253,7 +253,7 @@ following files:
253 253
254 # Module specific targets 254 # Module specific targets
255 genbin: 255 genbin:
256 echo "X" > 8123_bin_shipped 256 echo "X" > 8123_bin.o_shipped
257 257
258 258
259 In example 2, we are down to two fairly simple files and for simple 259 In example 2, we are down to two fairly simple files and for simple
@@ -279,7 +279,7 @@ following files:
279 279
280 # Module specific targets 280 # Module specific targets
281 genbin: 281 genbin:
282 echo "X" > 8123_bin_shipped 282 echo "X" > 8123_bin.o_shipped
283 283
284 endif 284 endif
285 285
diff --git a/Makefile b/Makefile
index c9ac00837787..28331288341f 100644
--- a/Makefile
+++ b/Makefile
@@ -965,6 +965,7 @@ ifneq ($(KBUILD_SRC),)
965 mkdir -p include2; \ 965 mkdir -p include2; \
966 ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \ 966 ln -fsn $(srctree)/include/asm-$(SRCARCH) include2/asm; \
967 fi 967 fi
968 ln -fsn $(srctree) source
968endif 969endif
969 970
970# prepare2 creates a makefile if using a separate output directory 971# prepare2 creates a makefile if using a separate output directory
diff --git a/firmware/.gitignore b/firmware/.gitignore
index d9c69017bc9a..f89a21fffbf1 100644
--- a/firmware/.gitignore
+++ b/firmware/.gitignore
@@ -3,4 +3,3 @@
3*.bin 3*.bin
4*.csp 4*.csp
5*.dsp 5*.dsp
6ihex2fw
diff --git a/firmware/Makefile b/firmware/Makefile
index d872b7942a30..55d3082ea13e 100644
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -99,10 +99,10 @@ quiet_cmd_ihex = IHEX $@
99 cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@ 99 cmd_ihex = $(OBJCOPY) -Iihex -Obinary $< $@
100 100
101quiet_cmd_ihex2fw = IHEX2FW $@ 101quiet_cmd_ihex2fw = IHEX2FW $@
102 cmd_ihex2fw = $(objtree)/$(obj)/ihex2fw $< $@ 102 cmd_ihex2fw = $(objtree)/scripts/ihex2fw $< $@
103 103
104quiet_cmd_h16tofw = H16TOFW $@ 104quiet_cmd_h16tofw = H16TOFW $@
105 cmd_h16tofw = $(objtree)/$(obj)/ihex2fw -w $< $@ 105 cmd_h16tofw = $(objtree)/scripts/ihex2fw -w $< $@
106 106
107quiet_cmd_fwbin = MK_FW $@ 107quiet_cmd_fwbin = MK_FW $@
108 cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \ 108 cmd_fwbin = FWNAME="$(patsubst firmware/%.gen.S,%,$@)"; \
@@ -165,11 +165,11 @@ $(obj)/%: $(obj)/%.ihex | $(objtree)/$(obj)/$$(dir %)
165# is actually meaningful, because the firmware has to be loaded in a certain 165# is actually meaningful, because the firmware has to be loaded in a certain
166# order rather than as a single binary blob. Thus, we convert them into our 166# order rather than as a single binary blob. Thus, we convert them into our
167# more compact binary representation of ihex records (<linux/ihex.h>) 167# more compact binary representation of ihex records (<linux/ihex.h>)
168$(obj)/%.fw: $(obj)/%.HEX $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) 168$(obj)/%.fw: $(obj)/%.HEX | $(objtree)/$(obj)/$$(dir %)
169 $(call cmd,ihex2fw) 169 $(call cmd,ihex2fw)
170 170
171# .H16 is our own modified form of Intel HEX, with 16-bit length for records. 171# .H16 is our own modified form of Intel HEX, with 16-bit length for records.
172$(obj)/%.fw: $(obj)/%.H16 $(obj)/ihex2fw | $(objtree)/$(obj)/$$(dir %) 172$(obj)/%.fw: $(obj)/%.H16 | $(objtree)/$(obj)/$$(dir %)
173 $(call cmd,h16tofw) 173 $(call cmd,h16tofw)
174 174
175$(firmware-dirs): 175$(firmware-dirs):
@@ -186,5 +186,3 @@ targets := $(fw-shipped-) $(patsubst $(obj)/%,%, \
186# Without this, built-in.o won't be created when it's empty, and the 186# Without this, built-in.o won't be created when it's empty, and the
187# final vmlinux link will fail. 187# final vmlinux link will fail.
188obj-n := dummy 188obj-n := dummy
189
190hostprogs-y := ihex2fw
diff --git a/include/linux/qnx4_fs.h b/include/linux/qnx4_fs.h
index 34a196ee7941..787d19ea9f46 100644
--- a/include/linux/qnx4_fs.h
+++ b/include/linux/qnx4_fs.h
@@ -2,14 +2,12 @@
2 * Name : qnx4_fs.h 2 * Name : qnx4_fs.h
3 * Author : Richard Frowijn 3 * Author : Richard Frowijn
4 * Function : qnx4 global filesystem definitions 4 * Function : qnx4 global filesystem definitions
5 * Version : 1.0.2
6 * Last modified : 2000-01-31
7 *
8 * History : 23-03-1998 created 5 * History : 23-03-1998 created
9 */ 6 */
10#ifndef _LINUX_QNX4_FS_H 7#ifndef _LINUX_QNX4_FS_H
11#define _LINUX_QNX4_FS_H 8#define _LINUX_QNX4_FS_H
12 9
10#include <linux/types.h>
13#include <linux/qnxtypes.h> 11#include <linux/qnxtypes.h>
14#include <linux/magic.h> 12#include <linux/magic.h>
15 13
diff --git a/include/linux/qnxtypes.h b/include/linux/qnxtypes.h
index a3eb1137857b..bebbe5cc4fb8 100644
--- a/include/linux/qnxtypes.h
+++ b/include/linux/qnxtypes.h
@@ -2,9 +2,6 @@
2 * Name : qnxtypes.h 2 * Name : qnxtypes.h
3 * Author : Richard Frowijn 3 * Author : Richard Frowijn
4 * Function : standard qnx types 4 * Function : standard qnx types
5 * Version : 1.0.2
6 * Last modified : 2000-01-06
7 *
8 * History : 22-03-1998 created 5 * History : 22-03-1998 created
9 * 6 *
10 */ 7 */
@@ -12,6 +9,8 @@
12#ifndef _QNX4TYPES_H 9#ifndef _QNX4TYPES_H
13#define _QNX4TYPES_H 10#define _QNX4TYPES_H
14 11
12#include <linux/types.h>
13
15typedef __le16 qnx4_nxtnt_t; 14typedef __le16 qnx4_nxtnt_t;
16typedef __u8 qnx4_ftype_t; 15typedef __u8 qnx4_ftype_t;
17 16
diff --git a/scripts/.gitignore b/scripts/.gitignore
index b939fbd01195..09e2406f3b78 100644
--- a/scripts/.gitignore
+++ b/scripts/.gitignore
@@ -1,6 +1,7 @@
1# 1#
2# Generated files 2# Generated files
3# 3#
4ihex2fw
4conmakehash 5conmakehash
5kallsyms 6kallsyms
6pnmtologo 7pnmtologo
diff --git a/scripts/Makefile b/scripts/Makefile
index aafdf064feef..035182e16afb 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -2,11 +2,12 @@
2# scripts contains sources for various helper programs used throughout 2# scripts contains sources for various helper programs used throughout
3# the kernel for the build process. 3# the kernel for the build process.
4# --------------------------------------------------------------------------- 4# ---------------------------------------------------------------------------
5# ihex2fw: Parser/loader for IHEX formatted data
5# kallsyms: Find all symbols in vmlinux 6# kallsyms: Find all symbols in vmlinux
6# pnmttologo: Convert pnm files to logo files 7# pnmttologo: Convert pnm files to logo files
7# conmakehash: Create chartable
8# conmakehash: Create arrays for initializing the kernel console tables 8# conmakehash: Create arrays for initializing the kernel console tables
9 9
10hostprogs-y := ihex2fw
10hostprogs-$(CONFIG_KALLSYMS) += kallsyms 11hostprogs-$(CONFIG_KALLSYMS) += kallsyms
11hostprogs-$(CONFIG_LOGO) += pnmtologo 12hostprogs-$(CONFIG_LOGO) += pnmtologo
12hostprogs-$(CONFIG_VT) += conmakehash 13hostprogs-$(CONFIG_VT) += conmakehash
diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index f0af9aa9b243..0a498e33b30b 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -88,7 +88,7 @@ END
88} 88}
89 89
90print "<?xml version=\"1.0\" standalone=\"no\"?> \n"; 90print "<?xml version=\"1.0\" standalone=\"no\"?> \n";
91print "<svg width=\"1000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n"; 91print "<svg width=\"2000\" height=\"100%\" version=\"1.1\" xmlns=\"http://www.w3.org/2000/svg\">\n";
92 92
93my @styles; 93my @styles;
94 94
@@ -105,8 +105,9 @@ $styles[9] = "fill:rgb(255,255,128);fill-opacity:0.5;stroke-width:1;stroke:rgb(0
105$styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; 105$styles[10] = "fill:rgb(255,128,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
106$styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)"; 106$styles[11] = "fill:rgb(128,255,255);fill-opacity:0.5;stroke-width:1;stroke:rgb(0,0,0)";
107 107
108my $mult = 950.0 / ($maxtime - $firsttime); 108my $mult = 1950.0 / ($maxtime - $firsttime);
109my $threshold = ($maxtime - $firsttime) / 60.0; 109my $threshold2 = ($maxtime - $firsttime) / 120.0;
110my $threshold = $threshold2/10;
110my $stylecounter = 0; 111my $stylecounter = 0;
111my %rows; 112my %rows;
112my $rowscount = 1; 113my $rowscount = 1;
@@ -116,7 +117,7 @@ foreach my $key (@initcalls) {
116 my $duration = $end{$key} - $start{$key}; 117 my $duration = $end{$key} - $start{$key};
117 118
118 if ($duration >= $threshold) { 119 if ($duration >= $threshold) {
119 my ($s, $s2, $e, $w, $y, $y2, $style); 120 my ($s, $s2, $s3, $e, $w, $y, $y2, $style);
120 my $pid = $pids{$key}; 121 my $pid = $pids{$key};
121 122
122 if (!defined($rows{$pid})) { 123 if (!defined($rows{$pid})) {
@@ -125,6 +126,7 @@ foreach my $key (@initcalls) {
125 } 126 }
126 $s = ($start{$key} - $firsttime) * $mult; 127 $s = ($start{$key} - $firsttime) * $mult;
127 $s2 = $s + 6; 128 $s2 = $s + 6;
129 $s3 = $s + 1;
128 $e = ($end{$key} - $firsttime) * $mult; 130 $e = ($end{$key} - $firsttime) * $mult;
129 $w = $e - $s; 131 $w = $e - $s;
130 132
@@ -138,7 +140,11 @@ foreach my $key (@initcalls) {
138 }; 140 };
139 141
140 print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n"; 142 print "<rect x=\"$s\" width=\"$w\" y=\"$y\" height=\"145\" style=\"$style\"/>\n";
141 print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n"; 143 if ($duration >= $threshold2) {
144 print "<text transform=\"translate($s2,$y2) rotate(90)\">$key</text>\n";
145 } else {
146 print "<text transform=\"translate($s3,$y2) rotate(90)\" font-size=\"3pt\">$key</text>\n";
147 }
142 } 148 }
143} 149}
144 150
diff --git a/scripts/config b/scripts/config
new file mode 100755
index 000000000000..68b9761cdc38
--- /dev/null
+++ b/scripts/config
@@ -0,0 +1,150 @@
1#!/bin/bash
2# Manipulate options in a .config file from the command line
3
4usage() {
5 cat >&2 <<EOL
6Manipulate options in a .config file from the command line.
7Usage:
8config options command ...
9commands:
10 --enable|-e option Enable option
11 --disable|-d option Disable option
12 --module|-m option Turn option into a module
13 --state|-s option Print state of option (n,y,m,undef)
14
15 --enable-after|-E beforeopt option
16 Enable option directly after other option
17 --disable-after|-D beforeopt option
18 Disable option directly after other option
19 --module-after|-M beforeopt option
20 Turn option into module directly after other option
21
22 commands can be repeated multiple times
23
24options:
25 --file .config file to change (default .config)
26
27config doesn't check the validity of the .config file. This is done at next
28 make time.
29The options need to be already in the file before they can be changed,
30but sometimes you can cheat with the --*-after options.
31EOL
32 exit 1
33}
34
35checkarg() {
36 ARG="$1"
37 if [ "$ARG" = "" ] ; then
38 usage
39 fi
40 case "$ARG" in
41 CONFIG_*)
42 ARG="${ARG/CONFIG_/}"
43 ;;
44 esac
45 ARG="`echo $ARG | tr a-z A-Z`"
46}
47
48replace() {
49 sed -i -e "$@" $FN
50}
51
52if [ "$1" = "--file" ]; then
53 FN="$2"
54 if [ "$FN" = "" ] ; then
55 usage
56 fi
57 shift
58 shift
59else
60 FN=.config
61fi
62
63while [ "$1" != "" ] ; do
64 CMD="$1"
65 shift
66 case "$CMD" in
67 --enable|-e)
68 checkarg "$1"
69 replace "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
70 shift
71 ;;
72
73 --disable|-d)
74 checkarg "$1"
75 replace "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
76 shift
77 ;;
78
79 --module|-m)
80 checkarg "$1"
81 replace "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
82 -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
83 shift
84 ;;
85
86 --state|-s)
87 checkarg "$1"
88 if grep -q "# CONFIG_$ARG is not set" $FN ; then
89 echo n
90 else
91 V="$(grep "^CONFIG_$ARG=" $FN)"
92 if [ $? != 0 ] ; then
93 echo undef
94 else
95 V="${V/CONFIG_$ARG=/}"
96 V="${V/\"/}"
97 echo "$V"
98 fi
99 fi
100 shift
101 ;;
102
103 --enable-after|-E)
104 checkarg "$1"
105 A=$ARG
106 checkarg "$2"
107 B=$ARG
108 replace "/CONFIG_$A=[my]/aCONFIG_$B=y" \
109 -e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=y" \
110 -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=y/"
111 shift
112 shift
113 ;;
114
115 --disable-after|-D)
116 checkarg "$1"
117 A=$ARG
118 checkarg "$2"
119 B=$ARG
120 replace "/CONFIG_$A=[my]/a# CONFIG_$B is not set" \
121 -e "/# CONFIG_$ARG is not set/a/# CONFIG_$ARG is not set" \
122 -e "s/CONFIG_$ARG=[my]/# CONFIG_$ARG is not set/"
123 shift
124 shift
125 ;;
126
127 --module-after|-M)
128 checkarg "$1"
129 A=$ARG
130 checkarg "$2"
131 B=$ARG
132 replace "/CONFIG_$A=[my]/aCONFIG_$B=m" \
133 -e "/# CONFIG_$ARG is not set/a/CONFIG_$ARG=m" \
134 -e "s/CONFIG_$ARG=y/CONFIG_$ARG=m/" \
135 -e "s/# CONFIG_$ARG is not set/CONFIG_$ARG=m/"
136 shift
137 shift
138 ;;
139
140 # undocumented because it ignores --file (fixme)
141 --refresh)
142 yes "" | make oldconfig
143 ;;
144
145 *)
146 usage
147 ;;
148 esac
149done
150
diff --git a/firmware/ihex2fw.c b/scripts/ihex2fw.c
index 8f7fdaa9e010..8f7fdaa9e010 100644
--- a/firmware/ihex2fw.c
+++ b/scripts/ihex2fw.c
diff --git a/scripts/tags.sh b/scripts/tags.sh
index 9e3451d2c3a1..fdbe78bb5e2b 100755
--- a/scripts/tags.sh
+++ b/scripts/tags.sh
@@ -24,6 +24,11 @@ else
24 tree=${srctree}/ 24 tree=${srctree}/
25fi 25fi
26 26
27# Detect if ALLSOURCE_ARCHS is set. If not, we assume SRCARCH
28if [ "${ALLSOURCE_ARCHS}" = "" ]; then
29 ALLSOURCE_ARCHS=${SRCARCH}
30fi
31
27# find sources in arch/$ARCH 32# find sources in arch/$ARCH
28find_arch_sources() 33find_arch_sources()
29{ 34{
@@ -54,26 +59,29 @@ find_other_sources()
54find_sources() 59find_sources()
55{ 60{
56 find_arch_sources $1 "$2" 61 find_arch_sources $1 "$2"
57 find_include_sources "$2"
58 find_other_sources "$2"
59} 62}
60 63
61all_sources() 64all_sources()
62{ 65{
63 find_sources $SRCARCH '*.[chS]' 66 for arch in $ALLSOURCE_ARCHS
67 do
68 find_sources $arch '*.[chS]'
69 done
64 if [ ! -z "$archinclude" ]; then 70 if [ ! -z "$archinclude" ]; then
65 find_arch_include_sources $archinclude '*.[chS]' 71 find_arch_include_sources $archinclude '*.[chS]'
66 fi 72 fi
73 find_include_sources '*.[chS]'
74 find_other_sources '*.[chS]'
67} 75}
68 76
69all_kconfigs() 77all_kconfigs()
70{ 78{
71 find_sources $SRCARCH 'Kconfig*' 79 find_sources $ALLSOURCE_ARCHS 'Kconfig*'
72} 80}
73 81
74all_defconfigs() 82all_defconfigs()
75{ 83{
76 find_sources $SRCARCH "defconfig" 84 find_sources $ALLSOURCE_ARCHS "defconfig"
77} 85}
78 86
79docscope() 87docscope()