aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-30 19:49:53 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-07-30 19:49:53 -0700
commit81cae4d46f5674c4d666ab83e99ef1badc33059e (patch)
treea1447864874445b4df3ad7dcffcce94bf6810f49 /scripts
parenta6c1323128246e9d5067865db44ab7f64e9cce15 (diff)
parente09e58867154b8aae0a3ac26a9b1c05962f5a355 (diff)
downloadhistory-81cae4d46f5674c4d666ab83e99ef1badc33059e.tar.gz
Merge bk://linux-sam.bkbits.net/kbuild
into ppc970.osdl.org:/home/torvalds/v2.6/linux
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile19
-rw-r--r--scripts/Makefile.modpost2
-rw-r--r--scripts/genksyms/parse.c_shipped258
-rw-r--r--scripts/mkmakefile31
-rw-r--r--scripts/mod/Makefile16
-rw-r--r--scripts/mod/empty.c (renamed from scripts/empty.c)0
-rw-r--r--scripts/mod/file2alias.c (renamed from scripts/file2alias.c)2
-rw-r--r--scripts/mod/mk_elfconfig.c (renamed from scripts/mk_elfconfig.c)0
-rw-r--r--scripts/mod/modpost.c (renamed from scripts/modpost.c)0
-rw-r--r--scripts/mod/modpost.h (renamed from scripts/modpost.h)0
-rw-r--r--scripts/mod/sumversion.c (renamed from scripts/sumversion.c)0
-rw-r--r--scripts/package/Makefile20
-rwxr-xr-xscripts/package/mkspec19
13 files changed, 223 insertions, 144 deletions
diff --git a/scripts/Makefile b/scripts/Makefile
index 4931b3e361e2b..81c913c1ee3f9 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -5,24 +5,11 @@
# docproc: Preprocess .tmpl file in order to generate .sgml docs
# conmakehash: Create arrays for initializing the kernel console tables
-host-progs := conmakehash kallsyms modpost mk_elfconfig pnmtologo bin2c
-always := $(host-progs) empty.o
-
-modpost-objs := modpost.o file2alias.o sumversion.o
+host-progs := conmakehash kallsyms pnmtologo bin2c
+always := $(host-progs)
subdir-$(CONFIG_MODVERSIONS) += genksyms
+subdir-y += mod
# Let clean descend into subdirs
subdir- += basic lxdialog kconfig package
-
-# dependencies on generated files need to be listed explicitly
-
-$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
-
-quiet_cmd_elfconfig = MKELF $@
- cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
-
-$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
- $(call if_changed,elfconfig)
-
-targets += elfconfig.h
diff --git a/scripts/Makefile.modpost b/scripts/Makefile.modpost
index 95663091bda55..19f5345279ac5 100644
--- a/scripts/Makefile.modpost
+++ b/scripts/Makefile.modpost
@@ -50,7 +50,7 @@ _modpost: $(modules)
# Step 2), invoke modpost
# Includes step 3,4
quiet_cmd_modpost = MODPOST
- cmd_modpost = scripts/modpost \
+ cmd_modpost = scripts/mod/modpost \
$(if $(KBUILD_EXTMOD),-i,-o) $(symverfile) \
$(filter-out FORCE,$^)
diff --git a/scripts/genksyms/parse.c_shipped b/scripts/genksyms/parse.c_shipped
index c0f7ed4d1bfcb..2c6b1286b638a 100644
--- a/scripts/genksyms/parse.c_shipped
+++ b/scripts/genksyms/parse.c_shipped
@@ -156,7 +156,7 @@ static const short yyrhs[] = { 53,
71, 94, 92, 82, 0, 0, 62, 0, 63, 0,
62, 63, 0, 64, 0, 65, 0, 5, 0, 16,
0, 20, 0, 11, 0, 13, 0, 66, 0, 70,
- 0, 27, 46, 65, 47, 0, 21, 36, 0, 23,
+ 0, 27, 46, 62, 47, 0, 21, 36, 0, 23,
36, 0, 10, 36, 0, 21, 36, 84, 0, 23,
36, 84, 0, 10, 36, 31, 0, 10, 31, 0,
21, 84, 0, 23, 84, 0, 7, 0, 18, 0,
@@ -291,142 +291,150 @@ static const short yydefgoto[] = { 1,
};
static const short yypact[] = {-32768,
- 19,-32768, 175,-32768, 32,-32768,-32768,-32768,-32768,-32768,
+ 15,-32768, 197,-32768, 23,-32768,-32768,-32768,-32768,-32768,
-18,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,-32768,
--32768, -30,-32768, -26,-32768,-32768,-32768, -32, -10, -2,
--32768,-32768,-32768,-32768, 2, 428,-32768,-32768,-32768,-32768,
--32768,-32768,-32768,-32768,-32768,-32768,-32768, 34, 12, 79,
--32768, 428, 12,-32768, 455, 33,-32768,-32768, 15, 14,
- 35, 29,-32768, 2, -14, -21,-32768,-32768,-32768, 67,
- 31, 37, 127,-32768,-32768, 2,-32768, 54, 60, 66,
- 69,-32768, 14,-32768,-32768, 2,-32768,-32768,-32768, 84,
--32768, 219,-32768,-32768, 70,-32768, 20, 91, 72, 84,
- -20, 74, 81,-32768,-32768,-32768, 86,-32768, 102,-32768,
- 106,-32768,-32768,-32768,-32768,-32768, 109, 108, 348, 112,
- 126, 117,-32768,-32768, 118,-32768, 122,-32768,-32768,-32768,
--32768, 262,-32768, 31,-32768, 131,-32768,-32768,-32768,-32768,
--32768, 7, 120,-32768, -9,-32768,-32768, 392,-32768,-32768,
- 125, 130,-32768,-32768, 132,-32768, 159,-32768,-32768, 305,
--32768,-32768,-32768,-32768,-32768,-32768, 160, 161,-32768,-32768,
- 174,-32768
+-32768, -28,-32768, -25,-32768,-32768,-32768, -26, -22, -12,
+-32768,-32768,-32768,-32768, 49, 493,-32768,-32768,-32768,-32768,
+-32768,-32768,-32768,-32768,-32768,-32768,-32768, 27, -8, 101,
+-32768, 493, -8,-32768, 493, 10,-32768,-32768, 11, 9,
+ 18, 26,-32768, 49, -15, -13,-32768,-32768,-32768, 25,
+ 24, 48, 149,-32768,-32768, 49,-32768, 414, 39, 40,
+ 47,-32768, 9,-32768,-32768, 49,-32768,-32768,-32768, 66,
+-32768, 241,-32768,-32768, 50,-32768, 5, 65, 42, 66,
+ 17, 56, 55,-32768,-32768,-32768, 60,-32768, 75,-32768,
+ 80,-32768,-32768,-32768,-32768,-32768, 81, 82, 370, 85,
+ 98, 89,-32768,-32768, 88,-32768, 91,-32768,-32768,-32768,
+-32768, 284,-32768, 24,-32768, 103,-32768,-32768,-32768,-32768,
+-32768, 8, 43,-32768, 30,-32768,-32768, 457,-32768,-32768,
+ 92, 93,-32768,-32768, 95,-32768, 96,-32768,-32768, 327,
+-32768,-32768,-32768,-32768,-32768,-32768, 99, 104,-32768,-32768,
+ 148,-32768
};
static const short yypgoto[] = {-32768,
- 208,-32768,-32768,-32768, 158,-32768,-32768, 128, 0, -90,
- -36,-32768, 157,-32768, -70,-32768,-32768, -51, -31,-32768,
- -40,-32768, -125,-32768,-32768, 65, -97,-32768,-32768,-32768,
--32768, -19,-32768,-32768, 143,-32768,-32768, 83, 124, 141,
+ 152,-32768,-32768,-32768, 119,-32768,-32768, 94, 0, -55,
+ -35,-32768,-32768,-32768, -69,-32768,-32768, -56, -30,-32768,
+ -76,-32768, -122,-32768,-32768, 29, -62,-32768,-32768,-32768,
+-32768, -17,-32768,-32768, 105,-32768,-32768, 52, 86, 83,
-32768,-32768,-32768
};
-#define YYLAST 495
-
-
-static const short yytable[] = { 67,
- 99, 119, 35, 65, 54, 49, 152, 155, 84, 53,
- 91, 131, 47, 55, 88, 80, 89, 48, 171, 50,
- 125, 9, 159, 50, 92, 132, 99, 81, 99, 69,
- 18, 114, 87, 77, 168, 56, 160, 58, -89, 27,
- 57, 119, 140, 31, 157, 158, 156, 59, 143, 60,
- 58, 76, 142, -89, 60, 126, 127, 119, 129, 96,
- 59, 50, 60, 99, 68, 97, 95, 60, 79, 119,
- 96, 143, 143, 86, 45, 46, 97, 85, 60, 70,
- 106, 98, 67, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 110, 24, 25, 26, 27, 28, 111, 126, 31, 93,
- 94, 96, 112, 116, -19, 113, 133, 97, 32, 60,
- 98, -19, -103, 128, -19, 134, -19, 107, 93, -19,
- 88, 6, 7, 8, 9, 10, 11, 12, 13, 14,
- 15, 16, 17, 18, 19, 20, 21, 22, 135, 24,
- 25, 26, 27, 28, 139, 140, 31, 136, 146, 156,
- 147, 148, -19, 154, 149, 142, 32, 60, 150, -19,
- -104, 163, -19, 172, -19, 5, 164, -19, 165, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,
- 27, 28, 29, 30, 31, 166, 169, 170, 4, 75,
- -19, 78, 162, 115, 32, 108, 153, -19, 124, 118,
- -19, 0, -19, 6, 7, 8, 9, 10, 11, 12,
+#define YYLAST 533
+
+
+static const short yytable[] = { 78,
+ 67, 99, 35, 84, 65, 125, 54, 49, 155, 152,
+ 53, 80, 47, 88, 171, 89, 9, 48, 91, 55,
+ 127, 50, 129, 56, 50, 18, 114, 99, 81, 99,
+ 57, 69, 92, 87, 27, 77, 119, 168, 31, -89,
+ 126, 50, 67, 140, 96, 79, 58, 156, 131, 143,
+ 97, 76, 60, 142, -89, 60, 59, 68, 60, 95,
+ 85, 159, 132, 96, 99, 45, 46, 93, 94, 97,
+ 86, 60, 143, 143, 98, 160, 119, 126, 140, 157,
+ 158, 96, 156, 67, 58, 111, 112, 97, 142, 60,
+ 60, 106, 119, 113, 59, 116, 60, 128, 133, 134,
+ 98, 70, 93, 88, 119, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 135, 24, 25, 26, 27, 28, 139, 136,
+ 31, 146, 147, 148, 149, 154, -19, 150, 163, 164,
+ 32, 165, 166, -19, -103, 169, -19, 172, -19, 107,
+ 170, -19, 4, 6, 7, 8, 9, 10, 11, 12,
13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
- 130, 24, 25, 26, 27, 28, 0, 0, 31, 0,
- 0, 0, 0, -82, 0, 0, 0, 0, 32, 0,
- 0, 0, 151, 0, 0, -82, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 0, 24, 25, 26, 27, 28, 0,
- 0, 31, 0, 0, 0, 0, -82, 0, 0, 0,
- 0, 32, 0, 0, 0, 167, 0, 0, -82, 6,
- 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 0, 24, 25, 26,
- 27, 28, 0, 0, 31, 0, 0, 0, 0, -82,
- 0, 0, 0, 0, 32, 0, 0, 0, 0, 0,
- 0, -82, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
- 24, 25, 26, 27, 28, 0, 0, 31, 0, 0,
- 0, 0, 0, 140, 0, 0, 0, 141, 0, 0,
- 0, 0, 0, 142, 0, 60, 6, 7, 8, 9,
- 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 0, 24, 25, 26, 27, 28, 0,
- 0, 31, 0, 0, 0, 0, 161, 0, 0, 0,
- 0, 32, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 22, 0,
- 24, 25, 26, 27, 28, 0, 0, 31, 0, 0,
- 7, 8, 9, 10, 11, 0, 13, 32, 15, 16,
- 0, 18, 19, 20, 0, 22, 0, 24, 25, 26,
- 27, 28, 0, 0, 31, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 32
+ 75, 24, 25, 26, 27, 28, 162, 108, 31, 115,
+ 124, 0, 130, 0, -19, 153, 0, 0, 32, 0,
+ 0, -19, -104, 0, -19, 0, -19, 5, 0, -19,
+ 0, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 0, 0, 0,
+ 0, 0, -19, 0, 0, 0, 32, 0, 0, -19,
+ 0, 118, -19, 0, -19, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, 22, 0, 24, 25, 26, 27, 28, 0, 0,
+ 31, 0, 0, 0, 0, -82, 0, 0, 0, 0,
+ 32, 0, 0, 0, 151, 0, 0, -82, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 0, 24, 25, 26, 27,
+ 28, 0, 0, 31, 0, 0, 0, 0, -82, 0,
+ 0, 0, 0, 32, 0, 0, 0, 167, 0, 0,
+ -82, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 0, 24,
+ 25, 26, 27, 28, 0, 0, 31, 0, 0, 0,
+ 0, -82, 0, 0, 0, 0, 32, 0, 0, 0,
+ 0, 0, 0, -82, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 0, 24, 25, 26, 27, 28, 0, 0, 31,
+ 0, 0, 0, 0, 0, 140, 0, 0, 0, 141,
+ 0, 0, 0, 0, 0, 142, 0, 60, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, 22, 0, 24, 25, 26, 27,
+ 28, 0, 0, 31, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 32, 0, 0, 0, 0, 0, 0,
+ 110, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 0, 24,
+ 25, 26, 27, 28, 0, 0, 31, 0, 0, 0,
+ 0, 161, 0, 0, 0, 0, 32, 6, 7, 8,
+ 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
+ 19, 20, 21, 22, 0, 24, 25, 26, 27, 28,
+ 0, 0, 31, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 32
};
-static const short yycheck[] = { 36,
- 71, 92, 3, 35, 24, 36, 132, 1, 60, 36,
- 32, 32, 31, 46, 29, 1, 31, 36, 0, 50,
- 1, 8, 32, 50, 46, 46, 97, 59, 99, 49,
- 17, 83, 64, 53, 160, 46, 46, 36, 32, 26,
- 43, 132, 36, 30, 142, 143, 40, 46, 119, 48,
- 36, 52, 46, 47, 48, 36, 97, 148, 99, 40,
- 46, 50, 48, 134, 31, 46, 36, 48, 36, 160,
- 40, 142, 143, 45, 43, 44, 46, 43, 48, 1,
- 44, 51, 119, 5, 6, 7, 8, 9, 10, 11,
- 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 47, 23, 24, 25, 26, 27, 47, 36, 30, 43,
- 44, 40, 47, 30, 36, 47, 43, 46, 40, 48,
- 51, 43, 44, 33, 46, 45, 48, 1, 43, 51,
- 29, 5, 6, 7, 8, 9, 10, 11, 12, 13,
- 14, 15, 16, 17, 18, 19, 20, 21, 43, 23,
- 24, 25, 26, 27, 47, 36, 30, 49, 47, 40,
- 35, 45, 36, 33, 47, 46, 40, 48, 47, 43,
- 44, 47, 46, 0, 48, 1, 47, 51, 47, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
- 26, 27, 28, 29, 30, 47, 47, 47, 1, 52,
- 36, 55, 148, 86, 40, 73, 134, 43, 95, 1,
- 46, -1, 48, 5, 6, 7, 8, 9, 10, 11,
+static const short yycheck[] = { 55,
+ 36, 71, 3, 60, 35, 1, 24, 36, 1, 132,
+ 36, 1, 31, 29, 0, 31, 8, 36, 32, 46,
+ 97, 50, 99, 46, 50, 17, 83, 97, 59, 99,
+ 43, 49, 46, 64, 26, 53, 92, 160, 30, 32,
+ 36, 50, 78, 36, 40, 36, 36, 40, 32, 119,
+ 46, 52, 48, 46, 47, 48, 46, 31, 48, 36,
+ 43, 32, 46, 40, 134, 43, 44, 43, 44, 46,
+ 45, 48, 142, 143, 51, 46, 132, 36, 36, 142,
+ 143, 40, 40, 119, 36, 47, 47, 46, 46, 48,
+ 48, 44, 148, 47, 46, 30, 48, 33, 43, 45,
+ 51, 1, 43, 29, 160, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, 43, 23, 24, 25, 26, 27, 47, 49,
+ 30, 47, 35, 45, 47, 33, 36, 47, 47, 47,
+ 40, 47, 47, 43, 44, 47, 46, 0, 48, 1,
+ 47, 51, 1, 5, 6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
- 100, 23, 24, 25, 26, 27, -1, -1, 30, -1,
- -1, -1, -1, 35, -1, -1, -1, -1, 40, -1,
- -1, -1, 1, -1, -1, 47, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, -1, 23, 24, 25, 26, 27, -1,
- -1, 30, -1, -1, -1, -1, 35, -1, -1, -1,
- -1, 40, -1, -1, -1, 1, -1, -1, 47, 5,
- 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, -1, 23, 24, 25,
- 26, 27, -1, -1, 30, -1, -1, -1, -1, 35,
- -1, -1, -1, -1, 40, -1, -1, -1, -1, -1,
- -1, 47, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
- 23, 24, 25, 26, 27, -1, -1, 30, -1, -1,
- -1, -1, -1, 36, -1, -1, -1, 40, -1, -1,
- -1, -1, -1, 46, -1, 48, 5, 6, 7, 8,
- 9, 10, 11, 12, 13, 14, 15, 16, 17, 18,
- 19, 20, 21, -1, 23, 24, 25, 26, 27, -1,
- -1, 30, -1, -1, -1, -1, 35, -1, -1, -1,
- -1, 40, 5, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 17, 18, 19, 20, 21, -1,
- 23, 24, 25, 26, 27, -1, -1, 30, -1, -1,
- 6, 7, 8, 9, 10, -1, 12, 40, 14, 15,
- -1, 17, 18, 19, -1, 21, -1, 23, 24, 25,
- 26, 27, -1, -1, 30, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, 40
+ 52, 23, 24, 25, 26, 27, 148, 73, 30, 86,
+ 95, -1, 100, -1, 36, 134, -1, -1, 40, -1,
+ -1, 43, 44, -1, 46, -1, 48, 1, -1, 51,
+ -1, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, -1, -1, -1,
+ -1, -1, 36, -1, -1, -1, 40, -1, -1, 43,
+ -1, 1, 46, -1, 48, 5, 6, 7, 8, 9,
+ 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
+ 20, 21, -1, 23, 24, 25, 26, 27, -1, -1,
+ 30, -1, -1, -1, -1, 35, -1, -1, -1, -1,
+ 40, -1, -1, -1, 1, -1, -1, 47, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, -1, 23, 24, 25, 26,
+ 27, -1, -1, 30, -1, -1, -1, -1, 35, -1,
+ -1, -1, -1, 40, -1, -1, -1, 1, -1, -1,
+ 47, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
+ 24, 25, 26, 27, -1, -1, 30, -1, -1, -1,
+ -1, 35, -1, -1, -1, -1, 40, -1, -1, -1,
+ -1, -1, -1, 47, 5, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 15, 16, 17, 18, 19, 20,
+ 21, -1, 23, 24, 25, 26, 27, -1, -1, 30,
+ -1, -1, -1, -1, -1, 36, -1, -1, -1, 40,
+ -1, -1, -1, -1, -1, 46, -1, 48, 5, 6,
+ 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
+ 17, 18, 19, 20, 21, -1, 23, 24, 25, 26,
+ 27, -1, -1, 30, -1, -1, -1, -1, -1, -1,
+ -1, -1, -1, 40, -1, -1, -1, -1, -1, -1,
+ 47, 5, 6, 7, 8, 9, 10, 11, 12, 13,
+ 14, 15, 16, 17, 18, 19, 20, 21, -1, 23,
+ 24, 25, 26, 27, -1, -1, 30, -1, -1, -1,
+ -1, 35, -1, -1, -1, -1, 40, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 18, 19, 20, 21, -1, 23, 24, 25, 26, 27,
+ -1, -1, 30, -1, -1, -1, -1, -1, -1, -1,
+ -1, -1, 40
};
/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
#line 3 "/usr/lib/bison.simple"
diff --git a/scripts/mkmakefile b/scripts/mkmakefile
new file mode 100644
index 0000000000000..c4d621b30d0db
--- /dev/null
+++ b/scripts/mkmakefile
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Generates a small Makefile used in the root of the output
+# directory, to allow make to be started from there.
+# The Makefile also allow for more convinient build of external modules
+
+# Usage
+# $1 - Kernel src directory
+# $2 - Output directory
+# $3 - version
+# $4 - patchlevel
+
+
+cat << EOF
+# Automatically generated by $0: don't edit
+
+VERSION = $3
+PATCHLEVEL = $4
+
+KERNELSRC := $1
+KERNELOUTPUT := $2
+
+MAKEFLAGS += --no-print-directory
+
+all:
+ \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT)
+
+%::
+ \$(MAKE) -C \$(KERNELSRC) O=\$(KERNELOUTPUT) \$@
+
+EOF
+
diff --git a/scripts/mod/Makefile b/scripts/mod/Makefile
new file mode 100644
index 0000000000000..f66bf5262aae3
--- /dev/null
+++ b/scripts/mod/Makefile
@@ -0,0 +1,16 @@
+host-progs := modpost mk_elfconfig
+always := $(host-progs) empty.o
+
+modpost-objs := modpost.o file2alias.o sumversion.o
+
+# dependencies on generated files need to be listed explicitly
+
+$(obj)/modpost.o $(obj)/file2alias.o $(obj)/sumversion.o: $(obj)/elfconfig.h
+
+quiet_cmd_elfconfig = MKELF $@
+ cmd_elfconfig = $(obj)/mk_elfconfig $(ARCH) < $< > $@
+
+$(obj)/elfconfig.h: $(obj)/empty.o $(obj)/mk_elfconfig FORCE
+ $(call if_changed,elfconfig)
+
+targets += elfconfig.h
diff --git a/scripts/empty.c b/scripts/mod/empty.c
index 49839cc4ff26a..49839cc4ff26a 100644
--- a/scripts/empty.c
+++ b/scripts/mod/empty.c
diff --git a/scripts/file2alias.c b/scripts/mod/file2alias.c
index fa8fd160b2b86..f38c6d7def2a3 100644
--- a/scripts/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -27,7 +27,7 @@ typedef unsigned char __u8;
/* Big exception to the "don't include kernel headers into userspace, which
* even potentially has different endianness and word sizes, since
* we handle those differences explicitly below */
-#include "../include/linux/mod_devicetable.h"
+#include "../../include/linux/mod_devicetable.h"
#define ADD(str, sep, cond, field) \
do { \
diff --git a/scripts/mk_elfconfig.c b/scripts/mod/mk_elfconfig.c
index de2aabf89fb30..de2aabf89fb30 100644
--- a/scripts/mk_elfconfig.c
+++ b/scripts/mod/mk_elfconfig.c
diff --git a/scripts/modpost.c b/scripts/mod/modpost.c
index 662e75b2f780b..662e75b2f780b 100644
--- a/scripts/modpost.c
+++ b/scripts/mod/modpost.c
diff --git a/scripts/modpost.h b/scripts/mod/modpost.h
index ddb013d9fd987..ddb013d9fd987 100644
--- a/scripts/modpost.h
+++ b/scripts/mod/modpost.h
diff --git a/scripts/sumversion.c b/scripts/mod/sumversion.c
index b41b718edffef..b41b718edffef 100644
--- a/scripts/sumversion.c
+++ b/scripts/mod/sumversion.c
diff --git a/scripts/package/Makefile b/scripts/package/Makefile
index f3df4bc950dcc..48f89e17a3cf5 100644
--- a/scripts/package/Makefile
+++ b/scripts/package/Makefile
@@ -31,9 +31,10 @@ KERNELPATH := kernel-$(subst -,,$(KERNELRELEASE))
MKSPEC := $(srctree)/scripts/package/mkspec
PREV := set -e; cd ..;
+# rpm-pkg
.PHONY: rpm-pkg rpm
-$(objtree)/kernel.spec: $(MKSPEC)
+$(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile
$(CONFIG_SHELL) $(MKSPEC) > $@
rpm-pkg rpm: $(objtree)/kernel.spec
@@ -52,6 +53,22 @@ rpm-pkg rpm: $(objtree)/kernel.spec
clean-rule += rm -f $(objtree)/kernel.spec
+# binrpm-pkg
+.PHONY: binrpm-pkg
+$(objtree)/binkernel.spec: $(MKSPEC) $(srctree)/Makefile
+ $(CONFIG_SHELL) $(MKSPEC) prebuilt > $@
+
+binrpm-pkg: $(objtree)/binkernel.spec
+ $(MAKE)
+ set -e; \
+ $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version
+ set -e; \
+ mv -f $(objtree)/.tmp_version $(objtree)/.version
+
+ $(RPM) --define "_builddir $(srctree)" --target $(UTS_MACHINE) -bb $<
+
+clean-rule += rm -f $(objtree)/binkernel.spec
+
# Deb target
# ---------------------------------------------------------------------------
#
@@ -67,5 +84,6 @@ clean-rule += && rm -rf $(objtree)/debian/
# ---------------------------------------------------------------------------
help:
@echo ' rpm-pkg - Build the kernel as an RPM package'
+ @echo ' binrpm-pkg - Build an rpm package containing the compiled kernel & modules'
@echo ' deb-pkg - Build the kernel as an deb package'
diff --git a/scripts/package/mkspec b/scripts/package/mkspec
index 3ecfc23e09210..5d94e452a0c0d 100755
--- a/scripts/package/mkspec
+++ b/scripts/package/mkspec
@@ -9,6 +9,13 @@
# Patched for non-x86 by Opencon (L) 2002 <opencon@rio.skydome.net>
#
+# how we were called determines which rpms we build and how we build them
+if [ "$1" = "prebuilt" ]; then
+ PREBUILT=true
+else
+ PREBUILT=false
+fi
+
# starting to output the spec
if [ "`grep CONFIG_DRM=y .config | cut -f2 -d\=`" = "y" ]; then
PROVIDES=kernel-drm
@@ -26,8 +33,12 @@ echo "License: GPL"
echo "Group: System Environment/Kernel"
echo "Vendor: The Linux Community"
echo "URL: http://www.kernel.org"
+
+if ! $PREBUILT; then
echo -n "Source: kernel-$VERSION.$PATCHLEVEL.$SUBLEVEL"
echo "$EXTRAVERSION.tar.gz" | sed -e "s/-//g"
+fi
+
echo "BuildRoot: /var/tmp/%{name}-%{PACKAGE_VERSION}-root"
echo "Provides: $PROVIDES"
echo "%define __spec_install_post /usr/lib/rpm/brp-compress || :"
@@ -36,12 +47,20 @@ echo ""
echo "%description"
echo "The Linux Kernel, the operating system core itself"
echo ""
+
+if ! $PREBUILT; then
echo "%prep"
echo "%setup -q"
echo ""
+fi
+
echo "%build"
+
+if ! $PREBUILT; then
echo "make clean && make"
echo ""
+fi
+
echo "%install"
echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib $RPM_BUILD_ROOT/lib/modules'