diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-10-29 04:02:15 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-10-29 04:02:20 -0400 |
commit | 9de09ace8d518141a4375e1d216ab64db4377799 (patch) | |
tree | da8e7a77f4ea91eb3bb73fc6da72ecf8c99e1c16 /scripts | |
parent | 1beee96bae0daf7f491356777c3080cc436950f5 (diff) | |
parent | 6d3f1e12f46a2f9a1bb7e7aa433df8dd31ce5647 (diff) |
Merge branch 'tracing/urgent' into tracing/core
Merge reason: Pick up fixes and move base from -rc1 to -rc5.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Kbuild.include | 2 | ||||
-rw-r--r-- | scripts/Makefile.lib | 2 | ||||
-rwxr-xr-x | scripts/checkkconfigsymbols.sh | 4 | ||||
-rw-r--r-- | scripts/headers_install.pl | 2 | ||||
-rwxr-xr-x | scripts/mkcompile_h | 12 | ||||
-rw-r--r-- | scripts/package/Makefile | 11 | ||||
-rwxr-xr-x | scripts/package/mkspec | 2 |
7 files changed, 25 insertions, 10 deletions
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include index 4f9c1908593b..c67e73ecd5be 100644 --- a/scripts/Kbuild.include +++ b/scripts/Kbuild.include | |||
@@ -100,7 +100,7 @@ as-option = $(call try-run,\ | |||
100 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) | 100 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) |
101 | 101 | ||
102 | as-instr = $(call try-run,\ | 102 | as-instr = $(call try-run,\ |
103 | echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) | 103 | /bin/echo -e "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -xassembler -o "$$TMP" -,$(2),$(3)) |
104 | 104 | ||
105 | # cc-option | 105 | # cc-option |
106 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) | 106 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) |
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 7a7778746ea6..ffdafb26f539 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
@@ -208,7 +208,7 @@ cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -f -9 > $@) || \ | |||
208 | 208 | ||
209 | # Bzip2 and LZMA do not include size in file... so we have to fake that; | 209 | # Bzip2 and LZMA do not include size in file... so we have to fake that; |
210 | # append the size as a 32-bit littleendian number as gzip does. | 210 | # append the size as a 32-bit littleendian number as gzip does. |
211 | size_append = echo -ne $(shell \ | 211 | size_append = /bin/echo -ne $(shell \ |
212 | dec_size=0; \ | 212 | dec_size=0; \ |
213 | for F in $1; do \ | 213 | for F in $1; do \ |
214 | fsize=$$(stat -c "%s" $$F); \ | 214 | fsize=$$(stat -c "%s" $$F); \ |
diff --git a/scripts/checkkconfigsymbols.sh b/scripts/checkkconfigsymbols.sh index 39677c82747a..46be3c5a62b7 100755 --- a/scripts/checkkconfigsymbols.sh +++ b/scripts/checkkconfigsymbols.sh | |||
@@ -9,7 +9,7 @@ paths="$@" | |||
9 | # Doing this once at the beginning saves a lot of time, on a cache-hot tree. | 9 | # Doing this once at the beginning saves a lot of time, on a cache-hot tree. |
10 | Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`" | 10 | Kconfigs="`find . -name 'Kconfig' -o -name 'Kconfig*[^~]'`" |
11 | 11 | ||
12 | echo -e "File list \tundefined symbol used" | 12 | /bin/echo -e "File list \tundefined symbol used" |
13 | find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i | 13 | find $paths -name '*.[chS]' -o -name 'Makefile' -o -name 'Makefile*[^~]'| while read i |
14 | do | 14 | do |
15 | # Output the bare Kconfig variable and the filename; the _MODULE part at | 15 | # Output the bare Kconfig variable and the filename; the _MODULE part at |
@@ -54,6 +54,6 @@ while read symb files; do | |||
54 | # beyond the purpose of this script. | 54 | # beyond the purpose of this script. |
55 | symb_bare=`echo $symb | sed -e 's/_MODULE//'` | 55 | symb_bare=`echo $symb | sed -e 's/_MODULE//'` |
56 | if ! grep -q "\<$symb_bare\>" $Kconfigs; then | 56 | if ! grep -q "\<$symb_bare\>" $Kconfigs; then |
57 | echo -e "$files: \t$symb" | 57 | /bin/echo -e "$files: \t$symb" |
58 | fi | 58 | fi |
59 | done|sort | 59 | done|sort |
diff --git a/scripts/headers_install.pl b/scripts/headers_install.pl index c6ae4052ab43..b89ca2c58fdb 100644 --- a/scripts/headers_install.pl +++ b/scripts/headers_install.pl | |||
@@ -20,7 +20,7 @@ use strict; | |||
20 | 20 | ||
21 | my ($readdir, $installdir, $arch, @files) = @ARGV; | 21 | my ($readdir, $installdir, $arch, @files) = @ARGV; |
22 | 22 | ||
23 | my $unifdef = "scripts/unifdef -U__KERNEL__"; | 23 | my $unifdef = "scripts/unifdef -U__KERNEL__ -D__EXPORTED_HEADERS__"; |
24 | 24 | ||
25 | foreach my $file (@files) { | 25 | foreach my $file (@files) { |
26 | local *INFILE; | 26 | local *INFILE; |
diff --git a/scripts/mkcompile_h b/scripts/mkcompile_h index 6a12dd9f1181..bce3d0fe6fbd 100755 --- a/scripts/mkcompile_h +++ b/scripts/mkcompile_h | |||
@@ -1,3 +1,5 @@ | |||
1 | #!/bin/sh | ||
2 | |||
1 | TARGET=$1 | 3 | TARGET=$1 |
2 | ARCH=$2 | 4 | ARCH=$2 |
3 | SMP=$3 | 5 | SMP=$3 |
@@ -50,7 +52,7 @@ UTS_VERSION="$UTS_VERSION $CONFIG_FLAGS $TIMESTAMP" | |||
50 | # Truncate to maximum length | 52 | # Truncate to maximum length |
51 | 53 | ||
52 | UTS_LEN=64 | 54 | UTS_LEN=64 |
53 | UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | 55 | UTS_TRUNCATE="cut -b -$UTS_LEN" |
54 | 56 | ||
55 | # Generate a temporary compile.h | 57 | # Generate a temporary compile.h |
56 | 58 | ||
@@ -66,9 +68,13 @@ UTS_TRUNCATE="sed -e s/\(.\{1,$UTS_LEN\}\).*/\1/" | |||
66 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" | 68 | echo \#define LINUX_COMPILE_HOST \"`hostname | $UTS_TRUNCATE`\" |
67 | 69 | ||
68 | if [ -x /bin/dnsdomainname ]; then | 70 | if [ -x /bin/dnsdomainname ]; then |
69 | echo \#define LINUX_COMPILE_DOMAIN \"`dnsdomainname | $UTS_TRUNCATE`\" | 71 | domain=`dnsdomainname 2> /dev/null` |
70 | elif [ -x /bin/domainname ]; then | 72 | elif [ -x /bin/domainname ]; then |
71 | echo \#define LINUX_COMPILE_DOMAIN \"`domainname | $UTS_TRUNCATE`\" | 73 | domain=`domainname 2> /dev/null` |
74 | fi | ||
75 | |||
76 | if [ -n "$domain" ]; then | ||
77 | echo \#define LINUX_COMPILE_DOMAIN \"`echo $domain | $UTS_TRUNCATE`\" | ||
72 | else | 78 | else |
73 | echo \#define LINUX_COMPILE_DOMAIN | 79 | echo \#define LINUX_COMPILE_DOMAIN |
74 | fi | 80 | fi |
diff --git a/scripts/package/Makefile b/scripts/package/Makefile index fa4a0a17b7e0..f67cc885c807 100644 --- a/scripts/package/Makefile +++ b/scripts/package/Makefile | |||
@@ -18,6 +18,9 @@ | |||
18 | # e) generate the rpm files, based on kernel.spec | 18 | # e) generate the rpm files, based on kernel.spec |
19 | # - Use /. to avoid tar packing just the symlink | 19 | # - Use /. to avoid tar packing just the symlink |
20 | 20 | ||
21 | # Note that the rpm-pkg target cannot be used with KBUILD_OUTPUT, | ||
22 | # but the binrpm-pkg target can; for some reason O= gets ignored. | ||
23 | |||
21 | # Do we have rpmbuild, otherwise fall back to the older rpm | 24 | # Do we have rpmbuild, otherwise fall back to the older rpm |
22 | RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ | 25 | RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ |
23 | else echo rpm; fi) | 26 | else echo rpm; fi) |
@@ -33,6 +36,12 @@ $(objtree)/kernel.spec: $(MKSPEC) $(srctree)/Makefile | |||
33 | $(CONFIG_SHELL) $(MKSPEC) > $@ | 36 | $(CONFIG_SHELL) $(MKSPEC) > $@ |
34 | 37 | ||
35 | rpm-pkg rpm: $(objtree)/kernel.spec FORCE | 38 | rpm-pkg rpm: $(objtree)/kernel.spec FORCE |
39 | @if test -n "$(KBUILD_OUTPUT)"; then \ | ||
40 | echo "Building source + binary RPM is not possible outside the"; \ | ||
41 | echo "kernel source tree. Don't set KBUILD_OUTPUT, or use the"; \ | ||
42 | echo "binrpm-pkg target instead."; \ | ||
43 | false; \ | ||
44 | fi | ||
36 | $(MAKE) clean | 45 | $(MAKE) clean |
37 | $(PREV) ln -sf $(srctree) $(KERNELPATH) | 46 | $(PREV) ln -sf $(srctree) $(KERNELPATH) |
38 | $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion > $(objtree)/.scmversion | 47 | $(CONFIG_SHELL) $(srctree)/scripts/setlocalversion > $(objtree)/.scmversion |
@@ -61,7 +70,7 @@ binrpm-pkg: $(objtree)/binkernel.spec FORCE | |||
61 | set -e; \ | 70 | set -e; \ |
62 | mv -f $(objtree)/.tmp_version $(objtree)/.version | 71 | mv -f $(objtree)/.tmp_version $(objtree)/.version |
63 | 72 | ||
64 | $(RPM) $(RPMOPTS) --define "_builddir $(srctree)" --target \ | 73 | $(RPM) $(RPMOPTS) --define "_builddir $(objtree)" --target \ |
65 | $(UTS_MACHINE) -bb $< | 74 | $(UTS_MACHINE) -bb $< |
66 | 75 | ||
67 | clean-files += $(objtree)/binkernel.spec | 76 | clean-files += $(objtree)/binkernel.spec |
diff --git a/scripts/package/mkspec b/scripts/package/mkspec index 3d93f8c81252..47bdd2f99b78 100755 --- a/scripts/package/mkspec +++ b/scripts/package/mkspec | |||
@@ -70,7 +70,7 @@ echo 'mkdir -p $RPM_BUILD_ROOT/boot $RPM_BUILD_ROOT/lib/modules' | |||
70 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' | 70 | echo 'mkdir -p $RPM_BUILD_ROOT/lib/firmware' |
71 | echo "%endif" | 71 | echo "%endif" |
72 | 72 | ||
73 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} modules_install' | 73 | echo 'INSTALL_MOD_PATH=$RPM_BUILD_ROOT make %{_smp_mflags} KBUILD_SRC= modules_install' |
74 | echo "%ifarch ia64" | 74 | echo "%ifarch ia64" |
75 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" | 75 | echo 'cp $KBUILD_IMAGE $RPM_BUILD_ROOT'"/boot/efi/vmlinuz-$KERNELRELEASE" |
76 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" | 76 | echo 'ln -s '"efi/vmlinuz-$KERNELRELEASE" '$RPM_BUILD_ROOT'"/boot/" |