Commit cca4e4aec1fe52e5ecd15e3cebdbb36e2f254220
1 parent
4d6402b012
Exists in
master
and in
54 other branches
Reduce build times
U-Boot Makefiles contain a number of tests for compiler features etc. which so far are executed again and again. On some architectures (especially ARM) this results in a large number of calls to gcc. This patch makes sure to run such tests only once, thus largely reducing the number of "execve" system calls. Example: number of "execve" system calls for building the "P2020DS" (Power Architecture) and "qong" (ARM) boards, measured as: -> strace -f -e trace=execve -o /tmp/foo ./MAKEALL <board> -> grep execve /tmp/foo | wc -l Before: After: Reduction: ================================== P2020DS 20555 15205 -26% qong 31692 14490 -54% As a result, built times are significantly reduced, typically by 30...50%. Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Andy Fleming <afleming@gmail.com> Cc: Kumar Gala <galak@kernel.crashing.org> Cc: Albert Aribaud <albert.aribaud@free.fr> cc: Graeme Russ <graeme.russ@gmail.com> cc: Mike Frysinger <vapier@gentoo.org> Tested-by: Graeme Russ <graeme.russ@gmail.com> Tested-by: Matthias Weisser <weisserm@arcor.de> Tested-by: Sanjeev Premi <premi@ti.com> Tested-by: Simon Glass <sjg@chromium.org> Tested-by: Macpaul Lin <macpaul@gmail.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
Showing 25 changed files with 67 additions and 43 deletions Inline Diff
- Makefile
- arch/arm/config.mk
- arch/arm/cpu/arm1136/config.mk
- arch/arm/cpu/arm1176/config.mk
- arch/arm/cpu/arm1176/s3c64xx/config.mk
- arch/arm/cpu/arm720t/config.mk
- arch/arm/cpu/arm920t/config.mk
- arch/arm/cpu/arm925t/config.mk
- arch/arm/cpu/arm926ejs/at91/config.mk
- arch/arm/cpu/arm926ejs/config.mk
- arch/arm/cpu/arm946es/config.mk
- arch/arm/cpu/arm_intcm/config.mk
- arch/arm/cpu/armv7/config.mk
- arch/arm/cpu/armv7/omap-common/config.mk
- arch/arm/cpu/ixp/config.mk
- arch/arm/cpu/lh7a40x/config.mk
- arch/arm/cpu/pxa/config.mk
- arch/arm/cpu/s3c44b0/config.mk
- arch/arm/cpu/sa1100/config.mk
- arch/powerpc/cpu/mpc824x/Makefile
- arch/powerpc/cpu/mpc85xx/config.mk
- arch/x86/config.mk
- board/siemens/SCM/Makefile
- config.mk
- examples/standalone/Makefile
Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2011 | 2 | # (C) Copyright 2000-2011 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundatio; either version 2 of | 10 | # published by the Free Software Foundatio; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | VERSION = 2011 | 24 | VERSION = 2011 |
25 | PATCHLEVEL = 09 | 25 | PATCHLEVEL = 09 |
26 | SUBLEVEL = | 26 | SUBLEVEL = |
27 | EXTRAVERSION = | 27 | EXTRAVERSION = |
28 | ifneq "$(SUBLEVEL)" "" | 28 | ifneq "$(SUBLEVEL)" "" |
29 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 29 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
30 | else | 30 | else |
31 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) | 31 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) |
32 | endif | 32 | endif |
33 | TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h | 33 | TIMESTAMP_FILE = $(obj)include/generated/timestamp_autogenerated.h |
34 | VERSION_FILE = $(obj)include/generated/version_autogenerated.h | 34 | VERSION_FILE = $(obj)include/generated/version_autogenerated.h |
35 | 35 | ||
36 | HOSTARCH := $(shell uname -m | \ | 36 | HOSTARCH := $(shell uname -m | \ |
37 | sed -e s/i.86/x86/ \ | 37 | sed -e s/i.86/x86/ \ |
38 | -e s/sun4u/sparc64/ \ | 38 | -e s/sun4u/sparc64/ \ |
39 | -e s/arm.*/arm/ \ | 39 | -e s/arm.*/arm/ \ |
40 | -e s/sa110/arm/ \ | 40 | -e s/sa110/arm/ \ |
41 | -e s/ppc64/powerpc/ \ | 41 | -e s/ppc64/powerpc/ \ |
42 | -e s/ppc/powerpc/ \ | 42 | -e s/ppc/powerpc/ \ |
43 | -e s/macppc/powerpc/\ | 43 | -e s/macppc/powerpc/\ |
44 | -e s/sh.*/sh/) | 44 | -e s/sh.*/sh/) |
45 | 45 | ||
46 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ | 46 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ |
47 | sed -e 's/\(cygwin\).*/cygwin/') | 47 | sed -e 's/\(cygwin\).*/cygwin/') |
48 | 48 | ||
49 | # Set shell to bash if possible, otherwise fall back to sh | 49 | # Set shell to bash if possible, otherwise fall back to sh |
50 | SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 50 | SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
51 | else if [ -x /bin/bash ]; then echo /bin/bash; \ | 51 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
52 | else echo sh; fi; fi) | 52 | else echo sh; fi; fi) |
53 | 53 | ||
54 | export HOSTARCH HOSTOS SHELL | 54 | export HOSTARCH HOSTOS SHELL |
55 | 55 | ||
56 | # Deal with colliding definitions from tcsh etc. | 56 | # Deal with colliding definitions from tcsh etc. |
57 | VENDOR= | 57 | VENDOR= |
58 | 58 | ||
59 | ######################################################################### | 59 | ######################################################################### |
60 | # Allow for silent builds | 60 | # Allow for silent builds |
61 | ifeq (,$(findstring s,$(MAKEFLAGS))) | 61 | ifeq (,$(findstring s,$(MAKEFLAGS))) |
62 | XECHO = echo | 62 | XECHO = echo |
63 | else | 63 | else |
64 | XECHO = : | 64 | XECHO = : |
65 | endif | 65 | endif |
66 | 66 | ||
67 | ######################################################################### | 67 | ######################################################################### |
68 | # | 68 | # |
69 | # U-boot build supports producing a object files to the separate external | 69 | # U-boot build supports producing a object files to the separate external |
70 | # directory. Two use cases are supported: | 70 | # directory. Two use cases are supported: |
71 | # | 71 | # |
72 | # 1) Add O= to the make command line | 72 | # 1) Add O= to the make command line |
73 | # 'make O=/tmp/build all' | 73 | # 'make O=/tmp/build all' |
74 | # | 74 | # |
75 | # 2) Set environement variable BUILD_DIR to point to the desired location | 75 | # 2) Set environement variable BUILD_DIR to point to the desired location |
76 | # 'export BUILD_DIR=/tmp/build' | 76 | # 'export BUILD_DIR=/tmp/build' |
77 | # 'make' | 77 | # 'make' |
78 | # | 78 | # |
79 | # The second approach can also be used with a MAKEALL script | 79 | # The second approach can also be used with a MAKEALL script |
80 | # 'export BUILD_DIR=/tmp/build' | 80 | # 'export BUILD_DIR=/tmp/build' |
81 | # './MAKEALL' | 81 | # './MAKEALL' |
82 | # | 82 | # |
83 | # Command line 'O=' setting overrides BUILD_DIR environent variable. | 83 | # Command line 'O=' setting overrides BUILD_DIR environent variable. |
84 | # | 84 | # |
85 | # When none of the above methods is used the local build is performed and | 85 | # When none of the above methods is used the local build is performed and |
86 | # the object files are placed in the source directory. | 86 | # the object files are placed in the source directory. |
87 | # | 87 | # |
88 | 88 | ||
89 | ifdef O | 89 | ifdef O |
90 | ifeq ("$(origin O)", "command line") | 90 | ifeq ("$(origin O)", "command line") |
91 | BUILD_DIR := $(O) | 91 | BUILD_DIR := $(O) |
92 | endif | 92 | endif |
93 | endif | 93 | endif |
94 | 94 | ||
95 | ifneq ($(BUILD_DIR),) | 95 | ifneq ($(BUILD_DIR),) |
96 | saved-output := $(BUILD_DIR) | 96 | saved-output := $(BUILD_DIR) |
97 | 97 | ||
98 | # Attempt to create a output directory. | 98 | # Attempt to create a output directory. |
99 | $(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) | 99 | $(shell [ -d ${BUILD_DIR} ] || mkdir -p ${BUILD_DIR}) |
100 | 100 | ||
101 | # Verify if it was successful. | 101 | # Verify if it was successful. |
102 | BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd) | 102 | BUILD_DIR := $(shell cd $(BUILD_DIR) && /bin/pwd) |
103 | $(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist)) | 103 | $(if $(BUILD_DIR),,$(error output directory "$(saved-output)" does not exist)) |
104 | endif # ifneq ($(BUILD_DIR),) | 104 | endif # ifneq ($(BUILD_DIR),) |
105 | 105 | ||
106 | OBJTREE := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) | 106 | OBJTREE := $(if $(BUILD_DIR),$(BUILD_DIR),$(CURDIR)) |
107 | SPLTREE := $(OBJTREE)/spl | 107 | SPLTREE := $(OBJTREE)/spl |
108 | SRCTREE := $(CURDIR) | 108 | SRCTREE := $(CURDIR) |
109 | TOPDIR := $(SRCTREE) | 109 | TOPDIR := $(SRCTREE) |
110 | LNDIR := $(OBJTREE) | 110 | LNDIR := $(OBJTREE) |
111 | export TOPDIR SRCTREE OBJTREE SPLTREE | 111 | export TOPDIR SRCTREE OBJTREE SPLTREE |
112 | 112 | ||
113 | MKCONFIG := $(SRCTREE)/mkconfig | 113 | MKCONFIG := $(SRCTREE)/mkconfig |
114 | export MKCONFIG | 114 | export MKCONFIG |
115 | 115 | ||
116 | ifneq ($(OBJTREE),$(SRCTREE)) | 116 | ifneq ($(OBJTREE),$(SRCTREE)) |
117 | REMOTE_BUILD := 1 | 117 | REMOTE_BUILD := 1 |
118 | export REMOTE_BUILD | 118 | export REMOTE_BUILD |
119 | endif | 119 | endif |
120 | 120 | ||
121 | # $(obj) and (src) are defined in config.mk but here in main Makefile | 121 | # $(obj) and (src) are defined in config.mk but here in main Makefile |
122 | # we also need them before config.mk is included which is the case for | 122 | # we also need them before config.mk is included which is the case for |
123 | # some targets like unconfig, clean, clobber, distclean, etc. | 123 | # some targets like unconfig, clean, clobber, distclean, etc. |
124 | ifneq ($(OBJTREE),$(SRCTREE)) | 124 | ifneq ($(OBJTREE),$(SRCTREE)) |
125 | obj := $(OBJTREE)/ | 125 | obj := $(OBJTREE)/ |
126 | src := $(SRCTREE)/ | 126 | src := $(SRCTREE)/ |
127 | else | 127 | else |
128 | obj := | 128 | obj := |
129 | src := | 129 | src := |
130 | endif | 130 | endif |
131 | export obj src | 131 | export obj src |
132 | 132 | ||
133 | # Make sure CDPATH settings don't interfere | 133 | # Make sure CDPATH settings don't interfere |
134 | unexport CDPATH | 134 | unexport CDPATH |
135 | 135 | ||
136 | ######################################################################### | 136 | ######################################################################### |
137 | 137 | ||
138 | # The "tools" are needed early, so put this first | 138 | # The "tools" are needed early, so put this first |
139 | # Don't include stuff already done in $(LIBS) | 139 | # Don't include stuff already done in $(LIBS) |
140 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC | 140 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC |
141 | # is "yes"), so compile examples after U-Boot is compiled. | 141 | # is "yes"), so compile examples after U-Boot is compiled. |
142 | SUBDIR_TOOLS = tools | 142 | SUBDIR_TOOLS = tools |
143 | SUBDIR_EXAMPLES = examples/standalone examples/api | 143 | SUBDIR_EXAMPLES = examples/standalone examples/api |
144 | SUBDIRS = $(SUBDIR_TOOLS) | 144 | SUBDIRS = $(SUBDIR_TOOLS) |
145 | ifndef CONFIG_SANDBOX | 145 | ifndef CONFIG_SANDBOX |
146 | SUBDIRS += $(SUBDIR_EXAMPLES) | 146 | SUBDIRS += $(SUBDIR_EXAMPLES) |
147 | endif | 147 | endif |
148 | 148 | ||
149 | .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) | 149 | .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) |
150 | 150 | ||
151 | ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) | 151 | ifeq ($(obj)include/config.mk,$(wildcard $(obj)include/config.mk)) |
152 | 152 | ||
153 | # Include autoconf.mk before config.mk so that the config options are available | 153 | # Include autoconf.mk before config.mk so that the config options are available |
154 | # to all top level build files. We need the dummy all: target to prevent the | 154 | # to all top level build files. We need the dummy all: target to prevent the |
155 | # dependency target in autoconf.mk.dep from being the default. | 155 | # dependency target in autoconf.mk.dep from being the default. |
156 | all: | 156 | all: |
157 | sinclude $(obj)include/autoconf.mk.dep | 157 | sinclude $(obj)include/autoconf.mk.dep |
158 | sinclude $(obj)include/autoconf.mk | 158 | sinclude $(obj)include/autoconf.mk |
159 | 159 | ||
160 | # load ARCH, BOARD, and CPU configuration | 160 | # load ARCH, BOARD, and CPU configuration |
161 | include $(obj)include/config.mk | 161 | include $(obj)include/config.mk |
162 | export ARCH CPU BOARD VENDOR SOC | 162 | export ARCH CPU BOARD VENDOR SOC |
163 | 163 | ||
164 | # set default to nothing for native builds | 164 | # set default to nothing for native builds |
165 | ifeq ($(HOSTARCH),$(ARCH)) | 165 | ifeq ($(HOSTARCH),$(ARCH)) |
166 | CROSS_COMPILE ?= | 166 | CROSS_COMPILE ?= |
167 | endif | 167 | endif |
168 | 168 | ||
169 | # load other configuration | 169 | # load other configuration |
170 | include $(TOPDIR)/config.mk | 170 | include $(TOPDIR)/config.mk |
171 | 171 | ||
172 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use | 172 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use |
173 | # that (or fail if absent). Otherwise, search for a linker script in a | 173 | # that (or fail if absent). Otherwise, search for a linker script in a |
174 | # standard location. | 174 | # standard location. |
175 | 175 | ||
176 | ifndef LDSCRIPT | 176 | ifndef LDSCRIPT |
177 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug | 177 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug |
178 | ifdef CONFIG_SYS_LDSCRIPT | 178 | ifdef CONFIG_SYS_LDSCRIPT |
179 | # need to strip off double quotes | 179 | # need to strip off double quotes |
180 | LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) | 180 | LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) |
181 | endif | 181 | endif |
182 | endif | 182 | endif |
183 | 183 | ||
184 | ifndef LDSCRIPT | 184 | ifndef LDSCRIPT |
185 | ifeq ($(CONFIG_NAND_U_BOOT),y) | 185 | ifeq ($(CONFIG_NAND_U_BOOT),y) |
186 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds | 186 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds |
187 | ifeq ($(wildcard $(LDSCRIPT)),) | 187 | ifeq ($(wildcard $(LDSCRIPT)),) |
188 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | 188 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds |
189 | endif | 189 | endif |
190 | endif | 190 | endif |
191 | ifeq ($(wildcard $(LDSCRIPT)),) | 191 | ifeq ($(wildcard $(LDSCRIPT)),) |
192 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds | 192 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds |
193 | endif | 193 | endif |
194 | ifeq ($(wildcard $(LDSCRIPT)),) | 194 | ifeq ($(wildcard $(LDSCRIPT)),) |
195 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds | 195 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds |
196 | endif | 196 | endif |
197 | ifeq ($(wildcard $(LDSCRIPT)),) | 197 | ifeq ($(wildcard $(LDSCRIPT)),) |
198 | $(error could not find linker script) | 198 | $(error could not find linker script) |
199 | endif | 199 | endif |
200 | endif | 200 | endif |
201 | 201 | ||
202 | ######################################################################### | 202 | ######################################################################### |
203 | # U-Boot objects....order is important (i.e. start must be first) | 203 | # U-Boot objects....order is important (i.e. start must be first) |
204 | 204 | ||
205 | OBJS = $(CPUDIR)/start.o | 205 | OBJS = $(CPUDIR)/start.o |
206 | ifeq ($(CPU),x86) | 206 | ifeq ($(CPU),x86) |
207 | OBJS += $(CPUDIR)/start16.o | 207 | OBJS += $(CPUDIR)/start16.o |
208 | OBJS += $(CPUDIR)/resetvec.o | 208 | OBJS += $(CPUDIR)/resetvec.o |
209 | endif | 209 | endif |
210 | ifeq ($(CPU),ppc4xx) | 210 | ifeq ($(CPU),ppc4xx) |
211 | OBJS += $(CPUDIR)/resetvec.o | 211 | OBJS += $(CPUDIR)/resetvec.o |
212 | endif | 212 | endif |
213 | ifeq ($(CPU),mpc85xx) | 213 | ifeq ($(CPU),mpc85xx) |
214 | OBJS += $(CPUDIR)/resetvec.o | 214 | OBJS += $(CPUDIR)/resetvec.o |
215 | endif | 215 | endif |
216 | 216 | ||
217 | OBJS := $(addprefix $(obj),$(OBJS)) | 217 | OBJS := $(addprefix $(obj),$(OBJS)) |
218 | 218 | ||
219 | LIBS = lib/libgeneric.o | 219 | LIBS = lib/libgeneric.o |
220 | LIBS += lib/lzma/liblzma.o | 220 | LIBS += lib/lzma/liblzma.o |
221 | LIBS += lib/lzo/liblzo.o | 221 | LIBS += lib/lzo/liblzo.o |
222 | LIBS += lib/zlib/libz.o | 222 | LIBS += lib/zlib/libz.o |
223 | LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ | 223 | LIBS += $(shell if [ -f board/$(VENDOR)/common/Makefile ]; then echo \ |
224 | "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) | 224 | "board/$(VENDOR)/common/lib$(VENDOR).o"; fi) |
225 | LIBS += $(CPUDIR)/lib$(CPU).o | 225 | LIBS += $(CPUDIR)/lib$(CPU).o |
226 | ifdef SOC | 226 | ifdef SOC |
227 | LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o | 227 | LIBS += $(CPUDIR)/$(SOC)/lib$(SOC).o |
228 | endif | 228 | endif |
229 | ifeq ($(CPU),ixp) | 229 | ifeq ($(CPU),ixp) |
230 | LIBS += arch/arm/cpu/ixp/npe/libnpe.o | 230 | LIBS += arch/arm/cpu/ixp/npe/libnpe.o |
231 | endif | 231 | endif |
232 | ifeq ($(CONFIG_OF_EMBED),y) | 232 | ifeq ($(CONFIG_OF_EMBED),y) |
233 | LIBS += dts/libdts.o | 233 | LIBS += dts/libdts.o |
234 | endif | 234 | endif |
235 | LIBS += arch/$(ARCH)/lib/lib$(ARCH).o | 235 | LIBS += arch/$(ARCH)/lib/lib$(ARCH).o |
236 | LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ | 236 | LIBS += fs/cramfs/libcramfs.o fs/fat/libfat.o fs/fdos/libfdos.o fs/jffs2/libjffs2.o \ |
237 | fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ | 237 | fs/reiserfs/libreiserfs.o fs/ext2/libext2fs.o fs/yaffs2/libyaffs2.o \ |
238 | fs/ubifs/libubifs.o | 238 | fs/ubifs/libubifs.o |
239 | LIBS += net/libnet.o | 239 | LIBS += net/libnet.o |
240 | LIBS += disk/libdisk.o | 240 | LIBS += disk/libdisk.o |
241 | LIBS += drivers/bios_emulator/libatibiosemu.o | 241 | LIBS += drivers/bios_emulator/libatibiosemu.o |
242 | LIBS += drivers/block/libblock.o | 242 | LIBS += drivers/block/libblock.o |
243 | LIBS += drivers/dma/libdma.o | 243 | LIBS += drivers/dma/libdma.o |
244 | LIBS += drivers/fpga/libfpga.o | 244 | LIBS += drivers/fpga/libfpga.o |
245 | LIBS += drivers/gpio/libgpio.o | 245 | LIBS += drivers/gpio/libgpio.o |
246 | LIBS += drivers/hwmon/libhwmon.o | 246 | LIBS += drivers/hwmon/libhwmon.o |
247 | LIBS += drivers/i2c/libi2c.o | 247 | LIBS += drivers/i2c/libi2c.o |
248 | LIBS += drivers/input/libinput.o | 248 | LIBS += drivers/input/libinput.o |
249 | LIBS += drivers/misc/libmisc.o | 249 | LIBS += drivers/misc/libmisc.o |
250 | LIBS += drivers/mmc/libmmc.o | 250 | LIBS += drivers/mmc/libmmc.o |
251 | LIBS += drivers/mtd/libmtd.o | 251 | LIBS += drivers/mtd/libmtd.o |
252 | LIBS += drivers/mtd/nand/libnand.o | 252 | LIBS += drivers/mtd/nand/libnand.o |
253 | LIBS += drivers/mtd/onenand/libonenand.o | 253 | LIBS += drivers/mtd/onenand/libonenand.o |
254 | LIBS += drivers/mtd/ubi/libubi.o | 254 | LIBS += drivers/mtd/ubi/libubi.o |
255 | LIBS += drivers/mtd/spi/libspi_flash.o | 255 | LIBS += drivers/mtd/spi/libspi_flash.o |
256 | LIBS += drivers/net/libnet.o | 256 | LIBS += drivers/net/libnet.o |
257 | LIBS += drivers/net/phy/libphy.o | 257 | LIBS += drivers/net/phy/libphy.o |
258 | LIBS += drivers/pci/libpci.o | 258 | LIBS += drivers/pci/libpci.o |
259 | LIBS += drivers/pcmcia/libpcmcia.o | 259 | LIBS += drivers/pcmcia/libpcmcia.o |
260 | LIBS += drivers/power/libpower.o | 260 | LIBS += drivers/power/libpower.o |
261 | LIBS += drivers/spi/libspi.o | 261 | LIBS += drivers/spi/libspi.o |
262 | ifeq ($(CPU),mpc83xx) | 262 | ifeq ($(CPU),mpc83xx) |
263 | LIBS += drivers/qe/libqe.o | 263 | LIBS += drivers/qe/libqe.o |
264 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o | 264 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o |
265 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o | 265 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o |
266 | endif | 266 | endif |
267 | ifeq ($(CPU),mpc85xx) | 267 | ifeq ($(CPU),mpc85xx) |
268 | LIBS += drivers/qe/libqe.o | 268 | LIBS += drivers/qe/libqe.o |
269 | LIBS += drivers/net/fm/libfm.o | 269 | LIBS += drivers/net/fm/libfm.o |
270 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o | 270 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o |
271 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o | 271 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o |
272 | endif | 272 | endif |
273 | ifeq ($(CPU),mpc86xx) | 273 | ifeq ($(CPU),mpc86xx) |
274 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o | 274 | LIBS += arch/powerpc/cpu/mpc8xxx/ddr/libddr.o |
275 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o | 275 | LIBS += arch/powerpc/cpu/mpc8xxx/lib8xxx.o |
276 | endif | 276 | endif |
277 | LIBS += drivers/rtc/librtc.o | 277 | LIBS += drivers/rtc/librtc.o |
278 | LIBS += drivers/serial/libserial.o | 278 | LIBS += drivers/serial/libserial.o |
279 | LIBS += drivers/twserial/libtws.o | 279 | LIBS += drivers/twserial/libtws.o |
280 | LIBS += drivers/usb/eth/libusb_eth.o | 280 | LIBS += drivers/usb/eth/libusb_eth.o |
281 | LIBS += drivers/usb/gadget/libusb_gadget.o | 281 | LIBS += drivers/usb/gadget/libusb_gadget.o |
282 | LIBS += drivers/usb/host/libusb_host.o | 282 | LIBS += drivers/usb/host/libusb_host.o |
283 | LIBS += drivers/usb/musb/libusb_musb.o | 283 | LIBS += drivers/usb/musb/libusb_musb.o |
284 | LIBS += drivers/usb/phy/libusb_phy.o | 284 | LIBS += drivers/usb/phy/libusb_phy.o |
285 | LIBS += drivers/video/libvideo.o | 285 | LIBS += drivers/video/libvideo.o |
286 | LIBS += drivers/watchdog/libwatchdog.o | 286 | LIBS += drivers/watchdog/libwatchdog.o |
287 | LIBS += common/libcommon.o | 287 | LIBS += common/libcommon.o |
288 | LIBS += lib/libfdt/libfdt.o | 288 | LIBS += lib/libfdt/libfdt.o |
289 | LIBS += api/libapi.o | 289 | LIBS += api/libapi.o |
290 | LIBS += post/libpost.o | 290 | LIBS += post/libpost.o |
291 | 291 | ||
292 | ifeq ($(SOC),am33xx) | 292 | ifeq ($(SOC),am33xx) |
293 | LIBS += $(CPUDIR)/omap-common/libomap-common.o | 293 | LIBS += $(CPUDIR)/omap-common/libomap-common.o |
294 | endif | 294 | endif |
295 | ifeq ($(SOC),omap3) | 295 | ifeq ($(SOC),omap3) |
296 | LIBS += $(CPUDIR)/omap-common/libomap-common.o | 296 | LIBS += $(CPUDIR)/omap-common/libomap-common.o |
297 | endif | 297 | endif |
298 | ifeq ($(SOC),omap4) | 298 | ifeq ($(SOC),omap4) |
299 | LIBS += $(CPUDIR)/omap-common/libomap-common.o | 299 | LIBS += $(CPUDIR)/omap-common/libomap-common.o |
300 | endif | 300 | endif |
301 | 301 | ||
302 | ifeq ($(SOC),s5pc1xx) | 302 | ifeq ($(SOC),s5pc1xx) |
303 | LIBS += $(CPUDIR)/s5p-common/libs5p-common.o | 303 | LIBS += $(CPUDIR)/s5p-common/libs5p-common.o |
304 | endif | 304 | endif |
305 | ifeq ($(SOC),s5pc2xx) | 305 | ifeq ($(SOC),s5pc2xx) |
306 | LIBS += $(CPUDIR)/s5p-common/libs5p-common.o | 306 | LIBS += $(CPUDIR)/s5p-common/libs5p-common.o |
307 | endif | 307 | endif |
308 | 308 | ||
309 | LIBS := $(addprefix $(obj),$(sort $(LIBS))) | 309 | LIBS := $(addprefix $(obj),$(sort $(LIBS))) |
310 | .PHONY : $(LIBS) | 310 | .PHONY : $(LIBS) |
311 | 311 | ||
312 | LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o | 312 | LIBBOARD = board/$(BOARDDIR)/lib$(BOARD).o |
313 | LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) | 313 | LIBBOARD := $(addprefix $(obj),$(LIBBOARD)) |
314 | 314 | ||
315 | # Add GCC lib | 315 | # Add GCC lib |
316 | ifdef USE_PRIVATE_LIBGCC | 316 | ifdef USE_PRIVATE_LIBGCC |
317 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") | 317 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") |
318 | PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o | 318 | PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o |
319 | else | 319 | else |
320 | PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc | 320 | PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc |
321 | endif | 321 | endif |
322 | else | 322 | else |
323 | PLATFORM_LIBGCC = -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc | 323 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc |
324 | endif | 324 | endif |
325 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) | 325 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) |
326 | export PLATFORM_LIBS | 326 | export PLATFORM_LIBS |
327 | 327 | ||
328 | # Special flags for CPP when processing the linker script. | 328 | # Special flags for CPP when processing the linker script. |
329 | # Pass the version down so we can handle backwards compatibility | 329 | # Pass the version down so we can handle backwards compatibility |
330 | # on the fly. | 330 | # on the fly. |
331 | LDPPFLAGS += \ | 331 | LDPPFLAGS += \ |
332 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ | 332 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ |
333 | $(shell $(LD) --version | \ | 333 | $(shell $(LD) --version | \ |
334 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') | 334 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
335 | 335 | ||
336 | __OBJS := $(subst $(obj),,$(OBJS)) | 336 | __OBJS := $(subst $(obj),,$(OBJS)) |
337 | __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) | 337 | __LIBS := $(subst $(obj),,$(LIBS)) $(subst $(obj),,$(LIBBOARD)) |
338 | 338 | ||
339 | ######################################################################### | 339 | ######################################################################### |
340 | ######################################################################### | 340 | ######################################################################### |
341 | 341 | ||
342 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) | 342 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) |
343 | BOARD_SIZE_CHECK = \ | 343 | BOARD_SIZE_CHECK = \ |
344 | @actual=`wc -c $@ | awk '{print $$1}'`; \ | 344 | @actual=`wc -c $@ | awk '{print $$1}'`; \ |
345 | limit=$(CONFIG_BOARD_SIZE_LIMIT); \ | 345 | limit=$(CONFIG_BOARD_SIZE_LIMIT); \ |
346 | if test $$actual -gt $$limit; then \ | 346 | if test $$actual -gt $$limit; then \ |
347 | echo "$@ exceeds file size limit:"; \ | 347 | echo "$@ exceeds file size limit:"; \ |
348 | echo " limit: $$limit bytes"; \ | 348 | echo " limit: $$limit bytes"; \ |
349 | echo " actual: $$actual bytes"; \ | 349 | echo " actual: $$actual bytes"; \ |
350 | echo " excess: $$((actual - limit)) bytes"; \ | 350 | echo " excess: $$((actual - limit)) bytes"; \ |
351 | exit 1; \ | 351 | exit 1; \ |
352 | fi | 352 | fi |
353 | else | 353 | else |
354 | BOARD_SIZE_CHECK = | 354 | BOARD_SIZE_CHECK = |
355 | endif | 355 | endif |
356 | 356 | ||
357 | # Always append ALL so that arch config.mk's can add custom ones | 357 | # Always append ALL so that arch config.mk's can add custom ones |
358 | ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map | 358 | ALL-y += $(obj)u-boot.srec $(obj)u-boot.bin $(obj)System.map |
359 | 359 | ||
360 | ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin | 360 | ALL-$(CONFIG_NAND_U_BOOT) += $(obj)u-boot-nand.bin |
361 | ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin | 361 | ALL-$(CONFIG_ONENAND_U_BOOT) += $(obj)u-boot-onenand.bin |
362 | ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin | 362 | ONENAND_BIN ?= $(obj)onenand_ipl/onenand-ipl-2k.bin |
363 | ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin | 363 | ALL-$(CONFIG_MMC_U_BOOT) += $(obj)mmc_spl/u-boot-mmc-spl.bin |
364 | ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin | 364 | ALL-$(CONFIG_SPL) += $(obj)spl/u-boot-spl.bin |
365 | ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin | 365 | ALL-$(CONFIG_OF_SEPARATE) += $(obj)u-boot.dtb $(obj)u-boot-dtb.bin |
366 | 366 | ||
367 | all: $(ALL-y) $(SUBDIR_EXAMPLES) | 367 | all: $(ALL-y) $(SUBDIR_EXAMPLES) |
368 | 368 | ||
369 | $(obj)u-boot.dtb: $(obj)u-boot | 369 | $(obj)u-boot.dtb: $(obj)u-boot |
370 | $(MAKE) -C dts binary | 370 | $(MAKE) -C dts binary |
371 | mv $(obj)dts/dt.dtb $@ | 371 | mv $(obj)dts/dt.dtb $@ |
372 | 372 | ||
373 | $(obj)u-boot-dtb.bin: $(obj)u-boot.bin $(obj)u-boot.dtb | 373 | $(obj)u-boot-dtb.bin: $(obj)u-boot.bin $(obj)u-boot.dtb |
374 | cat $^ >$@ | 374 | cat $^ >$@ |
375 | 375 | ||
376 | $(obj)u-boot.hex: $(obj)u-boot | 376 | $(obj)u-boot.hex: $(obj)u-boot |
377 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ | 377 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ |
378 | 378 | ||
379 | $(obj)u-boot.srec: $(obj)u-boot | 379 | $(obj)u-boot.srec: $(obj)u-boot |
380 | $(OBJCOPY) -O srec $< $@ | 380 | $(OBJCOPY) -O srec $< $@ |
381 | 381 | ||
382 | $(obj)u-boot.bin: $(obj)u-boot | 382 | $(obj)u-boot.bin: $(obj)u-boot |
383 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 383 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
384 | $(BOARD_SIZE_CHECK) | 384 | $(BOARD_SIZE_CHECK) |
385 | 385 | ||
386 | $(obj)u-boot.ldr: $(obj)u-boot | 386 | $(obj)u-boot.ldr: $(obj)u-boot |
387 | $(CREATE_LDR_ENV) | 387 | $(CREATE_LDR_ENV) |
388 | $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) | 388 | $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) |
389 | $(BOARD_SIZE_CHECK) | 389 | $(BOARD_SIZE_CHECK) |
390 | 390 | ||
391 | $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr | 391 | $(obj)u-boot.ldr.hex: $(obj)u-boot.ldr |
392 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary | 392 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary |
393 | 393 | ||
394 | $(obj)u-boot.ldr.srec: $(obj)u-boot.ldr | 394 | $(obj)u-boot.ldr.srec: $(obj)u-boot.ldr |
395 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary | 395 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary |
396 | 396 | ||
397 | $(obj)u-boot.img: $(obj)u-boot.bin | 397 | $(obj)u-boot.img: $(obj)u-boot.bin |
398 | $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ | 398 | $(obj)tools/mkimage -A $(ARCH) -T firmware -C none \ |
399 | -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \ | 399 | -O u-boot -a $(CONFIG_SYS_TEXT_BASE) -e 0 \ |
400 | -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ | 400 | -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ |
401 | sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ | 401 | sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ |
402 | -d $< $@ | 402 | -d $< $@ |
403 | 403 | ||
404 | $(obj)u-boot.imx: $(obj)u-boot.bin | 404 | $(obj)u-boot.imx: $(obj)u-boot.bin |
405 | $(obj)tools/mkimage -n $(CONFIG_IMX_CONFIG) -T imximage \ | 405 | $(obj)tools/mkimage -n $(CONFIG_IMX_CONFIG) -T imximage \ |
406 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ | 406 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
407 | 407 | ||
408 | $(obj)u-boot.kwb: $(obj)u-boot.bin | 408 | $(obj)u-boot.kwb: $(obj)u-boot.bin |
409 | $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ | 409 | $(obj)tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ |
410 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ | 410 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
411 | 411 | ||
412 | $(obj)u-boot.sha1: $(obj)u-boot.bin | 412 | $(obj)u-boot.sha1: $(obj)u-boot.bin |
413 | $(obj)tools/ubsha1 $(obj)u-boot.bin | 413 | $(obj)tools/ubsha1 $(obj)u-boot.bin |
414 | 414 | ||
415 | $(obj)u-boot.dis: $(obj)u-boot | 415 | $(obj)u-boot.dis: $(obj)u-boot |
416 | $(OBJDUMP) -d $< > $@ | 416 | $(OBJDUMP) -d $< > $@ |
417 | 417 | ||
418 | $(obj)u-boot.ubl: $(obj)u-boot-nand.bin | 418 | $(obj)u-boot.ubl: $(obj)u-boot-nand.bin |
419 | $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ | 419 | $(obj)tools/mkimage -n $(UBL_CONFIG) -T ublimage \ |
420 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ | 420 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
421 | 421 | ||
422 | ifeq ($(CONFIG_SANDBOX),y) | 422 | ifeq ($(CONFIG_SANDBOX),y) |
423 | GEN_UBOOT = \ | 423 | GEN_UBOOT = \ |
424 | cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \ | 424 | cd $(LNDIR) && $(CC) $(SYMS) -T $(obj)u-boot.lds \ |
425 | -Wl,--start-group $(__LIBS) -Wl,--end-group \ | 425 | -Wl,--start-group $(__LIBS) -Wl,--end-group \ |
426 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot | 426 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot |
427 | else | 427 | else |
428 | GEN_UBOOT = \ | 428 | GEN_UBOOT = \ |
429 | UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ | 429 | UNDEF_SYM=`$(OBJDUMP) -x $(LIBBOARD) $(LIBS) | \ |
430 | sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ | 430 | sed -n -e 's/.*\($(SYM_PREFIX)__u_boot_cmd_.*\)/-u\1/p'|sort|uniq`;\ |
431 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \ | 431 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $$UNDEF_SYM $(__OBJS) \ |
432 | --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ | 432 | --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ |
433 | -Map u-boot.map -o u-boot | 433 | -Map u-boot.map -o u-boot |
434 | endif | 434 | endif |
435 | 435 | ||
436 | $(obj)u-boot: depend \ | 436 | $(obj)u-boot: depend \ |
437 | $(SUBDIR_TOOLS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds | 437 | $(SUBDIR_TOOLS) $(OBJS) $(LIBBOARD) $(LIBS) $(LDSCRIPT) $(obj)u-boot.lds |
438 | $(GEN_UBOOT) | 438 | $(GEN_UBOOT) |
439 | ifeq ($(CONFIG_KALLSYMS),y) | 439 | ifeq ($(CONFIG_KALLSYMS),y) |
440 | smap=`$(call SYSTEM_MAP,u-boot) | \ | 440 | smap=`$(call SYSTEM_MAP,u-boot) | \ |
441 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ | 441 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ |
442 | $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \ | 442 | $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \ |
443 | -c common/system_map.c -o $(obj)common/system_map.o | 443 | -c common/system_map.c -o $(obj)common/system_map.o |
444 | $(GEN_UBOOT) $(obj)common/system_map.o | 444 | $(GEN_UBOOT) $(obj)common/system_map.o |
445 | endif | 445 | endif |
446 | 446 | ||
447 | $(OBJS): depend | 447 | $(OBJS): depend |
448 | $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@)) | 448 | $(MAKE) -C $(CPUDIR) $(if $(REMOTE_BUILD),$@,$(notdir $@)) |
449 | 449 | ||
450 | $(LIBS): depend $(SUBDIR_TOOLS) | 450 | $(LIBS): depend $(SUBDIR_TOOLS) |
451 | $(MAKE) -C $(dir $(subst $(obj),,$@)) | 451 | $(MAKE) -C $(dir $(subst $(obj),,$@)) |
452 | 452 | ||
453 | $(LIBBOARD): depend $(LIBS) | 453 | $(LIBBOARD): depend $(LIBS) |
454 | $(MAKE) -C $(dir $(subst $(obj),,$@)) | 454 | $(MAKE) -C $(dir $(subst $(obj),,$@)) |
455 | 455 | ||
456 | $(SUBDIRS): depend | 456 | $(SUBDIRS): depend |
457 | $(MAKE) -C $@ all | 457 | $(MAKE) -C $@ all |
458 | 458 | ||
459 | $(SUBDIR_EXAMPLES): $(obj)u-boot | 459 | $(SUBDIR_EXAMPLES): $(obj)u-boot |
460 | 460 | ||
461 | $(LDSCRIPT): depend | 461 | $(LDSCRIPT): depend |
462 | $(MAKE) -C $(dir $@) $(notdir $@) | 462 | $(MAKE) -C $(dir $@) $(notdir $@) |
463 | 463 | ||
464 | $(obj)u-boot.lds: $(LDSCRIPT) | 464 | $(obj)u-boot.lds: $(LDSCRIPT) |
465 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 465 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
466 | 466 | ||
467 | nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend | 467 | nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend |
468 | $(MAKE) -C nand_spl/board/$(BOARDDIR) all | 468 | $(MAKE) -C nand_spl/board/$(BOARDDIR) all |
469 | 469 | ||
470 | $(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin | 470 | $(obj)u-boot-nand.bin: nand_spl $(obj)u-boot.bin |
471 | cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin | 471 | cat $(obj)nand_spl/u-boot-spl-16k.bin $(obj)u-boot.bin > $(obj)u-boot-nand.bin |
472 | 472 | ||
473 | onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk | 473 | onenand_ipl: $(TIMESTAMP_FILE) $(VERSION_FILE) $(obj)include/autoconf.mk |
474 | $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all | 474 | $(MAKE) -C onenand_ipl/board/$(BOARDDIR) all |
475 | 475 | ||
476 | $(obj)u-boot-onenand.bin: onenand_ipl $(obj)u-boot.bin | 476 | $(obj)u-boot-onenand.bin: onenand_ipl $(obj)u-boot.bin |
477 | cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin | 477 | cat $(ONENAND_BIN) $(obj)u-boot.bin > $(obj)u-boot-onenand.bin |
478 | 478 | ||
479 | mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend | 479 | mmc_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend |
480 | $(MAKE) -C mmc_spl/board/$(BOARDDIR) all | 480 | $(MAKE) -C mmc_spl/board/$(BOARDDIR) all |
481 | 481 | ||
482 | $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl | 482 | $(obj)mmc_spl/u-boot-mmc-spl.bin: mmc_spl |
483 | 483 | ||
484 | $(obj)spl/u-boot-spl.bin: depend | 484 | $(obj)spl/u-boot-spl.bin: depend |
485 | $(MAKE) -C spl all | 485 | $(MAKE) -C spl all |
486 | 486 | ||
487 | updater: | 487 | updater: |
488 | $(MAKE) -C tools/updater all | 488 | $(MAKE) -C tools/updater all |
489 | 489 | ||
490 | # Explicitly make _depend in subdirs containing multiple targets to prevent | 490 | # Explicitly make _depend in subdirs containing multiple targets to prevent |
491 | # parallel sub-makes creating .depend files simultaneously. | 491 | # parallel sub-makes creating .depend files simultaneously. |
492 | depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ | 492 | depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ |
493 | $(obj)include/autoconf.mk \ | 493 | $(obj)include/autoconf.mk \ |
494 | $(obj)include/generated/generic-asm-offsets.h \ | 494 | $(obj)include/generated/generic-asm-offsets.h \ |
495 | $(obj)include/generated/asm-offsets.h | 495 | $(obj)include/generated/asm-offsets.h |
496 | for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \ | 496 | for dir in $(SUBDIRS) $(CPUDIR) $(dir $(LDSCRIPT)) ; do \ |
497 | $(MAKE) -C $$dir _depend ; done | 497 | $(MAKE) -C $$dir _depend ; done |
498 | 498 | ||
499 | TAG_SUBDIRS = $(SUBDIRS) | 499 | TAG_SUBDIRS = $(SUBDIRS) |
500 | TAG_SUBDIRS += $(dir $(__LIBS)) | 500 | TAG_SUBDIRS += $(dir $(__LIBS)) |
501 | TAG_SUBDIRS += include | 501 | TAG_SUBDIRS += include |
502 | 502 | ||
503 | FIND := find | 503 | FIND := find |
504 | FINDFLAGS := -L | 504 | FINDFLAGS := -L |
505 | 505 | ||
506 | tags ctags: | 506 | tags ctags: |
507 | ctags -w -o $(obj)ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 507 | ctags -w -o $(obj)ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
508 | -name '*.[chS]' -print` | 508 | -name '*.[chS]' -print` |
509 | 509 | ||
510 | etags: | 510 | etags: |
511 | etags -a -o $(obj)etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 511 | etags -a -o $(obj)etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
512 | -name '*.[chS]' -print` | 512 | -name '*.[chS]' -print` |
513 | cscope: | 513 | cscope: |
514 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ | 514 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ |
515 | cscope.files | 515 | cscope.files |
516 | cscope -b -q -k | 516 | cscope -b -q -k |
517 | 517 | ||
518 | SYSTEM_MAP = \ | 518 | SYSTEM_MAP = \ |
519 | $(NM) $1 | \ | 519 | $(NM) $1 | \ |
520 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ | 520 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ |
521 | LC_ALL=C sort | 521 | LC_ALL=C sort |
522 | $(obj)System.map: $(obj)u-boot | 522 | $(obj)System.map: $(obj)u-boot |
523 | @$(call SYSTEM_MAP,$<) > $(obj)System.map | 523 | @$(call SYSTEM_MAP,$<) > $(obj)System.map |
524 | 524 | ||
525 | # | 525 | # |
526 | # Auto-generate the autoconf.mk file (which is included by all makefiles) | 526 | # Auto-generate the autoconf.mk file (which is included by all makefiles) |
527 | # | 527 | # |
528 | # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. | 528 | # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. |
529 | # the dep file is only include in this top level makefile to determine when | 529 | # the dep file is only include in this top level makefile to determine when |
530 | # to regenerate the autoconf.mk file. | 530 | # to regenerate the autoconf.mk file. |
531 | $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h | 531 | $(obj)include/autoconf.mk.dep: $(obj)include/config.h include/common.h |
532 | @$(XECHO) Generating $@ ; \ | 532 | @$(XECHO) Generating $@ ; \ |
533 | set -e ; \ | 533 | set -e ; \ |
534 | : Generate the dependancies ; \ | 534 | : Generate the dependancies ; \ |
535 | $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \ | 535 | $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \ |
536 | -MQ $(obj)include/autoconf.mk include/common.h > $@ | 536 | -MQ $(obj)include/autoconf.mk include/common.h > $@ |
537 | 537 | ||
538 | $(obj)include/autoconf.mk: $(obj)include/config.h | 538 | $(obj)include/autoconf.mk: $(obj)include/config.h |
539 | @$(XECHO) Generating $@ ; \ | 539 | @$(XECHO) Generating $@ ; \ |
540 | set -e ; \ | 540 | set -e ; \ |
541 | : Extract the config macros ; \ | 541 | : Extract the config macros ; \ |
542 | $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \ | 542 | $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM include/common.h | \ |
543 | sed -n -f tools/scripts/define2mk.sed > $@.tmp && \ | 543 | sed -n -f tools/scripts/define2mk.sed > $@.tmp && \ |
544 | mv $@.tmp $@ | 544 | mv $@.tmp $@ |
545 | 545 | ||
546 | $(obj)include/generated/generic-asm-offsets.h: $(obj)include/autoconf.mk.dep \ | 546 | $(obj)include/generated/generic-asm-offsets.h: $(obj)include/autoconf.mk.dep \ |
547 | $(obj)lib/asm-offsets.s | 547 | $(obj)lib/asm-offsets.s |
548 | @$(XECHO) Generating $@ | 548 | @$(XECHO) Generating $@ |
549 | tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@ | 549 | tools/scripts/make-asm-offsets $(obj)lib/asm-offsets.s $@ |
550 | 550 | ||
551 | $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \ | 551 | $(obj)lib/asm-offsets.s: $(obj)include/autoconf.mk.dep \ |
552 | $(src)lib/asm-offsets.c | 552 | $(src)lib/asm-offsets.c |
553 | @mkdir -p $(obj)lib | 553 | @mkdir -p $(obj)lib |
554 | $(CC) -DDO_DEPS_ONLY \ | 554 | $(CC) -DDO_DEPS_ONLY \ |
555 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | 555 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ |
556 | -o $@ $(src)lib/asm-offsets.c -c -S | 556 | -o $@ $(src)lib/asm-offsets.c -c -S |
557 | 557 | ||
558 | $(obj)include/generated/asm-offsets.h: $(obj)include/autoconf.mk.dep \ | 558 | $(obj)include/generated/asm-offsets.h: $(obj)include/autoconf.mk.dep \ |
559 | $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s | 559 | $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s |
560 | @echo Generating $@ | 560 | @echo Generating $@ |
561 | tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@ | 561 | tools/scripts/make-asm-offsets $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s $@ |
562 | 562 | ||
563 | $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/autoconf.mk.dep | 563 | $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s: $(obj)include/autoconf.mk.dep |
564 | @mkdir -p $(obj)$(CPUDIR)/$(SOC) | 564 | @mkdir -p $(obj)$(CPUDIR)/$(SOC) |
565 | if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ | 565 | if [ -f $(src)$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ |
566 | $(CC) -DDO_DEPS_ONLY \ | 566 | $(CC) -DDO_DEPS_ONLY \ |
567 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | 567 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ |
568 | -o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ | 568 | -o $@ $(src)$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ |
569 | else \ | 569 | else \ |
570 | touch $@; \ | 570 | touch $@; \ |
571 | fi | 571 | fi |
572 | 572 | ||
573 | ######################################################################### | 573 | ######################################################################### |
574 | else # !config.mk | 574 | else # !config.mk |
575 | all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ | 575 | all $(obj)u-boot.hex $(obj)u-boot.srec $(obj)u-boot.bin \ |
576 | $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ | 576 | $(obj)u-boot.img $(obj)u-boot.dis $(obj)u-boot \ |
577 | $(filter-out tools,$(SUBDIRS)) \ | 577 | $(filter-out tools,$(SUBDIRS)) \ |
578 | updater depend dep tags ctags etags cscope $(obj)System.map: | 578 | updater depend dep tags ctags etags cscope $(obj)System.map: |
579 | @echo "System not configured - see README" >&2 | 579 | @echo "System not configured - see README" >&2 |
580 | @ exit 1 | 580 | @ exit 1 |
581 | 581 | ||
582 | tools: $(VERSION_FILE) $(TIMESTAMP_FILE) | 582 | tools: $(VERSION_FILE) $(TIMESTAMP_FILE) |
583 | $(MAKE) -C $@ all | 583 | $(MAKE) -C $@ all |
584 | endif # config.mk | 584 | endif # config.mk |
585 | 585 | ||
586 | $(VERSION_FILE): | 586 | $(VERSION_FILE): |
587 | @mkdir -p $(dir $(VERSION_FILE)) | 587 | @mkdir -p $(dir $(VERSION_FILE)) |
588 | @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \ | 588 | @( localvers='$(shell $(TOPDIR)/tools/setlocalversion $(TOPDIR))' ; \ |
589 | printf '#define PLAIN_VERSION "%s%s"\n' \ | 589 | printf '#define PLAIN_VERSION "%s%s"\n' \ |
590 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ | 590 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ |
591 | printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ | 591 | printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ |
592 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ | 592 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ |
593 | ) > $@.tmp | 593 | ) > $@.tmp |
594 | @( printf '#define CC_VERSION_STRING "%s"\n' \ | 594 | @( printf '#define CC_VERSION_STRING "%s"\n' \ |
595 | '$(shell $(CC) --version | head -n 1)' )>> $@.tmp | 595 | '$(shell $(CC) --version | head -n 1)' )>> $@.tmp |
596 | @( printf '#define LD_VERSION_STRING "%s"\n' \ | 596 | @( printf '#define LD_VERSION_STRING "%s"\n' \ |
597 | '$(shell $(LD) -v | head -n 1)' )>> $@.tmp | 597 | '$(shell $(LD) -v | head -n 1)' )>> $@.tmp |
598 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ | 598 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ |
599 | 599 | ||
600 | $(TIMESTAMP_FILE): | 600 | $(TIMESTAMP_FILE): |
601 | @mkdir -p $(dir $(TIMESTAMP_FILE)) | 601 | @mkdir -p $(dir $(TIMESTAMP_FILE)) |
602 | @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp | 602 | @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp |
603 | @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp | 603 | @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp |
604 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ | 604 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ |
605 | 605 | ||
606 | easylogo env gdb: | 606 | easylogo env gdb: |
607 | $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} | 607 | $(MAKE) -C tools/$@ all MTD_VERSION=${MTD_VERSION} |
608 | gdbtools: gdb | 608 | gdbtools: gdb |
609 | 609 | ||
610 | tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) | 610 | tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) |
611 | $(MAKE) -C tools HOST_TOOLS_ALL=y | 611 | $(MAKE) -C tools HOST_TOOLS_ALL=y |
612 | 612 | ||
613 | .PHONY : CHANGELOG | 613 | .PHONY : CHANGELOG |
614 | CHANGELOG: | 614 | CHANGELOG: |
615 | git log --no-merges U-Boot-1_1_5.. | \ | 615 | git log --no-merges U-Boot-1_1_5.. | \ |
616 | unexpand -a | sed -e 's/\s\s*$$//' > $@ | 616 | unexpand -a | sed -e 's/\s\s*$$//' > $@ |
617 | 617 | ||
618 | include/license.h: tools/bin2header COPYING | 618 | include/license.h: tools/bin2header COPYING |
619 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h | 619 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h |
620 | ######################################################################### | 620 | ######################################################################### |
621 | 621 | ||
622 | unconfig: | 622 | unconfig: |
623 | @rm -f $(obj)include/config.h $(obj)include/config.mk \ | 623 | @rm -f $(obj)include/config.h $(obj)include/config.mk \ |
624 | $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ | 624 | $(obj)board/*/config.tmp $(obj)board/*/*/config.tmp \ |
625 | $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep | 625 | $(obj)include/autoconf.mk $(obj)include/autoconf.mk.dep |
626 | 626 | ||
627 | %_config:: unconfig | 627 | %_config:: unconfig |
628 | @$(MKCONFIG) -A $(@:_config=) | 628 | @$(MKCONFIG) -A $(@:_config=) |
629 | 629 | ||
630 | sinclude $(obj).boards.depend | 630 | sinclude $(obj).boards.depend |
631 | $(obj).boards.depend: boards.cfg | 631 | $(obj).boards.depend: boards.cfg |
632 | awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@ | 632 | awk '(NF && $$1 !~ /^#/) { print $$1 ": " $$1 "_config; $$(MAKE)" }' $< > $@ |
633 | 633 | ||
634 | # | 634 | # |
635 | # Functions to generate common board directory names | 635 | # Functions to generate common board directory names |
636 | # | 636 | # |
637 | lcname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\L\1/') | 637 | lcname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\L\1/') |
638 | ucname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') | 638 | ucname = $(shell echo $(1) | sed -e 's/\(.*\)_config/\U\1/') |
639 | 639 | ||
640 | ######################################################################### | 640 | ######################################################################### |
641 | ## Coldfire | 641 | ## Coldfire |
642 | ######################################################################### | 642 | ######################################################################### |
643 | M52277EVB_config \ | 643 | M52277EVB_config \ |
644 | M52277EVB_spansion_config \ | 644 | M52277EVB_spansion_config \ |
645 | M52277EVB_stmicro_config : unconfig | 645 | M52277EVB_stmicro_config : unconfig |
646 | @mkdir -p $(obj)include | 646 | @mkdir -p $(obj)include |
647 | @mkdir -p $(obj)board/freescale/m52277evb | 647 | @mkdir -p $(obj)board/freescale/m52277evb |
648 | @case "$@" in \ | 648 | @case "$@" in \ |
649 | M52277EVB_config) FLASH=SPANSION;; \ | 649 | M52277EVB_config) FLASH=SPANSION;; \ |
650 | M52277EVB_spansion_config) FLASH=SPANSION;; \ | 650 | M52277EVB_spansion_config) FLASH=SPANSION;; \ |
651 | M52277EVB_stmicro_config) FLASH=STMICRO;; \ | 651 | M52277EVB_stmicro_config) FLASH=STMICRO;; \ |
652 | esac; \ | 652 | esac; \ |
653 | if [ "$${FLASH}" = "SPANSION" ] ; then \ | 653 | if [ "$${FLASH}" = "SPANSION" ] ; then \ |
654 | echo "#define CONFIG_SYS_SPANSION_BOOT" >> $(obj)include/config.h ; \ | 654 | echo "#define CONFIG_SYS_SPANSION_BOOT" >> $(obj)include/config.h ; \ |
655 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m52277evb/config.tmp ; \ | 655 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m52277evb/config.tmp ; \ |
656 | fi; \ | 656 | fi; \ |
657 | if [ "$${FLASH}" = "STMICRO" ] ; then \ | 657 | if [ "$${FLASH}" = "STMICRO" ] ; then \ |
658 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ | 658 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ |
659 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ | 659 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ |
660 | echo "CONFIG_SYS_TEXT_BASE = 0x43E00000" > $(obj)board/freescale/m52277evb/config.tmp ; \ | 660 | echo "CONFIG_SYS_TEXT_BASE = 0x43E00000" > $(obj)board/freescale/m52277evb/config.tmp ; \ |
661 | fi | 661 | fi |
662 | @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale | 662 | @$(MKCONFIG) -n $@ -a M52277EVB m68k mcf5227x m52277evb freescale |
663 | 663 | ||
664 | M5235EVB_config \ | 664 | M5235EVB_config \ |
665 | M5235EVB_Flash16_config \ | 665 | M5235EVB_Flash16_config \ |
666 | M5235EVB_Flash32_config: unconfig | 666 | M5235EVB_Flash32_config: unconfig |
667 | @mkdir -p $(obj)include | 667 | @mkdir -p $(obj)include |
668 | @mkdir -p $(obj)board/freescale/m5235evb | 668 | @mkdir -p $(obj)board/freescale/m5235evb |
669 | @case "$@" in \ | 669 | @case "$@" in \ |
670 | M5235EVB_config) FLASH=16;; \ | 670 | M5235EVB_config) FLASH=16;; \ |
671 | M5235EVB_Flash16_config) FLASH=16;; \ | 671 | M5235EVB_Flash16_config) FLASH=16;; \ |
672 | M5235EVB_Flash32_config) FLASH=32;; \ | 672 | M5235EVB_Flash32_config) FLASH=32;; \ |
673 | esac; \ | 673 | esac; \ |
674 | if [ "$${FLASH}" != "16" ] ; then \ | 674 | if [ "$${FLASH}" != "16" ] ; then \ |
675 | echo "#define NORFLASH_PS32BIT 1" >> $(obj)include/config.h ; \ | 675 | echo "#define NORFLASH_PS32BIT 1" >> $(obj)include/config.h ; \ |
676 | echo "CONFIG_SYS_TEXT_BASE = 0xFFC00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ | 676 | echo "CONFIG_SYS_TEXT_BASE = 0xFFC00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ |
677 | else \ | 677 | else \ |
678 | echo "CONFIG_SYS_TEXT_BASE = 0xFFE00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ | 678 | echo "CONFIG_SYS_TEXT_BASE = 0xFFE00000" > $(obj)board/freescale/m5235evb/config.tmp ; \ |
679 | fi | 679 | fi |
680 | @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale | 680 | @$(MKCONFIG) -n $@ -a M5235EVB m68k mcf523x m5235evb freescale |
681 | 681 | ||
682 | EB+MCF-EV123_config : unconfig | 682 | EB+MCF-EV123_config : unconfig |
683 | @mkdir -p $(obj)board/BuS/EB+MCF-EV123 | 683 | @mkdir -p $(obj)board/BuS/EB+MCF-EV123 |
684 | @echo "CONFIG_SYS_TEXT_BASE = 0xFFE00000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk | 684 | @echo "CONFIG_SYS_TEXT_BASE = 0xFFE00000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk |
685 | @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS | 685 | @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS |
686 | 686 | ||
687 | EB+MCF-EV123_internal_config : unconfig | 687 | EB+MCF-EV123_internal_config : unconfig |
688 | @mkdir -p $(obj)board/BuS/EB+MCF-EV123 | 688 | @mkdir -p $(obj)board/BuS/EB+MCF-EV123 |
689 | @echo "CONFIG_SYS_TEXT_BASE = 0xF0000000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk | 689 | @echo "CONFIG_SYS_TEXT_BASE = 0xF0000000"|tee $(obj)board/BuS/EB+MCF-EV123/textbase.mk |
690 | @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS | 690 | @$(MKCONFIG) -n $@ EB+MCF-EV123 m68k mcf52x2 EB+MCF-EV123 BuS |
691 | 691 | ||
692 | M54451EVB_config \ | 692 | M54451EVB_config \ |
693 | M54451EVB_stmicro_config : unconfig | 693 | M54451EVB_stmicro_config : unconfig |
694 | @mkdir -p $(obj)include | 694 | @mkdir -p $(obj)include |
695 | @mkdir -p $(obj)board/freescale/m54451evb | 695 | @mkdir -p $(obj)board/freescale/m54451evb |
696 | @case "$@" in \ | 696 | @case "$@" in \ |
697 | M54451EVB_config) FLASH=NOR;; \ | 697 | M54451EVB_config) FLASH=NOR;; \ |
698 | M54451EVB_stmicro_config) FLASH=STMICRO;; \ | 698 | M54451EVB_stmicro_config) FLASH=STMICRO;; \ |
699 | esac; \ | 699 | esac; \ |
700 | if [ "$${FLASH}" = "NOR" ] ; then \ | 700 | if [ "$${FLASH}" = "NOR" ] ; then \ |
701 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54451evb/config.tmp ; \ | 701 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54451evb/config.tmp ; \ |
702 | fi; \ | 702 | fi; \ |
703 | if [ "$${FLASH}" = "STMICRO" ] ; then \ | 703 | if [ "$${FLASH}" = "STMICRO" ] ; then \ |
704 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ | 704 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ |
705 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ | 705 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ |
706 | echo "CONFIG_SYS_TEXT_BASE = 0x47E00000" > $(obj)board/freescale/m54451evb/config.tmp ; \ | 706 | echo "CONFIG_SYS_TEXT_BASE = 0x47E00000" > $(obj)board/freescale/m54451evb/config.tmp ; \ |
707 | fi; \ | 707 | fi; \ |
708 | echo "#define CONFIG_SYS_INPUT_CLKSRC 24000000" >> $(obj)include/config.h ; | 708 | echo "#define CONFIG_SYS_INPUT_CLKSRC 24000000" >> $(obj)include/config.h ; |
709 | @$(MKCONFIG) -n $@ -a M54451EVB m68k mcf5445x m54451evb freescale | 709 | @$(MKCONFIG) -n $@ -a M54451EVB m68k mcf5445x m54451evb freescale |
710 | 710 | ||
711 | M54455EVB_config \ | 711 | M54455EVB_config \ |
712 | M54455EVB_atmel_config \ | 712 | M54455EVB_atmel_config \ |
713 | M54455EVB_intel_config \ | 713 | M54455EVB_intel_config \ |
714 | M54455EVB_a33_config \ | 714 | M54455EVB_a33_config \ |
715 | M54455EVB_a66_config \ | 715 | M54455EVB_a66_config \ |
716 | M54455EVB_i33_config \ | 716 | M54455EVB_i33_config \ |
717 | M54455EVB_i66_config \ | 717 | M54455EVB_i66_config \ |
718 | M54455EVB_stm33_config : unconfig | 718 | M54455EVB_stm33_config : unconfig |
719 | @mkdir -p $(obj)include | 719 | @mkdir -p $(obj)include |
720 | @mkdir -p $(obj)board/freescale/m54455evb | 720 | @mkdir -p $(obj)board/freescale/m54455evb |
721 | @case "$@" in \ | 721 | @case "$@" in \ |
722 | M54455EVB_config) FLASH=ATMEL; FREQ=33333333;; \ | 722 | M54455EVB_config) FLASH=ATMEL; FREQ=33333333;; \ |
723 | M54455EVB_atmel_config) FLASH=ATMEL; FREQ=33333333;; \ | 723 | M54455EVB_atmel_config) FLASH=ATMEL; FREQ=33333333;; \ |
724 | M54455EVB_intel_config) FLASH=INTEL; FREQ=33333333;; \ | 724 | M54455EVB_intel_config) FLASH=INTEL; FREQ=33333333;; \ |
725 | M54455EVB_a33_config) FLASH=ATMEL; FREQ=33333333;; \ | 725 | M54455EVB_a33_config) FLASH=ATMEL; FREQ=33333333;; \ |
726 | M54455EVB_a66_config) FLASH=ATMEL; FREQ=66666666;; \ | 726 | M54455EVB_a66_config) FLASH=ATMEL; FREQ=66666666;; \ |
727 | M54455EVB_i33_config) FLASH=INTEL; FREQ=33333333;; \ | 727 | M54455EVB_i33_config) FLASH=INTEL; FREQ=33333333;; \ |
728 | M54455EVB_i66_config) FLASH=INTEL; FREQ=66666666;; \ | 728 | M54455EVB_i66_config) FLASH=INTEL; FREQ=66666666;; \ |
729 | M54455EVB_stm33_config) FLASH=STMICRO; FREQ=33333333;; \ | 729 | M54455EVB_stm33_config) FLASH=STMICRO; FREQ=33333333;; \ |
730 | esac; \ | 730 | esac; \ |
731 | if [ "$${FLASH}" = "INTEL" ] ; then \ | 731 | if [ "$${FLASH}" = "INTEL" ] ; then \ |
732 | echo "#define CONFIG_SYS_INTEL_BOOT" >> $(obj)include/config.h ; \ | 732 | echo "#define CONFIG_SYS_INTEL_BOOT" >> $(obj)include/config.h ; \ |
733 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ | 733 | echo "CONFIG_SYS_TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ |
734 | fi; \ | 734 | fi; \ |
735 | if [ "$${FLASH}" = "ATMEL" ] ; then \ | 735 | if [ "$${FLASH}" = "ATMEL" ] ; then \ |
736 | echo "#define CONFIG_SYS_ATMEL_BOOT" >> $(obj)include/config.h ; \ | 736 | echo "#define CONFIG_SYS_ATMEL_BOOT" >> $(obj)include/config.h ; \ |
737 | echo "CONFIG_SYS_TEXT_BASE = 0x04000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ | 737 | echo "CONFIG_SYS_TEXT_BASE = 0x04000000" > $(obj)board/freescale/m54455evb/config.tmp ; \ |
738 | fi; \ | 738 | fi; \ |
739 | if [ "$${FLASH}" = "STMICRO" ] ; then \ | 739 | if [ "$${FLASH}" = "STMICRO" ] ; then \ |
740 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ | 740 | echo "#define CONFIG_CF_SBF" >> $(obj)include/config.h ; \ |
741 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ | 741 | echo "#define CONFIG_SYS_STMICRO_BOOT" >> $(obj)include/config.h ; \ |
742 | echo "CONFIG_SYS_TEXT_BASE = 0x4FE00000" > $(obj)board/freescale/m54455evb/config.tmp ; \ | 742 | echo "CONFIG_SYS_TEXT_BASE = 0x4FE00000" > $(obj)board/freescale/m54455evb/config.tmp ; \ |
743 | fi; \ | 743 | fi; \ |
744 | echo "#define CONFIG_SYS_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \ | 744 | echo "#define CONFIG_SYS_INPUT_CLKSRC $${FREQ}" >> $(obj)include/config.h ; \ |
745 | $(XECHO) "... with $${FREQ}Hz input clock" | 745 | $(XECHO) "... with $${FREQ}Hz input clock" |
746 | @$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale | 746 | @$(MKCONFIG) -n $@ -a M54455EVB m68k mcf5445x m54455evb freescale |
747 | 747 | ||
748 | #======================================================================== | 748 | #======================================================================== |
749 | # ARM | 749 | # ARM |
750 | #======================================================================== | 750 | #======================================================================== |
751 | 751 | ||
752 | xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1)))) | 752 | xtract_omap1610xxx = $(subst _cs0boot,,$(subst _cs3boot,,$(subst _cs_autoboot,,$(subst _config,,$1)))) |
753 | 753 | ||
754 | omap1610inn_config \ | 754 | omap1610inn_config \ |
755 | omap1610inn_cs0boot_config \ | 755 | omap1610inn_cs0boot_config \ |
756 | omap1610inn_cs3boot_config \ | 756 | omap1610inn_cs3boot_config \ |
757 | omap1610inn_cs_autoboot_config \ | 757 | omap1610inn_cs_autoboot_config \ |
758 | omap1610h2_config \ | 758 | omap1610h2_config \ |
759 | omap1610h2_cs0boot_config \ | 759 | omap1610h2_cs0boot_config \ |
760 | omap1610h2_cs3boot_config \ | 760 | omap1610h2_cs3boot_config \ |
761 | omap1610h2_cs_autoboot_config: unconfig | 761 | omap1610h2_cs_autoboot_config: unconfig |
762 | @mkdir -p $(obj)include | 762 | @mkdir -p $(obj)include |
763 | @if [ "$(findstring _cs0boot_, $@)" ] ; then \ | 763 | @if [ "$(findstring _cs0boot_, $@)" ] ; then \ |
764 | echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \ | 764 | echo "#define CONFIG_CS0_BOOT" >> .$(obj)include/config.h ; \ |
765 | elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \ | 765 | elif [ "$(findstring _cs_autoboot_, $@)" ] ; then \ |
766 | echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \ | 766 | echo "#define CONFIG_CS_AUTOBOOT" >> $(obj)include/config.h ; \ |
767 | else \ | 767 | else \ |
768 | echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ | 768 | echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ |
769 | fi; | 769 | fi; |
770 | @$(MKCONFIG) -n $@ -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn ti omap | 770 | @$(MKCONFIG) -n $@ -a $(call xtract_omap1610xxx,$@) arm arm926ejs omap1610inn ti omap |
771 | 771 | ||
772 | omap730p2_config \ | 772 | omap730p2_config \ |
773 | omap730p2_cs0boot_config \ | 773 | omap730p2_cs0boot_config \ |
774 | omap730p2_cs3boot_config : unconfig | 774 | omap730p2_cs3boot_config : unconfig |
775 | @mkdir -p $(obj)include | 775 | @mkdir -p $(obj)include |
776 | @if [ "$(findstring _cs0boot_, $@)" ] ; then \ | 776 | @if [ "$(findstring _cs0boot_, $@)" ] ; then \ |
777 | echo "#define CONFIG_CS0_BOOT" >> $(obj)include/config.h ; \ | 777 | echo "#define CONFIG_CS0_BOOT" >> $(obj)include/config.h ; \ |
778 | else \ | 778 | else \ |
779 | echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ | 779 | echo "#define CONFIG_CS3_BOOT" >> $(obj)include/config.h ; \ |
780 | fi; | 780 | fi; |
781 | @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap | 781 | @$(MKCONFIG) -n $@ -a omap730p2 arm arm926ejs omap730p2 ti omap |
782 | 782 | ||
783 | spear300_config \ | 783 | spear300_config \ |
784 | spear310_config \ | 784 | spear310_config \ |
785 | spear320_config : unconfig | 785 | spear320_config : unconfig |
786 | @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear | 786 | @$(MKCONFIG) -n $@ -t $@ spear3xx arm arm926ejs $(@:_config=) spear spear |
787 | 787 | ||
788 | spear600_config : unconfig | 788 | spear600_config : unconfig |
789 | @$(MKCONFIG) -n $@ -t $@ spear6xx arm arm926ejs $(@:_config=) spear spear | 789 | @$(MKCONFIG) -n $@ -t $@ spear6xx arm arm926ejs $(@:_config=) spear spear |
790 | 790 | ||
791 | SX1_stdout_serial_config \ | 791 | SX1_stdout_serial_config \ |
792 | SX1_config: unconfig | 792 | SX1_config: unconfig |
793 | @mkdir -p $(obj)include | 793 | @mkdir -p $(obj)include |
794 | @if [ "$(findstring _stdout_serial_, $@)" ] ; then \ | 794 | @if [ "$(findstring _stdout_serial_, $@)" ] ; then \ |
795 | echo "#undef CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \ | 795 | echo "#undef CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \ |
796 | else \ | 796 | else \ |
797 | echo "#define CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \ | 797 | echo "#define CONFIG_STDOUT_USBTTY" >> $(obj)include/config.h ; \ |
798 | fi; | 798 | fi; |
799 | @$(MKCONFIG) -n $@ SX1 arm arm925t sx1 | 799 | @$(MKCONFIG) -n $@ SX1 arm arm925t sx1 |
800 | 800 | ||
801 | ######################################################################### | 801 | ######################################################################### |
802 | ## XScale Systems | 802 | ## XScale Systems |
803 | ######################################################################### | 803 | ######################################################################### |
804 | 804 | ||
805 | pdnb3_config \ | 805 | pdnb3_config \ |
806 | scpu_config: unconfig | 806 | scpu_config: unconfig |
807 | @mkdir -p $(obj)include | 807 | @mkdir -p $(obj)include |
808 | @if [ "$(findstring scpu_,$@)" ] ; then \ | 808 | @if [ "$(findstring scpu_,$@)" ] ; then \ |
809 | echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ | 809 | echo "#define CONFIG_SCPU" >>$(obj)include/config.h ; \ |
810 | fi | 810 | fi |
811 | @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive | 811 | @$(MKCONFIG) -n $@ -a pdnb3 arm ixp pdnb3 prodrive |
812 | 812 | ||
813 | ######################################################################### | 813 | ######################################################################### |
814 | ## ARM1136 Systems | 814 | ## ARM1136 Systems |
815 | ######################################################################### | 815 | ######################################################################### |
816 | 816 | ||
817 | apollon_config : unconfig | 817 | apollon_config : unconfig |
818 | @mkdir -p $(obj)include | 818 | @mkdir -p $(obj)include |
819 | @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h | 819 | @echo "#define CONFIG_ONENAND_U_BOOT" > $(obj)include/config.h |
820 | @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk | 820 | @echo "CONFIG_ONENAND_U_BOOT = y" >> $(obj)include/config.mk |
821 | @$(MKCONFIG) $@ arm arm1136 apollon - omap24xx | 821 | @$(MKCONFIG) $@ arm arm1136 apollon - omap24xx |
822 | 822 | ||
823 | ######################################################################### | 823 | ######################################################################### |
824 | ## ARM1176 Systems | 824 | ## ARM1176 Systems |
825 | ######################################################################### | 825 | ######################################################################### |
826 | smdk6400_noUSB_config \ | 826 | smdk6400_noUSB_config \ |
827 | smdk6400_config : unconfig | 827 | smdk6400_config : unconfig |
828 | @mkdir -p $(obj)include $(obj)board/samsung/smdk6400 | 828 | @mkdir -p $(obj)include $(obj)board/samsung/smdk6400 |
829 | @mkdir -p $(obj)nand_spl/board/samsung/smdk6400 | 829 | @mkdir -p $(obj)nand_spl/board/samsung/smdk6400 |
830 | @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h | 830 | @echo "#define CONFIG_NAND_U_BOOT" > $(obj)include/config.h |
831 | @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk | 831 | @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk |
832 | @if [ -z "$(findstring smdk6400_noUSB_config,$@)" ]; then \ | 832 | @if [ -z "$(findstring smdk6400_noUSB_config,$@)" ]; then \ |
833 | echo "RAM_TEXT = 0x57e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\ | 833 | echo "RAM_TEXT = 0x57e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\ |
834 | else \ | 834 | else \ |
835 | echo "RAM_TEXT = 0xc7e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\ | 835 | echo "RAM_TEXT = 0xc7e00000" >> $(obj)board/samsung/smdk6400/config.tmp;\ |
836 | fi | 836 | fi |
837 | @$(MKCONFIG) smdk6400 arm arm1176 smdk6400 samsung s3c64xx | 837 | @$(MKCONFIG) smdk6400 arm arm1176 smdk6400 samsung s3c64xx |
838 | @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk | 838 | @echo "CONFIG_NAND_U_BOOT = y" >> $(obj)include/config.mk |
839 | 839 | ||
840 | ######################################################################### | 840 | ######################################################################### |
841 | ######################################################################### | 841 | ######################################################################### |
842 | 842 | ||
843 | clean: | 843 | clean: |
844 | @rm -f $(obj)examples/standalone/82559_eeprom \ | 844 | @rm -f $(obj)examples/standalone/82559_eeprom \ |
845 | $(obj)examples/standalone/atmel_df_pow2 \ | 845 | $(obj)examples/standalone/atmel_df_pow2 \ |
846 | $(obj)examples/standalone/eepro100_eeprom \ | 846 | $(obj)examples/standalone/eepro100_eeprom \ |
847 | $(obj)examples/standalone/hello_world \ | 847 | $(obj)examples/standalone/hello_world \ |
848 | $(obj)examples/standalone/interrupt \ | 848 | $(obj)examples/standalone/interrupt \ |
849 | $(obj)examples/standalone/mem_to_mem_idma2intr \ | 849 | $(obj)examples/standalone/mem_to_mem_idma2intr \ |
850 | $(obj)examples/standalone/sched \ | 850 | $(obj)examples/standalone/sched \ |
851 | $(obj)examples/standalone/smc911{11,x}_eeprom \ | 851 | $(obj)examples/standalone/smc911{11,x}_eeprom \ |
852 | $(obj)examples/standalone/test_burst \ | 852 | $(obj)examples/standalone/test_burst \ |
853 | $(obj)examples/standalone/timer | 853 | $(obj)examples/standalone/timer |
854 | @rm -f $(obj)examples/api/demo{,.bin} | 854 | @rm -f $(obj)examples/api/demo{,.bin} |
855 | @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \ | 855 | @rm -f $(obj)tools/bmp_logo $(obj)tools/easylogo/easylogo \ |
856 | $(obj)tools/env/{fw_printenv,fw_setenv} \ | 856 | $(obj)tools/env/{fw_printenv,fw_setenv} \ |
857 | $(obj)tools/envcrc \ | 857 | $(obj)tools/envcrc \ |
858 | $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ | 858 | $(obj)tools/gdb/{astest,gdbcont,gdbsend} \ |
859 | $(obj)tools/gen_eth_addr $(obj)tools/img2srec \ | 859 | $(obj)tools/gen_eth_addr $(obj)tools/img2srec \ |
860 | $(obj)tools/mkimage $(obj)tools/mpc86x_clk \ | 860 | $(obj)tools/mkimage $(obj)tools/mpc86x_clk \ |
861 | $(obj)tools/ncb $(obj)tools/ubsha1 | 861 | $(obj)tools/ncb $(obj)tools/ubsha1 |
862 | @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ | 862 | @rm -f $(obj)board/cray/L1/{bootscript.c,bootscript.image} \ |
863 | $(obj)board/matrix_vision/*/bootscript.img \ | 863 | $(obj)board/matrix_vision/*/bootscript.img \ |
864 | $(obj)board/voiceblue/eeprom \ | 864 | $(obj)board/voiceblue/eeprom \ |
865 | $(obj)u-boot.lds \ | 865 | $(obj)u-boot.lds \ |
866 | $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ | 866 | $(obj)arch/blackfin/cpu/bootrom-asm-offsets.[chs] \ |
867 | $(obj)arch/blackfin/cpu/init.{lds,elf} | 867 | $(obj)arch/blackfin/cpu/init.{lds,elf} |
868 | @rm -f $(obj)include/bmp_logo.h | 868 | @rm -f $(obj)include/bmp_logo.h |
869 | @rm -f $(obj)lib/asm-offsets.s | 869 | @rm -f $(obj)lib/asm-offsets.s |
870 | @rm -f $(obj)include/generated/asm-offsets.h | 870 | @rm -f $(obj)include/generated/asm-offsets.h |
871 | @rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s | 871 | @rm -f $(obj)$(CPUDIR)/$(SOC)/asm-offsets.s |
872 | @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} | 872 | @rm -f $(obj)nand_spl/{u-boot.lds,u-boot-nand_spl.lds,u-boot-spl,u-boot-spl.map,System.map} |
873 | @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map} | 873 | @rm -f $(obj)onenand_ipl/onenand-{ipl,ipl.bin,ipl.map} |
874 | @rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin} | 874 | @rm -f $(obj)mmc_spl/{u-boot.lds,u-boot-spl,u-boot-spl.map,u-boot-spl.bin,u-boot-mmc-spl.bin} |
875 | @rm -f $(ONENAND_BIN) | 875 | @rm -f $(ONENAND_BIN) |
876 | @rm -f $(obj)onenand_ipl/u-boot.lds | 876 | @rm -f $(obj)onenand_ipl/u-boot.lds |
877 | @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.lds,u-boot-spl.map} | 877 | @rm -f $(obj)spl/{u-boot-spl,u-boot-spl.bin,u-boot-spl.lds,u-boot-spl.map} |
878 | @rm -f $(obj)MLO | 878 | @rm -f $(obj)MLO |
879 | @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) | 879 | @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) |
880 | @find $(OBJTREE) -type f \ | 880 | @find $(OBJTREE) -type f \ |
881 | \( -name 'core' -o -name '*.bak' -o -name '*~' \ | 881 | \( -name 'core' -o -name '*.bak' -o -name '*~' \ |
882 | -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \ | 882 | -o -name '*.o' -o -name '*.a' -o -name '*.exe' \) -print \ |
883 | | xargs rm -f | 883 | | xargs rm -f |
884 | 884 | ||
885 | clobber: clean | 885 | clobber: clean |
886 | @find $(OBJTREE) -type f \( -name '*.depend*' \ | 886 | @find $(OBJTREE) -type f \( -name '*.depend*' \ |
887 | -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \ | 887 | -o -name '*.srec' -o -name '*.bin' -o -name u-boot.img \) \ |
888 | -print0 \ | 888 | -print0 \ |
889 | | xargs -0 rm -f | 889 | | xargs -0 rm -f |
890 | @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ | 890 | @rm -f $(OBJS) $(obj)*.bak $(obj)ctags $(obj)etags $(obj)TAGS \ |
891 | $(obj)cscope.* $(obj)*.*~ | 891 | $(obj)cscope.* $(obj)*.*~ |
892 | @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) | 892 | @rm -f $(obj)u-boot $(obj)u-boot.map $(obj)u-boot.hex $(ALL-y) |
893 | @rm -f $(obj)u-boot.kwb | 893 | @rm -f $(obj)u-boot.kwb |
894 | @rm -f $(obj)u-boot.imx | 894 | @rm -f $(obj)u-boot.imx |
895 | @rm -f $(obj)u-boot.ubl | 895 | @rm -f $(obj)u-boot.ubl |
896 | @rm -f $(obj)u-boot.dtb | 896 | @rm -f $(obj)u-boot.dtb |
897 | @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} | 897 | @rm -f $(obj)tools/{env/crc32.c,inca-swap-bytes} |
898 | @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c | 898 | @rm -f $(obj)arch/powerpc/cpu/mpc824x/bedbug_603e.c |
899 | @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm | 899 | @rm -fr $(obj)include/asm/proc $(obj)include/asm/arch $(obj)include/asm |
900 | @rm -fr $(obj)include/generated | 900 | @rm -fr $(obj)include/generated |
901 | @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f | 901 | @[ ! -d $(obj)nand_spl ] || find $(obj)nand_spl -name "*" -type l -print | xargs rm -f |
902 | @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f | 902 | @[ ! -d $(obj)onenand_ipl ] || find $(obj)onenand_ipl -name "*" -type l -print | xargs rm -f |
903 | @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l -print | xargs rm -f | 903 | @[ ! -d $(obj)mmc_spl ] || find $(obj)mmc_spl -name "*" -type l -print | xargs rm -f |
904 | @rm -f $(obj)dts/*.tmp | 904 | @rm -f $(obj)dts/*.tmp |
905 | 905 | ||
906 | mrproper \ | 906 | mrproper \ |
907 | distclean: clobber unconfig | 907 | distclean: clobber unconfig |
908 | ifneq ($(OBJTREE),$(SRCTREE)) | 908 | ifneq ($(OBJTREE),$(SRCTREE)) |
909 | rm -rf $(obj)* | 909 | rm -rf $(obj)* |
910 | endif | 910 | endif |
911 | 911 | ||
912 | backup: | 912 | backup: |
913 | F=`basename $(TOPDIR)` ; cd .. ; \ | 913 | F=`basename $(TOPDIR)` ; cd .. ; \ |
914 | gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F | 914 | gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F |
915 | 915 | ||
916 | ######################################################################### | 916 | ######################################################################### |
917 | 917 |
arch/arm/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2000-2002 | 2 | # (C) Copyright 2000-2002 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | CROSS_COMPILE ?= arm-linux- | 24 | CROSS_COMPILE ?= arm-linux- |
25 | 25 | ||
26 | ifndef CONFIG_STANDALONE_LOAD_ADDR | 26 | ifndef CONFIG_STANDALONE_LOAD_ADDR |
27 | ifeq ($(SOC),omap3) | 27 | ifeq ($(SOC),omap3) |
28 | CONFIG_STANDALONE_LOAD_ADDR = 0x80300000 | 28 | CONFIG_STANDALONE_LOAD_ADDR = 0x80300000 |
29 | else | 29 | else |
30 | CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 | 30 | CONFIG_STANDALONE_LOAD_ADDR = 0xc100000 |
31 | endif | 31 | endif |
32 | endif | 32 | endif |
33 | 33 | ||
34 | PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ | 34 | PLATFORM_CPPFLAGS += -DCONFIG_ARM -D__ARM__ |
35 | 35 | ||
36 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: | 36 | # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb: |
37 | PLATFORM_CPPFLAGS += $(call cc-option,-marm,) | 37 | PF_CPPFLAGS_ARM := $(call cc-option,-marm,) |
38 | 38 | ||
39 | # Try if EABI is supported, else fall back to old API, | 39 | # Try if EABI is supported, else fall back to old API, |
40 | # i. e. for example: | 40 | # i. e. for example: |
41 | # - with ELDK 4.2 (EABI supported), use: | 41 | # - with ELDK 4.2 (EABI supported), use: |
42 | # -mabi=aapcs-linux -mno-thumb-interwork | 42 | # -mabi=aapcs-linux -mno-thumb-interwork |
43 | # - with ELDK 4.1 (gcc 4.x, no EABI), use: | 43 | # - with ELDK 4.1 (gcc 4.x, no EABI), use: |
44 | # -mabi=apcs-gnu -mno-thumb-interwork | 44 | # -mabi=apcs-gnu -mno-thumb-interwork |
45 | # - with ELDK 3.1 (gcc 3.x), use: | 45 | # - with ELDK 3.1 (gcc 3.x), use: |
46 | # -mapcs-32 -mno-thumb-interwork | 46 | # -mapcs-32 -mno-thumb-interwork |
47 | PLATFORM_CPPFLAGS += $(call cc-option,\ | 47 | PF_CPPFLAGS_ABI := $(call cc-option,\ |
48 | -mabi=aapcs-linux -mno-thumb-interwork,\ | 48 | -mabi=aapcs-linux -mno-thumb-interwork,\ |
49 | $(call cc-option,\ | ||
50 | -mapcs-32,\ | ||
49 | $(call cc-option,\ | 51 | $(call cc-option,\ |
50 | -mapcs-32,\ | 52 | -mabi=apcs-gnu,\ |
51 | $(call cc-option,\ | 53 | )\ |
52 | -mabi=apcs-gnu,\ | 54 | ) $(call cc-option,-mno-thumb-interwork,)\ |
53 | )\ | 55 | ) |
54 | ) $(call cc-option,-mno-thumb-interwork,)\ | 56 | PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_ARM) $(PF_CPPFLAGS_ABI) |
55 | ) | ||
56 | 57 | ||
57 | # For EABI, make sure to provide raise() | 58 | # For EABI, make sure to provide raise() |
58 | ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) | 59 | ifneq (,$(findstring -mabi=aapcs-linux,$(PLATFORM_CPPFLAGS))) |
59 | # This file is parsed many times, so the string may get added multiple | 60 | # This file is parsed many times, so the string may get added multiple |
60 | # times. Also, the prefix needs to be different based on whether | 61 | # times. Also, the prefix needs to be different based on whether |
61 | # CONFIG_SPL_BUILD is defined or not. 'filter-out' the existing entry | 62 | # CONFIG_SPL_BUILD is defined or not. 'filter-out' the existing entry |
62 | # before adding the correct one. | 63 | # before adding the correct one. |
63 | ifdef CONFIG_SPL_BUILD | 64 | ifdef CONFIG_SPL_BUILD |
64 | PLATFORM_LIBS := $(SPLTREE)/arch/arm/lib/eabi_compat.o \ | 65 | PLATFORM_LIBS := $(SPLTREE)/arch/arm/lib/eabi_compat.o \ |
65 | $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) | 66 | $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) |
66 | else | 67 | else |
67 | PLATFORM_LIBS := $(OBJTREE)/arch/arm/lib/eabi_compat.o \ | 68 | PLATFORM_LIBS := $(OBJTREE)/arch/arm/lib/eabi_compat.o \ |
68 | $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) | 69 | $(filter-out %/arch/arm/lib/eabi_compat.o, $(PLATFORM_LIBS)) |
69 | endif | 70 | endif |
70 | endif | 71 | endif |
71 | 72 | ||
72 | ifdef CONFIG_SYS_LDSCRIPT | 73 | ifdef CONFIG_SYS_LDSCRIPT |
73 | # need to strip off double quotes | 74 | # need to strip off double quotes |
74 | LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) | 75 | LDSCRIPT := $(subst ",,$(CONFIG_SYS_LDSCRIPT)) |
75 | else | 76 | else |
76 | LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds | 77 | LDSCRIPT := $(SRCTREE)/$(CPUDIR)/u-boot.lds |
77 | endif | 78 | endif |
78 | 79 | ||
79 | # needed for relocation | 80 | # needed for relocation |
80 | ifndef CONFIG_NAND_SPL | 81 | ifndef CONFIG_NAND_SPL |
81 | LDFLAGS_u-boot += -pie | 82 | LDFLAGS_u-boot += -pie |
82 | endif | 83 | endif |
arch/arm/cpu/arm1136/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
24 | 24 | ||
25 | # Make ARMv5 to allow more compilers to work, even though its v6. | 25 | # Make ARMv5 to allow more compilers to work, even though its v6. |
26 | PLATFORM_CPPFLAGS += -march=armv5 | 26 | PLATFORM_CPPFLAGS += -march=armv5 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/arm1176/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
24 | 24 | ||
25 | # Make ARMv5 to allow more compilers to work, even though its v6. | 25 | # Make ARMv5 to allow more compilers to work, even though its v6. |
26 | PLATFORM_CPPFLAGS += -march=armv5t | 26 | PLATFORM_CPPFLAGS += -march=armv5t |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,\ |
33 | $(call cc-option,-malignment-traps,)) | ||
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 35 |
arch/arm/cpu/arm1176/s3c64xx/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
24 | 24 | ||
25 | # Make ARMv5 to allow more compilers to work, even though its v6. | 25 | # Make ARMv5 to allow more compilers to work, even though its v6. |
26 | PLATFORM_CPPFLAGS += -march=armv5t | 26 | PLATFORM_CPPFLAGS += -march=armv5t |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,\ |
33 | $(call cc-option,-malignment-traps,)) | ||
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 35 |
arch/arm/cpu/arm720t/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> | 3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
4 | # Marius Groeger <mgroeger@sysgo.de> | 4 | # Marius Groeger <mgroeger@sysgo.de> |
5 | # | 5 | # |
6 | # See file CREDITS for list of people who contributed to this | 6 | # See file CREDITS for list of people who contributed to this |
7 | # project. | 7 | # project. |
8 | # | 8 | # |
9 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
10 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
11 | # published by the Free Software Foundation; either version 2 of | 11 | # published by the Free Software Foundation; either version 2 of |
12 | # the License, or (at your option) any later version. | 12 | # the License, or (at your option) any later version. |
13 | # | 13 | # |
14 | # This program is distributed in the hope that it will be useful, | 14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
18 | # | 18 | # |
19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software | 20 | # along with this program; if not, write to the Free Software |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 | # MA 02111-1307 USA | 22 | # MA 02111-1307 USA |
23 | # | 23 | # |
24 | 24 | ||
25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
26 | 26 | ||
27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi | 27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi |
28 | # ========================================================================= | 28 | # ========================================================================= |
29 | # | 29 | # |
30 | # Supply options according to compiler version | 30 | # Supply options according to compiler version |
31 | # | 31 | # |
32 | # ========================================================================= | 32 | # ========================================================================= |
33 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 33 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,\ |
34 | $(call cc-option,-malignment-traps,)) | ||
35 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
34 | 36 |
arch/arm/cpu/arm920t/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv4 | 26 | PLATFORM_CPPFLAGS += -march=armv4 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/arm925t/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv4 | 26 | PLATFORM_CPPFLAGS += -march=armv4 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/arm926ejs/at91/config.mk
1 | PLATFORM_CPPFLAGS += $(call cc-option,-mtune=arm926ejs,) | 1 | PF_CPPFLAGS_TUNE := $(call cc-option,-mtune=arm926ejs,) |
2 | PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_TUNE) | ||
2 | 3 |
arch/arm/cpu/arm926ejs/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv5te | 26 | PLATFORM_CPPFLAGS += -march=armv5te |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/arm946es/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv4 | 26 | PLATFORM_CPPFLAGS += -march=armv4 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/arm_intcm/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv4 | 26 | PLATFORM_CPPFLAGS += -march=armv4 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/armv7/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
24 | 24 | ||
25 | # Make ARMv5 to allow more compilers to work, even though its v7a. | 25 | # Make ARMv5 to allow more compilers to work, even though its v7a. |
26 | PLATFORM_CPPFLAGS += -march=armv5 | 26 | PLATFORM_CPPFLAGS += -march=armv5 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | $(call cc-option,-malignment-traps,)) | 33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) |
34 | 34 |
arch/arm/cpu/armv7/omap-common/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 23 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
24 | 24 | ||
25 | # Make ARMv5 to allow more compilers to work, even though its v7a. | 25 | # Make ARMv5 to allow more compilers to work, even though its v7a. |
26 | PLATFORM_CPPFLAGS += -march=armv5 | 26 | PLATFORM_CPPFLAGS += -march=armv5 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ========================================================================= | 31 | # ========================================================================= |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,\ | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,\ |
33 | $(call cc-option,-malignment-traps,)) | 33 | $(call cc-option,-malignment-traps,)) |
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
34 | 35 |
arch/arm/cpu/ixp/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> | 3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
4 | # Marius Groeger <mgroeger@sysgo.de> | 4 | # Marius Groeger <mgroeger@sysgo.de> |
5 | # | 5 | # |
6 | # See file CREDITS for list of people who contributed to this | 6 | # See file CREDITS for list of people who contributed to this |
7 | # project. | 7 | # project. |
8 | # | 8 | # |
9 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
10 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
11 | # published by the Free Software Foundation; either version 2 of | 11 | # published by the Free Software Foundation; either version 2 of |
12 | # the License, or (at your option) any later version. | 12 | # the License, or (at your option) any later version. |
13 | # | 13 | # |
14 | # This program is distributed in the hope that it will be useful, | 14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
18 | # | 18 | # |
19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software | 20 | # along with this program; if not, write to the Free Software |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 | # MA 02111-1307 USA | 22 | # MA 02111-1307 USA |
23 | # | 23 | # |
24 | 24 | ||
25 | BIG_ENDIAN = y | 25 | BIG_ENDIAN = y |
26 | 26 | ||
27 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian | 27 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float -mbig-endian |
28 | 28 | ||
29 | PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 | 29 | PLATFORM_CPPFLAGS += -mbig-endian -march=armv5te -mtune=strongarm1100 |
30 | 30 | ||
31 | # -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error | 31 | # -fdata-sections triggers "section .bss overlaps section .rel.dyn" linker error |
32 | PLATFORM_RELFLAGS += -ffunction-sections | 32 | PLATFORM_RELFLAGS += -ffunction-sections |
33 | LDFLAGS_u-boot += --gc-sections | 33 | LDFLAGS_u-boot += --gc-sections |
34 | 34 | ||
35 | # ========================================================================= | 35 | # ========================================================================= |
36 | # | 36 | # |
37 | # Supply options according to compiler version | 37 | # Supply options according to compiler version |
38 | # | 38 | # |
39 | # ========================================================================= | 39 | # ========================================================================= |
40 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 40 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
41 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
41 | 42 |
arch/arm/cpu/lh7a40x/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> | 3 | # Gary Jennejohn, DENX Software Engineering, <garyj@denx.de> |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 24 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -march=armv4 | 26 | PLATFORM_CPPFLAGS += -march=armv4 |
27 | # ========================================================================= | 27 | # ========================================================================= |
28 | # | 28 | # |
29 | # Supply options according to compiler version | 29 | # Supply options according to compiler version |
30 | # | 30 | # |
31 | # ======================================================================== | 31 | # ======================================================================== |
32 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 32 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
33 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
33 | 34 |
arch/arm/cpu/pxa/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> | 3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
4 | # Marius Groeger <mgroeger@sysgo.de> | 4 | # Marius Groeger <mgroeger@sysgo.de> |
5 | # | 5 | # |
6 | # See file CREDITS for list of people who contributed to this | 6 | # See file CREDITS for list of people who contributed to this |
7 | # project. | 7 | # project. |
8 | # | 8 | # |
9 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
10 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
11 | # published by the Free Software Foundation; either version 2 of | 11 | # published by the Free Software Foundation; either version 2 of |
12 | # the License, or (at your option) any later version. | 12 | # the License, or (at your option) any later version. |
13 | # | 13 | # |
14 | # This program is distributed in the hope that it will be useful, | 14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
18 | # | 18 | # |
19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software | 20 | # along with this program; if not, write to the Free Software |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 | # MA 02111-1307 USA | 22 | # MA 02111-1307 USA |
23 | # | 23 | # |
24 | 24 | ||
25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
26 | 26 | ||
27 | PLATFORM_CPPFLAGS += -march=armv5te -mtune=xscale | 27 | PLATFORM_CPPFLAGS += -march=armv5te -mtune=xscale |
28 | # ========================================================================= | 28 | # ========================================================================= |
29 | # | 29 | # |
30 | # Supply options according to compiler version | 30 | # Supply options according to compiler version |
31 | # | 31 | # |
32 | # ======================================================================== | 32 | # ======================================================================== |
33 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 33 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
34 | 35 |
arch/arm/cpu/s3c44b0/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> | 3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
4 | # Marius Groeger <mgroeger@sysgo.de> | 4 | # Marius Groeger <mgroeger@sysgo.de> |
5 | # | 5 | # |
6 | # See file CREDITS for list of people who contributed to this | 6 | # See file CREDITS for list of people who contributed to this |
7 | # project. | 7 | # project. |
8 | # | 8 | # |
9 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
10 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
11 | # published by the Free Software Foundation; either version 2 of | 11 | # published by the Free Software Foundation; either version 2 of |
12 | # the License, or (at your option) any later version. | 12 | # the License, or (at your option) any later version. |
13 | # | 13 | # |
14 | # This program is distributed in the hope that it will be useful, | 14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
18 | # | 18 | # |
19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software | 20 | # along with this program; if not, write to the Free Software |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 | # MA 02111-1307 USA | 22 | # MA 02111-1307 USA |
23 | # | 23 | # |
24 | 24 | ||
25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
26 | 26 | ||
27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi -msoft-float | 27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=arm7tdmi -msoft-float |
28 | # ========================================================================= | 28 | # ========================================================================= |
29 | # | 29 | # |
30 | # Supply options according to compiler version | 30 | # Supply options according to compiler version |
31 | # | 31 | # |
32 | # ======================================================================== | 32 | # ======================================================================== |
33 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 33 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
34 | 35 |
arch/arm/cpu/sa1100/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002 | 2 | # (C) Copyright 2002 |
3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> | 3 | # Sysgo Real-Time Solutions, GmbH <www.elinos.com> |
4 | # Marius Groeger <mgroeger@sysgo.de> | 4 | # Marius Groeger <mgroeger@sysgo.de> |
5 | # | 5 | # |
6 | # See file CREDITS for list of people who contributed to this | 6 | # See file CREDITS for list of people who contributed to this |
7 | # project. | 7 | # project. |
8 | # | 8 | # |
9 | # This program is free software; you can redistribute it and/or | 9 | # This program is free software; you can redistribute it and/or |
10 | # modify it under the terms of the GNU General Public License as | 10 | # modify it under the terms of the GNU General Public License as |
11 | # published by the Free Software Foundation; either version 2 of | 11 | # published by the Free Software Foundation; either version 2 of |
12 | # the License, or (at your option) any later version. | 12 | # the License, or (at your option) any later version. |
13 | # | 13 | # |
14 | # This program is distributed in the hope that it will be useful, | 14 | # This program is distributed in the hope that it will be useful, |
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
17 | # GNU General Public License for more details. | 17 | # GNU General Public License for more details. |
18 | # | 18 | # |
19 | # You should have received a copy of the GNU General Public License | 19 | # You should have received a copy of the GNU General Public License |
20 | # along with this program; if not, write to the Free Software | 20 | # along with this program; if not, write to the Free Software |
21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 21 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
22 | # MA 02111-1307 USA | 22 | # MA 02111-1307 USA |
23 | # | 23 | # |
24 | 24 | ||
25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float | 25 | PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float |
26 | 26 | ||
27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=strongarm1100 | 27 | PLATFORM_CPPFLAGS += -march=armv4 -mtune=strongarm1100 |
28 | # ========================================================================= | 28 | # ========================================================================= |
29 | # | 29 | # |
30 | # Supply options according to compiler version | 30 | # Supply options according to compiler version |
31 | # | 31 | # |
32 | # ======================================================================== | 32 | # ======================================================================== |
33 | PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) | 33 | PF_RELFLAGS_SLB_AT := $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) |
34 | PLATFORM_RELFLAGS += $(PF_RELFLAGS_SLB_AT) | ||
34 | 35 |
arch/powerpc/cpu/mpc824x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2006 | 2 | # (C) Copyright 2000-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | include $(TOPDIR)/config.mk | 24 | include $(TOPDIR)/config.mk |
25 | ifneq ($(OBJTREE),$(SRCTREE)) | 25 | ifneq ($(OBJTREE),$(SRCTREE)) |
26 | $(shell mkdir -p $(obj)drivers/epic) | 26 | $(shell mkdir -p $(obj)drivers/epic $(obj)drivers/i2c) |
27 | $(shell mkdir -p $(obj)drivers/i2c) | ||
28 | endif | 27 | endif |
29 | 28 | ||
30 | LIB = $(obj)lib$(CPU).o | 29 | LIB = $(obj)lib$(CPU).o |
31 | 30 | ||
32 | START = start.o | 31 | START = start.o |
33 | COBJS = traps.o cpu.o cpu_init.o interrupts.o speed.o \ | 32 | COBJS = traps.o cpu.o cpu_init.o interrupts.o speed.o \ |
34 | drivers/epic/epic1.o drivers/i2c/i2c.o pci.o | 33 | drivers/epic/epic1.o drivers/i2c/i2c.o pci.o |
35 | COBJS_LN = bedbug_603e.o | 34 | COBJS_LN = bedbug_603e.o |
36 | 35 | ||
37 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN:.o=.c)) | 36 | SRCS := $(START:.o=.S) $(SOBJS:.o=.S) $(COBJS:.o=.c) $(addprefix $(obj),$(COBJS_LN:.o=.c)) |
38 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN)) | 37 | OBJS := $(addprefix $(obj),$(SOBJS) $(COBJS) $(COBJS_LN)) |
39 | START := $(addprefix $(obj),$(START)) | 38 | START := $(addprefix $(obj),$(START)) |
40 | 39 | ||
41 | all: $(obj).depend $(START) $(LIB) | 40 | all: $(obj).depend $(START) $(LIB) |
42 | 41 | ||
43 | $(LIB): $(OBJS) | 42 | $(LIB): $(OBJS) |
44 | $(call cmd_link_o_target, $(OBJS)) | 43 | $(call cmd_link_o_target, $(OBJS)) |
45 | 44 | ||
46 | $(obj)bedbug_603e.c: | 45 | $(obj)bedbug_603e.c: |
47 | ln -sf $(src)../mpc8260/bedbug_603e.c $(obj)bedbug_603e.c | 46 | ln -sf $(src)../mpc8260/bedbug_603e.c $(obj)bedbug_603e.c |
48 | 47 | ||
49 | ######################################################################### | 48 | ######################################################################### |
50 | 49 | ||
51 | # defines $(obj).depend target | 50 | # defines $(obj).depend target |
52 | include $(SRCTREE)/rules.mk | 51 | include $(SRCTREE)/rules.mk |
53 | 52 | ||
54 | sinclude $(obj).depend | 53 | sinclude $(obj).depend |
55 | 54 | ||
56 | ######################################################################### | 55 | ######################################################################### |
57 | 56 |
arch/powerpc/cpu/mpc85xx/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2002,2003 Motorola Inc. | 2 | # (C) Copyright 2002,2003 Motorola Inc. |
3 | # Xianghua Xiao, X.Xiao@motorola.com | 3 | # Xianghua Xiao, X.Xiao@motorola.com |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | PLATFORM_RELFLAGS += -meabi | 24 | PLATFORM_RELFLAGS += -meabi |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string | 26 | PLATFORM_CPPFLAGS += -ffixed-r2 -Wa,-me500 -msoft-float -mno-string |
27 | 27 | ||
28 | # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC; | 28 | # -mspe=yes is needed to have -mno-spe accepted by a buggy GCC; |
29 | # see "[PATCH,rs6000] make -mno-spe work as expected" on | 29 | # see "[PATCH,rs6000] make -mno-spe work as expected" on |
30 | # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html | 30 | # http://gcc.gnu.org/ml/gcc-patches/2008-04/msg00311.html |
31 | PLATFORM_CPPFLAGS +=$(call cc-option,-mspe=yes) | 31 | PF_CPPFLAGS_SPE := $(call cc-option,-mspe=yes) \ |
32 | PLATFORM_CPPFLAGS +=$(call cc-option,-mno-spe) | 32 | $(call cc-option,-mno-spe) |
33 | PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_SPE) | ||
33 | 34 |
arch/x86/config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2000-2002 | 2 | # (C) Copyright 2000-2002 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 | 24 | CONFIG_STANDALONE_LOAD_ADDR ?= 0x40000 |
25 | 25 | ||
26 | PLATFORM_CPPFLAGS += -fno-strict-aliasing | 26 | PLATFORM_CPPFLAGS += -fno-strict-aliasing |
27 | PLATFORM_CPPFLAGS += -Wstrict-prototypes | 27 | PLATFORM_CPPFLAGS += -Wstrict-prototypes |
28 | PLATFORM_CPPFLAGS += -mregparm=3 | 28 | PLATFORM_CPPFLAGS += -mregparm=3 |
29 | PLATFORM_CPPFLAGS += -fomit-frame-pointer | 29 | PLATFORM_CPPFLAGS += -fomit-frame-pointer |
30 | PLATFORM_CPPFLAGS += $(call cc-option, -ffreestanding) | 30 | PF_CPPFLAGS_X86 := $(call cc-option, -ffreestanding) \ |
31 | PLATFORM_CPPFLAGS += $(call cc-option, -fno-toplevel-reorder, $(call cc-option, -fno-unit-at-a-time)) | 31 | $(call cc-option, -fno-toplevel-reorder, \ |
32 | PLATFORM_CPPFLAGS += $(call cc-option, -fno-stack-protector) | 32 | $(call cc-option, -fno-unit-at-a-time)) \ |
33 | PLATFORM_CPPFLAGS += $(call cc-option, -mpreferred-stack-boundary=2) | 33 | $(call cc-option, -fno-stack-protector) \ |
34 | $(call cc-option, -mpreferred-stack-boundary=2) | ||
35 | PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) | ||
34 | PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm | 36 | PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm |
35 | PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 | 37 | PLATFORM_CPPFLAGS += -DREALMODE_BASE=0x7c0 |
36 | 38 | ||
37 | PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden | 39 | PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden |
38 | 40 | ||
39 | PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions | 41 | PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions |
40 | 42 | ||
41 | LDFLAGS_FINAL += --gc-sections -pie | 43 | LDFLAGS_FINAL += --gc-sections -pie |
42 | 44 |
board/siemens/SCM/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2001-2006 | 2 | # (C) Copyright 2001-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | include $(TOPDIR)/config.mk | 24 | include $(TOPDIR)/config.mk |
25 | 25 | ||
26 | ifneq ($(OBJTREE),$(SRCTREE)) | 26 | ifneq ($(OBJTREE),$(SRCTREE)) |
27 | $(shell mkdir -p $(obj)../common) | 27 | $(shell mkdir -p $(obj)../common $(obj)../../tqc/tqm8xx) |
28 | $(shell mkdir -p $(obj)../../tqc/tqm8xx) | ||
29 | endif | 28 | endif |
30 | 29 | ||
31 | LIB = $(obj)lib$(BOARD).o | 30 | LIB = $(obj)lib$(BOARD).o |
32 | 31 | ||
33 | COBJS = scm.o flash.o fpga_scm.o ../common/fpga.o \ | 32 | COBJS = scm.o flash.o fpga_scm.o ../common/fpga.o \ |
34 | ../../tqc/tqm8xx/load_sernum_ethaddr.o | 33 | ../../tqc/tqm8xx/load_sernum_ethaddr.o |
35 | 34 | ||
36 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) | 35 | SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) |
37 | OBJS := $(addprefix $(obj),$(COBJS)) | 36 | OBJS := $(addprefix $(obj),$(COBJS)) |
38 | SOBJS := $(addprefix $(obj),$(SOBJS)) | 37 | SOBJS := $(addprefix $(obj),$(SOBJS)) |
39 | 38 | ||
40 | $(LIB): $(OBJS) | 39 | $(LIB): $(OBJS) |
41 | $(call cmd_link_o_target, $(OBJS)) | 40 | $(call cmd_link_o_target, $(OBJS)) |
42 | 41 | ||
43 | ######################################################################### | 42 | ######################################################################### |
44 | 43 | ||
45 | # defines $(obj).depend target | 44 | # defines $(obj).depend target |
46 | include $(SRCTREE)/rules.mk | 45 | include $(SRCTREE)/rules.mk |
47 | 46 | ||
48 | sinclude $(obj).depend | 47 | sinclude $(obj).depend |
49 | 48 | ||
50 | ######################################################################### | 49 | ######################################################################### |
51 | 50 |
config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2000-2006 | 2 | # (C) Copyright 2000-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | ######################################################################### | 24 | ######################################################################### |
25 | 25 | ||
26 | ifeq ($(CURDIR),$(SRCTREE)) | 26 | ifeq ($(CURDIR),$(SRCTREE)) |
27 | dir := | 27 | dir := |
28 | else | 28 | else |
29 | dir := $(subst $(SRCTREE)/,,$(CURDIR)) | 29 | dir := $(subst $(SRCTREE)/,,$(CURDIR)) |
30 | endif | 30 | endif |
31 | 31 | ||
32 | ifneq ($(OBJTREE),$(SRCTREE)) | 32 | ifneq ($(OBJTREE),$(SRCTREE)) |
33 | # Create object files for SPL in a separate directory | 33 | # Create object files for SPL in a separate directory |
34 | ifeq ($(CONFIG_SPL_BUILD),y) | 34 | ifeq ($(CONFIG_SPL_BUILD),y) |
35 | obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) | 35 | obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) |
36 | else | 36 | else |
37 | obj := $(if $(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/) | 37 | obj := $(if $(dir),$(OBJTREE)/$(dir)/,$(OBJTREE)/) |
38 | endif | 38 | endif |
39 | src := $(if $(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/) | 39 | src := $(if $(dir),$(SRCTREE)/$(dir)/,$(SRCTREE)/) |
40 | 40 | ||
41 | $(shell mkdir -p $(obj)) | 41 | $(shell mkdir -p $(obj)) |
42 | else | 42 | else |
43 | # Create object files for SPL in a separate directory | 43 | # Create object files for SPL in a separate directory |
44 | ifeq ($(CONFIG_SPL_BUILD),y) | 44 | ifeq ($(CONFIG_SPL_BUILD),y) |
45 | obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) | 45 | obj := $(if $(dir),$(SPLTREE)/$(dir)/,$(SPLTREE)/) |
46 | 46 | ||
47 | $(shell mkdir -p $(obj)) | 47 | $(shell mkdir -p $(obj)) |
48 | else | 48 | else |
49 | obj := | 49 | obj := |
50 | endif | 50 | endif |
51 | src := | 51 | src := |
52 | endif | 52 | endif |
53 | 53 | ||
54 | # clean the slate ... | 54 | # clean the slate ... |
55 | PLATFORM_RELFLAGS = | 55 | PLATFORM_RELFLAGS = |
56 | PLATFORM_CPPFLAGS = | 56 | PLATFORM_CPPFLAGS = |
57 | PLATFORM_LDFLAGS = | 57 | PLATFORM_LDFLAGS = |
58 | 58 | ||
59 | ######################################################################### | 59 | ######################################################################### |
60 | 60 | ||
61 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \ | 61 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer \ |
62 | $(HOSTCPPFLAGS) | 62 | $(HOSTCPPFLAGS) |
63 | HOSTSTRIP = strip | 63 | HOSTSTRIP = strip |
64 | 64 | ||
65 | # | 65 | # |
66 | # Mac OS X / Darwin's C preprocessor is Apple specific. It | 66 | # Mac OS X / Darwin's C preprocessor is Apple specific. It |
67 | # generates numerous errors and warnings. We want to bypass it | 67 | # generates numerous errors and warnings. We want to bypass it |
68 | # and use GNU C's cpp. To do this we pass the -traditional-cpp | 68 | # and use GNU C's cpp. To do this we pass the -traditional-cpp |
69 | # option to the compiler. Note that the -traditional-cpp flag | 69 | # option to the compiler. Note that the -traditional-cpp flag |
70 | # DOES NOT have the same semantics as GNU C's flag, all it does | 70 | # DOES NOT have the same semantics as GNU C's flag, all it does |
71 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. | 71 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. |
72 | # | 72 | # |
73 | # Apple's linker is similar, thanks to the new 2 stage linking | 73 | # Apple's linker is similar, thanks to the new 2 stage linking |
74 | # multiple symbol definitions are treated as errors, hence the | 74 | # multiple symbol definitions are treated as errors, hence the |
75 | # -multiply_defined suppress option to turn off this error. | 75 | # -multiply_defined suppress option to turn off this error. |
76 | # | 76 | # |
77 | 77 | ||
78 | ifeq ($(HOSTOS),darwin) | 78 | ifeq ($(HOSTOS),darwin) |
79 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) | 79 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) |
80 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') | 80 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') |
81 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') | 81 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') |
82 | 82 | ||
83 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ | 83 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ |
84 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) | 84 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) |
85 | 85 | ||
86 | # Snow Leopards build environment has no longer restrictions as described above | 86 | # Snow Leopards build environment has no longer restrictions as described above |
87 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") | 87 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") |
88 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") | 88 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") |
89 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") | 89 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") |
90 | else | 90 | else |
91 | HOSTCC = gcc | 91 | HOSTCC = gcc |
92 | endif | 92 | endif |
93 | 93 | ||
94 | ifeq ($(HOSTOS),cygwin) | 94 | ifeq ($(HOSTOS),cygwin) |
95 | HOSTCFLAGS += -ansi | 95 | HOSTCFLAGS += -ansi |
96 | endif | 96 | endif |
97 | 97 | ||
98 | # We build some files with extra pedantic flags to try to minimize things | 98 | # We build some files with extra pedantic flags to try to minimize things |
99 | # that won't build on some weird host compiler -- though there are lots of | 99 | # that won't build on some weird host compiler -- though there are lots of |
100 | # exceptions for files that aren't complaint. | 100 | # exceptions for files that aren't complaint. |
101 | 101 | ||
102 | HOSTCFLAGS_NOPED = $(filter-out -pedantic,$(HOSTCFLAGS)) | 102 | HOSTCFLAGS_NOPED = $(filter-out -pedantic,$(HOSTCFLAGS)) |
103 | HOSTCFLAGS += -pedantic | 103 | HOSTCFLAGS += -pedantic |
104 | 104 | ||
105 | ######################################################################### | 105 | ######################################################################### |
106 | # | 106 | # |
107 | # Option checker (courtesy linux kernel) to ensure | 107 | # Option checker (courtesy linux kernel) to ensure |
108 | # only supported compiler options are used | 108 | # only supported compiler options are used |
109 | # | 109 | # |
110 | cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ | 110 | cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ |
111 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) | 111 | > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) |
112 | 112 | ||
113 | # | 113 | # |
114 | # Include the make variables (CC, etc...) | 114 | # Include the make variables (CC, etc...) |
115 | # | 115 | # |
116 | AS = $(CROSS_COMPILE)as | 116 | AS = $(CROSS_COMPILE)as |
117 | LD = $(CROSS_COMPILE)ld | 117 | LD = $(CROSS_COMPILE)ld |
118 | CC = $(CROSS_COMPILE)gcc | 118 | CC = $(CROSS_COMPILE)gcc |
119 | CPP = $(CC) -E | 119 | CPP = $(CC) -E |
120 | AR = $(CROSS_COMPILE)ar | 120 | AR = $(CROSS_COMPILE)ar |
121 | NM = $(CROSS_COMPILE)nm | 121 | NM = $(CROSS_COMPILE)nm |
122 | LDR = $(CROSS_COMPILE)ldr | 122 | LDR = $(CROSS_COMPILE)ldr |
123 | STRIP = $(CROSS_COMPILE)strip | 123 | STRIP = $(CROSS_COMPILE)strip |
124 | OBJCOPY = $(CROSS_COMPILE)objcopy | 124 | OBJCOPY = $(CROSS_COMPILE)objcopy |
125 | OBJDUMP = $(CROSS_COMPILE)objdump | 125 | OBJDUMP = $(CROSS_COMPILE)objdump |
126 | RANLIB = $(CROSS_COMPILE)RANLIB | 126 | RANLIB = $(CROSS_COMPILE)RANLIB |
127 | DTC = dtc | 127 | DTC = dtc |
128 | 128 | ||
129 | ######################################################################### | 129 | ######################################################################### |
130 | 130 | ||
131 | # Load generated board configuration | 131 | # Load generated board configuration |
132 | sinclude $(OBJTREE)/include/autoconf.mk | 132 | sinclude $(OBJTREE)/include/autoconf.mk |
133 | sinclude $(OBJTREE)/include/config.mk | 133 | sinclude $(OBJTREE)/include/config.mk |
134 | 134 | ||
135 | # Some architecture config.mk files need to know what CPUDIR is set to, | 135 | # Some architecture config.mk files need to know what CPUDIR is set to, |
136 | # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. | 136 | # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. |
137 | # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains | 137 | # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains |
138 | # CPU-specific code. | 138 | # CPU-specific code. |
139 | CPUDIR=arch/$(ARCH)/cpu/$(CPU) | 139 | CPUDIR=arch/$(ARCH)/cpu/$(CPU) |
140 | ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR))) | 140 | ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR))) |
141 | CPUDIR=arch/$(ARCH)/cpu | 141 | CPUDIR=arch/$(ARCH)/cpu |
142 | endif | 142 | endif |
143 | 143 | ||
144 | sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules | 144 | sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules |
145 | sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules | 145 | sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules |
146 | 146 | ||
147 | ifdef SOC | 147 | ifdef SOC |
148 | sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules | 148 | sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules |
149 | endif | 149 | endif |
150 | ifdef VENDOR | 150 | ifdef VENDOR |
151 | BOARDDIR = $(VENDOR)/$(BOARD) | 151 | BOARDDIR = $(VENDOR)/$(BOARD) |
152 | else | 152 | else |
153 | BOARDDIR = $(BOARD) | 153 | BOARDDIR = $(BOARD) |
154 | endif | 154 | endif |
155 | ifdef BOARD | 155 | ifdef BOARD |
156 | sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules | 156 | sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules |
157 | endif | 157 | endif |
158 | 158 | ||
159 | ######################################################################### | 159 | ######################################################################### |
160 | 160 | ||
161 | # We don't actually use $(ARFLAGS) anywhere anymore, so catch people | 161 | # We don't actually use $(ARFLAGS) anywhere anymore, so catch people |
162 | # who are porting old code to latest mainline but not updating $(AR). | 162 | # who are porting old code to latest mainline but not updating $(AR). |
163 | ARFLAGS = $(error update your Makefile to use cmd_link_o_target and not AR) | 163 | ARFLAGS = $(error update your Makefile to use cmd_link_o_target and not AR) |
164 | RELFLAGS= $(PLATFORM_RELFLAGS) | 164 | RELFLAGS= $(PLATFORM_RELFLAGS) |
165 | DBGFLAGS= -g # -DDEBUG | 165 | DBGFLAGS= -g # -DDEBUG |
166 | OPTFLAGS= -Os #-fomit-frame-pointer | 166 | OPTFLAGS= -Os #-fomit-frame-pointer |
167 | 167 | ||
168 | OBJCFLAGS += --gap-fill=0xff | 168 | OBJCFLAGS += --gap-fill=0xff |
169 | 169 | ||
170 | gccincdir := $(shell $(CC) -print-file-name=include) | 170 | gccincdir := $(shell $(CC) -print-file-name=include) |
171 | 171 | ||
172 | CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ | 172 | CPPFLAGS := $(DBGFLAGS) $(OPTFLAGS) $(RELFLAGS) \ |
173 | -D__KERNEL__ | 173 | -D__KERNEL__ |
174 | 174 | ||
175 | # Enable garbage collection of un-used sections for SPL | 175 | # Enable garbage collection of un-used sections for SPL |
176 | ifeq ($(CONFIG_SPL_BUILD),y) | 176 | ifeq ($(CONFIG_SPL_BUILD),y) |
177 | CPPFLAGS += -ffunction-sections -fdata-sections | 177 | CPPFLAGS += -ffunction-sections -fdata-sections |
178 | LDFLAGS_FINAL += --gc-sections | 178 | LDFLAGS_FINAL += --gc-sections |
179 | endif | 179 | endif |
180 | 180 | ||
181 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 181 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
182 | CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) | 182 | CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) |
183 | endif | 183 | endif |
184 | 184 | ||
185 | ifneq ($(CONFIG_SPL_TEXT_BASE),) | 185 | ifneq ($(CONFIG_SPL_TEXT_BASE),) |
186 | CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE) | 186 | CPPFLAGS += -DCONFIG_SPL_TEXT_BASE=$(CONFIG_SPL_TEXT_BASE) |
187 | endif | 187 | endif |
188 | 188 | ||
189 | ifeq ($(CONFIG_SPL_BUILD),y) | 189 | ifeq ($(CONFIG_SPL_BUILD),y) |
190 | CPPFLAGS += -DCONFIG_SPL_BUILD | 190 | CPPFLAGS += -DCONFIG_SPL_BUILD |
191 | endif | 191 | endif |
192 | 192 | ||
193 | ifneq ($(RESET_VECTOR_ADDRESS),) | 193 | ifneq ($(RESET_VECTOR_ADDRESS),) |
194 | CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS) | 194 | CPPFLAGS += -DRESET_VECTOR_ADDRESS=$(RESET_VECTOR_ADDRESS) |
195 | endif | 195 | endif |
196 | 196 | ||
197 | ifneq ($(OBJTREE),$(SRCTREE)) | 197 | ifneq ($(OBJTREE),$(SRCTREE)) |
198 | CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include | 198 | CPPFLAGS += -I$(OBJTREE)/include2 -I$(OBJTREE)/include |
199 | endif | 199 | endif |
200 | 200 | ||
201 | CPPFLAGS += -I$(TOPDIR)/include | 201 | CPPFLAGS += -I$(TOPDIR)/include |
202 | CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \ | 202 | CPPFLAGS += -fno-builtin -ffreestanding -nostdinc \ |
203 | -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) | 203 | -isystem $(gccincdir) -pipe $(PLATFORM_CPPFLAGS) |
204 | 204 | ||
205 | ifdef BUILD_TAG | 205 | ifdef BUILD_TAG |
206 | CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \ | 206 | CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes \ |
207 | -DBUILD_TAG='"$(BUILD_TAG)"' | 207 | -DBUILD_TAG='"$(BUILD_TAG)"' |
208 | else | 208 | else |
209 | CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes | 209 | CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes |
210 | endif | 210 | endif |
211 | 211 | ||
212 | CFLAGS += $(call cc-option,-fno-stack-protector) | 212 | CFLAGS_SSP := $(call cc-option,-fno-stack-protector) |
213 | CFLAGS += $(CFLAGS_SSP) | ||
213 | # Some toolchains enable security related warning flags by default, | 214 | # Some toolchains enable security related warning flags by default, |
214 | # but they don't make much sense in the u-boot world, so disable them. | 215 | # but they don't make much sense in the u-boot world, so disable them. |
215 | CFLAGS += $(call cc-option,-Wno-format-nonliteral) | 216 | CFLAGS_WARN := $(call cc-option,-Wno-format-nonliteral) \ |
216 | CFLAGS += $(call cc-option,-Wno-format-security) | 217 | $(call cc-option,-Wno-format-security) |
218 | CFLAGS += $(CFLAGS_WARN) | ||
217 | 219 | ||
218 | # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format> | 220 | # $(CPPFLAGS) sets -g, which causes gcc to pass a suitable -g<format> |
219 | # option to the assembler. | 221 | # option to the assembler. |
220 | AFLAGS_DEBUG := | 222 | AFLAGS_DEBUG := |
221 | 223 | ||
222 | # turn jbsr into jsr for m68k | 224 | # turn jbsr into jsr for m68k |
223 | ifeq ($(ARCH),m68k) | 225 | ifeq ($(ARCH),m68k) |
224 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) | 226 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) |
225 | AFLAGS_DEBUG := -Wa,-gstabs,-S | 227 | AFLAGS_DEBUG := -Wa,-gstabs,-S |
226 | endif | 228 | endif |
227 | endif | 229 | endif |
228 | 230 | ||
229 | AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) | 231 | AFLAGS := $(AFLAGS_DEBUG) -D__ASSEMBLY__ $(CPPFLAGS) |
230 | 232 | ||
231 | LDFLAGS += $(PLATFORM_LDFLAGS) | 233 | LDFLAGS += $(PLATFORM_LDFLAGS) |
232 | LDFLAGS_FINAL += -Bstatic | 234 | LDFLAGS_FINAL += -Bstatic |
233 | 235 | ||
234 | LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL) | 236 | LDFLAGS_u-boot += -T $(obj)u-boot.lds $(LDFLAGS_FINAL) |
235 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 237 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
236 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) | 238 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) |
237 | endif | 239 | endif |
238 | 240 | ||
239 | LDFLAGS_u-boot-spl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) | 241 | LDFLAGS_u-boot-spl += -T $(obj)u-boot-spl.lds $(LDFLAGS_FINAL) |
240 | ifneq ($(CONFIG_SPL_TEXT_BASE),) | 242 | ifneq ($(CONFIG_SPL_TEXT_BASE),) |
241 | LDFLAGS_u-boot-spl += -Ttext $(CONFIG_SPL_TEXT_BASE) | 243 | LDFLAGS_u-boot-spl += -Ttext $(CONFIG_SPL_TEXT_BASE) |
242 | endif | 244 | endif |
243 | 245 | ||
244 | # Location of a usable BFD library, where we define "usable" as | 246 | # Location of a usable BFD library, where we define "usable" as |
245 | # "built for ${HOST}, supports ${TARGET}". Sensible values are | 247 | # "built for ${HOST}, supports ${TARGET}". Sensible values are |
246 | # - When cross-compiling: the root of the cross-environment | 248 | # - When cross-compiling: the root of the cross-environment |
247 | # - Linux/ppc (native): /usr | 249 | # - Linux/ppc (native): /usr |
248 | # - NetBSD/ppc (native): you lose ... (must extract these from the | 250 | # - NetBSD/ppc (native): you lose ... (must extract these from the |
249 | # binutils build directory, plus the native and U-Boot include | 251 | # binutils build directory, plus the native and U-Boot include |
250 | # files don't like each other) | 252 | # files don't like each other) |
251 | # | 253 | # |
252 | # So far, this is used only by tools/gdb/Makefile. | 254 | # So far, this is used only by tools/gdb/Makefile. |
253 | 255 | ||
254 | ifeq ($(HOSTOS),darwin) | 256 | ifeq ($(HOSTOS),darwin) |
255 | BFD_ROOT_DIR = /usr/local/tools | 257 | BFD_ROOT_DIR = /usr/local/tools |
256 | else | 258 | else |
257 | ifeq ($(HOSTARCH),$(ARCH)) | 259 | ifeq ($(HOSTARCH),$(ARCH)) |
258 | # native | 260 | # native |
259 | BFD_ROOT_DIR = /usr | 261 | BFD_ROOT_DIR = /usr |
260 | else | 262 | else |
261 | #BFD_ROOT_DIR = /LinuxPPC/CDK # Linux/i386 | 263 | #BFD_ROOT_DIR = /LinuxPPC/CDK # Linux/i386 |
262 | #BFD_ROOT_DIR = /usr/pkg/cross # NetBSD/i386 | 264 | #BFD_ROOT_DIR = /usr/pkg/cross # NetBSD/i386 |
263 | BFD_ROOT_DIR = /opt/powerpc | 265 | BFD_ROOT_DIR = /opt/powerpc |
264 | endif | 266 | endif |
265 | endif | 267 | endif |
266 | 268 | ||
267 | ######################################################################### | 269 | ######################################################################### |
268 | 270 | ||
269 | export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \ | 271 | export HOSTCC HOSTCFLAGS HOSTLDFLAGS PEDCFLAGS HOSTSTRIP CROSS_COMPILE \ |
270 | AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE | 272 | AS LD CC CPP AR NM STRIP OBJCOPY OBJDUMP MAKE |
271 | export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS | 273 | export CONFIG_SYS_TEXT_BASE PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS |
272 | 274 | ||
273 | ######################################################################### | 275 | ######################################################################### |
274 | 276 | ||
275 | # Allow boards to use custom optimize flags on a per dir/file basis | 277 | # Allow boards to use custom optimize flags on a per dir/file basis |
276 | BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) | 278 | BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) |
277 | ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) | 279 | ALL_AFLAGS = $(AFLAGS) $(AFLAGS_$(BCURDIR)/$(@F)) $(AFLAGS_$(BCURDIR)) |
278 | ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) | 280 | ALL_CFLAGS = $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) |
279 | EXTRA_CPPFLAGS = $(CPPFLAGS_$(BCURDIR)/$(@F)) $(CPPFLAGS_$(BCURDIR)) | 281 | EXTRA_CPPFLAGS = $(CPPFLAGS_$(BCURDIR)/$(@F)) $(CPPFLAGS_$(BCURDIR)) |
280 | ALL_CFLAGS += $(EXTRA_CPPFLAGS) | 282 | ALL_CFLAGS += $(EXTRA_CPPFLAGS) |
281 | 283 | ||
282 | # The _DEP version uses the $< file target (for dependency generation) | 284 | # The _DEP version uses the $< file target (for dependency generation) |
283 | # See rules.mk | 285 | # See rules.mk |
284 | EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $<))) \ | 286 | EXTRA_CPPFLAGS_DEP = $(CPPFLAGS_$(BCURDIR)/$(addsuffix .o,$(basename $<))) \ |
285 | $(CPPFLAGS_$(BCURDIR)) | 287 | $(CPPFLAGS_$(BCURDIR)) |
286 | $(obj)%.s: %.S | 288 | $(obj)%.s: %.S |
287 | $(CPP) $(ALL_AFLAGS) -o $@ $< | 289 | $(CPP) $(ALL_AFLAGS) -o $@ $< |
288 | $(obj)%.o: %.S | 290 | $(obj)%.o: %.S |
289 | $(CC) $(ALL_AFLAGS) -o $@ $< -c | 291 | $(CC) $(ALL_AFLAGS) -o $@ $< -c |
290 | $(obj)%.o: %.c | 292 | $(obj)%.o: %.c |
291 | $(CC) $(ALL_CFLAGS) -o $@ $< -c | 293 | $(CC) $(ALL_CFLAGS) -o $@ $< -c |
292 | $(obj)%.i: %.c | 294 | $(obj)%.i: %.c |
293 | $(CPP) $(ALL_CFLAGS) -o $@ $< -c | 295 | $(CPP) $(ALL_CFLAGS) -o $@ $< -c |
294 | $(obj)%.s: %.c | 296 | $(obj)%.s: %.c |
295 | $(CC) $(ALL_CFLAGS) -o $@ $< -c -S | 297 | $(CC) $(ALL_CFLAGS) -o $@ $< -c -S |
296 | 298 | ||
297 | ######################################################################### | 299 | ######################################################################### |
298 | 300 | ||
299 | # If the list of objects to link is empty, just create an empty built-in.o | 301 | # If the list of objects to link is empty, just create an empty built-in.o |
300 | cmd_link_o_target = $(if $(strip $1),\ | 302 | cmd_link_o_target = $(if $(strip $1),\ |
301 | $(LD) $(LDFLAGS) -r -o $@ $1,\ | 303 | $(LD) $(LDFLAGS) -r -o $@ $1,\ |
302 | rm -f $@; $(AR) rcs $@ ) | 304 | rm -f $@; $(AR) rcs $@ ) |
303 | 305 | ||
304 | ######################################################################### | 306 | ######################################################################### |
305 | 307 |
examples/standalone/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2006 | 2 | # (C) Copyright 2000-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # See file CREDITS for list of people who contributed to this | 5 | # See file CREDITS for list of people who contributed to this |
6 | # project. | 6 | # project. |
7 | # | 7 | # |
8 | # This program is free software; you can redistribute it and/or | 8 | # This program is free software; you can redistribute it and/or |
9 | # modify it under the terms of the GNU General Public License as | 9 | # modify it under the terms of the GNU General Public License as |
10 | # published by the Free Software Foundation; either version 2 of | 10 | # published by the Free Software Foundation; either version 2 of |
11 | # the License, or (at your option) any later version. | 11 | # the License, or (at your option) any later version. |
12 | # | 12 | # |
13 | # This program is distributed in the hope that it will be useful, | 13 | # This program is distributed in the hope that it will be useful, |
14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | 14 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 15 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16 | # GNU General Public License for more details. | 16 | # GNU General Public License for more details. |
17 | # | 17 | # |
18 | # You should have received a copy of the GNU General Public License | 18 | # You should have received a copy of the GNU General Public License |
19 | # along with this program; if not, write to the Free Software | 19 | # along with this program; if not, write to the Free Software |
20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, | 20 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
21 | # MA 02111-1307 USA | 21 | # MA 02111-1307 USA |
22 | # | 22 | # |
23 | 23 | ||
24 | include $(TOPDIR)/config.mk | 24 | include $(TOPDIR)/config.mk |
25 | 25 | ||
26 | ELF-$(ARCH) := | 26 | ELF-$(ARCH) := |
27 | ELF-$(BOARD) := | 27 | ELF-$(BOARD) := |
28 | ELF-$(CPU) := | 28 | ELF-$(CPU) := |
29 | ELF-y := hello_world | 29 | ELF-y := hello_world |
30 | 30 | ||
31 | ELF-$(CONFIG_SMC91111) += smc91111_eeprom | 31 | ELF-$(CONFIG_SMC91111) += smc91111_eeprom |
32 | ELF-$(CONFIG_SMC911X) += smc911x_eeprom | 32 | ELF-$(CONFIG_SMC911X) += smc911x_eeprom |
33 | ELF-$(CONFIG_SPI_FLASH_ATMEL) += atmel_df_pow2 | 33 | ELF-$(CONFIG_SPI_FLASH_ATMEL) += atmel_df_pow2 |
34 | ELF-i386 += 82559_eeprom | 34 | ELF-i386 += 82559_eeprom |
35 | ELF-mpc5xxx += interrupt | 35 | ELF-mpc5xxx += interrupt |
36 | ELF-mpc8xx += test_burst timer | 36 | ELF-mpc8xx += test_burst timer |
37 | ELF-mpc8260 += mem_to_mem_idma2intr | 37 | ELF-mpc8260 += mem_to_mem_idma2intr |
38 | ELF-ppc += sched | 38 | ELF-ppc += sched |
39 | ELF-oxc += eepro100_eeprom | 39 | ELF-oxc += eepro100_eeprom |
40 | 40 | ||
41 | # | 41 | # |
42 | # Some versions of make do not handle trailing white spaces properly; | 42 | # Some versions of make do not handle trailing white spaces properly; |
43 | # leading to build failures. The problem was found with GNU Make 3.80. | 43 | # leading to build failures. The problem was found with GNU Make 3.80. |
44 | # Using 'strip' as a workaround for the problem. | 44 | # Using 'strip' as a workaround for the problem. |
45 | # | 45 | # |
46 | ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))) | 46 | ELF := $(strip $(ELF-y) $(ELF-$(ARCH)) $(ELF-$(BOARD)) $(ELF-$(CPU))) |
47 | 47 | ||
48 | SREC := $(addsuffix .srec,$(ELF)) | 48 | SREC := $(addsuffix .srec,$(ELF)) |
49 | BIN := $(addsuffix .bin,$(ELF)) | 49 | BIN := $(addsuffix .bin,$(ELF)) |
50 | 50 | ||
51 | COBJS := $(ELF:=.o) | 51 | COBJS := $(ELF:=.o) |
52 | 52 | ||
53 | LIB = $(obj)libstubs.o | 53 | LIB = $(obj)libstubs.o |
54 | 54 | ||
55 | LIBAOBJS-$(ARCH) := | 55 | LIBAOBJS-$(ARCH) := |
56 | LIBAOBJS-$(CPU) := | 56 | LIBAOBJS-$(CPU) := |
57 | LIBAOBJS-ppc += $(ARCH)_longjmp.o $(ARCH)_setjmp.o | 57 | LIBAOBJS-ppc += $(ARCH)_longjmp.o $(ARCH)_setjmp.o |
58 | LIBAOBJS-mpc8xx += test_burst_lib.o | 58 | LIBAOBJS-mpc8xx += test_burst_lib.o |
59 | LIBAOBJS := $(LIBAOBJS-$(ARCH)) $(LIBAOBJS-$(CPU)) | 59 | LIBAOBJS := $(LIBAOBJS-$(ARCH)) $(LIBAOBJS-$(CPU)) |
60 | 60 | ||
61 | LIBCOBJS = stubs.o | 61 | LIBCOBJS = stubs.o |
62 | 62 | ||
63 | LIBOBJS = $(addprefix $(obj),$(LIBAOBJS) $(LIBCOBJS)) | 63 | LIBOBJS = $(addprefix $(obj),$(LIBAOBJS) $(LIBCOBJS)) |
64 | 64 | ||
65 | SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S) | 65 | SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S) |
66 | OBJS := $(addprefix $(obj),$(COBJS)) | 66 | OBJS := $(addprefix $(obj),$(COBJS)) |
67 | ELF := $(addprefix $(obj),$(ELF)) | 67 | ELF := $(addprefix $(obj),$(ELF)) |
68 | BIN := $(addprefix $(obj),$(BIN)) | 68 | BIN := $(addprefix $(obj),$(BIN)) |
69 | SREC := $(addprefix $(obj),$(SREC)) | 69 | SREC := $(addprefix $(obj),$(SREC)) |
70 | 70 | ||
71 | gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) | 71 | gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) |
72 | 72 | ||
73 | CPPFLAGS += -I.. | 73 | CPPFLAGS += -I.. |
74 | 74 | ||
75 | # For PowerPC there's no need to compile standalone applications as a | 75 | # For PowerPC there's no need to compile standalone applications as a |
76 | # relocatable executable. The relocation data is not needed, and | 76 | # relocatable executable. The relocation data is not needed, and |
77 | # also causes the entry point of the standalone application to be | 77 | # also causes the entry point of the standalone application to be |
78 | # inconsistent. | 78 | # inconsistent. |
79 | ifeq ($(ARCH),powerpc) | 79 | ifeq ($(ARCH),powerpc) |
80 | AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS)) | 80 | AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS)) |
81 | CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS)) | 81 | CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS)) |
82 | CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS)) | 82 | CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS)) |
83 | endif | 83 | endif |
84 | 84 | ||
85 | # We don't want gcc reordering functions if possible. This ensures that an | 85 | # We don't want gcc reordering functions if possible. This ensures that an |
86 | # application's entry point will be the first function in the application's | 86 | # application's entry point will be the first function in the application's |
87 | # source file. | 87 | # source file. |
88 | CFLAGS += $(call cc-option,-fno-toplevel-reorder) | 88 | CFLAGS_NTR := $(call cc-option,-fno-toplevel-reorder) |
89 | CFLAGS += $(CFLAGS_NTR) | ||
89 | 90 | ||
90 | all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF) | 91 | all: $(obj).depend $(OBJS) $(LIB) $(SREC) $(BIN) $(ELF) |
91 | 92 | ||
92 | ######################################################################### | 93 | ######################################################################### |
93 | $(LIB): $(obj).depend $(LIBOBJS) | 94 | $(LIB): $(obj).depend $(LIBOBJS) |
94 | $(call cmd_link_o_target, $(LIBOBJS)) | 95 | $(call cmd_link_o_target, $(LIBOBJS)) |
95 | 96 | ||
96 | $(ELF): | 97 | $(ELF): |
97 | $(obj)%: $(obj)%.o $(LIB) | 98 | $(obj)%: $(obj)%.o $(LIB) |
98 | $(LD) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ | 99 | $(LD) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ |
99 | -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ | 100 | -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ |
100 | -L$(gcclibdir) -lgcc | 101 | -L$(gcclibdir) -lgcc |
101 | 102 | ||
102 | $(SREC): | 103 | $(SREC): |
103 | $(obj)%.srec: $(obj)% | 104 | $(obj)%.srec: $(obj)% |
104 | $(OBJCOPY) -O srec $< $@ 2>/dev/null | 105 | $(OBJCOPY) -O srec $< $@ 2>/dev/null |
105 | 106 | ||
106 | $(BIN): | 107 | $(BIN): |
107 | $(obj)%.bin: $(obj)% | 108 | $(obj)%.bin: $(obj)% |
108 | $(OBJCOPY) -O binary $< $@ 2>/dev/null | 109 | $(OBJCOPY) -O binary $< $@ 2>/dev/null |
109 | 110 | ||
110 | ######################################################################### | 111 | ######################################################################### |
111 | 112 | ||
112 | # defines $(obj).depend target | 113 | # defines $(obj).depend target |
113 | include $(SRCTREE)/rules.mk | 114 | include $(SRCTREE)/rules.mk |
114 | 115 | ||
115 | sinclude $(obj).depend | 116 | sinclude $(obj).depend |
116 | 117 | ||
117 | ######################################################################### | 118 | ######################################################################### |
118 | 119 |