diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2009-07-20 15:37:11 -0400 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2009-09-20 06:18:14 -0400 |
commit | caa27b66bd7188fd063769eaf4b33533ef0709e6 (patch) | |
tree | 57d9f96ad40712f690763fb205006938885bbc1a | |
parent | 78f28b7c555359c67c2a0d23f7436e915329421e (diff) |
kbuild: use INSTALLKERNEL to select customized installkernel script
Replace the use of CROSS_COMPILE to select a customized
installkernel script with the possibility to set INSTALLKERNEL
to select a custom installkernel script when running make:
make INSTALLKERNEL=arm-installkernel install
With this patch we are now more consistent across
different architectures - they did not all support use
of CROSS_COMPILE.
The use of CROSS_COMPILE was a hack as this really belongs
to gcc/binutils and the installkernel script does not change
just because we change toolchain.
The use of CROSS_COMPILE caused troubles with an upcoming patch
that saves CROSS_COMPILE when a kernel is built - it would no
longer be installable.
[Thanks to Peter Z. for this hint]
This patch undos what Ian did in commit:
0f8e2d62fa04441cd12c08ce521e84e5bd3f8a46
("use ${CROSS_COMPILE}installkernel in arch/*/boot/install.sh")
The patch has been lightly tested on x86 only - but all changes
looks obvious.
Acked-by: Peter Zijlstra <peterz@infradead.org>
Acked-by: Mike Frysinger <vapier@gentoo.org> [blackfin]
Acked-by: Russell King <linux@arm.linux.org.uk> [arm]
Acked-by: Paul Mundt <lethal@linux-sh.org> [sh]
Acked-by: "H. Peter Anvin" <hpa@zytor.com> [x86]
Cc: Ian Campbell <icampbell@arcom.com>
Cc: Tony Luck <tony.luck@intel.com> [ia64]
Cc: Fenghua Yu <fenghua.yu@intel.com> [ia64]
Cc: Hirokazu Takata <takata@linux-m32r.org> [m32r]
Cc: Geert Uytterhoeven <geert@linux-m68k.org> [m68k]
Cc: Kyle McMartin <kyle@mcmartin.ca> [parisc]
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> [powerpc]
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> [s390]
Cc: Thomas Gleixner <tglx@linutronix.de> [x86]
Cc: Ingo Molnar <mingo@redhat.com> [x86]
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
-rw-r--r-- | Documentation/kbuild/kbuild.txt | 16 | ||||
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | arch/arm/Makefile | 4 | ||||
-rw-r--r-- | arch/arm/boot/install.sh | 4 | ||||
-rw-r--r-- | arch/blackfin/Makefile | 4 | ||||
-rw-r--r-- | arch/blackfin/boot/install.sh | 6 | ||||
-rw-r--r-- | arch/ia64/install.sh | 4 | ||||
-rw-r--r-- | arch/m32r/boot/compressed/install.sh | 4 | ||||
-rw-r--r-- | arch/m68k/install.sh | 4 | ||||
-rw-r--r-- | arch/parisc/Makefile | 4 | ||||
-rw-r--r-- | arch/parisc/install.sh | 4 | ||||
-rw-r--r-- | arch/powerpc/Makefile | 4 | ||||
-rw-r--r-- | arch/powerpc/boot/install.sh | 4 | ||||
-rw-r--r-- | arch/s390/boot/install.sh | 4 | ||||
-rw-r--r-- | arch/sh/boot/compressed/install.sh | 4 | ||||
-rw-r--r-- | arch/x86/Makefile | 4 | ||||
-rw-r--r-- | arch/x86/boot/install.sh | 4 |
17 files changed, 50 insertions, 32 deletions
diff --git a/Documentation/kbuild/kbuild.txt b/Documentation/kbuild/kbuild.txt index f3355b6812df..bb3bf38f03da 100644 --- a/Documentation/kbuild/kbuild.txt +++ b/Documentation/kbuild/kbuild.txt | |||
@@ -65,6 +65,22 @@ INSTALL_PATH | |||
65 | INSTALL_PATH specifies where to place the updated kernel and system map | 65 | INSTALL_PATH specifies where to place the updated kernel and system map |
66 | images. Default is /boot, but you can set it to other values. | 66 | images. Default is /boot, but you can set it to other values. |
67 | 67 | ||
68 | INSTALLKERNEL | ||
69 | -------------------------------------------------- | ||
70 | Install script called when using "make install". | ||
71 | The default name is "installkernel". | ||
72 | |||
73 | The script will be called with the following arguments: | ||
74 | $1 - kernel version | ||
75 | $2 - kernel image file | ||
76 | $3 - kernel map file | ||
77 | $4 - default install path (use root directory if blank) | ||
78 | |||
79 | The implmentation of "make install" is architecture specific | ||
80 | and it may differ from the above. | ||
81 | |||
82 | INSTALLKERNEL is provided to enable the possibility to | ||
83 | specify a custom installer when cross compiling a kernel. | ||
68 | 84 | ||
69 | MODLIB | 85 | MODLIB |
70 | -------------------------------------------------- | 86 | -------------------------------------------------- |
@@ -315,6 +315,7 @@ OBJCOPY = $(CROSS_COMPILE)objcopy | |||
315 | OBJDUMP = $(CROSS_COMPILE)objdump | 315 | OBJDUMP = $(CROSS_COMPILE)objdump |
316 | AWK = awk | 316 | AWK = awk |
317 | GENKSYMS = scripts/genksyms/genksyms | 317 | GENKSYMS = scripts/genksyms/genksyms |
318 | INSTALLKERNEL := installkernel | ||
318 | DEPMOD = /sbin/depmod | 319 | DEPMOD = /sbin/depmod |
319 | KALLSYMS = scripts/kallsyms | 320 | KALLSYMS = scripts/kallsyms |
320 | PERL = perl | 321 | PERL = perl |
@@ -353,7 +354,8 @@ KERNELVERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | |||
353 | 354 | ||
354 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION | 355 | export VERSION PATCHLEVEL SUBLEVEL KERNELRELEASE KERNELVERSION |
355 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC | 356 | export ARCH SRCARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC |
356 | export CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE | 357 | export CPP AR NM STRIP OBJCOPY OBJDUMP |
358 | export MAKE AWK GENKSYMS INSTALLKERNEL PERL UTS_MACHINE | ||
357 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS | 359 | export HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS |
358 | 360 | ||
359 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS | 361 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS |
diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 7350557a81e0..68c6ab0749da 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile | |||
@@ -279,7 +279,7 @@ define archhelp | |||
279 | echo ' (supply initrd image via make variable INITRD=<path>)' | 279 | echo ' (supply initrd image via make variable INITRD=<path>)' |
280 | echo ' install - Install uncompressed kernel' | 280 | echo ' install - Install uncompressed kernel' |
281 | echo ' zinstall - Install compressed kernel' | 281 | echo ' zinstall - Install compressed kernel' |
282 | echo ' Install using (your) ~/bin/installkernel or' | 282 | echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or' |
283 | echo ' (distribution) /sbin/installkernel or' | 283 | echo ' (distribution) /sbin/$(INSTALLKERNEL) or' |
284 | echo ' install to $$(INSTALL_PATH) and run lilo' | 284 | echo ' install to $$(INSTALL_PATH) and run lilo' |
285 | endef | 285 | endef |
diff --git a/arch/arm/boot/install.sh b/arch/arm/boot/install.sh index 9f9bed207345..06ea7d42ce8e 100644 --- a/arch/arm/boot/install.sh +++ b/arch/arm/boot/install.sh | |||
@@ -21,8 +21,8 @@ | |||
21 | # | 21 | # |
22 | 22 | ||
23 | # User may have a custom install script | 23 | # User may have a custom install script |
24 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi | 25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
26 | 26 | ||
27 | if [ "$(basename $2)" = "zImage" ]; then | 27 | if [ "$(basename $2)" = "zImage" ]; then |
28 | # Compressed install | 28 | # Compressed install |
diff --git a/arch/blackfin/Makefile b/arch/blackfin/Makefile index 6f9533c3d752..f063b772934b 100644 --- a/arch/blackfin/Makefile +++ b/arch/blackfin/Makefile | |||
@@ -155,7 +155,7 @@ define archhelp | |||
155 | echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' | 155 | echo '* vmImage.gz - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.gz)' |
156 | echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' | 156 | echo ' vmImage.lzma - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage.lzma)' |
157 | echo ' install - Install kernel using' | 157 | echo ' install - Install kernel using' |
158 | echo ' (your) ~/bin/$(CROSS_COMPILE)installkernel or' | 158 | echo ' (your) ~/bin/$(INSTALLKERNEL) or' |
159 | echo ' (distribution) PATH: $(CROSS_COMPILE)installkernel or' | 159 | echo ' (distribution) PATH: $(INSTALLKERNEL) or' |
160 | echo ' install to $$(INSTALL_PATH)' | 160 | echo ' install to $$(INSTALL_PATH)' |
161 | endef | 161 | endef |
diff --git a/arch/blackfin/boot/install.sh b/arch/blackfin/boot/install.sh index 9560a6b29100..e2c6e40902b7 100644 --- a/arch/blackfin/boot/install.sh +++ b/arch/blackfin/boot/install.sh | |||
@@ -36,9 +36,9 @@ verify "$3" | |||
36 | 36 | ||
37 | # User may have a custom install script | 37 | # User may have a custom install script |
38 | 38 | ||
39 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 39 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
40 | if which ${CROSS_COMPILE}installkernel >/dev/null 2>&1; then | 40 | if which ${INSTALLKERNEL} >/dev/null 2>&1; then |
41 | exec ${CROSS_COMPILE}installkernel "$@" | 41 | exec ${INSTALLKERNEL} "$@" |
42 | fi | 42 | fi |
43 | 43 | ||
44 | # Default install - same as make zlilo | 44 | # Default install - same as make zlilo |
diff --git a/arch/ia64/install.sh b/arch/ia64/install.sh index 929e780026d1..0e932f5dcd1a 100644 --- a/arch/ia64/install.sh +++ b/arch/ia64/install.sh | |||
@@ -21,8 +21,8 @@ | |||
21 | 21 | ||
22 | # User may have a custom install script | 22 | # User may have a custom install script |
23 | 23 | ||
24 | if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi | 24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi | 25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
26 | 26 | ||
27 | # Default install - same as make zlilo | 27 | # Default install - same as make zlilo |
28 | 28 | ||
diff --git a/arch/m32r/boot/compressed/install.sh b/arch/m32r/boot/compressed/install.sh index 6d72e9e72697..16e5a0a13437 100644 --- a/arch/m32r/boot/compressed/install.sh +++ b/arch/m32r/boot/compressed/install.sh | |||
@@ -24,8 +24,8 @@ | |||
24 | 24 | ||
25 | # User may have a custom install script | 25 | # User may have a custom install script |
26 | 26 | ||
27 | if [ -x /sbin/installkernel ]; then | 27 | if [ -x /sbin/${INSTALLKERNEL} ]; then |
28 | exec /sbin/installkernel "$@" | 28 | exec /sbin/${INSTALLKERNEL} "$@" |
29 | fi | 29 | fi |
30 | 30 | ||
31 | if [ "$2" = "zImage" ]; then | 31 | if [ "$2" = "zImage" ]; then |
diff --git a/arch/m68k/install.sh b/arch/m68k/install.sh index 9c6bae6112e3..57d640d4382c 100644 --- a/arch/m68k/install.sh +++ b/arch/m68k/install.sh | |||
@@ -33,8 +33,8 @@ verify "$3" | |||
33 | 33 | ||
34 | # User may have a custom install script | 34 | # User may have a custom install script |
35 | 35 | ||
36 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 36 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
37 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi | 37 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
38 | 38 | ||
39 | # Default install - same as make zlilo | 39 | # Default install - same as make zlilo |
40 | 40 | ||
diff --git a/arch/parisc/Makefile b/arch/parisc/Makefile index da6f66901c92..55cca1dac431 100644 --- a/arch/parisc/Makefile +++ b/arch/parisc/Makefile | |||
@@ -118,8 +118,8 @@ define archhelp | |||
118 | @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' | 118 | @echo '* vmlinux - Uncompressed kernel image (./vmlinux)' |
119 | @echo ' palo - Bootable image (./lifimage)' | 119 | @echo ' palo - Bootable image (./lifimage)' |
120 | @echo ' install - Install kernel using' | 120 | @echo ' install - Install kernel using' |
121 | @echo ' (your) ~/bin/installkernel or' | 121 | @echo ' (your) ~/bin/$(INSTALLKERNEL) or' |
122 | @echo ' (distribution) /sbin/installkernel or' | 122 | @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' |
123 | @echo ' copy to $$(INSTALL_PATH)' | 123 | @echo ' copy to $$(INSTALL_PATH)' |
124 | endef | 124 | endef |
125 | 125 | ||
diff --git a/arch/parisc/install.sh b/arch/parisc/install.sh index 9632b3e164c7..e593fc8d58bc 100644 --- a/arch/parisc/install.sh +++ b/arch/parisc/install.sh | |||
@@ -21,8 +21,8 @@ | |||
21 | 21 | ||
22 | # User may have a custom install script | 22 | # User may have a custom install script |
23 | 23 | ||
24 | if [ -x ~/bin/installkernel ]; then exec ~/bin/installkernel "$@"; fi | 24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/installkernel ]; then exec /sbin/installkernel "$@"; fi | 25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
26 | 26 | ||
27 | # Default install | 27 | # Default install |
28 | 28 | ||
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 952a3963e9e8..13e3fd852d63 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile | |||
@@ -182,8 +182,8 @@ define archhelp | |||
182 | @echo ' simpleImage.<dt> - Firmware independent image.' | 182 | @echo ' simpleImage.<dt> - Firmware independent image.' |
183 | @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' | 183 | @echo ' treeImage.<dt> - Support for older IBM 4xx firmware (not U-Boot)' |
184 | @echo ' install - Install kernel using' | 184 | @echo ' install - Install kernel using' |
185 | @echo ' (your) ~/bin/installkernel or' | 185 | @echo ' (your) ~/bin/$(INSTALLKERNEL) or' |
186 | @echo ' (distribution) /sbin/installkernel or' | 186 | @echo ' (distribution) /sbin/$(INSTALLKERNEL) or' |
187 | @echo ' install to $$(INSTALL_PATH) and run lilo' | 187 | @echo ' install to $$(INSTALL_PATH) and run lilo' |
188 | @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' | 188 | @echo ' *_defconfig - Select default config from arch/$(ARCH)/configs' |
189 | @echo '' | 189 | @echo '' |
diff --git a/arch/powerpc/boot/install.sh b/arch/powerpc/boot/install.sh index 98312d169c85..b6a256bc96ee 100644 --- a/arch/powerpc/boot/install.sh +++ b/arch/powerpc/boot/install.sh | |||
@@ -23,8 +23,8 @@ set -e | |||
23 | 23 | ||
24 | # User may have a custom install script | 24 | # User may have a custom install script |
25 | 25 | ||
26 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 26 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
27 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi | 27 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
28 | 28 | ||
29 | # Default install | 29 | # Default install |
30 | 30 | ||
diff --git a/arch/s390/boot/install.sh b/arch/s390/boot/install.sh index d4026f62cb06..aed3069699bd 100644 --- a/arch/s390/boot/install.sh +++ b/arch/s390/boot/install.sh | |||
@@ -21,8 +21,8 @@ | |||
21 | 21 | ||
22 | # User may have a custom install script | 22 | # User may have a custom install script |
23 | 23 | ||
24 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 24 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
25 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi | 25 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
26 | 26 | ||
27 | # Default install - same as make zlilo | 27 | # Default install - same as make zlilo |
28 | 28 | ||
diff --git a/arch/sh/boot/compressed/install.sh b/arch/sh/boot/compressed/install.sh index 90589f0fec12..f9f41818b17e 100644 --- a/arch/sh/boot/compressed/install.sh +++ b/arch/sh/boot/compressed/install.sh | |||
@@ -23,8 +23,8 @@ | |||
23 | 23 | ||
24 | # User may have a custom install script | 24 | # User may have a custom install script |
25 | 25 | ||
26 | if [ -x /sbin/installkernel ]; then | 26 | if [ -x /sbin/${INSTALLKERNEL} ]; then |
27 | exec /sbin/installkernel "$@" | 27 | exec /sbin/${INSTALLKERNEL} "$@" |
28 | fi | 28 | fi |
29 | 29 | ||
30 | if [ "$2" = "zImage" ]; then | 30 | if [ "$2" = "zImage" ]; then |
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index 7983c420eaf2..a012ee8ef803 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile | |||
@@ -179,8 +179,8 @@ archclean: | |||
179 | define archhelp | 179 | define archhelp |
180 | echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' | 180 | echo '* bzImage - Compressed kernel image (arch/x86/boot/bzImage)' |
181 | echo ' install - Install kernel using' | 181 | echo ' install - Install kernel using' |
182 | echo ' (your) ~/bin/installkernel or' | 182 | echo ' (your) ~/bin/$(INSTALLKERNEL) or' |
183 | echo ' (distribution) /sbin/installkernel or' | 183 | echo ' (distribution) /sbin/$(INSTALLKERNEL) or' |
184 | echo ' install to $$(INSTALL_PATH) and run lilo' | 184 | echo ' install to $$(INSTALL_PATH) and run lilo' |
185 | echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' | 185 | echo ' fdimage - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' |
186 | echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' | 186 | echo ' fdimage144 - Create 1.4MB boot floppy image (arch/x86/boot/fdimage)' |
diff --git a/arch/x86/boot/install.sh b/arch/x86/boot/install.sh index 8d60ee15dfd9..d13ec1c38640 100644 --- a/arch/x86/boot/install.sh +++ b/arch/x86/boot/install.sh | |||
@@ -33,8 +33,8 @@ verify "$3" | |||
33 | 33 | ||
34 | # User may have a custom install script | 34 | # User may have a custom install script |
35 | 35 | ||
36 | if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi | 36 | if [ -x ~/bin/${INSTALLKERNEL} ]; then exec ~/bin/${INSTALLKERNEL} "$@"; fi |
37 | if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi | 37 | if [ -x /sbin/${INSTALLKERNEL} ]; then exec /sbin/${INSTALLKERNEL} "$@"; fi |
38 | 38 | ||
39 | # Default install - same as make zlilo | 39 | # Default install - same as make zlilo |
40 | 40 | ||