aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/frv/boot/Makefile4
-rw-r--r--arch/i386/Makefile10
-rw-r--r--arch/i386/boot/Makefile2
-rw-r--r--arch/i386/boot/install.sh14
-rw-r--r--arch/ia64/Makefile3
-rw-r--r--arch/powerpc/Makefile6
-rw-r--r--arch/ppc/Makefile3
-rw-r--r--arch/x86_64/Makefile5
-rw-r--r--arch/x86_64/boot/Makefile2
-rw-r--r--arch/x86_64/boot/install.sh40
10 files changed, 33 insertions, 56 deletions
diff --git a/arch/frv/boot/Makefile b/arch/frv/boot/Makefile
index d75e0d77136..5dfc93fd945 100644
--- a/arch/frv/boot/Makefile
+++ b/arch/frv/boot/Makefile
@@ -57,10 +57,10 @@ initrd:
57# installation 57# installation
58# 58#
59install: $(CONFIGURE) Image 59install: $(CONFIGURE) Image
60 sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) Image $(TOPDIR)/System.map "$(INSTALL_PATH)" 60 sh ./install.sh $(KERNELRELEASE) Image $(TOPDIR)/System.map "$(INSTALL_PATH)"
61 61
62zinstall: $(CONFIGURE) zImage 62zinstall: $(CONFIGURE) zImage
63 sh ./install.sh $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)" 63 sh ./install.sh $(KERNELRELEASE) zImage $(TOPDIR)/System.map "$(INSTALL_PATH)"
64 64
65# 65#
66# miscellany 66# miscellany
diff --git a/arch/i386/Makefile b/arch/i386/Makefile
index b84119f9cc6..d3c0409d201 100644
--- a/arch/i386/Makefile
+++ b/arch/i386/Makefile
@@ -37,7 +37,10 @@ CFLAGS += $(call cc-option,-mpreferred-stack-boundary=2)
37# CPU-specific tuning. Anything which can be shared with UML should go here. 37# CPU-specific tuning. Anything which can be shared with UML should go here.
38include $(srctree)/arch/i386/Makefile.cpu 38include $(srctree)/arch/i386/Makefile.cpu
39 39
40cflags-$(CONFIG_REGPARM) += -mregparm=3 40# -mregparm=3 works ok on gcc-3.0 and later
41#
42cflags-$(CONFIG_REGPARM) += $(shell if [ $(call cc-version) -ge 0300 ] ; then \
43 echo "-mregparm=3"; fi ;)
41 44
42# Disable unit-at-a-time mode, it makes gcc use a lot more stack 45# Disable unit-at-a-time mode, it makes gcc use a lot more stack
43# due to the lack of sharing of stacklots. 46# due to the lack of sharing of stacklots.
@@ -100,7 +103,7 @@ AFLAGS += $(mflags-y)
100boot := arch/i386/boot 103boot := arch/i386/boot
101 104
102.PHONY: zImage bzImage compressed zlilo bzlilo \ 105.PHONY: zImage bzImage compressed zlilo bzlilo \
103 zdisk bzdisk fdimage fdimage144 fdimage288 install kernel_install 106 zdisk bzdisk fdimage fdimage144 fdimage288 install
104 107
105all: bzImage 108all: bzImage
106 109
@@ -122,8 +125,7 @@ zdisk bzdisk: vmlinux
122fdimage fdimage144 fdimage288: vmlinux 125fdimage fdimage144 fdimage288: vmlinux
123 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@ 126 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) $@
124 127
125install: vmlinux 128install:
126install kernel_install:
127 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install 129 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(KBUILD_IMAGE) install
128 130
129archclean: 131archclean:
diff --git a/arch/i386/boot/Makefile b/arch/i386/boot/Makefile
index 1e71382d413..0fea75dd4e3 100644
--- a/arch/i386/boot/Makefile
+++ b/arch/i386/boot/Makefile
@@ -100,5 +100,5 @@ zlilo: $(BOOTIMAGE)
100 cp System.map $(INSTALL_PATH)/ 100 cp System.map $(INSTALL_PATH)/
101 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 101 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
102 102
103install: $(BOOTIMAGE) 103install:
104 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)" 104 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $< System.map "$(INSTALL_PATH)"
diff --git a/arch/i386/boot/install.sh b/arch/i386/boot/install.sh
index f17b40dfc0f..5e44c736eea 100644
--- a/arch/i386/boot/install.sh
+++ b/arch/i386/boot/install.sh
@@ -19,6 +19,20 @@
19# $4 - default install path (blank if root directory) 19# $4 - default install path (blank if root directory)
20# 20#
21 21
22verify () {
23 if [ ! -f "$1" ]; then
24 echo "" 1>&2
25 echo " *** Missing file: $1" 1>&2
26 echo ' *** You need to run "make" before "make install".' 1>&2
27 echo "" 1>&2
28 exit 1
29 fi
30}
31
32# Make sure the files actually exist
33verify "$2"
34verify "$3"
35
22# User may have a custom install script 36# User may have a custom install script
23 37
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi 38if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
diff --git a/arch/ia64/Makefile b/arch/ia64/Makefile
index 57b047c27e4..f722e1a2594 100644
--- a/arch/ia64/Makefile
+++ b/arch/ia64/Makefile
@@ -25,7 +25,6 @@ cflags-y := -pipe $(EXTRA) -ffixed-r13 -mfixed-range=f12-f15,f32-f127 \
25 -falign-functions=32 -frename-registers -fno-optimize-sibling-calls 25 -falign-functions=32 -frename-registers -fno-optimize-sibling-calls
26CFLAGS_KERNEL := -mconstant-gp 26CFLAGS_KERNEL := -mconstant-gp
27 27
28GCC_VERSION := $(call cc-version)
29GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)") 28GAS_STATUS = $(shell $(srctree)/arch/ia64/scripts/check-gas "$(CC)" "$(OBJDUMP)")
30CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)") 29CPPFLAGS += $(shell $(srctree)/arch/ia64/scripts/toolchain-flags "$(CC)" "$(OBJDUMP)" "$(READELF)")
31 30
@@ -37,7 +36,7 @@ $(error Sorry, you need a newer version of the assember, one that is built from
37 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz) 36 ftp://ftp.hpl.hp.com/pub/linux-ia64/gas-030124.tar.gz)
38endif 37endif
39 38
40ifeq ($(GCC_VERSION),0304) 39ifeq ($(call cc-version),0304)
41 cflags-$(CONFIG_ITANIUM) += -mtune=merced 40 cflags-$(CONFIG_ITANIUM) += -mtune=merced
42 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley 41 cflags-$(CONFIG_MCKINLEY) += -mtune=mckinley
43endif 42endif
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 5f80e58e5cb..d3654a264ef 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -76,8 +76,7 @@ LINUXINCLUDE += $(LINUXINCLUDE-y)
76CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__ 76CHECKFLAGS += -m$(SZ) -D__powerpc__ -D__powerpc$(SZ)__
77 77
78ifeq ($(CONFIG_PPC64),y) 78ifeq ($(CONFIG_PPC64),y)
79GCC_VERSION := $(call cc-version) 79GCC_BROKEN_VEC := $(shell if [ $(call cc-version) -lt 0400 ] ; then echo "y"; fi)
80GCC_BROKEN_VEC := $(shell if [ $(GCC_VERSION) -lt 0400 ] ; then echo "y"; fi)
81 80
82ifeq ($(CONFIG_POWER4_ONLY),y) 81ifeq ($(CONFIG_POWER4_ONLY),y)
83ifeq ($(CONFIG_ALTIVEC),y) 82ifeq ($(CONFIG_ALTIVEC),y)
@@ -189,10 +188,9 @@ TOUT := .tmp_gas_check
189# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec 188# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
190# instructions. 189# instructions.
191# gcc-3.4 and binutils-2.14 are a fatal combination. 190# gcc-3.4 and binutils-2.14 are a fatal combination.
192GCC_VERSION := $(call cc-version)
193 191
194checkbin: 192checkbin:
195 @if test "$(GCC_VERSION)" = "0304" ; then \ 193 @if test "$(call cc-version)" = "0304" ; then \
196 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ 194 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \
197 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ 195 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \
198 echo 'correctly with gcc-3.4 and your version of binutils.'; \ 196 echo 'correctly with gcc-3.4 and your version of binutils.'; \
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index e719a4933af..98e940beeb3 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -128,10 +128,9 @@ TOUT := .tmp_gas_check
128# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec 128# Ensure this is binutils 2.12.1 (or 2.12.90.0.7) or later for altivec
129# instructions. 129# instructions.
130# gcc-3.4 and binutils-2.14 are a fatal combination. 130# gcc-3.4 and binutils-2.14 are a fatal combination.
131GCC_VERSION := $(call cc-version)
132 131
133checkbin: 132checkbin:
134 @if test "$(GCC_VERSION)" = "0304" ; then \ 133 @if test "$(call cc-version)" = "0304" ; then \
135 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \ 134 if ! /bin/echo mftb 5 | $(AS) -v -mppc -many -o $(TOUT) >/dev/null 2>&1 ; then \
136 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \ 135 echo -n '*** ${VERSION}.${PATCHLEVEL} kernels no longer build '; \
137 echo 'correctly with gcc-3.4 and your version of binutils.'; \ 136 echo 'correctly with gcc-3.4 and your version of binutils.'; \
diff --git a/arch/x86_64/Makefile b/arch/x86_64/Makefile
index a9cd42e6182..51d83288d62 100644
--- a/arch/x86_64/Makefile
+++ b/arch/x86_64/Makefile
@@ -80,9 +80,12 @@ bzlilo: vmlinux
80bzdisk: vmlinux 80bzdisk: vmlinux
81 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk 81 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) zdisk
82 82
83install fdimage fdimage144 fdimage288: vmlinux 83fdimage fdimage144 fdimage288: vmlinux
84 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@ 84 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
85 85
86install:
87 $(Q)$(MAKE) $(build)=$(boot) BOOTIMAGE=$(BOOTIMAGE) $@
88
86archclean: 89archclean:
87 $(Q)$(MAKE) $(clean)=$(boot) 90 $(Q)$(MAKE) $(clean)=$(boot)
88 91
diff --git a/arch/x86_64/boot/Makefile b/arch/x86_64/boot/Makefile
index 18c6e915d69..29f8396ed15 100644
--- a/arch/x86_64/boot/Makefile
+++ b/arch/x86_64/boot/Makefile
@@ -98,5 +98,5 @@ zlilo: $(BOOTIMAGE)
98 cp System.map $(INSTALL_PATH)/ 98 cp System.map $(INSTALL_PATH)/
99 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi 99 if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi
100 100
101install: $(BOOTIMAGE) 101install:
102 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)" 102 sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
diff --git a/arch/x86_64/boot/install.sh b/arch/x86_64/boot/install.sh
index 198af15a775..baaa2369bdb 100644
--- a/arch/x86_64/boot/install.sh
+++ b/arch/x86_64/boot/install.sh
@@ -1,40 +1,2 @@
1#!/bin/sh 1#!/bin/sh
2# 2. $srctree/arch/i386/boot/install.sh
3# arch/x86_64/boot/install.sh
4#
5# This file is subject to the terms and conditions of the GNU General Public
6# License. See the file "COPYING" in the main directory of this archive
7# for more details.
8#
9# Copyright (C) 1995 by Linus Torvalds
10#
11# Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
12#
13# "make install" script for i386 architecture
14#
15# Arguments:
16# $1 - kernel version
17# $2 - kernel image file
18# $3 - kernel map file
19# $4 - default install path (blank if root directory)
20#
21
22# User may have a custom install script
23
24if [ -x ~/bin/${CROSS_COMPILE}installkernel ]; then exec ~/bin/${CROSS_COMPILE}installkernel "$@"; fi
25if [ -x /sbin/${CROSS_COMPILE}installkernel ]; then exec /sbin/${CROSS_COMPILE}installkernel "$@"; fi
26
27# Default install - same as make zlilo
28
29if [ -f $4/vmlinuz ]; then
30 mv $4/vmlinuz $4/vmlinuz.old
31fi
32
33if [ -f $4/System.map ]; then
34 mv $4/System.map $4/System.old
35fi
36
37cat $2 > $4/vmlinuz
38cp $3 $4/System.map
39
40if [ -x /sbin/lilo ]; then /sbin/lilo; else /etc/lilo/install; fi