Commit 6825a95b0ba72c4e5667d02d8b31986e2e9abd5a
Committed by
Tom Rini
1 parent
22433fc54b
Exists in
master
and in
49 other branches
kbuild: use Linux Kernel build scripts
Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
Showing 77 changed files with 526 additions and 325 deletions Inline Diff
- Makefile
- arch/arm/imx-common/Makefile
- arch/blackfin/cpu/Makefile
- arch/blackfin/lib/Makefile
- arch/m68k/cpu/mcf5227x/Makefile
- arch/m68k/cpu/mcf523x/Makefile
- arch/m68k/cpu/mcf52x2/Makefile
- arch/m68k/cpu/mcf532x/Makefile
- arch/m68k/cpu/mcf5445x/Makefile
- arch/m68k/cpu/mcf547x_8x/Makefile
- arch/powerpc/cpu/mpc8xx/Makefile
- arch/powerpc/lib/Makefile
- arch/sandbox/cpu/Makefile
- board/bct-brettl2/config.mk
- board/bf518f-ezbrd/config.mk
- board/bf526-ezbrd/config.mk
- board/bf527-ad7160-eval/config.mk
- board/bf527-ezkit/config.mk
- board/bf527-sdp/config.mk
- board/bf533-ezkit/config.mk
- board/bf533-stamp/config.mk
- board/bf537-stamp/config.mk
- board/bf538f-ezkit/config.mk
- board/bf548-ezkit/config.mk
- board/bf561-acvilon/config.mk
- board/bf561-ezkit/config.mk
- board/br4/config.mk
- board/cm-bf527/config.mk
- board/cm-bf533/config.mk
- board/cm-bf537e/config.mk
- board/cm-bf537u/config.mk
- board/cm-bf548/config.mk
- board/cm-bf561/config.mk
- board/ip04/config.mk
- board/matrix_vision/mvblx/Makefile
- board/pr1/config.mk
- board/sandburst/karef/Makefile
- board/sandburst/metrobox/Makefile
- board/st-ericsson/snowball/Makefile
- board/st-ericsson/u8500/Makefile
- board/tcm-bf518/config.mk
- board/tcm-bf537/config.mk
- common/Makefile
- config.mk
- disk/Makefile
- doc/DocBook/Makefile
- drivers/bios_emulator/Makefile
- drivers/hwmon/Makefile
- drivers/net/npe/Makefile
- drivers/rtc/Makefile
- drivers/usb/musb-new/Makefile
- dts/Makefile
- examples/api/Makefile
- examples/standalone/Makefile
- fs/ubifs/Makefile
- fs/yaffs2/Makefile
- lib/Makefile
- lib/lzma/Makefile
- nand_spl/board/amcc/acadia/Makefile
- nand_spl/board/amcc/bamboo/Makefile
- nand_spl/board/amcc/canyonlands/Makefile
- nand_spl/board/amcc/kilauea/Makefile
- nand_spl/board/amcc/sequoia/Makefile
- nand_spl/board/freescale/mpc8315erdb/Makefile
- nand_spl/board/freescale/mpc8536ds/Makefile
- nand_spl/board/freescale/mpc8569mds/Makefile
- nand_spl/board/freescale/mpc8572ds/Makefile
- nand_spl/board/freescale/p1023rds/Makefile
- nand_spl/board/freescale/p1_p2_rdb/Makefile
- nand_spl/board/sheldon/simpc8313/Makefile
- net/Makefile
- post/lib_powerpc/fpu/Makefile
- scripts/Kbuild.include
- scripts/Makefile.build
- scripts/Makefile.lib
- spl/Makefile
- tools/Makefile
Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2013 | 2 | # (C) Copyright 2000-2013 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | VERSION = 2014 | 8 | VERSION = 2014 |
9 | PATCHLEVEL = 01 | 9 | PATCHLEVEL = 01 |
10 | SUBLEVEL = | 10 | SUBLEVEL = |
11 | EXTRAVERSION = | 11 | EXTRAVERSION = |
12 | ifneq "$(SUBLEVEL)" "" | 12 | ifneq "$(SUBLEVEL)" "" |
13 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) | 13 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
14 | else | 14 | else |
15 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) | 15 | U_BOOT_VERSION = $(VERSION).$(PATCHLEVEL)$(EXTRAVERSION) |
16 | endif | 16 | endif |
17 | TIMESTAMP_FILE = include/generated/timestamp_autogenerated.h | 17 | TIMESTAMP_FILE = include/generated/timestamp_autogenerated.h |
18 | VERSION_FILE = include/generated/version_autogenerated.h | 18 | VERSION_FILE = include/generated/version_autogenerated.h |
19 | 19 | ||
20 | HOSTARCH := $(shell uname -m | \ | 20 | HOSTARCH := $(shell uname -m | \ |
21 | sed -e s/i.86/x86/ \ | 21 | sed -e s/i.86/x86/ \ |
22 | -e s/sun4u/sparc64/ \ | 22 | -e s/sun4u/sparc64/ \ |
23 | -e s/arm.*/arm/ \ | 23 | -e s/arm.*/arm/ \ |
24 | -e s/sa110/arm/ \ | 24 | -e s/sa110/arm/ \ |
25 | -e s/ppc64/powerpc/ \ | 25 | -e s/ppc64/powerpc/ \ |
26 | -e s/ppc/powerpc/ \ | 26 | -e s/ppc/powerpc/ \ |
27 | -e s/macppc/powerpc/\ | 27 | -e s/macppc/powerpc/\ |
28 | -e s/sh.*/sh/) | 28 | -e s/sh.*/sh/) |
29 | 29 | ||
30 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ | 30 | HOSTOS := $(shell uname -s | tr '[:upper:]' '[:lower:]' | \ |
31 | sed -e 's/\(cygwin\).*/cygwin/') | 31 | sed -e 's/\(cygwin\).*/cygwin/') |
32 | 32 | ||
33 | export HOSTARCH HOSTOS | 33 | export HOSTARCH HOSTOS |
34 | 34 | ||
35 | # Deal with colliding definitions from tcsh etc. | 35 | # Deal with colliding definitions from tcsh etc. |
36 | VENDOR= | 36 | VENDOR= |
37 | 37 | ||
38 | ######################################################################### | 38 | ######################################################################### |
39 | # Allow for silent builds | 39 | # Allow for silent builds |
40 | ifeq (,$(findstring s,$(MAKEFLAGS))) | 40 | ifeq (,$(findstring s,$(MAKEFLAGS))) |
41 | XECHO = echo | 41 | XECHO = echo |
42 | else | 42 | else |
43 | XECHO = : | 43 | XECHO = : |
44 | endif | 44 | endif |
45 | 45 | ||
46 | # *DOCUMENTATION* | ||
47 | # To see a list of typical targets execute "make help" | ||
48 | # More info can be located in ./README | ||
49 | # Comments in this file are targeted only to the developer, do not | ||
50 | # expect to learn how to build the kernel reading this file. | ||
51 | |||
52 | # Do not: | ||
53 | # o use make's built-in rules and variables | ||
54 | # (this increases performance and avoids hard-to-debug behaviour); | ||
55 | # o print "Entering directory ..."; | ||
56 | MAKEFLAGS += -rR --no-print-directory | ||
57 | |||
58 | # Avoid funny character set dependencies | ||
59 | unexport LC_ALL | ||
60 | LC_COLLATE=C | ||
61 | LC_NUMERIC=C | ||
62 | export LC_COLLATE LC_NUMERIC | ||
63 | |||
64 | # We are using a recursive build, so we need to do a little thinking | ||
65 | # to get the ordering right. | ||
66 | # | ||
67 | # Most importantly: sub-Makefiles should only ever modify files in | ||
68 | # their own directory. If in some directory we have a dependency on | ||
69 | # a file in another dir (which doesn't happen often, but it's often | ||
70 | # unavoidable when linking the built-in.o targets which finally | ||
71 | # turn into vmlinux), we will call a sub make in that other dir, and | ||
72 | # after that we are sure that everything which is in that other dir | ||
73 | # is now up to date. | ||
74 | # | ||
75 | # The only cases where we need to modify files which have global | ||
76 | # effects are thus separated out and done before the recursive | ||
77 | # descending is started. They are now explicitly listed as the | ||
78 | # prepare rule. | ||
79 | |||
80 | # To put more focus on warnings, be less verbose as default | ||
81 | # Use 'make V=1' to see the full commands | ||
82 | |||
83 | ifeq ("$(origin V)", "command line") | ||
84 | KBUILD_VERBOSE = $(V) | ||
85 | endif | ||
86 | ifndef KBUILD_VERBOSE | ||
87 | KBUILD_VERBOSE = 0 | ||
88 | endif | ||
89 | |||
90 | # Call a source code checker (by default, "sparse") as part of the | ||
91 | # C compilation. | ||
92 | # | ||
93 | # Use 'make C=1' to enable checking of only re-compiled files. | ||
94 | # Use 'make C=2' to enable checking of *all* source files, regardless | ||
95 | # of whether they are re-compiled or not. | ||
96 | # | ||
97 | # See the file "Documentation/sparse.txt" for more details, including | ||
98 | # where to get the "sparse" utility. | ||
99 | |||
100 | ifeq ("$(origin C)", "command line") | ||
101 | KBUILD_CHECKSRC = $(C) | ||
102 | endif | ||
103 | ifndef KBUILD_CHECKSRC | ||
104 | KBUILD_CHECKSRC = 0 | ||
105 | endif | ||
106 | |||
107 | # Use make M=dir to specify directory of external module to build | ||
108 | # Old syntax make ... SUBDIRS=$PWD is still supported | ||
109 | # Setting the environment variable KBUILD_EXTMOD take precedence | ||
110 | ifdef SUBDIRS | ||
111 | KBUILD_EXTMOD ?= $(SUBDIRS) | ||
112 | endif | ||
113 | |||
114 | ifeq ("$(origin M)", "command line") | ||
115 | KBUILD_EXTMOD := $(M) | ||
116 | endif | ||
117 | |||
46 | # kbuild supports saving output files in a separate directory. | 118 | # kbuild supports saving output files in a separate directory. |
47 | # To locate output files in a separate directory two syntaxes are supported. | 119 | # To locate output files in a separate directory two syntaxes are supported. |
48 | # In both cases the working directory must be the root of the kernel src. | 120 | # In both cases the working directory must be the root of the kernel src. |
49 | # 1) O= | 121 | # 1) O= |
50 | # Use "make O=dir/to/store/output/files/" | 122 | # Use "make O=dir/to/store/output/files/" |
51 | # | 123 | # |
52 | # 2) Set KBUILD_OUTPUT | 124 | # 2) Set KBUILD_OUTPUT |
53 | # Set the environment variable KBUILD_OUTPUT to point to the directory | 125 | # Set the environment variable KBUILD_OUTPUT to point to the directory |
54 | # where the output files shall be placed. | 126 | # where the output files shall be placed. |
55 | # export KBUILD_OUTPUT=dir/to/store/output/files/ | 127 | # export KBUILD_OUTPUT=dir/to/store/output/files/ |
56 | # make | 128 | # make |
57 | # | 129 | # |
58 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment | 130 | # The O= assignment takes precedence over the KBUILD_OUTPUT environment |
59 | # variable. | 131 | # variable. |
60 | 132 | ||
61 | 133 | ||
62 | # KBUILD_SRC is set on invocation of make in OBJ directory | 134 | # KBUILD_SRC is set on invocation of make in OBJ directory |
63 | # KBUILD_SRC is not intended to be used by the regular user (for now) | 135 | # KBUILD_SRC is not intended to be used by the regular user (for now) |
64 | ifeq ($(KBUILD_SRC),) | 136 | ifeq ($(KBUILD_SRC),) |
65 | 137 | ||
66 | # OK, Make called in directory where kernel src resides | 138 | # OK, Make called in directory where kernel src resides |
67 | # Do we want to locate output files in a separate directory? | 139 | # Do we want to locate output files in a separate directory? |
68 | ifeq ("$(origin O)", "command line") | 140 | ifeq ("$(origin O)", "command line") |
69 | KBUILD_OUTPUT := $(O) | 141 | KBUILD_OUTPUT := $(O) |
70 | endif | 142 | endif |
71 | 143 | ||
72 | ifeq ("$(origin W)", "command line") | 144 | ifeq ("$(origin W)", "command line") |
73 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) | 145 | export KBUILD_ENABLE_EXTRA_GCC_CHECKS := $(W) |
74 | endif | 146 | endif |
75 | 147 | ||
76 | # That's our default target when none is given on the command line | 148 | # That's our default target when none is given on the command line |
77 | PHONY := _all | 149 | PHONY := _all |
78 | _all: | 150 | _all: |
79 | 151 | ||
80 | # Cancel implicit rules on top Makefile | 152 | # Cancel implicit rules on top Makefile |
81 | $(CURDIR)/Makefile Makefile: ; | 153 | $(CURDIR)/Makefile Makefile: ; |
82 | 154 | ||
83 | ifneq ($(KBUILD_OUTPUT),) | 155 | ifneq ($(KBUILD_OUTPUT),) |
84 | # Invoke a second make in the output directory, passing relevant variables | 156 | # Invoke a second make in the output directory, passing relevant variables |
85 | # check that the output directory actually exists | 157 | # check that the output directory actually exists |
86 | saved-output := $(KBUILD_OUTPUT) | 158 | saved-output := $(KBUILD_OUTPUT) |
87 | KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) | 159 | KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) |
88 | $(if $(KBUILD_OUTPUT),, \ | 160 | $(if $(KBUILD_OUTPUT),, \ |
89 | $(error output directory "$(saved-output)" does not exist)) | 161 | $(error output directory "$(saved-output)" does not exist)) |
90 | 162 | ||
91 | PHONY += $(MAKECMDGOALS) sub-make | 163 | PHONY += $(MAKECMDGOALS) sub-make |
92 | 164 | ||
93 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make | 165 | $(filter-out _all sub-make $(CURDIR)/Makefile, $(MAKECMDGOALS)) _all: sub-make |
94 | @: | 166 | @: |
95 | 167 | ||
96 | sub-make: FORCE | 168 | sub-make: FORCE |
97 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ | 169 | $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ |
98 | KBUILD_SRC=$(CURDIR) \ | 170 | KBUILD_SRC=$(CURDIR) \ |
99 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ | 171 | KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile \ |
100 | $(filter-out _all sub-make,$(MAKECMDGOALS)) | 172 | $(filter-out _all sub-make,$(MAKECMDGOALS)) |
101 | 173 | ||
102 | # Leave processing to above invocation of make | 174 | # Leave processing to above invocation of make |
103 | skip-makefile := 1 | 175 | skip-makefile := 1 |
104 | endif # ifneq ($(KBUILD_OUTPUT),) | 176 | endif # ifneq ($(KBUILD_OUTPUT),) |
105 | endif # ifeq ($(KBUILD_SRC),) | 177 | endif # ifeq ($(KBUILD_SRC),) |
106 | 178 | ||
107 | # We process the rest of the Makefile if this is the final invocation of make | 179 | # We process the rest of the Makefile if this is the final invocation of make |
108 | ifeq ($(skip-makefile),) | 180 | ifeq ($(skip-makefile),) |
109 | 181 | ||
182 | # If building an external module we do not care about the all: rule | ||
183 | # but instead _all depend on modules | ||
110 | PHONY += all | 184 | PHONY += all |
185 | ifeq ($(KBUILD_EXTMOD),) | ||
111 | _all: all | 186 | _all: all |
187 | else | ||
188 | _all: modules | ||
189 | endif | ||
112 | 190 | ||
113 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) | 191 | srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) |
114 | objtree := $(CURDIR) | 192 | objtree := $(CURDIR) |
115 | src := $(srctree) | 193 | src := $(srctree) |
116 | obj := $(objtree) | 194 | obj := $(objtree) |
117 | 195 | ||
118 | VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) | 196 | VPATH := $(srctree)$(if $(KBUILD_EXTMOD),:$(KBUILD_EXTMOD)) |
119 | 197 | ||
120 | export srctree objtree VPATH | 198 | export srctree objtree VPATH |
121 | 199 | ||
122 | # Call a source code checker (by default, "sparse") as part of the | ||
123 | # C compilation. | ||
124 | # | ||
125 | # Use 'make C=1' to enable checking of re-compiled files. | ||
126 | # | ||
127 | # See the linux kernel file "Documentation/sparse.txt" for more details, | ||
128 | # including where to get the "sparse" utility. | ||
129 | |||
130 | ifdef C | ||
131 | ifeq ("$(origin C)", "command line") | ||
132 | CHECKSRC := $(C) | ||
133 | endif | ||
134 | endif | ||
135 | ifndef CHECKSRC | ||
136 | CHECKSRC = 0 | ||
137 | endif | ||
138 | export CHECKSRC | ||
139 | |||
140 | OBJTREE := $(objtree) | 200 | OBJTREE := $(objtree) |
141 | SPLTREE := $(OBJTREE)/spl | 201 | SPLTREE := $(OBJTREE)/spl |
142 | TPLTREE := $(OBJTREE)/tpl | 202 | TPLTREE := $(OBJTREE)/tpl |
143 | SRCTREE := $(srctree) | 203 | SRCTREE := $(srctree) |
144 | TOPDIR := $(SRCTREE) | 204 | TOPDIR := $(SRCTREE) |
145 | export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE | 205 | export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE |
146 | 206 | ||
147 | MKCONFIG := $(SRCTREE)/mkconfig | 207 | MKCONFIG := $(SRCTREE)/mkconfig |
148 | export MKCONFIG | 208 | export MKCONFIG |
149 | 209 | ||
150 | # Make sure CDPATH settings don't interfere | 210 | # Make sure CDPATH settings don't interfere |
151 | unexport CDPATH | 211 | unexport CDPATH |
152 | 212 | ||
153 | ######################################################################### | 213 | ######################################################################### |
154 | 214 | ||
155 | # The "tools" are needed early, so put this first | 215 | # The "tools" are needed early, so put this first |
156 | # Don't include stuff already done in $(LIBS) | 216 | # Don't include stuff already done in $(LIBS) |
157 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC | 217 | # The "examples" conditionally depend on U-Boot (say, when USE_PRIVATE_LIBGCC |
158 | # is "yes"), so compile examples after U-Boot is compiled. | 218 | # is "yes"), so compile examples after U-Boot is compiled. |
159 | SUBDIR_TOOLS = tools | 219 | SUBDIR_TOOLS = tools |
160 | SUBDIRS = $(SUBDIR_TOOLS) | 220 | SUBDIRS = $(SUBDIR_TOOLS) |
161 | 221 | ||
162 | .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) | 222 | .PHONY : $(SUBDIRS) $(VERSION_FILE) $(TIMESTAMP_FILE) |
163 | 223 | ||
164 | ifeq (include/config.mk,$(wildcard include/config.mk)) | 224 | ifeq (include/config.mk,$(wildcard include/config.mk)) |
165 | 225 | ||
166 | # Include autoconf.mk before config.mk so that the config options are available | 226 | # Include autoconf.mk before config.mk so that the config options are available |
167 | # to all top level build files. We need the dummy all: target to prevent the | 227 | # to all top level build files. We need the dummy all: target to prevent the |
168 | # dependency target in autoconf.mk.dep from being the default. | 228 | # dependency target in autoconf.mk.dep from being the default. |
169 | all: | 229 | all: |
170 | sinclude include/autoconf.mk.dep | 230 | sinclude include/autoconf.mk.dep |
171 | sinclude include/autoconf.mk | 231 | sinclude include/autoconf.mk |
172 | 232 | ||
173 | SUBDIR_EXAMPLES-y := examples/standalone | 233 | SUBDIR_EXAMPLES-y := examples/standalone |
174 | SUBDIR_EXAMPLES-$(CONFIG_API) += examples/api | 234 | SUBDIR_EXAMPLES-$(CONFIG_API) += examples/api |
175 | ifndef CONFIG_SANDBOX | 235 | ifndef CONFIG_SANDBOX |
176 | SUBDIRS += $(SUBDIR_EXAMPLES-y) | 236 | SUBDIRS += $(SUBDIR_EXAMPLES-y) |
177 | endif | 237 | endif |
178 | 238 | ||
179 | # load ARCH, BOARD, and CPU configuration | 239 | # load ARCH, BOARD, and CPU configuration |
180 | include include/config.mk | 240 | include include/config.mk |
181 | export ARCH CPU BOARD VENDOR SOC | 241 | export ARCH CPU BOARD VENDOR SOC |
182 | 242 | ||
183 | # set default to nothing for native builds | 243 | # set default to nothing for native builds |
184 | ifeq ($(HOSTARCH),$(ARCH)) | 244 | ifeq ($(HOSTARCH),$(ARCH)) |
185 | CROSS_COMPILE ?= | 245 | CROSS_COMPILE ?= |
186 | endif | 246 | endif |
187 | 247 | ||
188 | # SHELL used by kbuild | 248 | # SHELL used by kbuild |
189 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ | 249 | CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ |
190 | else if [ -x /bin/bash ]; then echo /bin/bash; \ | 250 | else if [ -x /bin/bash ]; then echo /bin/bash; \ |
191 | else echo sh; fi ; fi) | 251 | else echo sh; fi ; fi) |
192 | 252 | ||
193 | HOSTCC = gcc | 253 | HOSTCC = gcc |
194 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer | 254 | HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer |
195 | 255 | ||
196 | ifeq ($(HOSTOS),cygwin) | 256 | ifeq ($(HOSTOS),cygwin) |
197 | HOSTCFLAGS += -ansi | 257 | HOSTCFLAGS += -ansi |
198 | endif | 258 | endif |
199 | 259 | ||
200 | # Mac OS X / Darwin's C preprocessor is Apple specific. It | 260 | # Mac OS X / Darwin's C preprocessor is Apple specific. It |
201 | # generates numerous errors and warnings. We want to bypass it | 261 | # generates numerous errors and warnings. We want to bypass it |
202 | # and use GNU C's cpp. To do this we pass the -traditional-cpp | 262 | # and use GNU C's cpp. To do this we pass the -traditional-cpp |
203 | # option to the compiler. Note that the -traditional-cpp flag | 263 | # option to the compiler. Note that the -traditional-cpp flag |
204 | # DOES NOT have the same semantics as GNU C's flag, all it does | 264 | # DOES NOT have the same semantics as GNU C's flag, all it does |
205 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. | 265 | # is invoke the GNU preprocessor in stock ANSI/ISO C fashion. |
206 | # | 266 | # |
207 | # Apple's linker is similar, thanks to the new 2 stage linking | 267 | # Apple's linker is similar, thanks to the new 2 stage linking |
208 | # multiple symbol definitions are treated as errors, hence the | 268 | # multiple symbol definitions are treated as errors, hence the |
209 | # -multiply_defined suppress option to turn off this error. | 269 | # -multiply_defined suppress option to turn off this error. |
210 | # | 270 | # |
211 | ifeq ($(HOSTOS),darwin) | 271 | ifeq ($(HOSTOS),darwin) |
212 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) | 272 | # get major and minor product version (e.g. '10' and '6' for Snow Leopard) |
213 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') | 273 | DARWIN_MAJOR_VERSION = $(shell sw_vers -productVersion | cut -f 1 -d '.') |
214 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') | 274 | DARWIN_MINOR_VERSION = $(shell sw_vers -productVersion | cut -f 2 -d '.') |
215 | 275 | ||
216 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ | 276 | os_x_before = $(shell if [ $(DARWIN_MAJOR_VERSION) -le $(1) -a \ |
217 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) | 277 | $(DARWIN_MINOR_VERSION) -le $(2) ] ; then echo "$(3)"; else echo "$(4)"; fi ;) |
218 | 278 | ||
219 | # Snow Leopards build environment has no longer restrictions as described above | 279 | # Snow Leopards build environment has no longer restrictions as described above |
220 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") | 280 | HOSTCC = $(call os_x_before, 10, 5, "cc", "gcc") |
221 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") | 281 | HOSTCFLAGS += $(call os_x_before, 10, 4, "-traditional-cpp") |
222 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") | 282 | HOSTLDFLAGS += $(call os_x_before, 10, 5, "-multiply_defined suppress") |
223 | endif | 283 | endif |
224 | 284 | ||
285 | # Decide whether to build built-in, modular, or both. | ||
286 | # Normally, just do built-in. | ||
287 | |||
288 | KBUILD_MODULES := | ||
289 | KBUILD_BUILTIN := 1 | ||
290 | |||
291 | # If we have only "make modules", don't compile built-in objects. | ||
292 | # When we're building modules with modversions, we need to consider | ||
293 | # the built-in objects during the descend as well, in order to | ||
294 | # make sure the checksums are up to date before we record them. | ||
295 | |||
296 | ifeq ($(MAKECMDGOALS),modules) | ||
297 | KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) | ||
298 | endif | ||
299 | |||
300 | # If we have "make <whatever> modules", compile modules | ||
301 | # in addition to whatever we do anyway. | ||
302 | # Just "make" or "make all" shall build modules as well | ||
303 | |||
304 | # U-Boot does not need modules | ||
305 | #ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) | ||
306 | # KBUILD_MODULES := 1 | ||
307 | #endif | ||
308 | |||
309 | #ifeq ($(MAKECMDGOALS),) | ||
310 | # KBUILD_MODULES := 1 | ||
311 | #endif | ||
312 | |||
313 | export KBUILD_MODULES KBUILD_BUILTIN | ||
314 | export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD | ||
315 | |||
316 | # Beautify output | ||
317 | # --------------------------------------------------------------------------- | ||
318 | # | ||
319 | # Normally, we echo the whole command before executing it. By making | ||
320 | # that echo $($(quiet)$(cmd)), we now have the possibility to set | ||
321 | # $(quiet) to choose other forms of output instead, e.g. | ||
322 | # | ||
323 | # quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ | ||
324 | # cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | ||
325 | # | ||
326 | # If $(quiet) is empty, the whole command will be printed. | ||
327 | # If it is set to "quiet_", only the short version will be printed. | ||
328 | # If it is set to "silent_", nothing will be printed at all, since | ||
329 | # the variable $(silent_cmd_cc_o_c) doesn't exist. | ||
330 | # | ||
331 | # A simple variant is to prefix commands with $(Q) - that's useful | ||
332 | # for commands that shall be hidden in non-verbose mode. | ||
333 | # | ||
334 | # $(Q)ln $@ :< | ||
335 | # | ||
336 | # If KBUILD_VERBOSE equals 0 then the above command will be hidden. | ||
337 | # If KBUILD_VERBOSE equals 1 then the above command is displayed. | ||
338 | |||
339 | ifeq ($(KBUILD_VERBOSE),1) | ||
340 | quiet = | ||
341 | Q = | ||
342 | else | ||
343 | quiet=quiet_ | ||
344 | Q = @ | ||
345 | endif | ||
346 | |||
347 | # If the user is running make -s (silent mode), suppress echoing of | ||
348 | # commands | ||
349 | |||
350 | ifneq ($(filter s% -s%,$(MAKEFLAGS)),) | ||
351 | quiet=silent_ | ||
352 | endif | ||
353 | |||
354 | export quiet Q KBUILD_VERBOSE | ||
355 | |||
356 | |||
225 | # Look for make include files relative to root of kernel src | 357 | # Look for make include files relative to root of kernel src |
226 | MAKEFLAGS += --include-dir=$(srctree) | 358 | MAKEFLAGS += --include-dir=$(srctree) |
227 | 359 | ||
228 | # We need some generic definitions (do not try to remake the file). | 360 | # We need some generic definitions (do not try to remake the file). |
229 | $(srctree)/scripts/Kbuild.include: ; | 361 | $(srctree)/scripts/Kbuild.include: ; |
230 | include $(srctree)/scripts/Kbuild.include | 362 | include $(srctree)/scripts/Kbuild.include |
231 | 363 | ||
232 | # Make variables (CC, etc...) | 364 | # Make variables (CC, etc...) |
233 | 365 | ||
234 | AS = $(CROSS_COMPILE)as | 366 | AS = $(CROSS_COMPILE)as |
235 | # Always use GNU ld | 367 | # Always use GNU ld |
236 | ifneq ($(shell $(CROSS_COMPILE)ld.bfd -v 2> /dev/null),) | 368 | ifneq ($(shell $(CROSS_COMPILE)ld.bfd -v 2> /dev/null),) |
237 | LD = $(CROSS_COMPILE)ld.bfd | 369 | LD = $(CROSS_COMPILE)ld.bfd |
238 | else | 370 | else |
239 | LD = $(CROSS_COMPILE)ld | 371 | LD = $(CROSS_COMPILE)ld |
240 | endif | 372 | endif |
241 | CC = $(CROSS_COMPILE)gcc | 373 | CC = $(CROSS_COMPILE)gcc |
242 | CPP = $(CC) -E | 374 | CPP = $(CC) -E |
243 | AR = $(CROSS_COMPILE)ar | 375 | AR = $(CROSS_COMPILE)ar |
244 | NM = $(CROSS_COMPILE)nm | 376 | NM = $(CROSS_COMPILE)nm |
245 | LDR = $(CROSS_COMPILE)ldr | 377 | LDR = $(CROSS_COMPILE)ldr |
246 | STRIP = $(CROSS_COMPILE)strip | 378 | STRIP = $(CROSS_COMPILE)strip |
247 | OBJCOPY = $(CROSS_COMPILE)objcopy | 379 | OBJCOPY = $(CROSS_COMPILE)objcopy |
248 | OBJDUMP = $(CROSS_COMPILE)objdump | 380 | OBJDUMP = $(CROSS_COMPILE)objdump |
249 | AWK = awk | 381 | AWK = awk |
250 | RANLIB = $(CROSS_COMPILE)RANLIB | 382 | RANLIB = $(CROSS_COMPILE)RANLIB |
251 | DTC = dtc | 383 | DTC = dtc |
252 | CHECK = sparse | 384 | CHECK = sparse |
253 | 385 | ||
254 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ | 386 | CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \ |
255 | -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF) | 387 | -Wbitwise -Wno-return-void -D__CHECK_ENDIAN__ $(CF) |
256 | 388 | ||
257 | # Use UBOOTINCLUDE when you must reference the include/ directory. | 389 | # Use UBOOTINCLUDE when you must reference the include/ directory. |
258 | # Needed to be compatible with the O= option | 390 | # Needed to be compatible with the O= option |
259 | UBOOTINCLUDE := | 391 | UBOOTINCLUDE := |
260 | ifneq ($(OBJTREE),$(SRCTREE)) | 392 | ifneq ($(OBJTREE),$(SRCTREE)) |
261 | UBOOTINCLUDE += -I$(OBJTREE)/include | 393 | UBOOTINCLUDE += -I$(OBJTREE)/include |
262 | endif | 394 | endif |
263 | UBOOTINCLUDE += -I$(srctree)/include \ | 395 | UBOOTINCLUDE += -I$(srctree)/include \ |
264 | -I$(srctree)/arch/$(ARCH)/include | 396 | -I$(srctree)/arch/$(ARCH)/include |
265 | 397 | ||
266 | KBUILD_CPPFLAGS := -D__KERNEL__ | 398 | KBUILD_CPPFLAGS := -D__KERNEL__ |
267 | 399 | ||
268 | KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ | 400 | KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ |
269 | -Wno-format-security \ | 401 | -Wno-format-security \ |
270 | -fno-builtin -ffreestanding | 402 | -fno-builtin -ffreestanding |
271 | KBUILD_AFLAGS := -D__ASSEMBLY__ | 403 | KBUILD_AFLAGS := -D__ASSEMBLY__ |
272 | 404 | ||
273 | export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC | 405 | export CONFIG_SHELL HOSTCC HOSTCFLAGS HOSTLDFLAGS CROSS_COMPILE AS LD CC |
274 | export CPP AR NM LDR STRIP OBJCOPY OBJDUMP | 406 | export CPP AR NM LDR STRIP OBJCOPY OBJDUMP |
275 | export MAKE AWK | 407 | export MAKE AWK |
276 | export DTC CHECK CHECKFLAGS | 408 | export DTC CHECK CHECKFLAGS |
277 | 409 | ||
278 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE | 410 | export KBUILD_CPPFLAGS NOSTDINC_FLAGS UBOOTINCLUDE |
279 | export KBUILD_CFLAGS KBUILD_AFLAGS | 411 | export KBUILD_CFLAGS KBUILD_AFLAGS |
280 | 412 | ||
413 | # When compiling out-of-tree modules, put MODVERDIR in the module | ||
414 | # tree rather than in the kernel tree. The kernel tree might | ||
415 | # even be read-only. | ||
416 | export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions | ||
417 | |||
418 | # Files to ignore in find ... statements | ||
419 | |||
420 | RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \ | ||
421 | -o -name .pc -o -name .hg -o -name .git \) -prune -o | ||
422 | export RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn \ | ||
423 | --exclude CVS --exclude .pc --exclude .hg --exclude .git | ||
424 | |||
425 | # =========================================================================== | ||
426 | # Rules shared between *config targets and build targets | ||
427 | |||
428 | # Basic helpers built in scripts/ | ||
429 | PHONY += scripts_basic | ||
430 | scripts_basic: | ||
431 | $(Q)$(MAKE) $(build)=scripts/basic | ||
432 | $(Q)rm -f .tmp_quiet_recordmcount | ||
433 | |||
434 | # To avoid any implicit rule to kick in, define an empty command. | ||
435 | scripts/basic/%: scripts_basic ; | ||
436 | |||
437 | |||
281 | KBUILD_CFLAGS += -Os #-fomit-frame-pointer | 438 | KBUILD_CFLAGS += -Os #-fomit-frame-pointer |
282 | 439 | ||
283 | ifdef BUILD_TAG | 440 | ifdef BUILD_TAG |
284 | KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' | 441 | KBUILD_CFLAGS += -DBUILD_TAG='"$(BUILD_TAG)"' |
285 | endif | 442 | endif |
286 | 443 | ||
287 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) | 444 | KBUILD_CFLAGS += $(call cc-option,-fno-stack-protector) |
288 | 445 | ||
289 | KBUILD_CFLAGS += -g | 446 | KBUILD_CFLAGS += -g |
290 | # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format> | 447 | # $(KBUILD_AFLAGS) sets -g, which causes gcc to pass a suitable -g<format> |
291 | # option to the assembler. | 448 | # option to the assembler. |
292 | KBUILD_AFLAGS += -g | 449 | KBUILD_AFLAGS += -g |
293 | 450 | ||
294 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) | 451 | NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) |
295 | CHECKFLAGS += $(NOSTDINC_FLAGS) | 452 | CHECKFLAGS += $(NOSTDINC_FLAGS) |
296 | 453 | ||
297 | # Report stack usage if supported | 454 | # Report stack usage if supported |
298 | KBUILD_CFLAGS += $(call cc-option,-fstack-usage) | 455 | KBUILD_CFLAGS += $(call cc-option,-fstack-usage) |
299 | 456 | ||
300 | KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral) | 457 | KBUILD_CFLAGS += $(call cc-option,-Wno-format-nonliteral) |
301 | 458 | ||
302 | # turn jbsr into jsr for m68k | 459 | # turn jbsr into jsr for m68k |
303 | ifeq ($(ARCH),m68k) | 460 | ifeq ($(ARCH),m68k) |
304 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) | 461 | ifeq ($(findstring 3.4,$(shell $(CC) --version)),3.4) |
305 | KBUILD_AFLAGS += -Wa,-gstabs,-S | 462 | KBUILD_AFLAGS += -Wa,-gstabs,-S |
306 | endif | 463 | endif |
307 | endif | 464 | endif |
308 | 465 | ||
309 | # load other configuration | 466 | # load other configuration |
310 | include $(TOPDIR)/config.mk | 467 | include $(TOPDIR)/config.mk |
311 | 468 | ||
312 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 469 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
313 | KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) | 470 | KBUILD_CPPFLAGS += -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) |
314 | endif | 471 | endif |
315 | 472 | ||
316 | export CONFIG_SYS_TEXT_BASE | 473 | export CONFIG_SYS_TEXT_BASE |
317 | 474 | ||
318 | LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL) | 475 | LDFLAGS_u-boot += -T u-boot.lds $(LDFLAGS_FINAL) |
319 | ifneq ($(CONFIG_SYS_TEXT_BASE),) | 476 | ifneq ($(CONFIG_SYS_TEXT_BASE),) |
320 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) | 477 | LDFLAGS_u-boot += -Ttext $(CONFIG_SYS_TEXT_BASE) |
321 | endif | 478 | endif |
322 | 479 | ||
323 | # Targets which don't build the source code | 480 | # Targets which don't build the source code |
324 | NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig %_config | 481 | NON_BUILD_TARGETS = backup clean clobber distclean mrproper tidy unconfig %_config |
325 | 482 | ||
326 | # Only do the generic board check when actually building, not configuring | 483 | # Only do the generic board check when actually building, not configuring |
327 | ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),) | 484 | ifeq ($(filter $(NON_BUILD_TARGETS),$(MAKECMDGOALS)),) |
328 | ifeq ($(__HAVE_ARCH_GENERIC_BOARD),) | 485 | ifeq ($(__HAVE_ARCH_GENERIC_BOARD),) |
329 | ifneq ($(CONFIG_SYS_GENERIC_BOARD),) | 486 | ifneq ($(CONFIG_SYS_GENERIC_BOARD),) |
330 | CHECK_GENERIC_BOARD = $(error Your architecture does not support generic board. \ | 487 | CHECK_GENERIC_BOARD = $(error Your architecture does not support generic board. \ |
331 | Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file) | 488 | Please undefined CONFIG_SYS_GENERIC_BOARD in your board config file) |
332 | endif | 489 | endif |
333 | endif | 490 | endif |
334 | endif | 491 | endif |
335 | 492 | ||
493 | # FIX ME | ||
494 | cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS) | ||
495 | c_flags := $(KBUILD_CFLAGS) $(cpp_flags) | ||
496 | |||
336 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use | 497 | # If board code explicitly specified LDSCRIPT or CONFIG_SYS_LDSCRIPT, use |
337 | # that (or fail if absent). Otherwise, search for a linker script in a | 498 | # that (or fail if absent). Otherwise, search for a linker script in a |
338 | # standard location. | 499 | # standard location. |
339 | 500 | ||
340 | LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT)) | 501 | LDSCRIPT_MAKEFILE_DIR = $(dir $(LDSCRIPT)) |
341 | 502 | ||
342 | ifndef LDSCRIPT | 503 | ifndef LDSCRIPT |
343 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug | 504 | #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug |
344 | ifdef CONFIG_SYS_LDSCRIPT | 505 | ifdef CONFIG_SYS_LDSCRIPT |
345 | # need to strip off double quotes | 506 | # need to strip off double quotes |
346 | LDSCRIPT := $(CONFIG_SYS_LDSCRIPT:"%"=%) | 507 | LDSCRIPT := $(CONFIG_SYS_LDSCRIPT:"%"=%) |
347 | endif | 508 | endif |
348 | endif | 509 | endif |
349 | 510 | ||
350 | # If there is no specified link script, we look in a number of places for it | 511 | # If there is no specified link script, we look in a number of places for it |
351 | ifndef LDSCRIPT | 512 | ifndef LDSCRIPT |
352 | ifeq ($(CONFIG_NAND_U_BOOT),y) | 513 | ifeq ($(CONFIG_NAND_U_BOOT),y) |
353 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds | 514 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds |
354 | ifeq ($(wildcard $(LDSCRIPT)),) | 515 | ifeq ($(wildcard $(LDSCRIPT)),) |
355 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | 516 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds |
356 | endif | 517 | endif |
357 | endif | 518 | endif |
358 | ifeq ($(wildcard $(LDSCRIPT)),) | 519 | ifeq ($(wildcard $(LDSCRIPT)),) |
359 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds | 520 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds |
360 | endif | 521 | endif |
361 | ifeq ($(wildcard $(LDSCRIPT)),) | 522 | ifeq ($(wildcard $(LDSCRIPT)),) |
362 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds | 523 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds |
363 | endif | 524 | endif |
364 | ifeq ($(wildcard $(LDSCRIPT)),) | 525 | ifeq ($(wildcard $(LDSCRIPT)),) |
365 | LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds | 526 | LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds |
366 | # We don't expect a Makefile here | 527 | # We don't expect a Makefile here |
367 | LDSCRIPT_MAKEFILE_DIR = | 528 | LDSCRIPT_MAKEFILE_DIR = |
368 | endif | 529 | endif |
369 | ifeq ($(wildcard $(LDSCRIPT)),) | 530 | ifeq ($(wildcard $(LDSCRIPT)),) |
370 | $(error could not find linker script) | 531 | $(error could not find linker script) |
371 | endif | 532 | endif |
372 | endif | 533 | endif |
373 | 534 | ||
374 | ######################################################################### | 535 | ######################################################################### |
375 | # U-Boot objects....order is important (i.e. start must be first) | 536 | # U-Boot objects....order is important (i.e. start must be first) |
376 | 537 | ||
377 | head-y := $(CPUDIR)/start.o | 538 | head-y := $(CPUDIR)/start.o |
378 | head-$(CONFIG_4xx) += arch/powerpc/cpu/ppc4xx/resetvec.o | 539 | head-$(CONFIG_4xx) += arch/powerpc/cpu/ppc4xx/resetvec.o |
379 | head-$(CONFIG_MPC85xx) += arch/powerpc/cpu/mpc85xx/resetvec.o | 540 | head-$(CONFIG_MPC85xx) += arch/powerpc/cpu/mpc85xx/resetvec.o |
380 | 541 | ||
381 | OBJS := $(head-y) | 542 | OBJS := $(head-y) |
382 | 543 | ||
383 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) | 544 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n) |
384 | 545 | ||
385 | LIBS-y += lib/ | 546 | LIBS-y += lib/ |
386 | LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | 547 | LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ |
387 | LIBS-y += $(CPUDIR)/ | 548 | LIBS-y += $(CPUDIR)/ |
388 | ifdef SOC | 549 | ifdef SOC |
389 | LIBS-y += $(CPUDIR)/$(SOC)/ | 550 | LIBS-y += $(CPUDIR)/$(SOC)/ |
390 | endif | 551 | endif |
391 | LIBS-$(CONFIG_IXP4XX_NPE) += drivers/net/npe/ | 552 | LIBS-$(CONFIG_IXP4XX_NPE) += drivers/net/npe/ |
392 | LIBS-$(CONFIG_OF_EMBED) += dts/ | 553 | LIBS-$(CONFIG_OF_EMBED) += dts/ |
393 | LIBS-y += arch/$(ARCH)/lib/ | 554 | LIBS-y += arch/$(ARCH)/lib/ |
394 | LIBS-y += fs/ | 555 | LIBS-y += fs/ |
395 | LIBS-y += net/ | 556 | LIBS-y += net/ |
396 | LIBS-y += disk/ | 557 | LIBS-y += disk/ |
397 | LIBS-y += drivers/ | 558 | LIBS-y += drivers/ |
398 | LIBS-y += drivers/dma/ | 559 | LIBS-y += drivers/dma/ |
399 | LIBS-y += drivers/gpio/ | 560 | LIBS-y += drivers/gpio/ |
400 | LIBS-y += drivers/i2c/ | 561 | LIBS-y += drivers/i2c/ |
401 | LIBS-y += drivers/input/ | 562 | LIBS-y += drivers/input/ |
402 | LIBS-y += drivers/mmc/ | 563 | LIBS-y += drivers/mmc/ |
403 | LIBS-y += drivers/mtd/ | 564 | LIBS-y += drivers/mtd/ |
404 | LIBS-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ | 565 | LIBS-$(CONFIG_CMD_NAND) += drivers/mtd/nand/ |
405 | LIBS-y += drivers/mtd/onenand/ | 566 | LIBS-y += drivers/mtd/onenand/ |
406 | LIBS-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ | 567 | LIBS-$(CONFIG_CMD_UBI) += drivers/mtd/ubi/ |
407 | LIBS-y += drivers/mtd/spi/ | 568 | LIBS-y += drivers/mtd/spi/ |
408 | LIBS-y += drivers/net/ | 569 | LIBS-y += drivers/net/ |
409 | LIBS-y += drivers/net/phy/ | 570 | LIBS-y += drivers/net/phy/ |
410 | LIBS-y += drivers/pci/ | 571 | LIBS-y += drivers/pci/ |
411 | LIBS-y += drivers/power/ \ | 572 | LIBS-y += drivers/power/ \ |
412 | drivers/power/fuel_gauge/ \ | 573 | drivers/power/fuel_gauge/ \ |
413 | drivers/power/mfd/ \ | 574 | drivers/power/mfd/ \ |
414 | drivers/power/pmic/ \ | 575 | drivers/power/pmic/ \ |
415 | drivers/power/battery/ | 576 | drivers/power/battery/ |
416 | LIBS-y += drivers/spi/ | 577 | LIBS-y += drivers/spi/ |
417 | LIBS-$(CONFIG_FMAN_ENET) += drivers/net/fm/ | 578 | LIBS-$(CONFIG_FMAN_ENET) += drivers/net/fm/ |
418 | LIBS-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ | 579 | LIBS-$(CONFIG_SYS_FSL_DDR) += drivers/ddr/fsl/ |
419 | LIBS-y += drivers/serial/ | 580 | LIBS-y += drivers/serial/ |
420 | LIBS-y += drivers/usb/eth/ | 581 | LIBS-y += drivers/usb/eth/ |
421 | LIBS-y += drivers/usb/gadget/ | 582 | LIBS-y += drivers/usb/gadget/ |
422 | LIBS-y += drivers/usb/host/ | 583 | LIBS-y += drivers/usb/host/ |
423 | LIBS-y += drivers/usb/musb/ | 584 | LIBS-y += drivers/usb/musb/ |
424 | LIBS-y += drivers/usb/musb-new/ | 585 | LIBS-y += drivers/usb/musb-new/ |
425 | LIBS-y += drivers/usb/phy/ | 586 | LIBS-y += drivers/usb/phy/ |
426 | LIBS-y += drivers/usb/ulpi/ | 587 | LIBS-y += drivers/usb/ulpi/ |
427 | LIBS-y += common/ | 588 | LIBS-y += common/ |
428 | LIBS-y += lib/libfdt/ | 589 | LIBS-y += lib/libfdt/ |
429 | LIBS-$(CONFIG_API) += api/ | 590 | LIBS-$(CONFIG_API) += api/ |
430 | LIBS-$(CONFIG_HAS_POST) += post/ | 591 | LIBS-$(CONFIG_HAS_POST) += post/ |
431 | LIBS-y += test/ | 592 | LIBS-y += test/ |
432 | 593 | ||
433 | ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) | 594 | ifneq (,$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35 mxs vf610)) |
434 | LIBS-y += arch/$(ARCH)/imx-common/ | 595 | LIBS-y += arch/$(ARCH)/imx-common/ |
435 | endif | 596 | endif |
436 | 597 | ||
437 | LIBS-$(CONFIG_ARM) += arch/arm/cpu/ | 598 | LIBS-$(CONFIG_ARM) += arch/arm/cpu/ |
438 | LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/ | 599 | LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/ |
439 | 600 | ||
440 | LIBS-y += board/$(BOARDDIR)/ | 601 | LIBS-y += board/$(BOARDDIR)/ |
441 | 602 | ||
442 | LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) | 603 | LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) |
443 | LIBS := $(sort $(LIBS-y)) | 604 | LIBS := $(sort $(LIBS-y)) |
444 | .PHONY : $(LIBS) | 605 | .PHONY : $(LIBS) |
445 | 606 | ||
446 | # Add GCC lib | 607 | # Add GCC lib |
447 | ifdef USE_PRIVATE_LIBGCC | 608 | ifdef USE_PRIVATE_LIBGCC |
448 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") | 609 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") |
449 | PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/libgcc.o | 610 | PLATFORM_LIBGCC = $(OBJTREE)/arch/$(ARCH)/lib/lib.a |
450 | else | 611 | else |
451 | PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc | 612 | PLATFORM_LIBGCC = -L $(USE_PRIVATE_LIBGCC) -lgcc |
452 | endif | 613 | endif |
453 | else | 614 | else |
454 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc | 615 | PLATFORM_LIBGCC := -L $(shell dirname `$(CC) $(c_flags) -print-libgcc-file-name`) -lgcc |
455 | endif | 616 | endif |
456 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) | 617 | PLATFORM_LIBS += $(PLATFORM_LIBGCC) |
457 | export PLATFORM_LIBS | 618 | export PLATFORM_LIBS |
458 | 619 | ||
459 | # Special flags for CPP when processing the linker script. | 620 | # Special flags for CPP when processing the linker script. |
460 | # Pass the version down so we can handle backwards compatibility | 621 | # Pass the version down so we can handle backwards compatibility |
461 | # on the fly. | 622 | # on the fly. |
462 | LDPPFLAGS += \ | 623 | LDPPFLAGS += \ |
463 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ | 624 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ |
464 | -DCPUDIR=$(CPUDIR) \ | 625 | -DCPUDIR=$(CPUDIR) \ |
465 | $(shell $(LD) --version | \ | 626 | $(shell $(LD) --version | \ |
466 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') | 627 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
467 | 628 | ||
468 | ######################################################################### | 629 | ######################################################################### |
469 | ######################################################################### | 630 | ######################################################################### |
470 | 631 | ||
471 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) | 632 | ifneq ($(CONFIG_BOARD_SIZE_LIMIT),) |
472 | BOARD_SIZE_CHECK = \ | 633 | BOARD_SIZE_CHECK = \ |
473 | @actual=`wc -c $@ | awk '{print $$1}'`; \ | 634 | @actual=`wc -c $@ | awk '{print $$1}'`; \ |
474 | limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ | 635 | limit=`printf "%d" $(CONFIG_BOARD_SIZE_LIMIT)`; \ |
475 | if test $$actual -gt $$limit; then \ | 636 | if test $$actual -gt $$limit; then \ |
476 | echo "$@ exceeds file size limit:" >&2 ; \ | 637 | echo "$@ exceeds file size limit:" >&2 ; \ |
477 | echo " limit: $$limit bytes" >&2 ; \ | 638 | echo " limit: $$limit bytes" >&2 ; \ |
478 | echo " actual: $$actual bytes" >&2 ; \ | 639 | echo " actual: $$actual bytes" >&2 ; \ |
479 | echo " excess: $$((actual - limit)) bytes" >&2; \ | 640 | echo " excess: $$((actual - limit)) bytes" >&2; \ |
480 | exit 1; \ | 641 | exit 1; \ |
481 | fi | 642 | fi |
482 | else | 643 | else |
483 | BOARD_SIZE_CHECK = | 644 | BOARD_SIZE_CHECK = |
484 | endif | 645 | endif |
485 | 646 | ||
486 | # Statically apply RELA-style relocations (currently arm64 only) | 647 | # Statically apply RELA-style relocations (currently arm64 only) |
487 | ifneq ($(CONFIG_STATIC_RELA),) | 648 | ifneq ($(CONFIG_STATIC_RELA),) |
488 | # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base | 649 | # $(1) is u-boot ELF, $(2) is u-boot bin, $(3) is text base |
489 | DO_STATIC_RELA = \ | 650 | DO_STATIC_RELA = \ |
490 | start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \ | 651 | start=$$($(NM) $(1) | grep __rel_dyn_start | cut -f 1 -d ' '); \ |
491 | end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \ | 652 | end=$$($(NM) $(1) | grep __rel_dyn_end | cut -f 1 -d ' '); \ |
492 | tools/relocate-rela $(2) $(3) $$start $$end | 653 | tools/relocate-rela $(2) $(3) $$start $$end |
493 | else | 654 | else |
494 | DO_STATIC_RELA = | 655 | DO_STATIC_RELA = |
495 | endif | 656 | endif |
496 | 657 | ||
497 | # Always append ALL so that arch config.mk's can add custom ones | 658 | # Always append ALL so that arch config.mk's can add custom ones |
498 | ALL-y += u-boot.srec u-boot.bin System.map | 659 | ALL-y += u-boot.srec u-boot.bin System.map |
499 | 660 | ||
500 | ALL-$(CONFIG_NAND_U_BOOT) += u-boot-nand.bin | 661 | ALL-$(CONFIG_NAND_U_BOOT) += u-boot-nand.bin |
501 | ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin | 662 | ALL-$(CONFIG_ONENAND_U_BOOT) += u-boot-onenand.bin |
502 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl | 663 | ALL-$(CONFIG_RAMBOOT_PBL) += u-boot.pbl |
503 | ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin | 664 | ALL-$(CONFIG_SPL) += spl/u-boot-spl.bin |
504 | ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img | 665 | ALL-$(CONFIG_SPL_FRAMEWORK) += u-boot.img |
505 | ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin | 666 | ALL-$(CONFIG_TPL) += tpl/u-boot-tpl.bin |
506 | ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin | 667 | ALL-$(CONFIG_OF_SEPARATE) += u-boot.dtb u-boot-dtb.bin |
507 | ifneq ($(CONFIG_SPL_TARGET),) | 668 | ifneq ($(CONFIG_SPL_TARGET),) |
508 | ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) | 669 | ALL-$(CONFIG_SPL) += $(CONFIG_SPL_TARGET:"%"=%) |
509 | endif | 670 | endif |
510 | ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf | 671 | ALL-$(CONFIG_REMAKE_ELF) += u-boot.elf |
511 | 672 | ||
512 | # enable combined SPL/u-boot/dtb rules for tegra | 673 | # enable combined SPL/u-boot/dtb rules for tegra |
513 | ifneq ($(CONFIG_TEGRA),) | 674 | ifneq ($(CONFIG_TEGRA),) |
514 | ifeq ($(CONFIG_SPL),y) | 675 | ifeq ($(CONFIG_SPL),y) |
515 | ifeq ($(CONFIG_OF_SEPARATE),y) | 676 | ifeq ($(CONFIG_OF_SEPARATE),y) |
516 | ALL-y += u-boot-dtb-tegra.bin | 677 | ALL-y += u-boot-dtb-tegra.bin |
517 | else | 678 | else |
518 | ALL-y += u-boot-nodtb-tegra.bin | 679 | ALL-y += u-boot-nodtb-tegra.bin |
519 | endif | 680 | endif |
520 | endif | 681 | endif |
521 | endif | 682 | endif |
522 | 683 | ||
523 | all: $(ALL-y) $(SUBDIR_EXAMPLES-y) | 684 | all: $(ALL-y) $(SUBDIR_EXAMPLES-y) |
524 | 685 | ||
525 | u-boot.dtb: checkdtc u-boot | 686 | u-boot.dtb: checkdtc u-boot |
526 | $(MAKE) $(build)=dts binary | 687 | $(MAKE) $(build)=dts binary |
527 | mv dts/dt.dtb $@ | 688 | mv dts/dt.dtb $@ |
528 | 689 | ||
529 | u-boot-dtb.bin: u-boot.bin u-boot.dtb | 690 | u-boot-dtb.bin: u-boot.bin u-boot.dtb |
530 | cat $^ >$@ | 691 | cat $^ >$@ |
531 | 692 | ||
532 | u-boot.hex: u-boot | 693 | u-boot.hex: u-boot |
533 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ | 694 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ |
534 | 695 | ||
535 | u-boot.srec: u-boot | 696 | u-boot.srec: u-boot |
536 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ | 697 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ |
537 | 698 | ||
538 | u-boot.bin: u-boot | 699 | u-boot.bin: u-boot |
539 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 700 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
540 | $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) | 701 | $(call DO_STATIC_RELA,$<,$@,$(CONFIG_SYS_TEXT_BASE)) |
541 | $(BOARD_SIZE_CHECK) | 702 | $(BOARD_SIZE_CHECK) |
542 | 703 | ||
543 | u-boot.ldr: u-boot | 704 | u-boot.ldr: u-boot |
544 | $(CREATE_LDR_ENV) | 705 | $(CREATE_LDR_ENV) |
545 | $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) | 706 | $(LDR) -T $(CONFIG_BFIN_CPU) -c $@ $< $(LDR_FLAGS) |
546 | $(BOARD_SIZE_CHECK) | 707 | $(BOARD_SIZE_CHECK) |
547 | 708 | ||
548 | u-boot.ldr.hex: u-boot.ldr | 709 | u-boot.ldr.hex: u-boot.ldr |
549 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary | 710 | $(OBJCOPY) ${OBJCFLAGS} -O ihex $< $@ -I binary |
550 | 711 | ||
551 | u-boot.ldr.srec: u-boot.ldr | 712 | u-boot.ldr.srec: u-boot.ldr |
552 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary | 713 | $(OBJCOPY) ${OBJCFLAGS} -O srec $< $@ -I binary |
553 | 714 | ||
554 | # | 715 | # |
555 | # U-Boot entry point, needed for booting of full-blown U-Boot | 716 | # U-Boot entry point, needed for booting of full-blown U-Boot |
556 | # from the SPL U-Boot version. | 717 | # from the SPL U-Boot version. |
557 | # | 718 | # |
558 | ifndef CONFIG_SYS_UBOOT_START | 719 | ifndef CONFIG_SYS_UBOOT_START |
559 | CONFIG_SYS_UBOOT_START := 0 | 720 | CONFIG_SYS_UBOOT_START := 0 |
560 | endif | 721 | endif |
561 | 722 | ||
562 | u-boot.img: u-boot.bin | 723 | u-boot.img: u-boot.bin |
563 | tools/mkimage -A $(ARCH) -T firmware -C none \ | 724 | tools/mkimage -A $(ARCH) -T firmware -C none \ |
564 | -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \ | 725 | -O u-boot -a $(CONFIG_SYS_TEXT_BASE) \ |
565 | -e $(CONFIG_SYS_UBOOT_START) \ | 726 | -e $(CONFIG_SYS_UBOOT_START) \ |
566 | -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ | 727 | -n $(shell sed -n -e 's/.*U_BOOT_VERSION//p' $(VERSION_FILE) | \ |
567 | sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ | 728 | sed -e 's/"[ ]*$$/ for $(BOARD) board"/') \ |
568 | -d $< $@ | 729 | -d $< $@ |
569 | 730 | ||
570 | u-boot.imx: u-boot.bin depend | 731 | u-boot.imx: u-boot.bin depend |
571 | $(MAKE) $(build)=arch/arm/imx-common $(objtree)/u-boot.imx | 732 | $(MAKE) $(build)=arch/arm/imx-common $(objtree)/u-boot.imx |
572 | 733 | ||
573 | u-boot.kwb: u-boot.bin | 734 | u-boot.kwb: u-boot.bin |
574 | tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ | 735 | tools/mkimage -n $(CONFIG_SYS_KWD_CONFIG) -T kwbimage \ |
575 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ | 736 | -a $(CONFIG_SYS_TEXT_BASE) -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
576 | 737 | ||
577 | u-boot.pbl: u-boot.bin | 738 | u-boot.pbl: u-boot.bin |
578 | tools/mkimage -n $(CONFIG_SYS_FSL_PBL_RCW) \ | 739 | tools/mkimage -n $(CONFIG_SYS_FSL_PBL_RCW) \ |
579 | -R $(CONFIG_SYS_FSL_PBL_PBI) -T pblimage \ | 740 | -R $(CONFIG_SYS_FSL_PBL_PBI) -T pblimage \ |
580 | -d $< $@ | 741 | -d $< $@ |
581 | 742 | ||
582 | u-boot.sha1: u-boot.bin | 743 | u-boot.sha1: u-boot.bin |
583 | tools/ubsha1 u-boot.bin | 744 | tools/ubsha1 u-boot.bin |
584 | 745 | ||
585 | u-boot.dis: u-boot | 746 | u-boot.dis: u-boot |
586 | $(OBJDUMP) -d $< > $@ | 747 | $(OBJDUMP) -d $< > $@ |
587 | 748 | ||
588 | # $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, | 749 | # $@ is output, $(1) and $(2) are inputs, $(3) is padded intermediate, |
589 | # $(4) is pad-to | 750 | # $(4) is pad-to |
590 | SPL_PAD_APPEND = \ | 751 | SPL_PAD_APPEND = \ |
591 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \ | 752 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(4) -I binary -O binary \ |
592 | $(1) $(3); \ | 753 | $(1) $(3); \ |
593 | cat $(3) $(2) > $@; \ | 754 | cat $(3) $(2) > $@; \ |
594 | rm $(3) | 755 | rm $(3) |
595 | 756 | ||
596 | ifdef CONFIG_TPL | 757 | ifdef CONFIG_TPL |
597 | SPL_PAYLOAD := tpl/u-boot-with-tpl.bin | 758 | SPL_PAYLOAD := tpl/u-boot-with-tpl.bin |
598 | else | 759 | else |
599 | SPL_PAYLOAD := u-boot.bin | 760 | SPL_PAYLOAD := u-boot.bin |
600 | endif | 761 | endif |
601 | 762 | ||
602 | u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) | 763 | u-boot-with-spl.bin: spl/u-boot-spl.bin $(SPL_PAYLOAD) |
603 | $(call SPL_PAD_APPEND,$<,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) | 764 | $(call SPL_PAD_APPEND,$<,$(SPL_PAYLOAD),spl/u-boot-spl-pad.bin,$(CONFIG_SPL_PAD_TO)) |
604 | 765 | ||
605 | tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin | 766 | tpl/u-boot-with-tpl.bin: tpl/u-boot-tpl.bin u-boot.bin |
606 | $(call SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) | 767 | $(call SPL_PAD_APPEND,$<,u-boot.bin,tpl/u-boot-tpl-pad.bin,$(CONFIG_TPL_PAD_TO)) |
607 | 768 | ||
608 | u-boot-with-spl.imx: spl/u-boot-spl.bin u-boot.bin | 769 | u-boot-with-spl.imx: spl/u-boot-spl.bin u-boot.bin |
609 | $(MAKE) $(build)=arch/arm/imx-common \ | 770 | $(MAKE) $(build)=arch/arm/imx-common \ |
610 | $(OBJTREE)/u-boot-with-spl.imx | 771 | $(OBJTREE)/u-boot-with-spl.imx |
611 | 772 | ||
612 | u-boot-with-nand-spl.imx: spl/u-boot-spl.bin u-boot.bin | 773 | u-boot-with-nand-spl.imx: spl/u-boot-spl.bin u-boot.bin |
613 | $(MAKE) $(build)=arch/arm/imx-common \ | 774 | $(MAKE) $(build)=arch/arm/imx-common \ |
614 | $(OBJTREE)/u-boot-with-nand-spl.imx | 775 | $(OBJTREE)/u-boot-with-nand-spl.imx |
615 | 776 | ||
616 | u-boot.ubl: u-boot-with-spl.bin | 777 | u-boot.ubl: u-boot-with-spl.bin |
617 | tools/mkimage -n $(UBL_CONFIG) -T ublimage \ | 778 | tools/mkimage -n $(UBL_CONFIG) -T ublimage \ |
618 | -e $(CONFIG_SYS_TEXT_BASE) -d $< u-boot.ubl | 779 | -e $(CONFIG_SYS_TEXT_BASE) -d $< u-boot.ubl |
619 | 780 | ||
620 | u-boot.ais: spl/u-boot-spl.bin u-boot.img | 781 | u-boot.ais: spl/u-boot-spl.bin u-boot.img |
621 | tools/mkimage -s -n $(if $(CONFIG_AIS_CONFIG_FILE),$(srctree)/$(CONFIG_AIS_CONFIG_FILE:"%"=%),"/dev/null") \ | 782 | tools/mkimage -s -n $(if $(CONFIG_AIS_CONFIG_FILE),$(srctree)/$(CONFIG_AIS_CONFIG_FILE:"%"=%),"/dev/null") \ |
622 | -T aisimage \ | 783 | -T aisimage \ |
623 | -e $(CONFIG_SPL_TEXT_BASE) \ | 784 | -e $(CONFIG_SPL_TEXT_BASE) \ |
624 | -d spl/u-boot-spl.bin \ | 785 | -d spl/u-boot-spl.bin \ |
625 | spl/u-boot-spl.ais | 786 | spl/u-boot-spl.ais |
626 | $(OBJCOPY) ${OBJCFLAGS} -I binary \ | 787 | $(OBJCOPY) ${OBJCFLAGS} -I binary \ |
627 | --pad-to=$(CONFIG_SPL_MAX_SIZE) -O binary \ | 788 | --pad-to=$(CONFIG_SPL_MAX_SIZE) -O binary \ |
628 | spl/u-boot-spl.ais spl/u-boot-spl-pad.ais | 789 | spl/u-boot-spl.ais spl/u-boot-spl-pad.ais |
629 | cat spl/u-boot-spl-pad.ais u-boot.img > u-boot.ais | 790 | cat spl/u-boot-spl-pad.ais u-boot.img > u-boot.ais |
630 | 791 | ||
631 | 792 | ||
632 | u-boot.sb: u-boot.bin spl/u-boot-spl.bin | 793 | u-boot.sb: u-boot.bin spl/u-boot-spl.bin |
633 | $(MAKE) $(build)=$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb | 794 | $(MAKE) $(build)=$(CPUDIR)/$(SOC)/ $(OBJTREE)/u-boot.sb |
634 | 795 | ||
635 | # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. | 796 | # On x600 (SPEAr600) U-Boot is appended to U-Boot SPL. |
636 | # Both images are created using mkimage (crc etc), so that the ROM | 797 | # Both images are created using mkimage (crc etc), so that the ROM |
637 | # bootloader can check its integrity. Padding needs to be done to the | 798 | # bootloader can check its integrity. Padding needs to be done to the |
638 | # SPL image (with mkimage header) and not the binary. Otherwise the resulting image | 799 | # SPL image (with mkimage header) and not the binary. Otherwise the resulting image |
639 | # which is loaded/copied by the ROM bootloader to SRAM doesn't fit. | 800 | # which is loaded/copied by the ROM bootloader to SRAM doesn't fit. |
640 | # The resulting image containing both U-Boot images is called u-boot.spr | 801 | # The resulting image containing both U-Boot images is called u-boot.spr |
641 | u-boot.spr: u-boot.img spl/u-boot-spl.bin | 802 | u-boot.spr: u-boot.img spl/u-boot-spl.bin |
642 | tools/mkimage -A $(ARCH) -T firmware -C none \ | 803 | tools/mkimage -A $(ARCH) -T firmware -C none \ |
643 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER \ | 804 | -a $(CONFIG_SPL_TEXT_BASE) -e $(CONFIG_SPL_TEXT_BASE) -n XLOADER \ |
644 | -d spl/u-boot-spl.bin $@ | 805 | -d spl/u-boot-spl.bin $@ |
645 | $(OBJCOPY) -I binary -O binary \ | 806 | $(OBJCOPY) -I binary -O binary \ |
646 | --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@ | 807 | --pad-to=$(CONFIG_SPL_PAD_TO) --gap-fill=0xff $@ |
647 | cat u-boot.img >> $@ | 808 | cat u-boot.img >> $@ |
648 | 809 | ||
649 | ifneq ($(CONFIG_TEGRA),) | 810 | ifneq ($(CONFIG_TEGRA),) |
650 | u-boot-nodtb-tegra.bin: spl/u-boot-spl.bin u-boot.bin | 811 | u-boot-nodtb-tegra.bin: spl/u-boot-spl.bin u-boot.bin |
651 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary spl/u-boot-spl spl/u-boot-spl-pad.bin | 812 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SYS_TEXT_BASE) -O binary spl/u-boot-spl spl/u-boot-spl-pad.bin |
652 | cat spl/u-boot-spl-pad.bin u-boot.bin > $@ | 813 | cat spl/u-boot-spl-pad.bin u-boot.bin > $@ |
653 | rm spl/u-boot-spl-pad.bin | 814 | rm spl/u-boot-spl-pad.bin |
654 | 815 | ||
655 | ifeq ($(CONFIG_OF_SEPARATE),y) | 816 | ifeq ($(CONFIG_OF_SEPARATE),y) |
656 | u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin u-boot.dtb | 817 | u-boot-dtb-tegra.bin: u-boot-nodtb-tegra.bin u-boot.dtb |
657 | cat u-boot-nodtb-tegra.bin u-boot.dtb > $@ | 818 | cat u-boot-nodtb-tegra.bin u-boot.dtb > $@ |
658 | endif | 819 | endif |
659 | endif | 820 | endif |
660 | 821 | ||
661 | u-boot-img.bin: spl/u-boot-spl.bin u-boot.img | 822 | u-boot-img.bin: spl/u-boot-spl.bin u-boot.img |
662 | cat spl/u-boot-spl.bin u-boot.img > $@ | 823 | cat spl/u-boot-spl.bin u-boot.img > $@ |
663 | 824 | ||
664 | # PPC4xx needs the SPL at the end of the image, since the reset vector | 825 | # PPC4xx needs the SPL at the end of the image, since the reset vector |
665 | # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target | 826 | # is located at 0xfffffffc. So we can't use the "u-boot-img.bin" target |
666 | # and need to introduce a new build target with the full blown U-Boot | 827 | # and need to introduce a new build target with the full blown U-Boot |
667 | # at the start padded up to the start of the SPL image. And then concat | 828 | # at the start padded up to the start of the SPL image. And then concat |
668 | # the SPL image to the end. | 829 | # the SPL image to the end. |
669 | u-boot-img-spl-at-end.bin: spl/u-boot-spl.bin u-boot.img | 830 | u-boot-img-spl-at-end.bin: spl/u-boot-spl.bin u-boot.img |
670 | $(OBJCOPY) -I binary -O binary --pad-to=$(CONFIG_UBOOT_PAD_TO) \ | 831 | $(OBJCOPY) -I binary -O binary --pad-to=$(CONFIG_UBOOT_PAD_TO) \ |
671 | --gap-fill=0xff u-boot.img $@ | 832 | --gap-fill=0xff u-boot.img $@ |
672 | cat spl/u-boot-spl.bin >> $@ | 833 | cat spl/u-boot-spl.bin >> $@ |
673 | 834 | ||
674 | # Create a new ELF from a raw binary file. This is useful for arm64 | 835 | # Create a new ELF from a raw binary file. This is useful for arm64 |
675 | # where static relocation needs to be performed on the raw binary, | 836 | # where static relocation needs to be performed on the raw binary, |
676 | # but certain simulators only accept an ELF file (but don't do the | 837 | # but certain simulators only accept an ELF file (but don't do the |
677 | # relocation). | 838 | # relocation). |
678 | # FIXME refactor dts/Makefile to share target/arch detection | 839 | # FIXME refactor dts/Makefile to share target/arch detection |
679 | u-boot.elf: u-boot.bin | 840 | u-boot.elf: u-boot.bin |
680 | @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \ | 841 | @$(OBJCOPY) -B aarch64 -I binary -O elf64-littleaarch64 \ |
681 | $< u-boot-elf.o | 842 | $< u-boot-elf.o |
682 | @$(LD) u-boot-elf.o -o $@ \ | 843 | @$(LD) u-boot-elf.o -o $@ \ |
683 | --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ | 844 | --defsym=_start=$(CONFIG_SYS_TEXT_BASE) \ |
684 | -Ttext=$(CONFIG_SYS_TEXT_BASE) | 845 | -Ttext=$(CONFIG_SYS_TEXT_BASE) |
685 | 846 | ||
686 | ifeq ($(CONFIG_SANDBOX),y) | 847 | ifeq ($(CONFIG_SANDBOX),y) |
687 | GEN_UBOOT = \ | 848 | GEN_UBOOT = \ |
688 | $(CC) $(SYMS) -T u-boot.lds \ | 849 | $(CC) $(SYMS) -T u-boot.lds \ |
689 | -Wl,--start-group $(LIBS) -Wl,--end-group \ | 850 | -Wl,--start-group $(LIBS) -Wl,--end-group \ |
690 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot | 851 | $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map -o u-boot |
691 | else | 852 | else |
692 | GEN_UBOOT = \ | 853 | GEN_UBOOT = \ |
693 | $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ | 854 | $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) \ |
694 | $(OBJS) \ | 855 | $(OBJS) \ |
695 | --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \ | 856 | --start-group $(LIBS) --end-group $(PLATFORM_LIBS) \ |
696 | -Map u-boot.map -o u-boot | 857 | -Map u-boot.map -o u-boot |
697 | endif | 858 | endif |
698 | 859 | ||
699 | u-boot: depend $(SUBDIR_TOOLS) $(OBJS) $(LIBS) u-boot.lds | 860 | u-boot: depend $(SUBDIR_TOOLS) $(OBJS) $(LIBS) u-boot.lds |
700 | $(GEN_UBOOT) | 861 | $(GEN_UBOOT) |
701 | ifeq ($(CONFIG_KALLSYMS),y) | 862 | ifeq ($(CONFIG_KALLSYMS),y) |
702 | smap=`$(call SYSTEM_MAP,u-boot) | \ | 863 | smap=`$(call SYSTEM_MAP,u-boot) | \ |
703 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ | 864 | awk '$$2 ~ /[tTwW]/ {printf $$1 $$3 "\\\\000"}'` ; \ |
704 | $(CC) $(CFLAGS) -DSYSTEM_MAP="\"$${smap}\"" \ | 865 | $(CC) $(c_flags) -DSYSTEM_MAP="\"$${smap}\"" \ |
705 | -c $(srctree)/common/system_map.c -o common/system_map.o | 866 | -c $(srctree)/common/system_map.c -o common/system_map.o |
706 | $(GEN_UBOOT) common/system_map.o | 867 | $(GEN_UBOOT) common/system_map.o |
707 | endif | 868 | endif |
708 | 869 | ||
709 | $(OBJS): | 870 | $(OBJS): |
710 | @: | 871 | @: |
711 | 872 | ||
712 | $(LIBS): depend $(SUBDIR_TOOLS) | 873 | $(LIBS): depend $(SUBDIR_TOOLS) scripts_basic |
713 | $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) | 874 | $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) |
714 | 875 | ||
715 | $(SUBDIRS): depend | 876 | $(SUBDIRS): depend scripts_basic |
716 | $(MAKE) $(build)=$@ all | 877 | $(Q)$(MAKE) $(build)=$@ |
717 | 878 | ||
718 | $(SUBDIR_EXAMPLES-y): u-boot | 879 | $(SUBDIR_EXAMPLES-y): u-boot |
719 | 880 | ||
720 | u-boot.lds: $(LDSCRIPT) depend | 881 | u-boot.lds: $(LDSCRIPT) depend |
721 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ | 882 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$< >$@ |
722 | 883 | ||
723 | nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend | 884 | nand_spl: $(TIMESTAMP_FILE) $(VERSION_FILE) depend scripts_basic |
724 | $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all | 885 | $(MAKE) $(build)=nand_spl/board/$(BOARDDIR) all |
725 | 886 | ||
726 | u-boot-nand.bin: nand_spl u-boot.bin | 887 | u-boot-nand.bin: nand_spl u-boot.bin |
727 | cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin | 888 | cat nand_spl/u-boot-spl-16k.bin u-boot.bin > u-boot-nand.bin |
728 | 889 | ||
729 | spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend | 890 | spl/u-boot-spl.bin: $(SUBDIR_TOOLS) depend scripts_basic |
730 | $(MAKE) obj=spl -f $(srctree)/spl/Makefile all | 891 | $(MAKE) obj=spl -f $(srctree)/spl/Makefile all |
731 | 892 | ||
732 | tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend | 893 | tpl/u-boot-tpl.bin: $(SUBDIR_TOOLS) depend scripts_basic |
733 | $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y | 894 | $(MAKE) obj=tpl -f $(srctree)/spl/Makefile all CONFIG_TPL_BUILD=y |
734 | 895 | ||
735 | # Explicitly make _depend in subdirs containing multiple targets to prevent | 896 | # Explicitly make _depend in subdirs containing multiple targets to prevent |
736 | # parallel sub-makes creating .depend files simultaneously. | 897 | # parallel sub-makes creating .depend files simultaneously. |
737 | depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ | 898 | depend dep: $(TIMESTAMP_FILE) $(VERSION_FILE) \ |
738 | include/spl-autoconf.mk \ | 899 | include/spl-autoconf.mk \ |
739 | include/tpl-autoconf.mk \ | 900 | include/tpl-autoconf.mk \ |
740 | include/autoconf.mk \ | 901 | include/autoconf.mk \ |
741 | include/generated/generic-asm-offsets.h \ | 902 | include/generated/generic-asm-offsets.h \ |
742 | include/generated/asm-offsets.h | 903 | include/generated/asm-offsets.h |
743 | 904 | ||
744 | TAG_SUBDIRS = $(SUBDIRS) | 905 | TAG_SUBDIRS = $(SUBDIRS) |
745 | TAG_SUBDIRS += $(dir $(LIBS)) | 906 | TAG_SUBDIRS += $(dir $(LIBS)) |
746 | TAG_SUBDIRS += include | 907 | TAG_SUBDIRS += include |
747 | 908 | ||
748 | FIND := find | 909 | FIND := find |
749 | FINDFLAGS := -L | 910 | FINDFLAGS := -L |
750 | 911 | ||
751 | checkstack: | 912 | checkstack: |
752 | $(CROSS_COMPILE)objdump -d u-boot \ | 913 | $(CROSS_COMPILE)objdump -d u-boot \ |
753 | `$(FIND) . -name u-boot-spl -print` | \ | 914 | `$(FIND) . -name u-boot-spl -print` | \ |
754 | perl $(src)/scripts/checkstack.pl $(ARCH) | 915 | perl $(src)/scripts/checkstack.pl $(ARCH) |
755 | 916 | ||
756 | tags ctags: | 917 | tags ctags: |
757 | ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 918 | ctags -w -o ctags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
758 | -name '*.[chS]' -print` | 919 | -name '*.[chS]' -print` |
759 | 920 | ||
760 | etags: | 921 | etags: |
761 | etags -a -o $(obj)etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ | 922 | etags -a -o $(obj)etags `$(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) \ |
762 | -name '*.[chS]' -print` | 923 | -name '*.[chS]' -print` |
763 | cscope: | 924 | cscope: |
764 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ | 925 | $(FIND) $(FINDFLAGS) $(TAG_SUBDIRS) -name '*.[chS]' -print > \ |
765 | cscope.files | 926 | cscope.files |
766 | cscope -b -q -k | 927 | cscope -b -q -k |
767 | 928 | ||
768 | SYSTEM_MAP = \ | 929 | SYSTEM_MAP = \ |
769 | $(NM) $1 | \ | 930 | $(NM) $1 | \ |
770 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ | 931 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ |
771 | LC_ALL=C sort | 932 | LC_ALL=C sort |
772 | System.map: u-boot | 933 | System.map: u-boot |
773 | @$(call SYSTEM_MAP,$<) > $@ | 934 | @$(call SYSTEM_MAP,$<) > $@ |
774 | 935 | ||
775 | checkthumb: | 936 | checkthumb: |
776 | @if test $(call cc-version) -lt 0404; then \ | 937 | @if test $(call cc-version) -lt 0404; then \ |
777 | echo -n '*** Your GCC does not produce working '; \ | 938 | echo -n '*** Your GCC does not produce working '; \ |
778 | echo 'binaries in THUMB mode.'; \ | 939 | echo 'binaries in THUMB mode.'; \ |
779 | echo '*** Your board is configured for THUMB mode.'; \ | 940 | echo '*** Your board is configured for THUMB mode.'; \ |
780 | false; \ | 941 | false; \ |
781 | fi | 942 | fi |
782 | 943 | ||
783 | # GCC 3.x is reported to have problems generating the type of relocation | 944 | # GCC 3.x is reported to have problems generating the type of relocation |
784 | # that U-Boot wants. | 945 | # that U-Boot wants. |
785 | # See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html | 946 | # See http://lists.denx.de/pipermail/u-boot/2012-September/135156.html |
786 | checkgcc4: | 947 | checkgcc4: |
787 | @if test $(call cc-version) -lt 0400; then \ | 948 | @if test $(call cc-version) -lt 0400; then \ |
788 | echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \ | 949 | echo -n '*** Your GCC is too old, please upgrade to GCC 4.x or newer'; \ |
789 | false; \ | 950 | false; \ |
790 | fi | 951 | fi |
791 | 952 | ||
792 | checkdtc: | 953 | checkdtc: |
793 | @if test $(call dtc-version) -lt 0104; then \ | 954 | @if test $(call dtc-version) -lt 0104; then \ |
794 | echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ | 955 | echo '*** Your dtc is too old, please upgrade to dtc 1.4 or newer'; \ |
795 | false; \ | 956 | false; \ |
796 | fi | 957 | fi |
797 | 958 | ||
798 | # | 959 | # |
799 | # Auto-generate the autoconf.mk file (which is included by all makefiles) | 960 | # Auto-generate the autoconf.mk file (which is included by all makefiles) |
800 | # | 961 | # |
801 | # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. | 962 | # This target actually generates 2 files; autoconf.mk and autoconf.mk.dep. |
802 | # the dep file is only include in this top level makefile to determine when | 963 | # the dep file is only include in this top level makefile to determine when |
803 | # to regenerate the autoconf.mk file. | 964 | # to regenerate the autoconf.mk file. |
804 | include/autoconf.mk.dep: include/config.h include/common.h | 965 | include/autoconf.mk.dep: include/config.h include/common.h |
805 | @$(XECHO) Generating $@ ; \ | 966 | @$(XECHO) Generating $@ ; \ |
806 | : Generate the dependancies ; \ | 967 | : Generate the dependancies ; \ |
807 | $(CC) -x c -DDO_DEPS_ONLY -M $(CFLAGS) $(CPPFLAGS) \ | 968 | $(CC) -x c -DDO_DEPS_ONLY -M $(c_flags) \ |
808 | -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \ | 969 | -MQ include/autoconf.mk $(srctree)/include/common.h > $@ || \ |
809 | rm $@ | 970 | rm $@ |
810 | 971 | ||
811 | include/autoconf.mk: include/config.h | 972 | include/autoconf.mk: include/config.h |
812 | @$(XECHO) Generating $@ ; \ | 973 | @$(XECHO) Generating $@ ; \ |
813 | : Extract the config macros ; \ | 974 | : Extract the config macros ; \ |
814 | $(CPP) $(CFLAGS) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ | 975 | $(CPP) $(c_flags) -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ |
815 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ | 976 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ |
816 | rm $@.tmp | 977 | rm $@.tmp |
817 | 978 | ||
818 | # Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) | 979 | # Auto-generate the spl-autoconf.mk file (which is included by all makefiles for SPL) |
819 | include/tpl-autoconf.mk: include/config.h | 980 | include/tpl-autoconf.mk: include/config.h |
820 | @$(XECHO) Generating $@ ; \ | 981 | @$(XECHO) Generating $@ ; \ |
821 | : Extract the config macros ; \ | 982 | : Extract the config macros ; \ |
822 | $(CPP) $(CFLAGS) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ | 983 | $(CPP) $(c_flags) -DCONFIG_TPL_BUILD -DCONFIG_SPL_BUILD\ |
823 | -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ | 984 | -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ |
824 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ | 985 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ |
825 | rm $@.tmp | 986 | rm $@.tmp |
826 | 987 | ||
827 | include/spl-autoconf.mk: include/config.h | 988 | include/spl-autoconf.mk: include/config.h |
828 | @$(XECHO) Generating $@ ; \ | 989 | @$(XECHO) Generating $@ ; \ |
829 | : Extract the config macros ; \ | 990 | : Extract the config macros ; \ |
830 | $(CPP) $(CFLAGS) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ | 991 | $(CPP) $(c_flags) -DCONFIG_SPL_BUILD -DDO_DEPS_ONLY -dM $(srctree)/include/common.h > $@.tmp && \ |
831 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ | 992 | sed -n -f $(srctree)/tools/scripts/define2mk.sed $@.tmp > $@; \ |
832 | rm $@.tmp | 993 | rm $@.tmp |
833 | 994 | ||
834 | include/generated/generic-asm-offsets.h: lib/asm-offsets.s | 995 | include/generated/generic-asm-offsets.h: lib/asm-offsets.s |
835 | @$(XECHO) Generating $@ | 996 | @$(XECHO) Generating $@ |
836 | $(srctree)/tools/scripts/make-asm-offsets lib/asm-offsets.s $@ | 997 | $(srctree)/tools/scripts/make-asm-offsets lib/asm-offsets.s $@ |
837 | 998 | ||
838 | lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c | 999 | lib/asm-offsets.s: include/config.h $(srctree)/lib/asm-offsets.c |
839 | @mkdir -p lib | 1000 | @mkdir -p lib |
840 | $(CC) -DDO_DEPS_ONLY \ | 1001 | $(CC) -DDO_DEPS_ONLY \ |
841 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | 1002 | $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ |
842 | -o $@ $(srctree)/lib/asm-offsets.c -c -S | 1003 | -o $@ $(srctree)/lib/asm-offsets.c -c -S |
843 | 1004 | ||
844 | include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s | 1005 | include/generated/asm-offsets.h: $(CPUDIR)/$(SOC)/asm-offsets.s |
845 | @$(XECHO) Generating $@ | 1006 | @$(XECHO) Generating $@ |
846 | $(srctree)/tools/scripts/make-asm-offsets $(CPUDIR)/$(SOC)/asm-offsets.s $@ | 1007 | $(srctree)/tools/scripts/make-asm-offsets $(CPUDIR)/$(SOC)/asm-offsets.s $@ |
847 | 1008 | ||
848 | $(CPUDIR)/$(SOC)/asm-offsets.s: include/config.h | 1009 | $(CPUDIR)/$(SOC)/asm-offsets.s: include/config.h |
849 | @mkdir -p $(CPUDIR)/$(SOC) | 1010 | @mkdir -p $(CPUDIR)/$(SOC) |
850 | if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ | 1011 | if [ -f $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c ];then \ |
851 | $(CC) -DDO_DEPS_ONLY \ | 1012 | $(CC) -DDO_DEPS_ONLY \ |
852 | $(CFLAGS) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ | 1013 | $(c_flags) $(CFLAGS_$(BCURDIR)/$(@F)) $(CFLAGS_$(BCURDIR)) \ |
853 | -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ | 1014 | -o $@ $(srctree)/$(CPUDIR)/$(SOC)/asm-offsets.c -c -S; \ |
854 | else \ | 1015 | else \ |
855 | touch $@; \ | 1016 | touch $@; \ |
856 | fi | 1017 | fi |
857 | 1018 | ||
858 | ######################################################################### | 1019 | ######################################################################### |
859 | else # !config.mk | 1020 | else # !config.mk |
860 | all u-boot.hex u-boot.srec u-boot.bin \ | 1021 | all u-boot.hex u-boot.srec u-boot.bin \ |
861 | u-boot.img u-boot.dis u-boot \ | 1022 | u-boot.img u-boot.dis u-boot \ |
862 | $(filter-out tools,$(SUBDIRS)) \ | 1023 | $(filter-out tools,$(SUBDIRS)) \ |
863 | depend dep tags ctags etags cscope System.map: | 1024 | depend dep tags ctags etags cscope System.map: |
864 | @echo "System not configured - see README" >&2 | 1025 | @echo "System not configured - see README" >&2 |
865 | @ exit 1 | 1026 | @ exit 1 |
866 | 1027 | ||
867 | tools: $(VERSION_FILE) $(TIMESTAMP_FILE) | 1028 | tools: $(VERSION_FILE) $(TIMESTAMP_FILE) |
868 | $(MAKE) $(build)=$@ all | 1029 | $(MAKE) $(build)=$@ all |
869 | endif # config.mk | 1030 | endif # config.mk |
870 | 1031 | ||
871 | # ARM relocations should all be R_ARM_RELATIVE (32-bit) or | 1032 | # ARM relocations should all be R_ARM_RELATIVE (32-bit) or |
872 | # R_AARCH64_RELATIVE (64-bit). | 1033 | # R_AARCH64_RELATIVE (64-bit). |
873 | checkarmreloc: u-boot | 1034 | checkarmreloc: u-boot |
874 | @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ | 1035 | @RELOC="`$(CROSS_COMPILE)readelf -r -W $< | cut -d ' ' -f 4 | \ |
875 | grep R_A | sort -u`"; \ | 1036 | grep R_A | sort -u`"; \ |
876 | if test "$$RELOC" != "R_ARM_RELATIVE" -a \ | 1037 | if test "$$RELOC" != "R_ARM_RELATIVE" -a \ |
877 | "$$RELOC" != "R_AARCH64_RELATIVE"; then \ | 1038 | "$$RELOC" != "R_AARCH64_RELATIVE"; then \ |
878 | echo "$< contains unexpected relocations: $$RELOC"; \ | 1039 | echo "$< contains unexpected relocations: $$RELOC"; \ |
879 | false; \ | 1040 | false; \ |
880 | fi | 1041 | fi |
881 | 1042 | ||
882 | $(VERSION_FILE): | 1043 | $(VERSION_FILE): |
883 | @mkdir -p $(dir $(VERSION_FILE)) | 1044 | @mkdir -p $(dir $(VERSION_FILE)) |
884 | @( localvers='$(shell $(TOPDIR)/scripts/setlocalversion $(TOPDIR))' ; \ | 1045 | @( localvers='$(shell $(TOPDIR)/scripts/setlocalversion $(TOPDIR))' ; \ |
885 | printf '#define PLAIN_VERSION "%s%s"\n' \ | 1046 | printf '#define PLAIN_VERSION "%s%s"\n' \ |
886 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ | 1047 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ |
887 | printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ | 1048 | printf '#define U_BOOT_VERSION "U-Boot %s%s"\n' \ |
888 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ | 1049 | "$(U_BOOT_VERSION)" "$${localvers}" ; \ |
889 | ) > $@.tmp | 1050 | ) > $@.tmp |
890 | @( printf '#define CC_VERSION_STRING "%s"\n' \ | 1051 | @( printf '#define CC_VERSION_STRING "%s"\n' \ |
891 | '$(shell $(CC) --version | head -n 1)' )>> $@.tmp | 1052 | '$(shell $(CC) --version | head -n 1)' )>> $@.tmp |
892 | @( printf '#define LD_VERSION_STRING "%s"\n' \ | 1053 | @( printf '#define LD_VERSION_STRING "%s"\n' \ |
893 | '$(shell $(LD) -v | head -n 1)' )>> $@.tmp | 1054 | '$(shell $(LD) -v | head -n 1)' )>> $@.tmp |
894 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ | 1055 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ |
895 | 1056 | ||
896 | $(TIMESTAMP_FILE): | 1057 | $(TIMESTAMP_FILE): |
897 | @mkdir -p $(dir $(TIMESTAMP_FILE)) | 1058 | @mkdir -p $(dir $(TIMESTAMP_FILE)) |
898 | @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp | 1059 | @LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > $@.tmp |
899 | @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp | 1060 | @LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> $@.tmp |
900 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ | 1061 | @cmp -s $@ $@.tmp && rm -f $@.tmp || mv -f $@.tmp $@ |
901 | 1062 | ||
902 | easylogo env gdb: | 1063 | easylogo env gdb: |
903 | $(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION} | 1064 | $(Q)$(MAKE) $(build)=tools/$@ MTD_VERSION=${MTD_VERSION} |
904 | 1065 | ||
905 | gdbtools: gdb | 1066 | gdbtools: gdb |
906 | 1067 | ||
907 | xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc | 1068 | xmldocs pdfdocs psdocs htmldocs mandocs: tools/kernel-doc/docproc |
908 | $(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@ | 1069 | $(Q)$(MAKE) U_BOOT_VERSION=$(U_BOOT_VERSION) $(build)=doc/DocBook $@ |
909 | 1070 | ||
910 | tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) | 1071 | tools-all: easylogo env gdb $(VERSION_FILE) $(TIMESTAMP_FILE) |
911 | $(MAKE) $(build)=tools HOST_TOOLS_ALL=y | 1072 | $(Q)$(MAKE) $(build)=tools HOST_TOOLS_ALL=y |
912 | 1073 | ||
913 | .PHONY : CHANGELOG | 1074 | .PHONY : CHANGELOG |
914 | CHANGELOG: | 1075 | CHANGELOG: |
915 | git log --no-merges U-Boot-1_1_5.. | \ | 1076 | git log --no-merges U-Boot-1_1_5.. | \ |
916 | unexpand -a | sed -e 's/\s\s*$$//' > $@ | 1077 | unexpand -a | sed -e 's/\s\s*$$//' > $@ |
917 | 1078 | ||
918 | include/license.h: tools/bin2header COPYING | 1079 | include/license.h: tools/bin2header COPYING |
919 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h | 1080 | cat COPYING | gzip -9 -c | ./tools/bin2header license_gzip > include/license.h |
920 | ######################################################################### | 1081 | ######################################################################### |
921 | 1082 | ||
922 | unconfig: | 1083 | unconfig: |
923 | @rm -f include/config.h include/config.mk \ | 1084 | @rm -f include/config.h include/config.mk \ |
924 | board/*/config.tmp board/*/*/config.tmp \ | 1085 | board/*/config.tmp board/*/*/config.tmp \ |
925 | include/autoconf.mk include/autoconf.mk.dep \ | 1086 | include/autoconf.mk include/autoconf.mk.dep \ |
926 | include/spl-autoconf.mk \ | 1087 | include/spl-autoconf.mk \ |
927 | include/tpl-autoconf.mk | 1088 | include/tpl-autoconf.mk |
928 | 1089 | ||
929 | %_config:: unconfig | 1090 | %_config:: unconfig |
930 | @$(MKCONFIG) -A $(@:_config=) | 1091 | @$(MKCONFIG) -A $(@:_config=) |
931 | 1092 | ||
932 | ######################################################################### | 1093 | ######################################################################### |
933 | 1094 | ||
934 | clean: | 1095 | clean: |
935 | @rm -f examples/standalone/atmel_df_pow2 \ | 1096 | @rm -f examples/standalone/atmel_df_pow2 \ |
936 | examples/standalone/hello_world \ | 1097 | examples/standalone/hello_world \ |
937 | examples/standalone/interrupt \ | 1098 | examples/standalone/interrupt \ |
938 | examples/standalone/mem_to_mem_idma2intr \ | 1099 | examples/standalone/mem_to_mem_idma2intr \ |
939 | examples/standalone/sched \ | 1100 | examples/standalone/sched \ |
940 | $(addprefix examples/standalone/, smc91111_eeprom smc911x_eeprom) \ | 1101 | $(addprefix examples/standalone/, smc91111_eeprom smc911x_eeprom) \ |
941 | examples/standalone/test_burst \ | 1102 | examples/standalone/test_burst \ |
942 | examples/standalone/timer | 1103 | examples/standalone/timer |
943 | @rm -f $(addprefix examples/api/, demo demo.bin) | 1104 | @rm -f $(addprefix examples/api/, demo demo.bin) |
944 | @rm -f tools/bmp_logo tools/easylogo/easylogo \ | 1105 | @rm -f tools/bmp_logo tools/easylogo/easylogo \ |
945 | tools/env/fw_printenv \ | 1106 | tools/env/fw_printenv \ |
946 | tools/envcrc \ | 1107 | tools/envcrc \ |
947 | $(addprefix tools/gdb/, gdbcont gdbsend) \ | 1108 | $(addprefix tools/gdb/, gdbcont gdbsend) \ |
948 | tools/gen_eth_addr tools/img2srec \ | 1109 | tools/gen_eth_addr tools/img2srec \ |
949 | tools/dumpimage \ | 1110 | tools/dumpimage \ |
950 | $(addprefix tools/, mkenvimage mkimage) \ | 1111 | $(addprefix tools/, mkenvimage mkimage) \ |
951 | tools/mpc86x_clk \ | 1112 | tools/mpc86x_clk \ |
952 | $(addprefix tools/, mk$(BOARD)spl mkexynosspl) \ | 1113 | $(addprefix tools/, mk$(BOARD)spl mkexynosspl) \ |
953 | tools/mxsboot \ | 1114 | tools/mxsboot \ |
954 | tools/ncb tools/ubsha1 \ | 1115 | tools/ncb tools/ubsha1 \ |
955 | tools/kernel-doc/docproc \ | 1116 | tools/kernel-doc/docproc \ |
956 | tools/proftool | 1117 | tools/proftool |
957 | @rm -f $(addprefix board/cray/L1/, bootscript.c bootscript.image) \ | 1118 | @rm -f $(addprefix board/cray/L1/, bootscript.c bootscript.image) \ |
958 | board/matrix_vision/*/bootscript.img \ | 1119 | board/matrix_vision/*/bootscript.img \ |
959 | spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ | 1120 | spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl \ |
960 | u-boot.lds \ | 1121 | u-boot.lds \ |
961 | $(addprefix arch/blackfin/cpu/, init.lds init.elf) | 1122 | $(addprefix arch/blackfin/cpu/, init.lds init.elf) |
962 | @rm -f include/bmp_logo.h | 1123 | @rm -f include/bmp_logo.h |
963 | @rm -f include/bmp_logo_data.h | 1124 | @rm -f include/bmp_logo_data.h |
964 | @rm -f lib/asm-offsets.s | 1125 | @rm -f lib/asm-offsets.s |
965 | @rm -f include/generated/asm-offsets.h | 1126 | @rm -f include/generated/asm-offsets.h |
966 | @rm -f $(CPUDIR)/$(SOC)/asm-offsets.s | 1127 | @rm -f $(CPUDIR)/$(SOC)/asm-offsets.s |
967 | @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) | 1128 | @rm -f $(TIMESTAMP_FILE) $(VERSION_FILE) |
968 | @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs | 1129 | @$(MAKE) -f $(srctree)/doc/DocBook/Makefile cleandocs |
969 | @find $(OBJTREE) -type f \ | 1130 | @find $(OBJTREE) -type f \ |
970 | \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ | 1131 | \( -name 'core' -o -name '*.bak' -o -name '*~' -o -name '*.su' \ |
971 | -o -name '*.o' -o -name '*.a' -o -name '*.exe' \ | 1132 | -o -name '*.o' -o -name '*.a' -o -name '*.exe' -o -name '*.cmd' \ |
972 | -o -name '*.cfgtmp' \) -print \ | 1133 | -o -name '*.cfgtmp' \) -print \ |
973 | | xargs rm -f | 1134 | | xargs rm -f |
974 | 1135 | ||
975 | # Removes everything not needed for testing u-boot | 1136 | # Removes everything not needed for testing u-boot |
976 | tidy: clean | 1137 | tidy: clean |
977 | @find $(OBJTREE) -type f \( -name '*.depend*' \) -print | xargs rm -f | 1138 | @find $(OBJTREE) -type f \( -name '*.depend*' \) -print | xargs rm -f |
978 | 1139 | ||
979 | clobber: tidy | 1140 | clobber: tidy |
980 | @find $(OBJTREE) -type f \( -name '*.srec' \ | 1141 | @find $(OBJTREE) -type f \( -name '*.srec' \ |
981 | -o -name '*.bin' -o -name u-boot.img \) \ | 1142 | -o -name '*.bin' -o -name u-boot.img \) \ |
982 | -print0 | xargs -0 rm -f | 1143 | -print0 | xargs -0 rm -f |
983 | @rm -f $(OBJS) *.bak ctags etags TAGS \ | 1144 | @rm -f $(OBJS) *.bak ctags etags TAGS \ |
984 | cscope.* *.*~ | 1145 | cscope.* *.*~ |
985 | @rm -f u-boot u-boot.map u-boot.hex $(ALL-y) | 1146 | @rm -f u-boot u-boot.map u-boot.hex $(ALL-y) |
986 | @rm -f u-boot.kwb | 1147 | @rm -f u-boot.kwb |
987 | @rm -f u-boot.pbl | 1148 | @rm -f u-boot.pbl |
988 | @rm -f u-boot.imx | 1149 | @rm -f u-boot.imx |
989 | @rm -f u-boot-with-spl.imx | 1150 | @rm -f u-boot-with-spl.imx |
990 | @rm -f u-boot-with-nand-spl.imx | 1151 | @rm -f u-boot-with-nand-spl.imx |
991 | @rm -f u-boot.ubl | 1152 | @rm -f u-boot.ubl |
992 | @rm -f u-boot.ais | 1153 | @rm -f u-boot.ais |
993 | @rm -f u-boot.dtb | 1154 | @rm -f u-boot.dtb |
994 | @rm -f u-boot.sb | 1155 | @rm -f u-boot.sb |
995 | @rm -f u-boot.spr | 1156 | @rm -f u-boot.spr |
996 | @rm -f $(addprefix nand_spl/, u-boot.lds u-boot.lst System.map) | 1157 | @rm -f $(addprefix nand_spl/, u-boot.lds u-boot.lst System.map) |
997 | @rm -f $(addprefix nand_spl/, u-boot-nand_spl.lds u-boot-spl u-boot-spl.map) | 1158 | @rm -f $(addprefix nand_spl/, u-boot-nand_spl.lds u-boot-spl u-boot-spl.map) |
998 | @rm -f $(addprefix spl/, u-boot-spl u-boot-spl.bin u-boot-spl.map) | 1159 | @rm -f $(addprefix spl/, u-boot-spl u-boot-spl.bin u-boot-spl.map) |
999 | @rm -f spl/u-boot-spl.lds | 1160 | @rm -f spl/u-boot-spl.lds |
1000 | @rm -f $(addprefix tpl/, u-boot-tpl u-boot-tpl.bin u-boot-tpl.map) | 1161 | @rm -f $(addprefix tpl/, u-boot-tpl u-boot-tpl.bin u-boot-tpl.map) |
1001 | @rm -f tpl/u-boot-spl.lds | 1162 | @rm -f tpl/u-boot-spl.lds |
1002 | @rm -f MLO MLO.byteswap | 1163 | @rm -f MLO MLO.byteswap |
1003 | @rm -f SPL | 1164 | @rm -f SPL |
1004 | @rm -f tools/xway-swap-bytes | 1165 | @rm -f tools/xway-swap-bytes |
1005 | @rm -fr include/asm/proc include/asm/arch include/asm | 1166 | @rm -fr include/asm/proc include/asm/arch include/asm |
1006 | @rm -fr include/generated | 1167 | @rm -fr include/generated |
1007 | @[ ! -d nand_spl ] || find nand_spl -name "*" -type l -print | xargs rm -f | 1168 | @[ ! -d nand_spl ] || find nand_spl -name "*" -type l -print | xargs rm -f |
1008 | @rm -f dts/*.tmp | 1169 | @rm -f dts/*.tmp |
1009 | @rm -f $(addprefix spl/, u-boot-spl.ais, u-boot-spl-pad.ais) | 1170 | @rm -f $(addprefix spl/, u-boot-spl.ais, u-boot-spl-pad.ais) |
1010 | 1171 | ||
1011 | mrproper \ | 1172 | mrproper \ |
1012 | distclean: clobber unconfig | 1173 | distclean: clobber unconfig |
1013 | ifneq ($(OBJTREE),$(SRCTREE)) | 1174 | ifneq ($(OBJTREE),$(SRCTREE)) |
arch/arm/imx-common/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 | # (C) Copyright 2011 Freescale Semiconductor, Inc. | 5 | # (C) Copyright 2011 Freescale Semiconductor, Inc. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) | 10 | ifeq ($(SOC),$(filter $(SOC),mx25 mx35 mx5 mx6 vf610)) |
11 | obj-y = iomux-v3.o | 11 | obj-y = iomux-v3.o |
12 | endif | 12 | endif |
13 | ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) | 13 | ifeq ($(SOC),$(filter $(SOC),mx5 mx6)) |
14 | obj-y += timer.o cpu.o speed.o | 14 | obj-y += timer.o cpu.o speed.o |
15 | obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o | 15 | obj-$(CONFIG_SYS_I2C_MXC) += i2c-mxv7.o |
16 | endif | 16 | endif |
17 | ifeq ($(SOC),$(filter $(SOC),mx6 mxs)) | 17 | ifeq ($(SOC),$(filter $(SOC),mx6 mxs)) |
18 | obj-y += misc.o | 18 | obj-y += misc.o |
19 | endif | 19 | endif |
20 | ifeq ($(SOC),$(filter $(SOC),mx6)) | 20 | ifeq ($(SOC),$(filter $(SOC),mx6)) |
21 | obj-$(CONFIG_CMD_SATA) += sata.o | 21 | obj-$(CONFIG_CMD_SATA) += sata.o |
22 | endif | 22 | endif |
23 | obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o | 23 | obj-$(CONFIG_CMD_BMODE) += cmd_bmode.o |
24 | obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o | 24 | obj-$(CONFIG_CMD_HDMIDETECT) += cmd_hdmidet.o |
25 | 25 | ||
26 | $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/% | 26 | $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp: $(OBJTREE)/%.cfgtmp : $(SRCTREE)/% |
27 | mkdir -p $(dir $@) | 27 | mkdir -p $(dir $@) |
28 | $(CC) -E -x c $< $(CPPFLAGS) -o $@ | 28 | $(CPP) $(cpp_flags) -x c -o $@ $< |
29 | 29 | ||
30 | $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp | 30 | $(OBJTREE)/u-boot.imx: $(OBJTREE)/u-boot.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp |
31 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ | 31 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ |
32 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ | 32 | -e $(CONFIG_SYS_TEXT_BASE) -d $< $@ |
33 | 33 | ||
34 | $(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp | 34 | $(OBJTREE)/SPL: $(OBJTREE)/spl/u-boot-spl.bin $(OBJTREE)/$(patsubst "%",%,$(CONFIG_IMX_CONFIG)).cfgtmp |
35 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ | 35 | $(OBJTREE)/tools/mkimage -n $(filter-out %.bin,$^) -T imximage \ |
36 | -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ | 36 | -e $(CONFIG_SPL_TEXT_BASE) -d $< $@ |
37 | 37 | ||
38 | $(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin | 38 | $(OBJTREE)/u-boot-with-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin |
39 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ | 39 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ |
40 | -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx | 40 | -I binary -O binary $< $(OBJTREE)/spl/u-boot-spl-pad.imx |
41 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ | 41 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ |
42 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ | 42 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ |
43 | $(OBJTREE)/u-boot.uim | 43 | $(OBJTREE)/u-boot.uim |
44 | cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ | 44 | cat $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ |
45 | rm $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim | 45 | rm $(OBJTREE)/spl/u-boot-spl-pad.imx $(OBJTREE)/u-boot.uim |
46 | 46 | ||
47 | $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin | 47 | $(OBJTREE)/u-boot-with-nand-spl.imx: $(OBJTREE)/SPL $(OBJTREE)/u-boot.bin |
48 | (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \ | 48 | (echo -ne '\x00\x00\x00\x00\x46\x43\x42\x20\x01' && \ |
49 | dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | \ | 49 | dd bs=1015 count=1 if=/dev/zero 2>/dev/null) | \ |
50 | cat - $< > $(OBJTREE)/spl/u-boot-nand-spl.imx | 50 | cat - $< > $(OBJTREE)/spl/u-boot-nand-spl.imx |
51 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ | 51 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(CONFIG_SPL_PAD_TO) \ |
52 | -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ | 52 | -I binary -O binary $(OBJTREE)/spl/u-boot-nand-spl.imx \ |
53 | $(OBJTREE)/spl/u-boot-nand-spl-pad.imx | 53 | $(OBJTREE)/spl/u-boot-nand-spl-pad.imx |
54 | rm $(OBJTREE)/spl/u-boot-nand-spl.imx | 54 | rm $(OBJTREE)/spl/u-boot-nand-spl.imx |
55 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ | 55 | $(OBJTREE)/tools/mkimage -A arm -O U-Boot -a $(CONFIG_SYS_TEXT_BASE) \ |
56 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ | 56 | -e $(CONFIG_SYS_TEXT_BASE) -C none -d $(OBJTREE)/u-boot.bin \ |
57 | $(OBJTREE)/u-boot.uim | 57 | $(OBJTREE)/u-boot.uim |
58 | cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ | 58 | cat $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim > $@ |
59 | rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim | 59 | rm $(OBJTREE)/spl/u-boot-nand-spl-pad.imx $(OBJTREE)/u-boot.uim |
60 | 60 |
arch/blackfin/cpu/Makefile
1 | # | 1 | # |
2 | # U-boot - Makefile | 2 | # U-boot - Makefile |
3 | # | 3 | # |
4 | # Copyright (c) 2005-2008 Analog Device Inc. | 4 | # Copyright (c) 2005-2008 Analog Device Inc. |
5 | # | 5 | # |
6 | # (C) Copyright 2000-2006 | 6 | # (C) Copyright 2000-2006 |
7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
8 | # | 8 | # |
9 | # Licensed under the GPL-2 or later. | 9 | # Licensed under the GPL-2 or later. |
10 | # | 10 | # |
11 | 11 | ||
12 | extra-y := init.elf | 12 | extra-y := init.elf |
13 | extra-y += initcode.o | 13 | extra-y += initcode.o |
14 | extra-y += start.o | 14 | extra-y += start.o |
15 | obj-y := interrupt.o cache.o | 15 | obj-y := interrupt.o cache.o |
16 | obj-y += cpu.o | 16 | obj-y += cpu.o |
17 | obj-y += gpio.o | 17 | obj-y += gpio.o |
18 | obj-y += interrupts.o | 18 | obj-y += interrupts.o |
19 | obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o | 19 | obj-$(CONFIG_JTAG_CONSOLE) += jtag-console.o |
20 | obj-y += os_log.o | 20 | obj-y += os_log.o |
21 | obj-y += reset.o | 21 | obj-y += reset.o |
22 | obj-y += traps.o | 22 | obj-y += traps.o |
23 | 23 | ||
24 | extra-y += check_initcode | 24 | extra-y += check_initcode |
25 | 25 | ||
26 | # make sure our initcode (which goes into LDR) does not | 26 | # make sure our initcode (which goes into LDR) does not |
27 | # have relocs or external references | 27 | # have relocs or external references |
28 | $(obj)/initcode.o: CFLAGS += -fno-function-sections -fno-data-sections | 28 | CFLAGS_REMOVE_initcode.o := -ffunction-sections -fdata-sections |
29 | READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $< | 29 | READINIT = env LC_ALL=C $(CROSS_COMPILE)readelf -s $< |
30 | $(obj)/check_initcode: $(obj)/initcode.o | 30 | $(obj)/check_initcode: $(obj)/initcode.o |
31 | ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) | 31 | ifneq ($(CONFIG_BFIN_BOOT_MODE),BFIN_BOOT_BYPASS) |
32 | @if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \ | 32 | @if $(READINIT) | grep '\<GLOBAL\>.*\<UND\>' ; then \ |
33 | echo "$< contains external references!" 1>&2 ; \ | 33 | echo "$< contains external references!" 1>&2 ; \ |
34 | exit 1 ; \ | 34 | exit 1 ; \ |
35 | fi | 35 | fi |
36 | endif | 36 | endif |
37 | 37 | ||
38 | $(obj)/init.lds: $(src)/init.lds.S | 38 | CPPFLAGS_init.lds := -ansi |
39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P $^ -o $@ | ||
40 | $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o | 39 | $(obj)/init.elf: $(obj)/init.lds $(obj)/init.o $(obj)/initcode.o |
41 | $(LD) $(LDFLAGS) -T $^ -o $@ | 40 | $(LD) $(LDFLAGS) -T $^ -o $@ |
42 | 41 |
arch/blackfin/lib/Makefile
1 | # | 1 | # |
2 | # U-boot Makefile | 2 | # U-boot Makefile |
3 | # | 3 | # |
4 | # Copyright (c) 2005-2008 Analog Devices Inc. | 4 | # Copyright (c) 2005-2008 Analog Devices Inc. |
5 | # | 5 | # |
6 | # (C) Copyright 2000-2006 | 6 | # (C) Copyright 2000-2006 |
7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
8 | # | 8 | # |
9 | # SPDX-License-Identifier: GPL-2.0+ | 9 | # SPDX-License-Identifier: GPL-2.0+ |
10 | # | 10 | # |
11 | 11 | ||
12 | CFLAGS += -DBFIN_BOARD_NAME='"$(BOARD)"' | 12 | # Unnecessary. |
13 | # Use CONFIG_SYS_BOARD instead of BFIN_BOARD_NAME | ||
14 | # and delete this. | ||
15 | ccflags-y += -DBFIN_BOARD_NAME='"$(BOARD)"' | ||
13 | 16 | ||
14 | obj-y += ins.o | 17 | obj-y += ins.o |
15 | obj-y += memcmp.o | 18 | obj-y += memcmp.o |
16 | obj-y += memcpy.o | 19 | obj-y += memcpy.o |
17 | obj-y += memmove.o | 20 | obj-y += memmove.o |
18 | obj-y += memset.o | 21 | obj-y += memset.o |
19 | obj-y += outs.o | 22 | obj-y += outs.o |
20 | obj-$(CONFIG_CMD_KGDB) += __kgdb.o | 23 | obj-$(CONFIG_CMD_KGDB) += __kgdb.o |
21 | obj-y += board.o | 24 | obj-y += board.o |
22 | obj-y += boot.o | 25 | obj-y += boot.o |
23 | obj-y += cache.o | 26 | obj-y += cache.o |
24 | obj-y += clocks.o | 27 | obj-y += clocks.o |
25 | obj-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o | 28 | obj-$(CONFIG_CMD_CACHE_DUMP) += cmd_cache_dump.o |
26 | obj-$(CONFIG_CMD_KGDB) += kgdb.o | 29 | obj-$(CONFIG_CMD_KGDB) += kgdb.o |
27 | obj-y += muldi3.o | 30 | obj-y += muldi3.o |
28 | obj-$(CONFIG_HAS_POST) += post.o | 31 | obj-$(CONFIG_HAS_POST) += post.o |
29 | obj-y += string.o | 32 | obj-y += string.o |
30 | 33 |
arch/m68k/cpu/mcf5227x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2004 | 2 | # (C) Copyright 2000-2004 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y = start.o | 10 | extra-y = start.o |
11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o | 11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o |
12 | 12 |
arch/m68k/cpu/mcf523x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2004 | 2 | # (C) Copyright 2000-2004 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y = start.o | 10 | extra-y = start.o |
11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o | 11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o |
12 | 12 |
arch/m68k/cpu/mcf52x2/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y = start.o | 10 | extra-y = start.o |
11 | obj-y = interrupts.o cpu.o speed.o cpu_init.o | 11 | obj-y = interrupts.o cpu.o speed.o cpu_init.o |
12 | 12 |
arch/m68k/cpu/mcf532x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2004 | 2 | # (C) Copyright 2000-2004 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y := start.o | 10 | extra-y := start.o |
11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o | 11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o |
12 | 12 |
arch/m68k/cpu/mcf5445x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2004 | 2 | # (C) Copyright 2000-2004 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y = start.o | 10 | extra-y = start.o |
11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o pci.o | 11 | obj-y = cpu.o speed.o cpu_init.o interrupts.o pci.o |
12 | 12 |
arch/m68k/cpu/mcf547x_8x/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000-2004 | 2 | # (C) Copyright 2000-2004 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y = start.o | 10 | extra-y = start.o |
11 | obj-y = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o | 11 | obj-y = cpu.o speed.o cpu_init.o pci.o interrupts.o slicetimer.o |
12 | 12 |
arch/powerpc/cpu/mpc8xx/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DET_DEBUG | 8 | # ccflags-y += -DET_DEBUG |
9 | 9 | ||
10 | extra-y += start.o | 10 | extra-y += start.o |
11 | extra-y += traps.o | 11 | extra-y += traps.o |
12 | obj-y += bedbug_860.o | 12 | obj-y += bedbug_860.o |
13 | obj-y += commproc.o | 13 | obj-y += commproc.o |
14 | obj-y += cpu.o | 14 | obj-y += cpu.o |
15 | obj-y += cpu_init.o | 15 | obj-y += cpu_init.o |
16 | obj-y += fec.o | 16 | obj-y += fec.o |
17 | obj-$(CONFIG_OF_LIBFDT) += fdt.o | 17 | obj-$(CONFIG_OF_LIBFDT) += fdt.o |
18 | obj-y += i2c.o | 18 | obj-y += i2c.o |
19 | obj-y += interrupts.o | 19 | obj-y += interrupts.o |
20 | obj-y += scc.o | 20 | obj-y += scc.o |
21 | obj-y += serial.o | 21 | obj-y += serial.o |
22 | obj-y += speed.o | 22 | obj-y += speed.o |
23 | obj-y += spi.o | 23 | obj-y += spi.o |
24 | obj-y += upatch.o | 24 | obj-y += upatch.o |
25 | obj-y += video.o | 25 | obj-y += video.o |
26 | obj-y += kgdb.o | 26 | obj-y += kgdb.o |
27 | obj-y += plprcr_write.o | 27 | obj-y += plprcr_write.o |
28 | 28 |
arch/powerpc/lib/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | ## Build a couple of necessary functions into a private libgcc | 8 | ## Build a couple of necessary functions into a private libgcc |
9 | ## if the user asked for it | 9 | ## if the user asked for it |
10 | ifdef USE_PRIVATE_LIBGCC | 10 | ifdef USE_PRIVATE_LIBGCC |
11 | lib-y += _ashldi3.o | 11 | lib-y += _ashldi3.o |
12 | lib-y += _ashrdi3.o | 12 | lib-y += _ashrdi3.o |
13 | lib-y += _lshrdi3.o | 13 | lib-y += _lshrdi3.o |
14 | endif | 14 | endif |
15 | 15 | ||
16 | MINIMAL= | 16 | MINIMAL= |
17 | 17 | ||
18 | ifdef CONFIG_SPL_BUILD | 18 | ifdef CONFIG_SPL_BUILD |
19 | ifdef CONFIG_SPL_INIT_MINIMAL | 19 | ifdef CONFIG_SPL_INIT_MINIMAL |
20 | MINIMAL=y | 20 | MINIMAL=y |
21 | endif | 21 | endif |
22 | endif | 22 | endif |
23 | 23 | ||
24 | ifdef MINIMAL | 24 | ifdef MINIMAL |
25 | obj-y += cache.o time.o | 25 | obj-y += cache.o time.o |
26 | obj-y += ticks.o | 26 | obj-y += ticks.o |
27 | else | 27 | else |
28 | 28 | ||
29 | obj-y += ppcstring.o | 29 | obj-y += ppcstring.o |
30 | 30 | ||
31 | obj-y += ppccache.o | 31 | obj-y += ppccache.o |
32 | obj-y += ticks.o | 32 | obj-y += ticks.o |
33 | obj-y += reloc.o | 33 | obj-y += reloc.o |
34 | 34 | ||
35 | obj-$(CONFIG_BAT_RW) += bat_rw.o | 35 | obj-$(CONFIG_BAT_RW) += bat_rw.o |
36 | ifndef CONFIG_SPL_BUILD | 36 | ifndef CONFIG_SPL_BUILD |
37 | ifndef CONFIG_SYS_GENERIC_BOARD | 37 | ifndef CONFIG_SYS_GENERIC_BOARD |
38 | obj-y += board.o | 38 | obj-y += board.o |
39 | endif | 39 | endif |
40 | endif | 40 | endif |
41 | obj-$(CONFIG_CMD_BOOTM) += bootm.o | 41 | obj-$(CONFIG_CMD_BOOTM) += bootm.o |
42 | obj-y += cache.o | 42 | obj-y += cache.o |
43 | obj-y += extable.o | 43 | obj-y += extable.o |
44 | obj-y += interrupts.o | 44 | obj-y += interrupts.o |
45 | obj-$(CONFIG_CMD_KGDB) += kgdb.o | 45 | obj-$(CONFIG_CMD_KGDB) += kgdb.o |
46 | obj-$(CONFIG_CMD_IDE) += ide.o | 46 | obj-$(CONFIG_CMD_IDE) += ide.o |
47 | obj-y += time.o | 47 | obj-y += time.o |
48 | 48 | ||
49 | # Don't include the MPC5xxx special memcpy into the | 49 | # Don't include the MPC5xxx special memcpy into the |
50 | # SPL U-Boot image. memcpy is used in the SPL NOR | 50 | # SPL U-Boot image. memcpy is used in the SPL NOR |
51 | # flash driver. And we need the real, fast memcpy | 51 | # flash driver. And we need the real, fast memcpy |
52 | # here. We have no problems with unaligned access. | 52 | # here. We have no problems with unaligned access. |
53 | ifndef CONFIG_SPL_BUILD | 53 | ifndef CONFIG_SPL_BUILD |
54 | # Workaround for local bus unaligned access problems | 54 | # Workaround for local bus unaligned access problems |
55 | # on MPC512x and MPC5200 | 55 | # on MPC512x and MPC5200 |
56 | ifdef CONFIG_MPC512X | 56 | ifdef CONFIG_MPC512X |
57 | $(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy | 57 | AFLAGS_ppcstring.o += -Dmemcpy=__memcpy |
58 | obj-y += memcpy_mpc5200.o | 58 | obj-y += memcpy_mpc5200.o |
59 | endif | 59 | endif |
60 | ifdef CONFIG_MPC5200 | 60 | ifdef CONFIG_MPC5200 |
61 | $(obj)/ppcstring.o: AFLAGS += -Dmemcpy=__memcpy | 61 | AFLAGS_ppcstring.o += -Dmemcpy=__memcpy |
62 | obj-y += memcpy_mpc5200.o | 62 | obj-y += memcpy_mpc5200.o |
63 | endif | 63 | endif |
64 | endif | 64 | endif |
65 | 65 | ||
66 | endif # not minimal | 66 | endif # not minimal |
67 | 67 | ||
68 | ifdef CONFIG_SPL_BUILD | 68 | ifdef CONFIG_SPL_BUILD |
69 | obj-$(CONFIG_SPL_FRAMEWORK) += spl.o | 69 | obj-$(CONFIG_SPL_FRAMEWORK) += spl.o |
70 | endif | 70 | endif |
71 | 71 |
arch/sandbox/cpu/Makefile
1 | # | 1 | # |
2 | # Copyright (c) 2011 The Chromium OS Authors. | 2 | # Copyright (c) 2011 The Chromium OS Authors. |
3 | # | 3 | # |
4 | # (C) Copyright 2000-2003 | 4 | # (C) Copyright 2000-2003 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | obj-y := cpu.o os.o start.o state.o | 10 | obj-y := cpu.o os.o start.o state.o |
11 | 11 | ||
12 | # os.c is build in the system environment, so needs standard includes | 12 | # os.c is build in the system environment, so needs standard includes |
13 | $(obj)/os.o: CFLAGS := $(filter-out -nostdinc,\ | 13 | # CFLAGS_REMOVE_os.o cannot be used to drop header include path |
14 | $(patsubst -I%,-idirafter%,$(CFLAGS))) | 14 | quiet_cmd_cc_os.o = CC $(quiet_modtag) $@ |
15 | $(obj)/.depend.os: CPPFLAGS := $(filter-out -nostdinc,\ | 15 | cmd_cc_os.o = $(CC) $(filter-out -nostdinc, \ |
16 | $(patsubst -I%,-idirafter%,$(CPPFLAGS))) | 16 | $(patsubst -I%,-idirafter%,$(c_flags))) -c -o $@ $< |
17 | |||
18 | $(obj)/os.o: $(src)/os.c FORCE | ||
19 | $(call if_changed_dep,cc_os.o) | ||
17 | 20 |
board/bct-brettl2/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/bf518f-ezbrd/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/bf526-ezbrd/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/bf527-ad7160-eval/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/bf527-ezkit/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/bf527-sdp/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 6 |
16 | 17 |
board/bf533-ezkit/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/bf533-stamp/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/bf537-stamp/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 | 17 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 |
17 | 18 |
board/bf538f-ezkit/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/bf548-ezkit/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 |
16 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 | 17 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 |
17 | LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1 | 18 | LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1 |
18 | LDR_FLAGS-BFIN_BOOT_UART := --dma 1 | 19 | LDR_FLAGS-BFIN_BOOT_UART := --dma 1 |
19 | LDR_FLAGS-BFIN_BOOT_NAND := --dma 6 | 20 | LDR_FLAGS-BFIN_BOOT_NAND := --dma 6 |
20 | 21 |
board/bf561-acvilon/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 |
16 | 17 |
board/bf561-ezkit/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 |
16 | 17 |
board/br4/config.mk
1 | # | 1 | # |
2 | # Copyright (c) Switchfin Org. <dpn@switchfin.org> | 2 | # Copyright (c) Switchfin Org. <dpn@switchfin.org> |
3 | # | 3 | # |
4 | # Copyright (c) 2005-2008 Analog Device Inc. | 4 | # Copyright (c) 2005-2008 Analog Device Inc. |
5 | # | 5 | # |
6 | # (C) Copyright 2001 | 6 | # (C) Copyright 2001 |
7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
8 | # | 8 | # |
9 | # SPDX-License-Identifier: GPL-2.0+ | 9 | # SPDX-License-Identifier: GPL-2.0+ |
10 | # | 10 | # |
11 | 11 | ||
12 | CFLAGS_lib += -O2 | 12 | # FIX ME |
13 | CFLAGS_lib/lzma += -O2 | 13 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
14 | CFLAGS_lib/zlib += -O2 | 14 | ccflags-y := -O2 |
15 | endif | ||
15 | 16 |
board/cm-bf527/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/cm-bf533/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/cm-bf537e/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/cm-bf537u/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
board/cm-bf548/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --dma 6 |
16 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 | 17 | LDR_FLAGS-BFIN_BOOT_FIFO := --dma 1 |
17 | LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1 | 18 | LDR_FLAGS-BFIN_BOOT_SPI_MASTER := --dma 1 |
18 | LDR_FLAGS-BFIN_BOOT_UART := --dma 1 | 19 | LDR_FLAGS-BFIN_BOOT_UART := --dma 1 |
19 | 20 |
board/cm-bf561/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 |
16 | 17 |
board/ip04/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 | 17 | LDR_FLAGS-BFIN_BOOT_UART := --port g --gpio 6 |
17 | 18 |
board/matrix_vision/mvblx/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2000, 2001, 2002 | 2 | # (C) Copyright 2000, 2001, 2002 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | obj-y += mvblx.o fpga.o | 8 | obj-y += mvblx.o fpga.o |
9 | obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o | 9 | obj-$(CONFIG_ID_EEPROM) += sys_eeprom.o |
10 | 10 | ||
11 | CFLAGS += -Werror | 11 | ccflags-y += -Werror |
12 | 12 |
board/pr1/config.mk
1 | # | 1 | # |
2 | # Copyright (c) Switchfin Org. <dpn@switchfin.org> | 2 | # Copyright (c) Switchfin Org. <dpn@switchfin.org> |
3 | # | 3 | # |
4 | # Copyright (c) 2005-2008 Analog Device Inc. | 4 | # Copyright (c) 2005-2008 Analog Device Inc. |
5 | # | 5 | # |
6 | # (C) Copyright 2001 | 6 | # (C) Copyright 2001 |
7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 7 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
8 | # | 8 | # |
9 | # SPDX-License-Identifier: GPL-2.0+ | 9 | # SPDX-License-Identifier: GPL-2.0+ |
10 | # | 10 | # |
11 | 11 | ||
12 | CFLAGS_lib += -O2 | 12 | # FIX ME |
13 | CFLAGS_lib/lzma += -O2 | 13 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
14 | CFLAGS_lib/zlib += -O2 | 14 | ccflags-y := -O2 |
15 | endif | ||
15 | 16 |
board/sandburst/karef/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006 | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # (C) Copyright 2005 | 5 | # (C) Copyright 2005 |
6 | # Sandburst Corporation | 6 | # Sandburst Corporation |
7 | # Travis B. Sawyer | 7 | # Travis B. Sawyer |
8 | # | 8 | # |
9 | # SPDX-License-Identifier: GPL-2.0+ | 9 | # SPDX-License-Identifier: GPL-2.0+ |
10 | # | 10 | # |
11 | 11 | ||
12 | # TBS: add for debugging purposes | 12 | # TBS: add for debugging purposes |
13 | BUILDUSER := $(shell whoami) | 13 | BUILDUSER := $(shell whoami) |
14 | FORCEBUILD := $(shell rm -f karef.o) | 14 | FORCEBUILD := $(shell rm -f karef.o) |
15 | 15 | ||
16 | CFLAGS += -DBUILDUSER='"$(BUILDUSER)"' | 16 | ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' |
17 | # TBS: end debugging | 17 | # TBS: end debugging |
18 | 18 | ||
19 | obj-y = karef.o ../common/flash.o ../common/sb_common.o | 19 | obj-y = karef.o ../common/flash.o ../common/sb_common.o |
20 | extra-y += init.o | 20 | extra-y += init.o |
21 | 21 |
board/sandburst/metrobox/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006 | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # (C) Copyright 2005 | 5 | # (C) Copyright 2005 |
6 | # Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com | 6 | # Travis B. Sawyer, Sandburst Corporation, tsawyer@sandburst.com |
7 | # | 7 | # |
8 | # SPDX-License-Identifier: GPL-2.0+ | 8 | # SPDX-License-Identifier: GPL-2.0+ |
9 | # | 9 | # |
10 | 10 | ||
11 | # TBS: add for debugging purposes | 11 | # TBS: add for debugging purposes |
12 | BUILDUSER := $(shell whoami) | 12 | BUILDUSER := $(shell whoami) |
13 | FORCEBUILD := $(shell rm -f metrobox.o) | 13 | FORCEBUILD := $(shell rm -f metrobox.o) |
14 | 14 | ||
15 | CFLAGS += -DBUILDUSER='"$(BUILDUSER)"' | 15 | ccflags-y += -DBUILDUSER='"$(BUILDUSER)"' |
16 | # TBS: end debugging | 16 | # TBS: end debugging |
17 | 17 | ||
18 | obj-y = metrobox.o ../common/flash.o ../common/sb_common.o | 18 | obj-y = metrobox.o ../common/flash.o ../common/sb_common.o |
19 | extra-y += init.o | 19 | extra-y += init.o |
20 | 20 |
board/st-ericsson/snowball/Makefile
1 | # | 1 | # |
2 | # Copyright (C) ST-Ericsson SA 2009 | 2 | # Copyright (C) ST-Ericsson SA 2009 |
3 | # | 3 | # |
4 | # SPDX-License-Identifier: GPL-2.0+ | 4 | # SPDX-License-Identifier: GPL-2.0+ |
5 | # | 5 | # |
6 | 6 | ||
7 | CFLAGS += -D__RELEASE -D__STN_8500 | 7 | ccflags-y += -D__RELEASE -D__STN_8500 |
8 | 8 | ||
9 | obj-y := snowball.o | 9 | obj-y := snowball.o |
10 | 10 |
board/st-ericsson/u8500/Makefile
1 | # | 1 | # |
2 | # Copyright (C) ST-Ericsson SA 2009 | 2 | # Copyright (C) ST-Ericsson SA 2009 |
3 | # | 3 | # |
4 | # SPDX-License-Identifier: GPL-2.0+ | 4 | # SPDX-License-Identifier: GPL-2.0+ |
5 | # | 5 | # |
6 | 6 | ||
7 | CFLAGS += -D__RELEASE -D__STN_8500 | 7 | ccflags-y += -D__RELEASE -D__STN_8500 |
8 | 8 | ||
9 | obj-y := u8500_href.o gpio.o | 9 | obj-y := u8500_href.o gpio.o |
10 | 10 |
board/tcm-bf518/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 |
board/tcm-bf537/config.mk
1 | # | 1 | # |
2 | # Copyright (c) 2005-2008 Analog Device Inc. | 2 | # Copyright (c) 2005-2008 Analog Device Inc. |
3 | # | 3 | # |
4 | # (C) Copyright 2001 | 4 | # (C) Copyright 2001 |
5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 5 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CFLAGS_lib += -O2 | 10 | # FIX ME |
11 | CFLAGS_lib/lzma += -O2 | 11 | ifneq ($(filter lib lib/lzma lib/zlib, $(obj)),) |
12 | CFLAGS_lib/zlib += -O2 | 12 | ccflags-y := -O2 |
13 | endif | ||
13 | 14 | ||
14 | # Set some default LDR flags based on boot mode. | 15 | # Set some default LDR flags based on boot mode. |
15 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 | 16 | LDR_FLAGS-BFIN_BOOT_PARA := --bits 16 --dma 8 |
16 | 17 |
common/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2004-2006 | 2 | # (C) Copyright 2004-2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # core | 8 | # core |
9 | ifndef CONFIG_SPL_BUILD | 9 | ifndef CONFIG_SPL_BUILD |
10 | obj-y += main.o | 10 | obj-y += main.o |
11 | obj-y += command.o | 11 | obj-y += command.o |
12 | obj-y += exports.o | 12 | obj-y += exports.o |
13 | obj-y += hash.o | 13 | obj-y += hash.o |
14 | obj-$(CONFIG_SYS_HUSH_PARSER) += hush.o | 14 | obj-$(CONFIG_SYS_HUSH_PARSER) += hush.o |
15 | obj-y += s_record.o | 15 | obj-y += s_record.o |
16 | obj-y += xyzModem.o | 16 | obj-y += xyzModem.o |
17 | obj-y += cmd_disk.o | 17 | obj-y += cmd_disk.o |
18 | 18 | ||
19 | # boards | 19 | # boards |
20 | obj-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o | 20 | obj-$(CONFIG_SYS_GENERIC_BOARD) += board_f.o |
21 | obj-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o | 21 | obj-$(CONFIG_SYS_GENERIC_BOARD) += board_r.o |
22 | 22 | ||
23 | # core command | 23 | # core command |
24 | obj-y += cmd_boot.o | 24 | obj-y += cmd_boot.o |
25 | obj-$(CONFIG_CMD_BOOTM) += cmd_bootm.o | 25 | obj-$(CONFIG_CMD_BOOTM) += cmd_bootm.o |
26 | obj-y += cmd_help.o | 26 | obj-y += cmd_help.o |
27 | obj-y += cmd_version.o | 27 | obj-y += cmd_version.o |
28 | 28 | ||
29 | # environment | 29 | # environment |
30 | obj-y += env_attr.o | 30 | obj-y += env_attr.o |
31 | obj-y += env_callback.o | 31 | obj-y += env_callback.o |
32 | obj-y += env_flags.o | 32 | obj-y += env_flags.o |
33 | obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o | 33 | obj-$(CONFIG_ENV_IS_IN_DATAFLASH) += env_dataflash.o |
34 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o | 34 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_eeprom.o |
35 | extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o | 35 | extra-$(CONFIG_ENV_IS_EMBEDDED) += env_embedded.o |
36 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o | 36 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += env_embedded.o |
37 | extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o | 37 | extra-$(CONFIG_ENV_IS_IN_FLASH) += env_embedded.o |
38 | obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o | 38 | obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_embedded.o |
39 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o | 39 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o |
40 | obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o | 40 | obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o |
41 | obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o | 41 | obj-$(CONFIG_ENV_IS_IN_FAT) += env_fat.o |
42 | obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o | 42 | obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o |
43 | obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o | 43 | obj-$(CONFIG_ENV_IS_IN_NVRAM) += env_nvram.o |
44 | obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o | 44 | obj-$(CONFIG_ENV_IS_IN_ONENAND) += env_onenand.o |
45 | obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o | 45 | obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o |
46 | obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o | 46 | obj-$(CONFIG_ENV_IS_IN_REMOTE) += env_remote.o |
47 | obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o | 47 | obj-$(CONFIG_ENV_IS_IN_UBI) += env_ubi.o |
48 | obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o | 48 | obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o |
49 | 49 | ||
50 | # command | 50 | # command |
51 | obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o | 51 | obj-$(CONFIG_CMD_AMBAPP) += cmd_ambapp.o |
52 | obj-$(CONFIG_SOURCE) += cmd_source.o | 52 | obj-$(CONFIG_SOURCE) += cmd_source.o |
53 | obj-$(CONFIG_CMD_SOURCE) += cmd_source.o | 53 | obj-$(CONFIG_CMD_SOURCE) += cmd_source.o |
54 | obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o | 54 | obj-$(CONFIG_CMD_BDI) += cmd_bdinfo.o |
55 | obj-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o | 55 | obj-$(CONFIG_CMD_BEDBUG) += bedbug.o cmd_bedbug.o |
56 | obj-$(CONFIG_CMD_BMP) += cmd_bmp.o | 56 | obj-$(CONFIG_CMD_BMP) += cmd_bmp.o |
57 | obj-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o | 57 | obj-$(CONFIG_CMD_BOOTMENU) += cmd_bootmenu.o |
58 | obj-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o | 58 | obj-$(CONFIG_CMD_BOOTLDR) += cmd_bootldr.o |
59 | obj-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o | 59 | obj-$(CONFIG_CMD_BOOTSTAGE) += cmd_bootstage.o |
60 | obj-$(CONFIG_CMD_CACHE) += cmd_cache.o | 60 | obj-$(CONFIG_CMD_CACHE) += cmd_cache.o |
61 | obj-$(CONFIG_CMD_CBFS) += cmd_cbfs.o | 61 | obj-$(CONFIG_CMD_CBFS) += cmd_cbfs.o |
62 | obj-$(CONFIG_CMD_CLK) += cmd_clk.o | 62 | obj-$(CONFIG_CMD_CLK) += cmd_clk.o |
63 | obj-$(CONFIG_CMD_CONSOLE) += cmd_console.o | 63 | obj-$(CONFIG_CMD_CONSOLE) += cmd_console.o |
64 | obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o | 64 | obj-$(CONFIG_CMD_CPLBINFO) += cmd_cplbinfo.o |
65 | obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o | 65 | obj-$(CONFIG_DATAFLASH_MMC_SELECT) += cmd_dataflash_mmc_mux.o |
66 | obj-$(CONFIG_CMD_DATE) += cmd_date.o | 66 | obj-$(CONFIG_CMD_DATE) += cmd_date.o |
67 | obj-$(CONFIG_CMD_SOUND) += cmd_sound.o | 67 | obj-$(CONFIG_CMD_SOUND) += cmd_sound.o |
68 | ifdef CONFIG_4xx | 68 | ifdef CONFIG_4xx |
69 | obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o | 69 | obj-$(CONFIG_CMD_SETGETDCR) += cmd_dcr.o |
70 | endif | 70 | endif |
71 | ifdef CONFIG_POST | 71 | ifdef CONFIG_POST |
72 | obj-$(CONFIG_CMD_DIAG) += cmd_diag.o | 72 | obj-$(CONFIG_CMD_DIAG) += cmd_diag.o |
73 | endif | 73 | endif |
74 | obj-$(CONFIG_CMD_DISPLAY) += cmd_display.o | 74 | obj-$(CONFIG_CMD_DISPLAY) += cmd_display.o |
75 | obj-$(CONFIG_CMD_DTT) += cmd_dtt.o | 75 | obj-$(CONFIG_CMD_DTT) += cmd_dtt.o |
76 | obj-$(CONFIG_CMD_ECHO) += cmd_echo.o | 76 | obj-$(CONFIG_CMD_ECHO) += cmd_echo.o |
77 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o | 77 | obj-$(CONFIG_ENV_IS_IN_EEPROM) += cmd_eeprom.o |
78 | obj-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o | 78 | obj-$(CONFIG_CMD_EEPROM) += cmd_eeprom.o |
79 | obj-$(CONFIG_CMD_ELF) += cmd_elf.o | 79 | obj-$(CONFIG_CMD_ELF) += cmd_elf.o |
80 | obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o | 80 | obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_exit.o |
81 | obj-$(CONFIG_CMD_EXT4) += cmd_ext4.o | 81 | obj-$(CONFIG_CMD_EXT4) += cmd_ext4.o |
82 | obj-$(CONFIG_CMD_EXT2) += cmd_ext2.o | 82 | obj-$(CONFIG_CMD_EXT2) += cmd_ext2.o |
83 | obj-$(CONFIG_CMD_FAT) += cmd_fat.o | 83 | obj-$(CONFIG_CMD_FAT) += cmd_fat.o |
84 | obj-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o | 84 | obj-$(CONFIG_CMD_FDC)$(CONFIG_CMD_FDOS) += cmd_fdc.o |
85 | obj-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o | 85 | obj-$(CONFIG_OF_LIBFDT) += cmd_fdt.o fdt_support.o |
86 | obj-$(CONFIG_CMD_FDOS) += cmd_fdos.o | 86 | obj-$(CONFIG_CMD_FDOS) += cmd_fdos.o |
87 | obj-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o | 87 | obj-$(CONFIG_CMD_FITUPD) += cmd_fitupd.o |
88 | obj-$(CONFIG_CMD_FLASH) += cmd_flash.o | 88 | obj-$(CONFIG_CMD_FLASH) += cmd_flash.o |
89 | ifdef CONFIG_FPGA | 89 | ifdef CONFIG_FPGA |
90 | obj-$(CONFIG_CMD_FPGA) += cmd_fpga.o | 90 | obj-$(CONFIG_CMD_FPGA) += cmd_fpga.o |
91 | endif | 91 | endif |
92 | obj-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o | 92 | obj-$(CONFIG_CMD_FPGAD) += cmd_fpgad.o |
93 | obj-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o | 93 | obj-$(CONFIG_CMD_FS_GENERIC) += cmd_fs.o |
94 | obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o | 94 | obj-$(CONFIG_CMD_FUSE) += cmd_fuse.o |
95 | obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o | 95 | obj-$(CONFIG_CMD_GETTIME) += cmd_gettime.o |
96 | obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o | 96 | obj-$(CONFIG_CMD_GPIO) += cmd_gpio.o |
97 | obj-$(CONFIG_CMD_I2C) += cmd_i2c.o | 97 | obj-$(CONFIG_CMD_I2C) += cmd_i2c.o |
98 | obj-$(CONFIG_CMD_HASH) += cmd_hash.o | 98 | obj-$(CONFIG_CMD_HASH) += cmd_hash.o |
99 | obj-$(CONFIG_CMD_IDE) += cmd_ide.o | 99 | obj-$(CONFIG_CMD_IDE) += cmd_ide.o |
100 | obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o | 100 | obj-$(CONFIG_CMD_IMMAP) += cmd_immap.o |
101 | obj-$(CONFIG_CMD_INI) += cmd_ini.o | 101 | obj-$(CONFIG_CMD_INI) += cmd_ini.o |
102 | obj-$(CONFIG_CMD_IRQ) += cmd_irq.o | 102 | obj-$(CONFIG_CMD_IRQ) += cmd_irq.o |
103 | obj-$(CONFIG_CMD_ITEST) += cmd_itest.o | 103 | obj-$(CONFIG_CMD_ITEST) += cmd_itest.o |
104 | obj-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o | 104 | obj-$(CONFIG_CMD_JFFS2) += cmd_jffs2.o |
105 | obj-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o | 105 | obj-$(CONFIG_CMD_CRAMFS) += cmd_cramfs.o |
106 | obj-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o | 106 | obj-$(CONFIG_CMD_LDRINFO) += cmd_ldrinfo.o |
107 | obj-$(CONFIG_CMD_LED) += cmd_led.o | 107 | obj-$(CONFIG_CMD_LED) += cmd_led.o |
108 | obj-$(CONFIG_CMD_LICENSE) += cmd_license.o | 108 | obj-$(CONFIG_CMD_LICENSE) += cmd_license.o |
109 | obj-y += cmd_load.o | 109 | obj-y += cmd_load.o |
110 | obj-$(CONFIG_LOGBUFFER) += cmd_log.o | 110 | obj-$(CONFIG_LOGBUFFER) += cmd_log.o |
111 | obj-$(CONFIG_ID_EEPROM) += cmd_mac.o | 111 | obj-$(CONFIG_ID_EEPROM) += cmd_mac.o |
112 | obj-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o | 112 | obj-$(CONFIG_CMD_MD5SUM) += cmd_md5sum.o |
113 | obj-$(CONFIG_CMD_MEMORY) += cmd_mem.o | 113 | obj-$(CONFIG_CMD_MEMORY) += cmd_mem.o |
114 | obj-$(CONFIG_CMD_IO) += cmd_io.o | 114 | obj-$(CONFIG_CMD_IO) += cmd_io.o |
115 | obj-$(CONFIG_CMD_MFSL) += cmd_mfsl.o | 115 | obj-$(CONFIG_CMD_MFSL) += cmd_mfsl.o |
116 | obj-$(CONFIG_MII) += miiphyutil.o | 116 | obj-$(CONFIG_MII) += miiphyutil.o |
117 | obj-$(CONFIG_CMD_MII) += miiphyutil.o | 117 | obj-$(CONFIG_CMD_MII) += miiphyutil.o |
118 | obj-$(CONFIG_PHYLIB) += miiphyutil.o | 118 | obj-$(CONFIG_PHYLIB) += miiphyutil.o |
119 | obj-$(CONFIG_CMD_MII) += cmd_mii.o | 119 | obj-$(CONFIG_CMD_MII) += cmd_mii.o |
120 | ifdef CONFIG_PHYLIB | 120 | ifdef CONFIG_PHYLIB |
121 | obj-$(CONFIG_CMD_MII) += cmd_mdio.o | 121 | obj-$(CONFIG_CMD_MII) += cmd_mdio.o |
122 | endif | 122 | endif |
123 | obj-$(CONFIG_CMD_MISC) += cmd_misc.o | 123 | obj-$(CONFIG_CMD_MISC) += cmd_misc.o |
124 | obj-$(CONFIG_CMD_MMC) += cmd_mmc.o | 124 | obj-$(CONFIG_CMD_MMC) += cmd_mmc.o |
125 | obj-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o | 125 | obj-$(CONFIG_CMD_MMC_SPI) += cmd_mmc_spi.o |
126 | obj-$(CONFIG_MP) += cmd_mp.o | 126 | obj-$(CONFIG_MP) += cmd_mp.o |
127 | obj-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o | 127 | obj-$(CONFIG_CMD_MTDPARTS) += cmd_mtdparts.o |
128 | obj-$(CONFIG_CMD_NAND) += cmd_nand.o | 128 | obj-$(CONFIG_CMD_NAND) += cmd_nand.o |
129 | obj-$(CONFIG_CMD_NET) += cmd_net.o | 129 | obj-$(CONFIG_CMD_NET) += cmd_net.o |
130 | obj-$(CONFIG_CMD_ONENAND) += cmd_onenand.o | 130 | obj-$(CONFIG_CMD_ONENAND) += cmd_onenand.o |
131 | obj-$(CONFIG_CMD_OTP) += cmd_otp.o | 131 | obj-$(CONFIG_CMD_OTP) += cmd_otp.o |
132 | obj-$(CONFIG_CMD_PART) += cmd_part.o | 132 | obj-$(CONFIG_CMD_PART) += cmd_part.o |
133 | ifdef CONFIG_PCI | 133 | ifdef CONFIG_PCI |
134 | obj-$(CONFIG_CMD_PCI) += cmd_pci.o | 134 | obj-$(CONFIG_CMD_PCI) += cmd_pci.o |
135 | endif | 135 | endif |
136 | obj-y += cmd_pcmcia.o | 136 | obj-y += cmd_pcmcia.o |
137 | obj-$(CONFIG_CMD_PORTIO) += cmd_portio.o | 137 | obj-$(CONFIG_CMD_PORTIO) += cmd_portio.o |
138 | obj-$(CONFIG_CMD_PXE) += cmd_pxe.o | 138 | obj-$(CONFIG_CMD_PXE) += cmd_pxe.o |
139 | obj-$(CONFIG_CMD_READ) += cmd_read.o | 139 | obj-$(CONFIG_CMD_READ) += cmd_read.o |
140 | obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o | 140 | obj-$(CONFIG_CMD_REGINFO) += cmd_reginfo.o |
141 | obj-$(CONFIG_CMD_REISER) += cmd_reiser.o | 141 | obj-$(CONFIG_CMD_REISER) += cmd_reiser.o |
142 | obj-$(CONFIG_SANDBOX) += cmd_sandbox.o | 142 | obj-$(CONFIG_SANDBOX) += cmd_sandbox.o |
143 | obj-$(CONFIG_CMD_SATA) += cmd_sata.o | 143 | obj-$(CONFIG_CMD_SATA) += cmd_sata.o |
144 | obj-$(CONFIG_CMD_SF) += cmd_sf.o | 144 | obj-$(CONFIG_CMD_SF) += cmd_sf.o |
145 | obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o | 145 | obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o |
146 | obj-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o | 146 | obj-$(CONFIG_CMD_SHA1SUM) += cmd_sha1sum.o |
147 | obj-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o | 147 | obj-$(CONFIG_CMD_SETEXPR) += cmd_setexpr.o |
148 | obj-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o | 148 | obj-$(CONFIG_CMD_SOFTSWITCH) += cmd_softswitch.o |
149 | obj-$(CONFIG_CMD_SPI) += cmd_spi.o | 149 | obj-$(CONFIG_CMD_SPI) += cmd_spi.o |
150 | obj-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o | 150 | obj-$(CONFIG_CMD_SPIBOOTLDR) += cmd_spibootldr.o |
151 | obj-$(CONFIG_CMD_STRINGS) += cmd_strings.o | 151 | obj-$(CONFIG_CMD_STRINGS) += cmd_strings.o |
152 | obj-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o | 152 | obj-$(CONFIG_CMD_TERMINAL) += cmd_terminal.o |
153 | obj-$(CONFIG_CMD_TIME) += cmd_time.o | 153 | obj-$(CONFIG_CMD_TIME) += cmd_time.o |
154 | obj-$(CONFIG_CMD_TRACE) += cmd_trace.o | 154 | obj-$(CONFIG_CMD_TRACE) += cmd_trace.o |
155 | obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o | 155 | obj-$(CONFIG_SYS_HUSH_PARSER) += cmd_test.o |
156 | obj-$(CONFIG_CMD_TPM) += cmd_tpm.o | 156 | obj-$(CONFIG_CMD_TPM) += cmd_tpm.o |
157 | obj-$(CONFIG_CMD_TSI148) += cmd_tsi148.o | 157 | obj-$(CONFIG_CMD_TSI148) += cmd_tsi148.o |
158 | obj-$(CONFIG_CMD_UBI) += cmd_ubi.o | 158 | obj-$(CONFIG_CMD_UBI) += cmd_ubi.o |
159 | obj-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o | 159 | obj-$(CONFIG_CMD_UBIFS) += cmd_ubifs.o |
160 | obj-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o | 160 | obj-$(CONFIG_CMD_UNIVERSE) += cmd_universe.o |
161 | obj-$(CONFIG_CMD_UNZIP) += cmd_unzip.o | 161 | obj-$(CONFIG_CMD_UNZIP) += cmd_unzip.o |
162 | ifdef CONFIG_CMD_USB | 162 | ifdef CONFIG_CMD_USB |
163 | obj-y += cmd_usb.o | 163 | obj-y += cmd_usb.o |
164 | obj-y += usb.o usb_hub.o | 164 | obj-y += usb.o usb_hub.o |
165 | obj-$(CONFIG_USB_STORAGE) += usb_storage.o | 165 | obj-$(CONFIG_USB_STORAGE) += usb_storage.o |
166 | endif | 166 | endif |
167 | obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o | 167 | obj-$(CONFIG_CMD_USB_MASS_STORAGE) += cmd_usb_mass_storage.o |
168 | obj-$(CONFIG_CMD_THOR_DOWNLOAD) += cmd_thordown.o | 168 | obj-$(CONFIG_CMD_THOR_DOWNLOAD) += cmd_thordown.o |
169 | obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o | 169 | obj-$(CONFIG_CMD_XIMG) += cmd_ximg.o |
170 | obj-$(CONFIG_YAFFS2) += cmd_yaffs2.o | 170 | obj-$(CONFIG_YAFFS2) += cmd_yaffs2.o |
171 | obj-$(CONFIG_CMD_SPL) += cmd_spl.o | 171 | obj-$(CONFIG_CMD_SPL) += cmd_spl.o |
172 | obj-$(CONFIG_CMD_ZIP) += cmd_zip.o | 172 | obj-$(CONFIG_CMD_ZIP) += cmd_zip.o |
173 | obj-$(CONFIG_CMD_ZFS) += cmd_zfs.o | 173 | obj-$(CONFIG_CMD_ZFS) += cmd_zfs.o |
174 | 174 | ||
175 | # others | 175 | # others |
176 | obj-$(CONFIG_BOOTSTAGE) += bootstage.o | 176 | obj-$(CONFIG_BOOTSTAGE) += bootstage.o |
177 | obj-$(CONFIG_CONSOLE_MUX) += iomux.o | 177 | obj-$(CONFIG_CONSOLE_MUX) += iomux.o |
178 | obj-y += flash.o | 178 | obj-y += flash.o |
179 | obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o | 179 | obj-$(CONFIG_CMD_KGDB) += kgdb.o kgdb_stubs.o |
180 | obj-$(CONFIG_I2C_EDID) += edid.o | 180 | obj-$(CONFIG_I2C_EDID) += edid.o |
181 | obj-$(CONFIG_KALLSYMS) += kallsyms.o | 181 | obj-$(CONFIG_KALLSYMS) += kallsyms.o |
182 | obj-y += splash.o | 182 | obj-y += splash.o |
183 | obj-$(CONFIG_LCD) += lcd.o | 183 | obj-$(CONFIG_LCD) += lcd.o |
184 | obj-$(CONFIG_LYNXKDI) += lynxkdi.o | 184 | obj-$(CONFIG_LYNXKDI) += lynxkdi.o |
185 | obj-$(CONFIG_MENU) += menu.o | 185 | obj-$(CONFIG_MENU) += menu.o |
186 | obj-$(CONFIG_MODEM_SUPPORT) += modem.o | 186 | obj-$(CONFIG_MODEM_SUPPORT) += modem.o |
187 | obj-$(CONFIG_UPDATE_TFTP) += update.o | 187 | obj-$(CONFIG_UPDATE_TFTP) += update.o |
188 | obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o | 188 | obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o |
189 | obj-$(CONFIG_CMD_DFU) += cmd_dfu.o | 189 | obj-$(CONFIG_CMD_DFU) += cmd_dfu.o |
190 | obj-$(CONFIG_CMD_GPT) += cmd_gpt.o | 190 | obj-$(CONFIG_CMD_GPT) += cmd_gpt.o |
191 | endif | 191 | endif |
192 | 192 | ||
193 | ifdef CONFIG_SPL_BUILD | 193 | ifdef CONFIG_SPL_BUILD |
194 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o | 194 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o |
195 | obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o | 195 | obj-$(CONFIG_SPL_YMODEM_SUPPORT) += xyzModem.o |
196 | obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o | 196 | obj-$(CONFIG_SPL_NET_SUPPORT) += miiphyutil.o |
197 | # environment | 197 | # environment |
198 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o | 198 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_attr.o |
199 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o | 199 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_flags.o |
200 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o | 200 | obj-$(CONFIG_SPL_ENV_SUPPORT) += env_callback.o |
201 | ifdef CONFIG_SPL_USB_HOST_SUPPORT | 201 | ifdef CONFIG_SPL_USB_HOST_SUPPORT |
202 | obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o | 202 | obj-$(CONFIG_SPL_USB_SUPPORT) += usb.o usb_hub.o |
203 | obj-$(CONFIG_USB_STORAGE) += usb_storage.o | 203 | obj-$(CONFIG_USB_STORAGE) += usb_storage.o |
204 | endif | 204 | endif |
205 | ifdef CONFIG_SPL_SATA_SUPPORT | 205 | ifdef CONFIG_SPL_SATA_SUPPORT |
206 | obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o | 206 | obj-$(CONFIG_CMD_SCSI) += cmd_scsi.o |
207 | endif | 207 | endif |
208 | ifneq ($(CONFIG_SPL_NET_SUPPORT),y) | 208 | ifneq ($(CONFIG_SPL_NET_SUPPORT),y) |
209 | obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o | 209 | obj-$(CONFIG_ENV_IS_NOWHERE) += env_nowhere.o |
210 | obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o | 210 | obj-$(CONFIG_ENV_IS_IN_MMC) += env_mmc.o |
211 | obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o | 211 | obj-$(CONFIG_ENV_IS_IN_NAND) += env_nand.o |
212 | obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o | 212 | obj-$(CONFIG_ENV_IS_IN_SPI_FLASH) += env_sf.o |
213 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o | 213 | obj-$(CONFIG_ENV_IS_IN_FLASH) += env_flash.o |
214 | else | 214 | else |
215 | obj-y += env_nowhere.o | 215 | obj-y += env_nowhere.o |
216 | endif | 216 | endif |
217 | endif | 217 | endif |
218 | # core command | 218 | # core command |
219 | obj-y += cmd_nvedit.o | 219 | obj-y += cmd_nvedit.o |
220 | #environment | 220 | #environment |
221 | obj-y += env_common.o | 221 | obj-y += env_common.o |
222 | #others | 222 | #others |
223 | ifdef CONFIG_DDR_SPD | 223 | ifdef CONFIG_DDR_SPD |
224 | SPD := y | 224 | SPD := y |
225 | endif | 225 | endif |
226 | ifdef CONFIG_SPD_EEPROM | 226 | ifdef CONFIG_SPD_EEPROM |
227 | SPD := y | 227 | SPD := y |
228 | endif | 228 | endif |
229 | obj-$(SPD) += ddr_spd.o | 229 | obj-$(SPD) += ddr_spd.o |
230 | obj-$(CONFIG_HWCONFIG) += hwconfig.o | 230 | obj-$(CONFIG_HWCONFIG) += hwconfig.o |
231 | obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o | 231 | obj-$(CONFIG_BOUNCE_BUFFER) += bouncebuf.o |
232 | obj-y += console.o | 232 | obj-y += console.o |
233 | obj-y += dlmalloc.o | 233 | obj-y += dlmalloc.o |
234 | obj-y += image.o | 234 | obj-y += image.o |
235 | obj-$(CONFIG_OF_LIBFDT) += image-fdt.o | 235 | obj-$(CONFIG_OF_LIBFDT) += image-fdt.o |
236 | obj-$(CONFIG_FIT) += image-fit.o | 236 | obj-$(CONFIG_FIT) += image-fit.o |
237 | obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o | 237 | obj-$(CONFIG_FIT_SIGNATURE) += image-sig.o |
238 | obj-y += memsize.o | 238 | obj-y += memsize.o |
239 | obj-y += stdio.o | 239 | obj-y += stdio.o |
240 | 240 | ||
241 | $(obj)/env_embedded.o: $(src)/env_embedded.c | 241 | CFLAGS_env_embedded.o := -Wa,--no-warn -DENV_CRC=$(shell tools/envcrc 2>/dev/null) |
242 | $(CC) $(AFLAGS) -Wa,--no-warn \ | 242 | CFLAGS_hush.o := $(PLATFORM_NO_UNALIGNED) |
243 | -DENV_CRC=$(shell tools/envcrc) -c -o $@ $< | 243 | CFLAGS_fdt_support.o := $(PLATFORM_NO_UNALIGNED) |
244 | |||
245 | # SEE README.arm-unaligned-accesses | ||
246 | $(obj)/hush.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) | ||
247 | $(obj)/fdt_support.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) | ||
248 | 244 |
config.mk
1 | # | 1 | # |
2 | # (C) Copyright 2000-2013 | 2 | # (C) Copyright 2000-2013 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | ######################################################################### | 7 | ######################################################################### |
8 | 8 | ||
9 | # clean the slate ... | 9 | # clean the slate ... |
10 | PLATFORM_RELFLAGS = | 10 | PLATFORM_RELFLAGS = |
11 | PLATFORM_CPPFLAGS = | 11 | PLATFORM_CPPFLAGS = |
12 | PLATFORM_LDFLAGS = | 12 | PLATFORM_LDFLAGS = |
13 | 13 | ||
14 | ######################################################################### | 14 | ######################################################################### |
15 | 15 | ||
16 | # Load generated board configuration | 16 | # Load generated board configuration |
17 | ifeq ($(CONFIG_TPL_BUILD),y) | 17 | ifeq ($(CONFIG_TPL_BUILD),y) |
18 | # Include TPL autoconf | 18 | # Include TPL autoconf |
19 | sinclude include/tpl-autoconf.mk | 19 | sinclude include/tpl-autoconf.mk |
20 | else | 20 | else |
21 | ifeq ($(CONFIG_SPL_BUILD),y) | 21 | ifeq ($(CONFIG_SPL_BUILD),y) |
22 | # Include SPL autoconf | 22 | # Include SPL autoconf |
23 | sinclude include/spl-autoconf.mk | 23 | sinclude include/spl-autoconf.mk |
24 | else | 24 | else |
25 | # Include normal autoconf | 25 | # Include normal autoconf |
26 | sinclude include/autoconf.mk | 26 | sinclude include/autoconf.mk |
27 | endif | 27 | endif |
28 | endif | 28 | endif |
29 | sinclude $(OBJTREE)/include/config.mk | 29 | sinclude $(OBJTREE)/include/config.mk |
30 | 30 | ||
31 | # Some architecture config.mk files need to know what CPUDIR is set to, | 31 | # Some architecture config.mk files need to know what CPUDIR is set to, |
32 | # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. | 32 | # so calculate CPUDIR before including ARCH/SOC/CPU config.mk files. |
33 | # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains | 33 | # Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains |
34 | # CPU-specific code. | 34 | # CPU-specific code. |
35 | CPUDIR=arch/$(ARCH)/cpu/$(CPU) | 35 | CPUDIR=arch/$(ARCH)/cpu/$(CPU) |
36 | ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR))) | 36 | ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR))) |
37 | CPUDIR=arch/$(ARCH)/cpu | 37 | CPUDIR=arch/$(ARCH)/cpu |
38 | endif | 38 | endif |
39 | 39 | ||
40 | sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules | 40 | sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules |
41 | sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules | 41 | sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules |
42 | 42 | ||
43 | ifdef SOC | 43 | ifdef SOC |
44 | sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules | 44 | sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules |
45 | endif | 45 | endif |
46 | ifdef VENDOR | 46 | ifdef VENDOR |
47 | BOARDDIR = $(VENDOR)/$(BOARD) | 47 | BOARDDIR = $(VENDOR)/$(BOARD) |
48 | else | 48 | else |
49 | BOARDDIR = $(BOARD) | 49 | BOARDDIR = $(BOARD) |
50 | endif | 50 | endif |
51 | ifdef BOARD | 51 | ifdef BOARD |
52 | sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules | 52 | sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules |
53 | endif | 53 | endif |
54 | 54 | ||
55 | ######################################################################### | 55 | ######################################################################### |
56 | 56 | ||
57 | RELFLAGS= $(PLATFORM_RELFLAGS) | 57 | RELFLAGS= $(PLATFORM_RELFLAGS) |
58 | 58 | ||
59 | OBJCFLAGS += --gap-fill=0xff | 59 | OBJCFLAGS += --gap-fill=0xff |
60 | 60 | ||
61 | CPPFLAGS = $(KBUILD_CPPFLAGS) $(RELFLAGS) | 61 | CPPFLAGS = $(RELFLAGS) |
62 | CPPFLAGS += $(UBOOTINCLUDE) | 62 | CPPFLAGS += -pipe $(PLATFORM_CPPFLAGS) |
63 | CPPFLAGS += $(NOSTDINC_FLAGS) -pipe $(PLATFORM_CPPFLAGS) | ||
64 | 63 | ||
65 | CFLAGS := $(KBUILD_CFLAGS) $(CPPFLAGS) | ||
66 | |||
67 | BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) | 64 | BCURDIR = $(subst $(SRCTREE)/,,$(CURDIR:$(obj)%=%)) |
68 | 65 | ||
69 | AFLAGS := $(KBUILD_AFLAGS) $(CPPFLAGS) | ||
70 | |||
71 | LDFLAGS += $(PLATFORM_LDFLAGS) | 66 | LDFLAGS += $(PLATFORM_LDFLAGS) |
72 | LDFLAGS_FINAL += -Bstatic | 67 | LDFLAGS_FINAL += -Bstatic |
73 | |||
74 | ######################################################################### | ||
75 | |||
76 | export PLATFORM_CPPFLAGS PLATFORM_RELFLAGS CPPFLAGS CFLAGS AFLAGS | ||
77 | 68 |
disk/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | #CFLAGS += -DET_DEBUG -DDEBUG | 8 | #ccflags-y += -DET_DEBUG -DDEBUG |
9 | 9 | ||
10 | obj-$(CONFIG_PARTITIONS) += part.o | 10 | obj-$(CONFIG_PARTITIONS) += part.o |
11 | obj-$(CONFIG_MAC_PARTITION) += part_mac.o | 11 | obj-$(CONFIG_MAC_PARTITION) += part_mac.o |
12 | obj-$(CONFIG_DOS_PARTITION) += part_dos.o | 12 | obj-$(CONFIG_DOS_PARTITION) += part_dos.o |
13 | obj-$(CONFIG_ISO_PARTITION) += part_iso.o | 13 | obj-$(CONFIG_ISO_PARTITION) += part_iso.o |
14 | obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o | 14 | obj-$(CONFIG_AMIGA_PARTITION) += part_amiga.o |
15 | obj-$(CONFIG_EFI_PARTITION) += part_efi.o | 15 | obj-$(CONFIG_EFI_PARTITION) += part_efi.o |
16 | 16 |
doc/DocBook/Makefile
1 | ### | 1 | ### |
2 | # This makefile is used to generate the kernel documentation, | 2 | # This makefile is used to generate the kernel documentation, |
3 | # primarily based on in-line comments in various source files. | 3 | # primarily based on in-line comments in various source files. |
4 | # See doc/kernel-doc-nano-HOWTO.txt for instruction in how | 4 | # See doc/kernel-doc-nano-HOWTO.txt for instruction in how |
5 | # to document the SRC - and how to read it. | 5 | # to document the SRC - and how to read it. |
6 | # To add a new book the only step required is to add the book to the | 6 | # To add a new book the only step required is to add the book to the |
7 | # list of DOCBOOKS. | 7 | # list of DOCBOOKS. |
8 | 8 | ||
9 | DOCBOOKS := fs.xml linker_lists.xml stdio.xml | 9 | DOCBOOKS := fs.xml linker_lists.xml stdio.xml |
10 | 10 | ||
11 | ### | 11 | ### |
12 | # The build process is as follows (targets): | 12 | # The build process is as follows (targets): |
13 | # (xmldocs) [by docproc] | 13 | # (xmldocs) [by docproc] |
14 | # file.tmpl --> file.xml +--> file.ps (psdocs) [by db2ps or xmlto] | 14 | # file.tmpl --> file.xml +--> file.ps (psdocs) [by db2ps or xmlto] |
15 | # +--> file.pdf (pdfdocs) [by db2pdf or xmlto] | 15 | # +--> file.pdf (pdfdocs) [by db2pdf or xmlto] |
16 | # +--> DIR=file (htmldocs) [by xmlto] | 16 | # +--> DIR=file (htmldocs) [by xmlto] |
17 | # +--> man/ (mandocs) [by xmlto] | 17 | # +--> man/ (mandocs) [by xmlto] |
18 | 18 | ||
19 | 19 | ||
20 | # for PDF and PS output you can choose between xmlto and docbook-utils tools | 20 | # for PDF and PS output you can choose between xmlto and docbook-utils tools |
21 | PDF_METHOD = $(prefer-db2x) | 21 | PDF_METHOD = $(prefer-db2x) |
22 | PS_METHOD = $(prefer-db2x) | 22 | PS_METHOD = $(prefer-db2x) |
23 | 23 | ||
24 | 24 | ||
25 | ### | 25 | ### |
26 | # The targets that may be used. | 26 | # The targets that may be used. |
27 | PHONY += $(obj).depend xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs | 27 | PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs |
28 | 28 | ||
29 | BOOKS := $(addprefix $(OBJTREE)/doc/DocBook/,$(DOCBOOKS)) | 29 | BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) |
30 | xmldocs: $(BOOKS) | 30 | xmldocs: $(BOOKS) |
31 | sgmldocs: xmldocs | 31 | sgmldocs: xmldocs |
32 | 32 | ||
33 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) | 33 | PS := $(patsubst %.xml, %.ps, $(BOOKS)) |
34 | psdocs: $(PS) | 34 | psdocs: $(PS) |
35 | 35 | ||
36 | PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) | 36 | PDF := $(patsubst %.xml, %.pdf, $(BOOKS)) |
37 | pdfdocs: $(PDF) | 37 | pdfdocs: $(PDF) |
38 | 38 | ||
39 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) | 39 | HTML := $(sort $(patsubst %.xml, %.html, $(BOOKS))) |
40 | htmldocs: $(HTML) | 40 | htmldocs: $(HTML) |
41 | $(call build_main_index) | 41 | $(call build_main_index) |
42 | $(call build_images) | 42 | $(call build_images) |
43 | $(call install_media_images) | 43 | $(call install_media_images) |
44 | 44 | ||
45 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) | 45 | MAN := $(patsubst %.xml, %.9, $(BOOKS)) |
46 | mandocs: $(MAN) | 46 | mandocs: $(MAN) |
47 | 47 | ||
48 | installmandocs: mandocs | 48 | installmandocs: mandocs |
49 | mkdir -p /usr/local/man/man9/ | 49 | mkdir -p /usr/local/man/man9/ |
50 | install doc/DocBook/man/*.9.gz /usr/local/man/man9/ | 50 | install doc/DocBook/man/*.9.gz /usr/local/man/man9/ |
51 | 51 | ||
52 | ### | 52 | ### |
53 | #External programs used | 53 | #External programs used |
54 | KERNELDOC = $(SRCTREE)/tools/kernel-doc/kernel-doc | 54 | KERNELDOC = $(srctree)/tools/kernel-doc/kernel-doc |
55 | DOCPROC = $(OBJTREE)/tools/kernel-doc/docproc | 55 | DOCPROC = $(objtree)/tools/kernel-doc/docproc |
56 | 56 | ||
57 | XMLTOFLAGS = -m $(SRCTREE)/doc/DocBook/stylesheet.xsl | 57 | XMLTOFLAGS = -m $(srctree)/doc/DocBook/stylesheet.xsl |
58 | XMLTOFLAGS += --skip-validation | 58 | XMLTOFLAGS += --skip-validation |
59 | 59 | ||
60 | ### | 60 | ### |
61 | # DOCPROC is used for two purposes: | 61 | # DOCPROC is used for two purposes: |
62 | # 1) To generate a dependency list for a .tmpl file | 62 | # 1) To generate a dependency list for a .tmpl file |
63 | # 2) To preprocess a .tmpl file and call kernel-doc with | 63 | # 2) To preprocess a .tmpl file and call kernel-doc with |
64 | # appropriate parameters. | 64 | # appropriate parameters. |
65 | # The following rules are used to generate the .xml documentation | 65 | # The following rules are used to generate the .xml documentation |
66 | # required to generate the final targets. (ps, pdf, html). | 66 | # required to generate the final targets. (ps, pdf, html). |
67 | %.xml: %.tmpl | 67 | quiet_cmd_docproc = DOCPROC $@ |
68 | $(DOCPROC) doc $< >$@ | 68 | cmd_docproc = SRCTREE=$(srctree)/ $(DOCPROC) doc $< >$@ |
69 | define rule_docproc | ||
70 | set -e; \ | ||
71 | $(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))';) \ | ||
72 | $(cmd_$(1)); \ | ||
73 | ( \ | ||
74 | echo 'cmd_$@ := $(cmd_$(1))'; \ | ||
75 | echo $@: `SRCTREE=$(srctree) $(DOCPROC) depend $<`; \ | ||
76 | ) > $(dir $@).$(notdir $@).cmd | ||
77 | endef | ||
69 | 78 | ||
70 | ifeq ($@, "cleandocs") | 79 | %.xml: %.tmpl FORCE |
71 | sinclude $(obj).depend | 80 | $(call if_changed_rule,docproc) |
72 | $(obj).depend: $(patsubst %.xml, %.tmpl, $(DOCBOOKS)) | 81 | |
73 | rm -f $(obj).depend ; \ | 82 | ### |
74 | touch $(obj).depend ; \ | 83 | #Read in all saved dependency files |
75 | for file in $^ ; do \ | 84 | cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) |
76 | xmlfile=`echo "$${file}" | \ | 85 | |
77 | sed "s/tmpl$$/xml/"` ; \ | 86 | ifneq ($(cmd_files),) |
78 | echo -n "$${xmlfile}: ">> $(obj).depend ; \ | 87 | include $(cmd_files) |
79 | $(DOCPROC) depend $$file >> $(obj).depend ; \ | ||
80 | echo -e "\n\t$(DOCPROC) doc $< >$${xmlfile} " >> \ | ||
81 | $(obj).depend ; \ | ||
82 | done | ||
83 | endif | 88 | endif |
84 | 89 | ||
85 | ### | 90 | ### |
86 | # Changes in kernel-doc force a rebuild of all documentation | 91 | # Changes in kernel-doc force a rebuild of all documentation |
87 | $(BOOKS): $(KERNELDOC) | 92 | $(BOOKS): $(KERNELDOC) |
88 | 93 | ||
94 | # Tell kbuild to always build the programs | ||
95 | always := $(hostprogs-y) | ||
96 | |||
89 | notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ | 97 | notfoundtemplate = echo "*** You have to install docbook-utils or xmlto ***"; \ |
90 | exit 1 | 98 | exit 1 |
91 | db2xtemplate = db2TYPE -o $(dir $@) $< | 99 | db2xtemplate = db2TYPE -o $(dir $@) $< |
92 | xmltotemplate = xmlto TYPE $(XMLTOFLAGS) -o $(dir $@) $< | 100 | xmltotemplate = xmlto TYPE $(XMLTOFLAGS) -o $(dir $@) $< |
93 | 101 | ||
94 | # determine which methods are available | 102 | # determine which methods are available |
95 | ifeq ($(shell which db2ps >/dev/null 2>&1 && echo found),found) | 103 | ifeq ($(shell which db2ps >/dev/null 2>&1 && echo found),found) |
96 | use-db2x = db2x | 104 | use-db2x = db2x |
97 | prefer-db2x = db2x | 105 | prefer-db2x = db2x |
98 | else | 106 | else |
99 | use-db2x = notfound | 107 | use-db2x = notfound |
100 | prefer-db2x = $(use-xmlto) | 108 | prefer-db2x = $(use-xmlto) |
101 | endif | 109 | endif |
102 | ifeq ($(shell which xmlto >/dev/null 2>&1 && echo found),found) | 110 | ifeq ($(shell which xmlto >/dev/null 2>&1 && echo found),found) |
103 | use-xmlto = xmlto | 111 | use-xmlto = xmlto |
104 | prefer-xmlto = xmlto | 112 | prefer-xmlto = xmlto |
105 | else | 113 | else |
106 | use-xmlto = notfound | 114 | use-xmlto = notfound |
107 | prefer-xmlto = $(use-db2x) | 115 | prefer-xmlto = $(use-db2x) |
108 | endif | 116 | endif |
109 | 117 | ||
110 | # the commands, generated from the chosen template | 118 | # the commands, generated from the chosen template |
111 | quiet_cmd_db2ps = PS $@ | 119 | quiet_cmd_db2ps = PS $@ |
112 | cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template)) | 120 | cmd_db2ps = $(subst TYPE,ps, $($(PS_METHOD)template)) |
113 | %.ps : %.xml | 121 | %.ps : %.xml |
114 | $(call cmd_db2ps) | 122 | $(call cmd,db2ps) |
115 | 123 | ||
116 | quiet_cmd_db2pdf = PDF $@ | 124 | quiet_cmd_db2pdf = PDF $@ |
117 | cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template)) | 125 | cmd_db2pdf = $(subst TYPE,pdf, $($(PDF_METHOD)template)) |
118 | %.pdf : %.xml | 126 | %.pdf : %.xml |
119 | $(call cmd_db2pdf) | 127 | $(call cmd,db2pdf) |
120 | 128 | ||
121 | 129 | ||
122 | index = index.html | 130 | index = index.html |
123 | main_idx = doc/DocBook/$(index) | 131 | main_idx = doc/DocBook/$(index) |
124 | build_main_index = rm -rf $(main_idx); \ | 132 | build_main_index = rm -rf $(main_idx); \ |
125 | echo '<h1>U-Boot Bootloader HTML Documentation</h1>' >> $(main_idx) && \ | 133 | echo '<h1>U-Boot Bootloader HTML Documentation</h1>' >> $(main_idx) && \ |
126 | echo '<h2>U-Boot Version: $(U_BOOT_VERSION)</h2>' >> $(main_idx) && \ | 134 | echo '<h2>U-Boot Version: $(U_BOOT_VERSION)</h2>' >> $(main_idx) && \ |
127 | cat $(HTML) >> $(main_idx) | 135 | cat $(HTML) >> $(main_idx) |
128 | 136 | ||
129 | # To work around bug [1] in docbook-xsl-stylesheets 1.76.1 , generate only html | 137 | # To work around bug [1] in docbook-xsl-stylesheets 1.76.1 , generate only html |
130 | # docs instead of xhtml with xmlto. | 138 | # docs instead of xhtml with xmlto. |
131 | # [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654338 | 139 | # [1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=654338 |
132 | quiet_cmd_db2html = HTML $@ | 140 | quiet_cmd_db2html = HTML $@ |
133 | cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ | 141 | cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ |
134 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ | 142 | echo '<a HREF="$(patsubst %.html,%,$(notdir $@))/index.html"> \ |
135 | $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ | 143 | $(patsubst %.html,%,$(notdir $@))</a><p>' > $@ |
136 | 144 | ||
137 | %.html: %.xml | 145 | %.html: %.xml |
138 | @(which xmlto > /dev/null 2>&1) || \ | 146 | @(which xmlto > /dev/null 2>&1) || \ |
139 | (echo "*** You need to install xmlto ***"; \ | 147 | (echo "*** You need to install xmlto ***"; \ |
140 | exit 1) | 148 | exit 1) |
141 | @rm -rf $@ $(patsubst %.html,%,$@) | 149 | @rm -rf $@ $(patsubst %.html,%,$@) |
142 | $(call cmd_db2html) | 150 | $(call cmd,db2html) |
143 | @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ | 151 | @if [ ! -z "$(PNG-$(basename $(notdir $@)))" ]; then \ |
144 | cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi | 152 | cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi |
145 | 153 | ||
146 | quiet_cmd_db2man = MAN $@ | 154 | quiet_cmd_db2man = MAN $@ |
147 | cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi | 155 | cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi |
148 | %.9 : %.xml | 156 | %.9 : %.xml |
149 | @(which xmlto > /dev/null 2>&1) || \ | 157 | @(which xmlto > /dev/null 2>&1) || \ |
150 | (echo "*** You need to install xmlto ***"; \ | 158 | (echo "*** You need to install xmlto ***"; \ |
151 | exit 1) | 159 | exit 1) |
152 | $(Q)mkdir -p $(obj)/man | 160 | $(Q)mkdir -p $(obj)/man |
153 | $(call cmd_db2man) | 161 | $(call cmd,db2man) |
154 | @touch $@ | 162 | @touch $@ |
155 | 163 | ||
156 | ### | 164 | ### |
157 | # Rules to generate postscripts and PNG images from .fig format files | 165 | # Rules to generate postscripts and PNG images from .fig format files |
158 | quiet_cmd_fig2eps = FIG2EPS $@ | 166 | quiet_cmd_fig2eps = FIG2EPS $@ |
159 | cmd_fig2eps = fig2dev -Leps $< $@ | 167 | cmd_fig2eps = fig2dev -Leps $< $@ |
160 | 168 | ||
161 | %.eps: %.fig | 169 | %.eps: %.fig |
162 | @(which fig2dev > /dev/null 2>&1) || \ | 170 | @(which fig2dev > /dev/null 2>&1) || \ |
163 | (echo "*** You need to install transfig ***"; \ | 171 | (echo "*** You need to install transfig ***"; \ |
164 | exit 1) | 172 | exit 1) |
165 | $(call cmd_fig2eps) | 173 | $(call cmd,fig2eps) |
166 | 174 | ||
167 | quiet_cmd_fig2png = FIG2PNG $@ | 175 | quiet_cmd_fig2png = FIG2PNG $@ |
168 | cmd_fig2png = fig2dev -Lpng $< $@ | 176 | cmd_fig2png = fig2dev -Lpng $< $@ |
169 | 177 | ||
170 | %.png: %.fig | 178 | %.png: %.fig |
171 | @(which fig2dev > /dev/null 2>&1) || \ | 179 | @(which fig2dev > /dev/null 2>&1) || \ |
172 | (echo "*** You need to install transfig ***"; \ | 180 | (echo "*** You need to install transfig ***"; \ |
173 | exit 1) | 181 | exit 1) |
174 | $(call cmd_fig2png) | 182 | $(call cmd,fig2png) |
175 | 183 | ||
176 | ### | 184 | ### |
177 | # Rule to convert a .c file to inline XML documentation | 185 | # Rule to convert a .c file to inline XML documentation |
178 | gen_xml = : | 186 | gen_xml = : |
179 | quiet_gen_xml = echo ' GEN $@' | 187 | quiet_gen_xml = echo ' GEN $@' |
180 | silent_gen_xml = : | 188 | silent_gen_xml = : |
181 | %.xml: %.c | 189 | %.xml: %.c |
182 | @$($(quiet)gen_xml) | 190 | @$($(quiet)gen_xml) |
183 | @( \ | 191 | @( \ |
184 | echo "<programlisting>"; \ | 192 | echo "<programlisting>"; \ |
185 | expand --tabs=8 < $< | \ | 193 | expand --tabs=8 < $< | \ |
186 | sed -e "s/&/\\&/g" \ | 194 | sed -e "s/&/\\&/g" \ |
187 | -e "s/</\\</g" \ | 195 | -e "s/</\\</g" \ |
188 | -e "s/>/\\>/g"; \ | 196 | -e "s/>/\\>/g"; \ |
189 | echo "</programlisting>") > $@ | 197 | echo "</programlisting>") > $@ |
190 | 198 | ||
191 | ### | 199 | ### |
192 | # Help targets as used by the top-level makefile | 200 | # Help targets as used by the top-level makefile |
193 | dochelp: | 201 | dochelp: |
194 | @echo ' U-Boot bootloader internal documentation in different formats:' | 202 | @echo ' U-Boot bootloader internal documentation in different formats:' |
195 | @echo ' htmldocs - HTML' | 203 | @echo ' htmldocs - HTML' |
196 | @echo ' pdfdocs - PDF' | 204 | @echo ' pdfdocs - PDF' |
197 | @echo ' psdocs - Postscript' | 205 | @echo ' psdocs - Postscript' |
198 | @echo ' xmldocs - XML DocBook' | 206 | @echo ' xmldocs - XML DocBook' |
199 | @echo ' mandocs - man pages' | 207 | @echo ' mandocs - man pages' |
200 | @echo ' installmandocs - install man pages generated by mandocs' | 208 | @echo ' installmandocs - install man pages generated by mandocs' |
201 | @echo ' cleandocs - clean all generated DocBook files' | 209 | @echo ' cleandocs - clean all generated DocBook files' |
202 | 210 | ||
203 | ### | 211 | ### |
204 | # Temporary files left by various tools | 212 | # Temporary files left by various tools |
205 | clean-files := $(DOCBOOKS) \ | 213 | clean-files := $(DOCBOOKS) \ |
206 | $(patsubst %.xml, %.dvi, $(DOCBOOKS)) \ | 214 | $(patsubst %.xml, %.dvi, $(DOCBOOKS)) \ |
207 | $(patsubst %.xml, %.aux, $(DOCBOOKS)) \ | 215 | $(patsubst %.xml, %.aux, $(DOCBOOKS)) \ |
208 | $(patsubst %.xml, %.tex, $(DOCBOOKS)) \ | 216 | $(patsubst %.xml, %.tex, $(DOCBOOKS)) \ |
209 | $(patsubst %.xml, %.log, $(DOCBOOKS)) \ | 217 | $(patsubst %.xml, %.log, $(DOCBOOKS)) \ |
210 | $(patsubst %.xml, %.out, $(DOCBOOKS)) \ | 218 | $(patsubst %.xml, %.out, $(DOCBOOKS)) \ |
211 | $(patsubst %.xml, %.ps, $(DOCBOOKS)) \ | 219 | $(patsubst %.xml, %.ps, $(DOCBOOKS)) \ |
212 | $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ | 220 | $(patsubst %.xml, %.pdf, $(DOCBOOKS)) \ |
213 | $(patsubst %.xml, %.html, $(DOCBOOKS)) \ | 221 | $(patsubst %.xml, %.html, $(DOCBOOKS)) \ |
214 | $(patsubst %.xml, %.9, $(DOCBOOKS)) \ | 222 | $(patsubst %.xml, %.9, $(DOCBOOKS)) \ |
215 | $(index) | 223 | $(index) |
216 | 224 | ||
217 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man | 225 | clean-dirs := $(patsubst %.xml,%,$(DOCBOOKS)) man |
218 | 226 | ||
219 | cleandocs: | 227 | cleandocs: |
220 | @rm -f $(obj).depend | ||
221 | @$(Q)rm -f $(call objectify, $(clean-files)) | 228 | @$(Q)rm -f $(call objectify, $(clean-files)) |
222 | @$(Q)rm -rf $(call objectify, $(clean-dirs)) | 229 | @$(Q)rm -rf $(call objectify, $(clean-dirs)) |
223 | 230 |
drivers/bios_emulator/Makefile
1 | X86DIR = x86emu | 1 | X86DIR = x86emu |
2 | 2 | ||
3 | obj-y = atibios.o biosemu.o besys.o bios.o \ | 3 | obj-y = atibios.o biosemu.o besys.o bios.o \ |
4 | $(X86DIR)/decode.o \ | 4 | $(X86DIR)/decode.o \ |
5 | $(X86DIR)/ops2.o \ | 5 | $(X86DIR)/ops2.o \ |
6 | $(X86DIR)/ops.o \ | 6 | $(X86DIR)/ops.o \ |
7 | $(X86DIR)/prim_ops.o \ | 7 | $(X86DIR)/prim_ops.o \ |
8 | $(X86DIR)/sys.o \ | 8 | $(X86DIR)/sys.o \ |
9 | $(X86DIR)/debug.o | 9 | $(X86DIR)/debug.o |
10 | 10 | ||
11 | EXTRA_CFLAGS += -I$(srctree)/$(src) -I$(srctree)/$(src)/include \ | 11 | ccflags-y := -I$(srctree)/$(src) -I$(srctree)/$(src)/include \ |
12 | -D__PPC__ -D__BIG_ENDIAN__ | 12 | -D__PPC__ -D__BIG_ENDIAN__ |
13 | |||
14 | CFLAGS += $(EXTRA_CFLAGS) | ||
15 | CPPFLAGS += $(EXTRA_CFLAGS) | ||
16 | 13 |
drivers/hwmon/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006 | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # (C) Copyright 2001 | 5 | # (C) Copyright 2001 |
6 | # Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. | 6 | # Erik Theisen, Wave 7 Optics, etheisen@mindspring.com. |
7 | # | 7 | # |
8 | # SPDX-License-Identifier: GPL-2.0+ | 8 | # SPDX-License-Identifier: GPL-2.0+ |
9 | # | 9 | # |
10 | 10 | ||
11 | #CFLAGS += -DDEBUG | 11 | #ccflags-y += -DDEBUG |
12 | 12 | ||
13 | obj-$(CONFIG_DTT_ADM1021) += adm1021.o | 13 | obj-$(CONFIG_DTT_ADM1021) += adm1021.o |
14 | obj-$(CONFIG_DTT_ADT7460) += adt7460.o | 14 | obj-$(CONFIG_DTT_ADT7460) += adt7460.o |
15 | obj-$(CONFIG_DTT_DS1621) += ds1621.o | 15 | obj-$(CONFIG_DTT_DS1621) += ds1621.o |
16 | obj-$(CONFIG_DTT_DS1722) += ds1722.o | 16 | obj-$(CONFIG_DTT_DS1722) += ds1722.o |
17 | obj-$(CONFIG_DTT_DS1775) += ds1775.o | 17 | obj-$(CONFIG_DTT_DS1775) += ds1775.o |
18 | obj-$(CONFIG_DTT_LM63) += lm63.o | 18 | obj-$(CONFIG_DTT_LM63) += lm63.o |
19 | obj-$(CONFIG_DTT_LM73) += lm73.o | 19 | obj-$(CONFIG_DTT_LM73) += lm73.o |
20 | obj-$(CONFIG_DTT_LM75) += lm75.o | 20 | obj-$(CONFIG_DTT_LM75) += lm75.o |
21 | obj-$(CONFIG_DTT_LM81) += lm81.o | 21 | obj-$(CONFIG_DTT_LM81) += lm81.o |
22 | 22 |
drivers/net/npe/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006 | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | LOCAL_CFLAGS += -I$(TOPDIR)/drivers/net/npe/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux | 8 | ccflags-y += -I$(src)/include -DCONFIG_IXP425_COMPONENT_ETHDB -D__linux |
9 | CFLAGS += $(LOCAL_CFLAGS) | ||
10 | CPPFLAGS += $(LOCAL_CFLAGS) # needed for depend | ||
11 | 9 | ||
12 | obj-y := npe.o \ | 10 | obj-y := npe.o \ |
13 | miiphy.o \ | 11 | miiphy.o \ |
14 | IxOsalBufferMgt.o \ | 12 | IxOsalBufferMgt.o \ |
15 | IxOsalIoMem.o \ | 13 | IxOsalIoMem.o \ |
16 | IxOsalOsCacheMMU.o \ | 14 | IxOsalOsCacheMMU.o \ |
17 | IxOsalOsMsgQ.o \ | 15 | IxOsalOsMsgQ.o \ |
18 | IxOsalOsSemaphore.o \ | 16 | IxOsalOsSemaphore.o \ |
19 | IxOsalOsServices.o \ | 17 | IxOsalOsServices.o \ |
20 | IxOsalOsThread.o \ | 18 | IxOsalOsThread.o \ |
21 | IxEthAcc.o \ | 19 | IxEthAcc.o \ |
22 | IxEthAccCommon.o \ | 20 | IxEthAccCommon.o \ |
23 | IxEthAccControlInterface.o \ | 21 | IxEthAccControlInterface.o \ |
24 | IxEthAccDataPlane.o \ | 22 | IxEthAccDataPlane.o \ |
25 | IxEthAccMac.o \ | 23 | IxEthAccMac.o \ |
26 | IxEthAccMii.o \ | 24 | IxEthAccMii.o \ |
27 | IxEthDBAPI.o \ | 25 | IxEthDBAPI.o \ |
28 | IxEthDBAPISupport.o \ | 26 | IxEthDBAPISupport.o \ |
29 | IxEthDBCore.o \ | 27 | IxEthDBCore.o \ |
30 | IxEthDBEvents.o \ | 28 | IxEthDBEvents.o \ |
31 | IxEthDBFeatures.o \ | 29 | IxEthDBFeatures.o \ |
32 | IxEthDBFirewall.o \ | 30 | IxEthDBFirewall.o \ |
33 | IxEthDBHashtable.o \ | 31 | IxEthDBHashtable.o \ |
34 | IxEthDBLearning.o \ | 32 | IxEthDBLearning.o \ |
35 | IxEthDBMem.o \ | 33 | IxEthDBMem.o \ |
36 | IxEthDBNPEAdaptor.o \ | 34 | IxEthDBNPEAdaptor.o \ |
37 | IxEthDBPortUpdate.o \ | 35 | IxEthDBPortUpdate.o \ |
38 | IxEthDBReports.o \ | 36 | IxEthDBReports.o \ |
39 | IxEthDBSearch.o \ | 37 | IxEthDBSearch.o \ |
40 | IxEthDBSpanningTree.o \ | 38 | IxEthDBSpanningTree.o \ |
41 | IxEthDBUtil.o \ | 39 | IxEthDBUtil.o \ |
42 | IxEthDBVlan.o \ | 40 | IxEthDBVlan.o \ |
43 | IxEthDBWiFi.o \ | 41 | IxEthDBWiFi.o \ |
44 | IxEthMii.o \ | 42 | IxEthMii.o \ |
45 | IxQMgrAqmIf.o \ | 43 | IxQMgrAqmIf.o \ |
46 | IxQMgrDispatcher.o \ | 44 | IxQMgrDispatcher.o \ |
47 | IxQMgrInit.o \ | 45 | IxQMgrInit.o \ |
48 | IxQMgrQAccess.o \ | 46 | IxQMgrQAccess.o \ |
49 | IxQMgrQCfg.o \ | 47 | IxQMgrQCfg.o \ |
50 | IxFeatureCtrl.o \ | 48 | IxFeatureCtrl.o \ |
51 | IxNpeDl.o \ | 49 | IxNpeDl.o \ |
52 | IxNpeDlImageMgr.o \ | 50 | IxNpeDlImageMgr.o \ |
53 | IxNpeDlNpeMgr.o \ | 51 | IxNpeDlNpeMgr.o \ |
54 | IxNpeDlNpeMgrUtils.o \ | 52 | IxNpeDlNpeMgrUtils.o \ |
55 | IxNpeMh.o \ | 53 | IxNpeMh.o \ |
56 | IxNpeMhConfig.o \ | 54 | IxNpeMhConfig.o \ |
57 | IxNpeMhReceive.o \ | 55 | IxNpeMhReceive.o \ |
58 | IxNpeMhSend.o \ | 56 | IxNpeMhSend.o \ |
59 | IxNpeMhSolicitedCbMgr.o \ | 57 | IxNpeMhSolicitedCbMgr.o \ |
60 | IxNpeMhUnsolicitedCbMgr.o | 58 | IxNpeMhUnsolicitedCbMgr.o |
61 | 59 |
drivers/rtc/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | #CFLAGS += -DDEBUG | 8 | #ccflags-y += -DDEBUG |
9 | 9 | ||
10 | obj-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o | 10 | obj-$(CONFIG_RTC_AT91SAM9_RTT) += at91sam9_rtt.o |
11 | obj-$(CONFIG_RTC_BFIN) += bfin_rtc.o | 11 | obj-$(CONFIG_RTC_BFIN) += bfin_rtc.o |
12 | obj-y += date.o | 12 | obj-y += date.o |
13 | obj-$(CONFIG_RTC_DAVINCI) += davinci.o | 13 | obj-$(CONFIG_RTC_DAVINCI) += davinci.o |
14 | obj-$(CONFIG_RTC_DS12887) += ds12887.o | 14 | obj-$(CONFIG_RTC_DS12887) += ds12887.o |
15 | obj-$(CONFIG_RTC_DS1302) += ds1302.o | 15 | obj-$(CONFIG_RTC_DS1302) += ds1302.o |
16 | obj-$(CONFIG_RTC_DS1306) += ds1306.o | 16 | obj-$(CONFIG_RTC_DS1306) += ds1306.o |
17 | obj-$(CONFIG_RTC_DS1307) += ds1307.o | 17 | obj-$(CONFIG_RTC_DS1307) += ds1307.o |
18 | obj-$(CONFIG_RTC_DS1338) += ds1307.o | 18 | obj-$(CONFIG_RTC_DS1338) += ds1307.o |
19 | obj-$(CONFIG_RTC_DS1337) += ds1337.o | 19 | obj-$(CONFIG_RTC_DS1337) += ds1337.o |
20 | obj-$(CONFIG_RTC_DS1374) += ds1374.o | 20 | obj-$(CONFIG_RTC_DS1374) += ds1374.o |
21 | obj-$(CONFIG_RTC_DS1388) += ds1337.o | 21 | obj-$(CONFIG_RTC_DS1388) += ds1337.o |
22 | obj-$(CONFIG_RTC_DS1556) += ds1556.o | 22 | obj-$(CONFIG_RTC_DS1556) += ds1556.o |
23 | obj-$(CONFIG_RTC_DS164x) += ds164x.o | 23 | obj-$(CONFIG_RTC_DS164x) += ds164x.o |
24 | obj-$(CONFIG_RTC_DS174x) += ds174x.o | 24 | obj-$(CONFIG_RTC_DS174x) += ds174x.o |
25 | obj-$(CONFIG_RTC_DS3231) += ds3231.o | 25 | obj-$(CONFIG_RTC_DS3231) += ds3231.o |
26 | obj-$(CONFIG_RTC_FTRTC010) += ftrtc010.o | 26 | obj-$(CONFIG_RTC_FTRTC010) += ftrtc010.o |
27 | obj-$(CONFIG_RTC_IMXDI) += imxdi.o | 27 | obj-$(CONFIG_RTC_IMXDI) += imxdi.o |
28 | obj-$(CONFIG_RTC_ISL1208) += isl1208.o | 28 | obj-$(CONFIG_RTC_ISL1208) += isl1208.o |
29 | obj-$(CONFIG_RTC_M41T11) += m41t11.o | 29 | obj-$(CONFIG_RTC_M41T11) += m41t11.o |
30 | obj-$(CONFIG_RTC_M41T60) += m41t60.o | 30 | obj-$(CONFIG_RTC_M41T60) += m41t60.o |
31 | obj-$(CONFIG_RTC_M41T62) += m41t62.o | 31 | obj-$(CONFIG_RTC_M41T62) += m41t62.o |
32 | obj-$(CONFIG_RTC_M41T94) += m41t94.o | 32 | obj-$(CONFIG_RTC_M41T94) += m41t94.o |
33 | obj-$(CONFIG_RTC_M48T35A) += m48t35ax.o | 33 | obj-$(CONFIG_RTC_M48T35A) += m48t35ax.o |
34 | obj-$(CONFIG_RTC_MAX6900) += max6900.o | 34 | obj-$(CONFIG_RTC_MAX6900) += max6900.o |
35 | obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o | 35 | obj-$(CONFIG_RTC_MC13XXX) += mc13xxx-rtc.o |
36 | obj-$(CONFIG_RTC_MC146818) += mc146818.o | 36 | obj-$(CONFIG_RTC_MC146818) += mc146818.o |
37 | obj-$(CONFIG_MCFRTC) += mcfrtc.o | 37 | obj-$(CONFIG_MCFRTC) += mcfrtc.o |
38 | obj-$(CONFIG_RTC_MK48T59) += mk48t59.o | 38 | obj-$(CONFIG_RTC_MK48T59) += mk48t59.o |
39 | obj-$(CONFIG_RTC_MPC5200) += mpc5xxx.o | 39 | obj-$(CONFIG_RTC_MPC5200) += mpc5xxx.o |
40 | obj-$(CONFIG_RTC_MPC8xx) += mpc8xx.o | 40 | obj-$(CONFIG_RTC_MPC8xx) += mpc8xx.o |
41 | obj-$(CONFIG_RTC_MV) += mvrtc.o | 41 | obj-$(CONFIG_RTC_MV) += mvrtc.o |
42 | obj-$(CONFIG_RTC_MX27) += mx27rtc.o | 42 | obj-$(CONFIG_RTC_MX27) += mx27rtc.o |
43 | obj-$(CONFIG_RTC_MXS) += mxsrtc.o | 43 | obj-$(CONFIG_RTC_MXS) += mxsrtc.o |
44 | obj-$(CONFIG_RTC_PCF8563) += pcf8563.o | 44 | obj-$(CONFIG_RTC_PCF8563) += pcf8563.o |
45 | obj-$(CONFIG_RTC_PL031) += pl031.o | 45 | obj-$(CONFIG_RTC_PL031) += pl031.o |
46 | obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o | 46 | obj-$(CONFIG_RTC_PT7C4338) += pt7c4338.o |
47 | obj-$(CONFIG_RTC_RS5C372A) += rs5c372.o | 47 | obj-$(CONFIG_RTC_RS5C372A) += rs5c372.o |
48 | obj-$(CONFIG_RTC_RTC4543) += rtc4543.o | 48 | obj-$(CONFIG_RTC_RTC4543) += rtc4543.o |
49 | obj-$(CONFIG_RTC_RV3029) += rv3029.o | 49 | obj-$(CONFIG_RTC_RV3029) += rv3029.o |
50 | obj-$(CONFIG_RTC_RX8025) += rx8025.o | 50 | obj-$(CONFIG_RTC_RX8025) += rx8025.o |
51 | obj-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o | 51 | obj-$(CONFIG_RTC_S3C24X0) += s3c24x0_rtc.o |
52 | obj-$(CONFIG_RTC_X1205) += x1205.o | 52 | obj-$(CONFIG_RTC_X1205) += x1205.o |
53 | 53 |
drivers/usb/musb-new/Makefile
1 | # | 1 | # |
2 | # for USB OTG silicon based on Mentor Graphics INVENTRA designs | 2 | # for USB OTG silicon based on Mentor Graphics INVENTRA designs |
3 | # | 3 | # |
4 | 4 | ||
5 | obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o | 5 | obj-$(CONFIG_MUSB_GADGET) += musb_gadget.o musb_gadget_ep0.o musb_core.o |
6 | obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o | 6 | obj-$(CONFIG_MUSB_GADGET) += musb_uboot.o |
7 | obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o | 7 | obj-$(CONFIG_MUSB_HOST) += musb_host.o musb_core.o musb_uboot.o |
8 | obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o | 8 | obj-$(CONFIG_USB_MUSB_DSPS) += musb_dsps.o |
9 | obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o | 9 | obj-$(CONFIG_USB_MUSB_AM35X) += am35x.o |
10 | obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o | 10 | obj-$(CONFIG_USB_MUSB_OMAP2PLUS) += omap2430.o |
11 | 11 | ||
12 | CFLAGS_NO_WARN := $(call cc-option,-Wno-unused-variable) \ | 12 | ccflags-y := $(call cc-option,-Wno-unused-variable) \ |
13 | $(call cc-option,-Wno-unused-but-set-variable) \ | 13 | $(call cc-option,-Wno-unused-but-set-variable) \ |
14 | $(call cc-option,-Wno-unused-label) | 14 | $(call cc-option,-Wno-unused-label) |
15 | CFLAGS += $(CFLAGS_NO_WARN) | ||
16 | 15 |
dts/Makefile
1 | # | 1 | # |
2 | # Copyright (c) 2011 The Chromium OS Authors. | 2 | # Copyright (c) 2011 The Chromium OS Authors. |
3 | # | 3 | # |
4 | # SPDX-License-Identifier: GPL-2.0+ | 4 | # SPDX-License-Identifier: GPL-2.0+ |
5 | # | 5 | # |
6 | 6 | ||
7 | # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is | 7 | # This Makefile builds the internal U-Boot fdt if CONFIG_OF_CONTROL is |
8 | # enabled. See doc/README.fdt-control for more details. | 8 | # enabled. See doc/README.fdt-control for more details. |
9 | 9 | ||
10 | ifeq ($(DEVICE_TREE),) | 10 | ifeq ($(DEVICE_TREE),) |
11 | $(if $(CONFIG_DEFAULT_DEVICE_TREE),,\ | 11 | $(if $(CONFIG_DEFAULT_DEVICE_TREE),,\ |
12 | $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file)) | 12 | $(error Please define CONFIG_DEFAULT_DEVICE_TREE in your board header file)) |
13 | DEVICE_TREE = $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) | 13 | DEVICE_TREE = $(CONFIG_DEFAULT_DEVICE_TREE:"%"=%) |
14 | endif | 14 | endif |
15 | 15 | ||
16 | DTS_INCDIRS = $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts | 16 | DTS_INCDIRS = $(SRCTREE)/board/$(VENDOR)/$(BOARD)/dts |
17 | DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts | 17 | DTS_INCDIRS += $(SRCTREE)/board/$(VENDOR)/dts |
18 | DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts | 18 | DTS_INCDIRS += $(SRCTREE)/arch/$(ARCH)/dts |
19 | 19 | ||
20 | DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \ | 20 | DTS_CPPFLAGS := -x assembler-with-cpp -undef -D__DTS__ \ |
21 | -nostdinc $(addprefix -I,$(DTS_INCDIRS)) | 21 | -nostdinc $(addprefix -I,$(DTS_INCDIRS)) |
22 | 22 | ||
23 | DTC_FLAGS := -R 4 -p 0x1000 \ | 23 | DTC_FLAGS := -R 4 -p 0x1000 \ |
24 | $(addprefix -i ,$(DTS_INCDIRS)) | 24 | $(addprefix -i ,$(DTS_INCDIRS)) |
25 | 25 | ||
26 | # Use a constant name for this so we can access it from C code. | 26 | # Use a constant name for this so we can access it from C code. |
27 | # objcopy doesn't seem to allow us to set the symbol name independently of | 27 | # objcopy doesn't seem to allow us to set the symbol name independently of |
28 | # the filename. | 28 | # the filename. |
29 | DT_BIN := $(obj)/dt.dtb | 29 | DT_BIN := $(obj)/dt.dtb |
30 | 30 | ||
31 | $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts | 31 | $(DT_BIN): $(TOPDIR)/board/$(VENDOR)/dts/$(DEVICE_TREE).dts |
32 | $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp | 32 | $(CPP) $(DTS_CPPFLAGS) $< -o $(DT_BIN).dts.tmp |
33 | $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp | 33 | $(DTC) $(DTC_FLAGS) -O dtb -o ${DT_BIN} $(DT_BIN).dts.tmp |
34 | 34 | ||
35 | process_lds = \ | 35 | process_lds = \ |
36 | $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' | 36 | $(1) | sed -r -n 's/^OUTPUT_$(2)[ ("]*([^")]*).*/\1/p' |
37 | 37 | ||
38 | # Run the compiler and get the link script from the linker | 38 | # Run the compiler and get the link script from the linker |
39 | GET_LDS = $(CC) $(CFLAGS) $(LDFLAGS) -Wl,--verbose 2>&1 | 39 | GET_LDS = $(CC) $(c_flags) $(ld_flags) -Wl,--verbose 2>&1 |
40 | 40 | ||
41 | $(obj)/dt.o: $(DT_BIN) | 41 | $(obj)/dt.o: $(DT_BIN) |
42 | # We want the output format and arch. | 42 | # We want the output format and arch. |
43 | # We also hope to win a prize for ugliest Makefile / shell interaction | 43 | # We also hope to win a prize for ugliest Makefile / shell interaction |
44 | # We look in the LDSCRIPT first. | 44 | # We look in the LDSCRIPT first. |
45 | # Then try the linker which should give us the answer. | 45 | # Then try the linker which should give us the answer. |
46 | # Then check it worked. | 46 | # Then check it worked. |
47 | [ -n "$(LDSCRIPT)" ] && \ | 47 | [ -n "$(LDSCRIPT)" ] && \ |
48 | oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` && \ | 48 | oformat=`$(call process_lds,cat $(LDSCRIPT),FORMAT)` && \ |
49 | oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\ | 49 | oarch=`$(call process_lds,cat $(LDSCRIPT),ARCH)` ;\ |
50 | \ | 50 | \ |
51 | [ -z $${oformat} ] && \ | 51 | [ -z $${oformat} ] && \ |
52 | oformat=`$(call process_lds,$(GET_LDS),FORMAT)` ;\ | 52 | oformat=`$(call process_lds,$(GET_LDS),FORMAT)` ;\ |
53 | [ -z $${oarch} ] && \ | 53 | [ -z $${oarch} ] && \ |
54 | oarch=`$(call process_lds,$(GET_LDS),ARCH)` ;\ | 54 | oarch=`$(call process_lds,$(GET_LDS),ARCH)` ;\ |
55 | \ | 55 | \ |
56 | [ -z $${oformat} ] && \ | 56 | [ -z $${oformat} ] && \ |
57 | echo "Cannot read OUTPUT_FORMAT from lds file $(LDSCRIPT)" && \ | 57 | echo "Cannot read OUTPUT_FORMAT from lds file $(LDSCRIPT)" && \ |
58 | exit 1 || true ;\ | 58 | exit 1 || true ;\ |
59 | [ -z $${oarch} ] && \ | 59 | [ -z $${oarch} ] && \ |
60 | echo "Cannot read OUTPUT_ARCH from lds file $(LDSCRIPT)" && \ | 60 | echo "Cannot read OUTPUT_ARCH from lds file $(LDSCRIPT)" && \ |
61 | exit 1 || true ;\ | 61 | exit 1 || true ;\ |
62 | \ | 62 | \ |
63 | cd $(dir ${DT_BIN}) && \ | 63 | cd $(dir ${DT_BIN}) && \ |
64 | $(OBJCOPY) -I binary -O $${oformat} -B $${oarch} \ | 64 | $(OBJCOPY) -I binary -O $${oformat} -B $${oarch} \ |
65 | $(notdir ${DT_BIN}) $(notdir $@) | 65 | $(notdir ${DT_BIN}) $(notdir $@) |
66 | rm $(DT_BIN) | 66 | rm $(DT_BIN) |
67 | 67 | ||
68 | obj-$(CONFIG_OF_EMBED) := dt.o | 68 | obj-$(CONFIG_OF_EMBED) := dt.o |
69 | 69 | ||
70 | binary: $(DT_BIN) | 70 | binary: $(DT_BIN) |
71 | 71 |
examples/api/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 Semihalf | 2 | # (C) Copyright 2007 Semihalf |
3 | # | 3 | # |
4 | # SPDX-License-Identifier: GPL-2.0+ | 4 | # SPDX-License-Identifier: GPL-2.0+ |
5 | # | 5 | # |
6 | 6 | ||
7 | ifdef FTRACE | 7 | ifdef FTRACE |
8 | CFLAGS += -finstrument-functions -DFTRACE | 8 | ccflags-y += -finstrument-functions -DFTRACE |
9 | endif | 9 | endif |
10 | 10 | ||
11 | ifeq ($(ARCH),powerpc) | 11 | ifeq ($(ARCH),powerpc) |
12 | LOAD_ADDR = 0x40000 | 12 | LOAD_ADDR = 0x40000 |
13 | endif | 13 | endif |
14 | ifeq ($(ARCH),arm) | 14 | ifeq ($(ARCH),arm) |
15 | LOAD_ADDR = 0x1000000 | 15 | LOAD_ADDR = 0x1000000 |
16 | endif | 16 | endif |
17 | 17 | ||
18 | # Resulting ELF and binary exectuables will be named demo and demo.bin | 18 | # Resulting ELF and binary exectuables will be named demo and demo.bin |
19 | extra-y = demo | 19 | extra-y = demo |
20 | 20 | ||
21 | # Source files located in the examples/api directory | 21 | # Source files located in the examples/api directory |
22 | SOBJ_FILES-y += crt0.o | 22 | SOBJ_FILES-y += crt0.o |
23 | COBJ_FILES-y += demo.o | 23 | COBJ_FILES-y += demo.o |
24 | COBJ_FILES-y += glue.o | 24 | COBJ_FILES-y += glue.o |
25 | COBJ_FILES-y += libgenwrap.o | 25 | COBJ_FILES-y += libgenwrap.o |
26 | 26 | ||
27 | # Source files which exist outside the examples/api directory | 27 | # Source files which exist outside the examples/api directory |
28 | EXT_COBJ_FILES-y += lib/crc32.o | 28 | EXT_COBJ_FILES-y += lib/crc32.o |
29 | EXT_COBJ_FILES-y += lib/ctype.o | 29 | EXT_COBJ_FILES-y += lib/ctype.o |
30 | EXT_COBJ_FILES-y += lib/div64.o | 30 | EXT_COBJ_FILES-y += lib/div64.o |
31 | EXT_COBJ_FILES-y += lib/string.o | 31 | EXT_COBJ_FILES-y += lib/string.o |
32 | EXT_COBJ_FILES-y += lib/time.o | 32 | EXT_COBJ_FILES-y += lib/time.o |
33 | EXT_COBJ_FILES-y += lib/vsprintf.o | 33 | EXT_COBJ_FILES-y += lib/vsprintf.o |
34 | EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o | 34 | EXT_SOBJ_FILES-$(CONFIG_PPC) += arch/powerpc/lib/ppcstring.o |
35 | 35 | ||
36 | # Create a list of source files so their dependencies can be auto-generated | ||
37 | SRCS += $(addprefix $(SRCTREE)/,$(EXT_COBJ_FILES-y:.o=.c)) | ||
38 | SRCS += $(addprefix $(SRCTREE)/,$(EXT_SOBJ_FILES-y:.o=.S)) | ||
39 | SRCS += $(addprefix $(SRCTREE)/examples/api/,$(COBJ_FILES-y:.o=.c)) | ||
40 | SRCS += $(addprefix $(SRCTREE)/examples/api/,$(SOBJ_FILES-y:.o=.S)) | ||
41 | |||
42 | # Create a list of object files to be compiled | 36 | # Create a list of object files to be compiled |
43 | OBJS += $(addprefix $(obj)/,$(SOBJ_FILES-y)) | 37 | OBJS += $(addprefix $(obj)/,$(SOBJ_FILES-y)) |
44 | OBJS += $(addprefix $(obj)/,$(COBJ_FILES-y)) | 38 | OBJS += $(addprefix $(obj)/,$(COBJ_FILES-y)) |
45 | OBJS += $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))) | 39 | OBJS += $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))) |
46 | OBJS += $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))) | 40 | OBJS += $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))) |
47 | 41 | ||
48 | ######################################################################### | 42 | ######################################################################### |
49 | 43 | ||
50 | $(obj)/demo: $(OBJS) | 44 | $(obj)/demo: $(OBJS) |
51 | $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS) | 45 | $(LD) --gc-sections -Ttext $(LOAD_ADDR) -o $@ $^ $(PLATFORM_LIBS) |
52 | 46 | ||
53 | $(obj)/demo.bin: $(obj)/demo | 47 | $(obj)/demo.bin: $(obj)/demo |
54 | $(OBJCOPY) -O binary $< $@ 2>/dev/null | 48 | $(OBJCOPY) -O binary $< $@ 2>/dev/null |
55 | 49 | ||
56 | # Rule to build generic library C files | 50 | # Rule to build generic library C files |
57 | $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c | 51 | $(addprefix $(obj)/,$(notdir $(EXT_COBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/lib/%.c FORCE |
58 | $(CC) -g $(CFLAGS) -c -o $@ $< | 52 | $(call cmd,force_checksrc) |
53 | $(call if_changed_rule,cc_o_c) | ||
59 | 54 | ||
60 | # Rule to build architecture-specific library assembly files | 55 | # Rule to build architecture-specific library assembly files |
61 | $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S | 56 | $(addprefix $(obj)/,$(notdir $(EXT_SOBJ_FILES-y))): $(obj)/%.o: $(SRCTREE)/arch/$(ARCH)/lib/%.S |
62 | $(CC) -g $(CFLAGS) -c -o $@ $< | 57 | $(call if_changed_dep,as_o_S) |
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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | ifdef FTRACE | 8 | ifdef FTRACE |
9 | CFLAGS += -finstrument-functions -DFTRACE | 9 | ccflags-y += -finstrument-functions -DFTRACE |
10 | endif | 10 | endif |
11 | 11 | ||
12 | extra-y := hello_world | 12 | extra-y := hello_world |
13 | extra-$(CONFIG_SMC91111) += smc91111_eeprom | 13 | extra-$(CONFIG_SMC91111) += smc91111_eeprom |
14 | extra-$(CONFIG_SMC911X) += smc911x_eeprom | 14 | extra-$(CONFIG_SMC911X) += smc911x_eeprom |
15 | extra-$(CONFIG_SPI_FLASH_ATMEL) += atmel_df_pow2 | 15 | extra-$(CONFIG_SPI_FLASH_ATMEL) += atmel_df_pow2 |
16 | extra-$(CONFIG_MPC5xxx) += interrupt | 16 | extra-$(CONFIG_MPC5xxx) += interrupt |
17 | extra-$(CONFIG_8xx) += test_burst timer | 17 | extra-$(CONFIG_8xx) += test_burst timer |
18 | extra-$(CONFIG_8260) += mem_to_mem_idma2intr | 18 | extra-$(CONFIG_8260) += mem_to_mem_idma2intr |
19 | extra-$(CONFIG_PPC) += sched | 19 | extra-$(CONFIG_PPC) += sched |
20 | 20 | ||
21 | # | 21 | # |
22 | # Some versions of make do not handle trailing white spaces properly; | 22 | # Some versions of make do not handle trailing white spaces properly; |
23 | # leading to build failures. The problem was found with GNU Make 3.80. | 23 | # leading to build failures. The problem was found with GNU Make 3.80. |
24 | # Using 'strip' as a workaround for the problem. | 24 | # Using 'strip' as a workaround for the problem. |
25 | # | 25 | # |
26 | ELF := $(strip $(extra-y)) | 26 | ELF := $(strip $(extra-y)) |
27 | 27 | ||
28 | extra-y += $(addsuffix .srec,$(extra-y)) $(addsuffix .bin,$(extra-y)) | 28 | extra-y += $(addsuffix .srec,$(extra-y)) $(addsuffix .bin,$(extra-y)) |
29 | clean-files := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra-)) | 29 | clean-files := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra-)) |
30 | 30 | ||
31 | 31 | ||
32 | COBJS := $(ELF:=.o) | 32 | COBJS := $(ELF:=.o) |
33 | 33 | ||
34 | LIB = $(obj)/libstubs.o | 34 | LIB = $(obj)/libstubs.o |
35 | 35 | ||
36 | LIBAOBJS-$(CONFIG_PPC) += ppc_longjmp.o ppc_setjmp.o | 36 | LIBAOBJS-$(CONFIG_PPC) += ppc_longjmp.o ppc_setjmp.o |
37 | LIBAOBJS-$(CONFIG_8xx) += test_burst_lib.o | 37 | LIBAOBJS-$(CONFIG_8xx) += test_burst_lib.o |
38 | LIBAOBJS := $(LIBAOBJS-y) | 38 | LIBAOBJS := $(LIBAOBJS-y) |
39 | 39 | ||
40 | LIBCOBJS = stubs.o | 40 | LIBCOBJS = stubs.o |
41 | 41 | ||
42 | .SECONDARY: $(call objectify,$(COBJS)) | ||
43 | targets += $(patsubst $(obj)/%,%,$(LIB)) $(COBJS) $(LIBAOBJS) $(LIBCOBJS) | ||
44 | |||
42 | LIBOBJS = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS)) | 45 | LIBOBJS = $(addprefix $(obj)/,$(LIBAOBJS) $(LIBCOBJS)) |
43 | 46 | ||
44 | SRCS := $(COBJS:.o=.c) $(LIBCOBJS:.o=.c) $(LIBAOBJS:.o=.S) | ||
45 | OBJS := $(addprefix $(obj)/,$(COBJS)) | ||
46 | ELF := $(addprefix $(obj)/,$(ELF)) | 47 | ELF := $(addprefix $(obj)/,$(ELF)) |
47 | 48 | ||
48 | gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) | 49 | gcclibdir := $(shell dirname `$(CC) -print-libgcc-file-name`) |
49 | 50 | ||
50 | # For PowerPC there's no need to compile standalone applications as a | 51 | # For PowerPC there's no need to compile standalone applications as a |
51 | # relocatable executable. The relocation data is not needed, and | 52 | # relocatable executable. The relocation data is not needed, and |
52 | # also causes the entry point of the standalone application to be | 53 | # also causes the entry point of the standalone application to be |
53 | # inconsistent. | 54 | # inconsistent. |
54 | ifeq ($(ARCH),powerpc) | 55 | ifeq ($(ARCH),powerpc) |
55 | AFLAGS := $(filter-out $(RELFLAGS),$(AFLAGS)) | 56 | # FIX ME |
56 | CFLAGS := $(filter-out $(RELFLAGS),$(CFLAGS)) | 57 | CPPFLAGS := $(filter-out $(RELFLAGS), $(CPPFLAGS)) |
57 | CPPFLAGS := $(filter-out $(RELFLAGS),$(CPPFLAGS)) | ||
58 | endif | 58 | endif |
59 | 59 | ||
60 | # We don't want gcc reordering functions if possible. This ensures that an | 60 | # We don't want gcc reordering functions if possible. This ensures that an |
61 | # application's entry point will be the first function in the application's | 61 | # application's entry point will be the first function in the application's |
62 | # source file. | 62 | # source file. |
63 | CFLAGS += $(call cc-option,-fno-toplevel-reorder) | 63 | ccflags-y += $(call cc-option,-fno-toplevel-reorder) |
64 | 64 | ||
65 | ######################################################################### | 65 | ######################################################################### |
66 | $(LIB): $(LIBOBJS) | 66 | |
67 | $(call cmd_link_o_target, $(LIBOBJS)) | 67 | quiet_cmd_link_lib = LD $@ |
68 | cmd_link_lib = $(LD) $(ld_flags) -r -o $@ $(filter $(LIBOBJS), $^) | ||
69 | |||
70 | $(LIB): $(LIBOBJS) FORCE | ||
71 | $(call if_changed,link_lib) | ||
68 | 72 | ||
69 | $(ELF): | 73 | $(ELF): |
70 | $(obj)/%: $(obj)/%.o $(LIB) | 74 | $(obj)/%: $(obj)/%.o $(LIB) |
71 | $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ | 75 | $(LD) $(LDFLAGS) -g -Ttext $(CONFIG_STANDALONE_LOAD_ADDR) \ |
72 | -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ | 76 | -o $@ -e $(SYM_PREFIX)$(notdir $(<:.o=)) $< $(LIB) \ |
73 | -L$(gcclibdir) -lgcc | 77 | -L$(gcclibdir) -lgcc |
74 | 78 | ||
75 | $(obj)/%.srec: $(obj)/% | 79 | $(obj)/%.srec: $(obj)/% |
76 | $(OBJCOPY) -O srec $< $@ 2>/dev/null | 80 | $(OBJCOPY) -O srec $< $@ 2>/dev/null |
77 | 81 |
fs/ubifs/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006 | 2 | # (C) Copyright 2006 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # (C) Copyright 2003 | 5 | # (C) Copyright 2003 |
6 | # Pavel Bartusek, Sysgo Real-Time Solutions AG, pba@sysgo.de | 6 | # Pavel Bartusek, Sysgo Real-Time Solutions AG, pba@sysgo.de |
7 | # | 7 | # |
8 | # | 8 | # |
9 | # SPDX-License-Identifier: GPL-2.0+ | 9 | # SPDX-License-Identifier: GPL-2.0+ |
10 | # | 10 | # |
11 | 11 | ||
12 | obj-y := ubifs.o io.o super.o sb.o master.o lpt.o | 12 | obj-y := ubifs.o io.o super.o sb.o master.o lpt.o |
13 | obj-y += lpt_commit.o scan.o lprops.o | 13 | obj-y += lpt_commit.o scan.o lprops.o |
14 | obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o | 14 | obj-y += tnc.o tnc_misc.o debug.o crc16.o budget.o |
15 | obj-y += log.o orphan.o recovery.o replay.o | 15 | obj-y += log.o orphan.o recovery.o replay.o |
16 | 16 | ||
17 | # SEE README.arm-unaligned-accesses | 17 | # SEE README.arm-unaligned-accesses |
18 | $(obj)/super.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) | 18 | CFLAGS_super.o := $(PLATFORM_NO_UNALIGNED) |
19 | 19 |
fs/yaffs2/Makefile
1 | # Makefile for YAFFS direct test | 1 | # Makefile for YAFFS direct test |
2 | # | 2 | # |
3 | # | 3 | # |
4 | # YAFFS: Yet another Flash File System. A NAND-flash specific file system. | 4 | # YAFFS: Yet another Flash File System. A NAND-flash specific file system. |
5 | # | 5 | # |
6 | # Copyright (C) 2003 Aleph One Ltd. | 6 | # Copyright (C) 2003 Aleph One Ltd. |
7 | # | 7 | # |
8 | # | 8 | # |
9 | # Created by Charles Manning <charles@aleph1.co.uk> | 9 | # Created by Charles Manning <charles@aleph1.co.uk> |
10 | # | 10 | # |
11 | # This program is free software; you can redistribute it and/or modify | 11 | # This program is free software; you can redistribute it and/or modify |
12 | # it under the terms of the GNU General Public License version 2 as | 12 | # it under the terms of the GNU General Public License version 2 as |
13 | # published by the Free Software Foundation. | 13 | # published by the Free Software Foundation. |
14 | # | 14 | # |
15 | # NB Warning this Makefile does not include header dependencies. | 15 | # NB Warning this Makefile does not include header dependencies. |
16 | # | 16 | # |
17 | # $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $ | 17 | # $Id: Makefile,v 1.15 2007/07/18 19:40:38 charles Exp $ |
18 | 18 | ||
19 | obj-y := \ | 19 | obj-y := \ |
20 | yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\ | 20 | yaffs_allocator.o yaffs_attribs.o yaffs_bitmap.o yaffs_uboot_glue.o\ |
21 | yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \ | 21 | yaffs_checkptrw.o yaffs_ecc.o yaffs_error.o \ |
22 | yaffsfs.o yaffs_guts.o yaffs_nameval.o yaffs_nand.o\ | 22 | yaffsfs.o yaffs_guts.o yaffs_nameval.o yaffs_nand.o\ |
23 | yaffs_packedtags1.o yaffs_packedtags2.o yaffs_qsort.o \ | 23 | yaffs_packedtags1.o yaffs_packedtags2.o yaffs_qsort.o \ |
24 | yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \ | 24 | yaffs_summary.o yaffs_tagscompat.o yaffs_verify.o yaffs_yaffs1.o \ |
25 | yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o | 25 | yaffs_yaffs2.o yaffs_mtdif.o yaffs_mtdif2.o |
26 | 26 | ||
27 | YCFLAGS = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM | 27 | ccflags-y = -DCONFIG_YAFFS_DIRECT -DCONFIG_YAFFS_SHORT_NAMES_IN_RAM \ |
28 | YCFLAGS += -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE | 28 | -DCONFIG_YAFFS_YAFFS2 -DNO_Y_INLINE \ |
29 | YCFLAGS += -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES | 29 | -DCONFIG_YAFFS_PROVIDE_DEFS -DCONFIG_YAFFSFS_PROVIDE_VALUES |
30 | |||
31 | CFLAGS += $(YCFLAGS) | ||
32 | CPPFLAGS += $(YCFLAGS) | ||
33 | 30 |
lib/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | ifndef CONFIG_SPL_BUILD | 8 | ifndef CONFIG_SPL_BUILD |
9 | 9 | ||
10 | obj-$(CONFIG_RSA) += rsa/ | 10 | obj-$(CONFIG_RSA) += rsa/ |
11 | obj-$(CONFIG_LZMA) += lzma/ | 11 | obj-$(CONFIG_LZMA) += lzma/ |
12 | obj-$(CONFIG_LZO) += lzo/ | 12 | obj-$(CONFIG_LZO) += lzo/ |
13 | obj-$(CONFIG_ZLIB) += zlib/ | 13 | obj-$(CONFIG_ZLIB) += zlib/ |
14 | obj-$(CONFIG_TIZEN) += tizen/ | 14 | obj-$(CONFIG_TIZEN) += tizen/ |
15 | 15 | ||
16 | obj-$(CONFIG_AES) += aes.o | 16 | obj-$(CONFIG_AES) += aes.o |
17 | obj-$(CONFIG_BZIP2) += bzlib.o | 17 | obj-$(CONFIG_BZIP2) += bzlib.o |
18 | obj-$(CONFIG_BZIP2) += bzlib_crctable.o | 18 | obj-$(CONFIG_BZIP2) += bzlib_crctable.o |
19 | obj-$(CONFIG_BZIP2) += bzlib_decompress.o | 19 | obj-$(CONFIG_BZIP2) += bzlib_decompress.o |
20 | obj-$(CONFIG_BZIP2) += bzlib_randtable.o | 20 | obj-$(CONFIG_BZIP2) += bzlib_randtable.o |
21 | obj-$(CONFIG_BZIP2) += bzlib_huffman.o | 21 | obj-$(CONFIG_BZIP2) += bzlib_huffman.o |
22 | obj-$(CONFIG_USB_TTY) += circbuf.o | 22 | obj-$(CONFIG_USB_TTY) += circbuf.o |
23 | obj-y += crc7.o | 23 | obj-y += crc7.o |
24 | obj-y += crc8.o | 24 | obj-y += crc8.o |
25 | obj-y += crc16.o | 25 | obj-y += crc16.o |
26 | obj-$(CONFIG_OF_CONTROL) += fdtdec.o | 26 | obj-$(CONFIG_OF_CONTROL) += fdtdec.o |
27 | obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o | 27 | obj-$(CONFIG_TEST_FDTDEC) += fdtdec_test.o |
28 | obj-$(CONFIG_GZIP) += gunzip.o | 28 | obj-$(CONFIG_GZIP) += gunzip.o |
29 | obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o | 29 | obj-$(CONFIG_GZIP_COMPRESSED) += gzip.o |
30 | obj-y += initcall.o | 30 | obj-y += initcall.o |
31 | obj-$(CONFIG_LMB) += lmb.o | 31 | obj-$(CONFIG_LMB) += lmb.o |
32 | obj-y += ldiv.o | 32 | obj-y += ldiv.o |
33 | obj-$(CONFIG_MD5) += md5.o | 33 | obj-$(CONFIG_MD5) += md5.o |
34 | obj-y += net_utils.o | 34 | obj-y += net_utils.o |
35 | obj-$(CONFIG_PHYSMEM) += physmem.o | 35 | obj-$(CONFIG_PHYSMEM) += physmem.o |
36 | obj-y += qsort.o | 36 | obj-y += qsort.o |
37 | obj-$(CONFIG_SHA1) += sha1.o | 37 | obj-$(CONFIG_SHA1) += sha1.o |
38 | obj-$(CONFIG_SHA256) += sha256.o | 38 | obj-$(CONFIG_SHA256) += sha256.o |
39 | obj-y += strmhz.o | 39 | obj-y += strmhz.o |
40 | obj-$(CONFIG_TPM) += tpm.o | 40 | obj-$(CONFIG_TPM) += tpm.o |
41 | obj-$(CONFIG_RBTREE) += rbtree.o | 41 | obj-$(CONFIG_RBTREE) += rbtree.o |
42 | obj-$(CONFIG_BITREVERSE) += bitrev.o | 42 | obj-$(CONFIG_BITREVERSE) += bitrev.o |
43 | endif | 43 | endif |
44 | 44 | ||
45 | ifdef CONFIG_SPL_BUILD | 45 | ifdef CONFIG_SPL_BUILD |
46 | obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o | 46 | obj-$(CONFIG_SPL_YMODEM_SUPPORT) += crc16.o |
47 | obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o | 47 | obj-$(CONFIG_SPL_NET_SUPPORT) += net_utils.o |
48 | endif | 48 | endif |
49 | obj-$(CONFIG_ADDR_MAP) += addr_map.o | 49 | obj-$(CONFIG_ADDR_MAP) += addr_map.o |
50 | obj-y += hashtable.o | 50 | obj-y += hashtable.o |
51 | obj-y += errno.o | 51 | obj-y += errno.o |
52 | obj-y += display_options.o | 52 | obj-y += display_options.o |
53 | obj-$(CONFIG_BCH) += bch.o | 53 | obj-$(CONFIG_BCH) += bch.o |
54 | obj-y += crc32.o | 54 | obj-y += crc32.o |
55 | obj-y += ctype.o | 55 | obj-y += ctype.o |
56 | obj-y += div64.o | 56 | obj-y += div64.o |
57 | obj-y += hang.o | 57 | obj-y += hang.o |
58 | obj-y += linux_string.o | 58 | obj-y += linux_string.o |
59 | obj-$(CONFIG_REGEX) += slre.o | 59 | obj-$(CONFIG_REGEX) += slre.o |
60 | obj-y += string.o | 60 | obj-y += string.o |
61 | obj-y += time.o | 61 | obj-y += time.o |
62 | obj-$(CONFIG_TRACE) += trace.o | 62 | obj-$(CONFIG_TRACE) += trace.o |
63 | obj-$(CONFIG_BOOTP_PXE) += uuid.o | 63 | obj-$(CONFIG_BOOTP_PXE) += uuid.o |
64 | obj-y += vsprintf.o | 64 | obj-y += vsprintf.o |
65 | obj-$(CONFIG_RANDOM_MACADDR) += rand.o | 65 | obj-$(CONFIG_RANDOM_MACADDR) += rand.o |
66 | obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o | 66 | obj-$(CONFIG_BOOTP_RANDOM_DELAY) += rand.o |
67 | obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o | 67 | obj-$(CONFIG_CMD_LINK_LOCAL) += rand.o |
68 | 68 | ||
69 | # SEE README.arm-unaligned-accesses | 69 | # SEE README.arm-unaligned-accesses |
70 | $(obj)/bzlib.o: CFLAGS += $(PLATFORM_NO_UNALIGNED) | 70 | CFLAGS_bzlib.o := $(PLATFORM_NO_UNALIGNED) |
71 | 71 |
lib/lzma/Makefile
1 | # | 1 | # |
2 | # Copyright (C) 2007-2008 Industrie Dial Face S.p.A. | 2 | # Copyright (C) 2007-2008 Industrie Dial Face S.p.A. |
3 | # Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) | 3 | # Luigi 'Comio' Mantellini (luigi.mantellini@idf-hit.com) |
4 | # | 4 | # |
5 | # (C) Copyright 2003-2006 | 5 | # (C) Copyright 2003-2006 |
6 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 6 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
7 | # | 7 | # |
8 | # SPDX-License-Identifier: GPL-2.0+ | 8 | # SPDX-License-Identifier: GPL-2.0+ |
9 | # | 9 | # |
10 | 10 | ||
11 | CFLAGS += -D_LZMA_PROB32 | 11 | ccflags-y += -D_LZMA_PROB32 |
12 | 12 | ||
13 | obj-y += LzmaDec.o LzmaTools.o | 13 | obj-y += LzmaDec.o LzmaTools.o |
14 | 14 |
nand_spl/board/amcc/acadia/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk | 8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
14 | $(LDFLAGS_FINAL) | 14 | $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS = start.o resetvec.o cache.o | 18 | SOBJS = start.o resetvec.o cache.o |
19 | COBJS = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o | 19 | COBJS = gpio.o nand_boot.o nand_ecc.o memory.o ndfc.o pll.o |
20 | 20 | ||
21 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 21 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
23 | __OBJS := $(SOBJS) $(COBJS) | 22 | __OBJS := $(SOBJS) $(COBJS) |
24 | LNDIR := $(nandobj)board/$(BOARDDIR) | 23 | LNDIR := $(nandobj)board/$(BOARDDIR) |
25 | 24 | ||
25 | targets += $(__OBJS) | ||
26 | |||
26 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \ | 27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin \ |
27 | $(nandobj)System.map | 28 | $(nandobj)System.map |
28 | 29 | ||
29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 30 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 31 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
31 | 32 | ||
32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 36 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 37 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
37 | -Map $(nandobj)u-boot-spl.map -o $@ | 38 | -Map $(nandobj)u-boot-spl.map -o $@ |
38 | 39 | ||
39 | $(nandobj)System.map: $(nandobj)u-boot-spl | 40 | $(nandobj)System.map: $(nandobj)u-boot-spl |
40 | @$(NM) $< | \ | 41 | @$(NM) $< | \ |
41 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ | 42 | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ |
42 | sort > $@ | 43 | sort > $@ |
43 | 44 | ||
44 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 45 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
45 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 46 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
46 | 47 | ||
47 | # create symbolic links for common files | 48 | # create symbolic links for common files |
48 | 49 | ||
49 | # from cpu directory | 50 | # from cpu directory |
50 | $(obj)/cache.S: | 51 | $(obj)/cache.S: |
51 | @rm -f $@ | 52 | @rm -f $@ |
52 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ | 53 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ |
53 | 54 | ||
54 | $(obj)/gpio.c: | 55 | $(obj)/gpio.c: |
55 | @rm -f $@ | 56 | @rm -f $@ |
56 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/gpio.c $@ | 57 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/gpio.c $@ |
57 | 58 | ||
58 | $(obj)/ndfc.c: | 59 | $(obj)/ndfc.c: |
59 | @rm -f $@ | 60 | @rm -f $@ |
60 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ | 61 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ |
61 | 62 | ||
62 | $(obj)/resetvec.S: | 63 | $(obj)/resetvec.S: |
63 | @rm -f $@ | 64 | @rm -f $@ |
64 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ | 65 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ |
65 | 66 | ||
66 | $(obj)/start.S: | 67 | $(obj)/start.S: |
67 | @rm -f $@ | 68 | @rm -f $@ |
68 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ | 69 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ |
69 | 70 | ||
70 | # from board directory | 71 | # from board directory |
71 | $(obj)/memory.c: | 72 | $(obj)/memory.c: |
72 | @rm -f $@ | 73 | @rm -f $@ |
73 | ln -s $(SRCTREE)/board/amcc/acadia/memory.c $@ | 74 | ln -s $(SRCTREE)/board/amcc/acadia/memory.c $@ |
74 | 75 | ||
75 | $(obj)/pll.c: | 76 | $(obj)/pll.c: |
76 | @rm -f $@ | 77 | @rm -f $@ |
77 | ln -s $(SRCTREE)/board/amcc/acadia/pll.c $@ | 78 | ln -s $(SRCTREE)/board/amcc/acadia/pll.c $@ |
78 | 79 | ||
79 | # from nand_spl directory | 80 | # from nand_spl directory |
80 | $(obj)/nand_boot.c: | 81 | $(obj)/nand_boot.c: |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ | 83 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ |
83 | 84 | ||
84 | # from drivers/mtd/nand directory | 85 | # from drivers/mtd/nand directory |
85 | $(obj)/nand_ecc.c: | 86 | $(obj)/nand_ecc.c: |
86 | @rm -f $@ | 87 | @rm -f $@ |
87 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ | 88 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ |
nand_spl/board/amcc/bamboo/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk | 8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
14 | $(LDFLAGS_FINAL) | 14 | $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS = start.o init.o resetvec.o | 18 | SOBJS = start.o init.o resetvec.o |
19 | COBJS = nand_boot.o nand_ecc.o ndfc.o sdram.o | 19 | COBJS = nand_boot.o nand_ecc.o ndfc.o sdram.o |
20 | 20 | ||
21 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 21 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
23 | __OBJS := $(SOBJS) $(COBJS) | 22 | __OBJS := $(SOBJS) $(COBJS) |
24 | LNDIR := $(nandobj)board/$(BOARDDIR) | 23 | LNDIR := $(nandobj)board/$(BOARDDIR) |
25 | 24 | ||
25 | targets += $(__OBJS) | ||
26 | |||
26 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
27 | 28 | ||
28 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
29 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
30 | 31 | ||
31 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
32 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
33 | 34 | ||
34 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
35 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
36 | -Map $(nandobj)u-boot-spl.map -o $@ | 37 | -Map $(nandobj)u-boot-spl.map -o $@ |
37 | 38 | ||
38 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 39 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 40 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
40 | 41 | ||
41 | # create symbolic links for common files | 42 | # create symbolic links for common files |
42 | 43 | ||
43 | # from cpu directory | 44 | # from cpu directory |
44 | $(obj)/ndfc.c: | 45 | $(obj)/ndfc.c: |
45 | @rm -f $@ | 46 | @rm -f $@ |
46 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ | 47 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ |
47 | 48 | ||
48 | $(obj)/resetvec.S: | 49 | $(obj)/resetvec.S: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ | 51 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ |
51 | 52 | ||
52 | $(obj)/start.S: | 53 | $(obj)/start.S: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ | 55 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ |
55 | 56 | ||
56 | # from board directory | 57 | # from board directory |
57 | $(obj)/init.S: | 58 | $(obj)/init.S: |
58 | @rm -f $@ | 59 | @rm -f $@ |
59 | ln -s $(SRCTREE)/board/amcc/bamboo/init.S $@ | 60 | ln -s $(SRCTREE)/board/amcc/bamboo/init.S $@ |
60 | 61 | ||
61 | # from nand_spl directory | 62 | # from nand_spl directory |
62 | $(obj)/nand_boot.c: | 63 | $(obj)/nand_boot.c: |
63 | @rm -f $@ | 64 | @rm -f $@ |
64 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ | 65 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ |
65 | 66 | ||
66 | # from drivers/mtd/nand directory | 67 | # from drivers/mtd/nand directory |
67 | $(obj)/nand_ecc.c: | 68 | $(obj)/nand_ecc.c: |
68 | @rm -f $@ | 69 | @rm -f $@ |
69 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ | 70 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ |
nand_spl/board/amcc/canyonlands/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2008 | 2 | # (C) Copyright 2008 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk | 8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
14 | $(LDFLAGS_FINAL) | 14 | $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS := start.o | 18 | SOBJS := start.o |
19 | SOBJS += init.o | 19 | SOBJS += init.o |
20 | SOBJS += resetvec.o | 20 | SOBJS += resetvec.o |
21 | COBJS := ddr2_fixed.o | 21 | COBJS := ddr2_fixed.o |
22 | COBJS += nand_boot.o | 22 | COBJS += nand_boot.o |
23 | COBJS += nand_ecc.o | 23 | COBJS += nand_ecc.o |
24 | COBJS += ndfc.o | 24 | COBJS += ndfc.o |
25 | 25 | ||
26 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
27 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 26 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
28 | __OBJS := $(SOBJS) $(COBJS) | 27 | __OBJS := $(SOBJS) $(COBJS) |
29 | LNDIR := $(nandobj)board/$(BOARDDIR) | 28 | LNDIR := $(nandobj)board/$(BOARDDIR) |
30 | 29 | ||
30 | targets += $(__OBJS) | ||
31 | |||
31 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 32 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
32 | 33 | ||
33 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 34 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
34 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 35 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
35 | 36 | ||
36 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 37 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
37 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 38 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
38 | 39 | ||
39 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 40 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
40 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 41 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
41 | -Map $(nandobj)u-boot-spl.map -o $@ | 42 | -Map $(nandobj)u-boot-spl.map -o $@ |
42 | 43 | ||
43 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 44 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
44 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 45 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
45 | 46 | ||
46 | # create symbolic links for common files | 47 | # create symbolic links for common files |
47 | 48 | ||
48 | # from cpu directory | 49 | # from cpu directory |
49 | $(obj)/ndfc.c: | 50 | $(obj)/ndfc.c: |
50 | @rm -f $@ | 51 | @rm -f $@ |
51 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ | 52 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ |
52 | 53 | ||
53 | $(obj)/resetvec.S: | 54 | $(obj)/resetvec.S: |
54 | @rm -f $@ | 55 | @rm -f $@ |
55 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ | 56 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ |
56 | 57 | ||
57 | $(obj)/start.S: | 58 | $(obj)/start.S: |
58 | @rm -f $@ | 59 | @rm -f $@ |
59 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ | 60 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ |
60 | 61 | ||
61 | # from board directory | 62 | # from board directory |
62 | $(obj)/init.S: | 63 | $(obj)/init.S: |
63 | @rm -f $@ | 64 | @rm -f $@ |
64 | ln -s $(SRCTREE)/board/amcc/canyonlands/init.S $@ | 65 | ln -s $(SRCTREE)/board/amcc/canyonlands/init.S $@ |
65 | 66 | ||
66 | # from nand_spl directory | 67 | # from nand_spl directory |
67 | $(obj)/nand_boot.c: | 68 | $(obj)/nand_boot.c: |
68 | @rm -f $@ | 69 | @rm -f $@ |
69 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ | 70 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ |
70 | 71 | ||
71 | # from drivers/mtd/nand directory | 72 | # from drivers/mtd/nand directory |
72 | $(obj)/nand_ecc.c: | 73 | $(obj)/nand_ecc.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ | 75 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ |
nand_spl/board/amcc/kilauea/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk | 8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
14 | $(LDFLAGS_FINAL) | 14 | $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS = start.o resetvec.o cache.o | 18 | SOBJS = start.o resetvec.o cache.o |
19 | COBJS = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o | 19 | COBJS = 44x_spd_ddr2.o nand_boot.o nand_ecc.o ndfc.o |
20 | 20 | ||
21 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 21 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
23 | __OBJS := $(SOBJS) $(COBJS) | 22 | __OBJS := $(SOBJS) $(COBJS) |
24 | LNDIR := $(nandobj)board/$(BOARDDIR) | 23 | LNDIR := $(nandobj)board/$(BOARDDIR) |
25 | 24 | ||
25 | targets += $(__OBJS) | ||
26 | |||
26 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
27 | 28 | ||
28 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
29 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
30 | 31 | ||
31 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
32 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
33 | 34 | ||
34 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
35 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
36 | -Map $(nandobj)u-boot-spl.map -o $@ | 37 | -Map $(nandobj)u-boot-spl.map -o $@ |
37 | 38 | ||
38 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 39 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 40 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
40 | 41 | ||
41 | # create symbolic links for common files | 42 | # create symbolic links for common files |
42 | 43 | ||
43 | # from cpu directory | 44 | # from cpu directory |
44 | $(obj)/44x_spd_ddr2.c: $(obj)/ecc.h | 45 | $(obj)/44x_spd_ddr2.c: $(obj)/ecc.h |
45 | @rm -f $@ | 46 | @rm -f $@ |
46 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c $@ | 47 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/44x_spd_ddr2.c $@ |
47 | 48 | ||
48 | $(obj)/cache.S: | 49 | $(obj)/cache.S: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ | 51 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/cache.S $@ |
51 | 52 | ||
52 | $(obj)/ecc.h: | 53 | $(obj)/ecc.h: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/ecc.h $@ | 55 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/ecc.h $@ |
55 | 56 | ||
56 | $(obj)/ndfc.c: | 57 | $(obj)/ndfc.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ | 59 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ |
59 | 60 | ||
60 | $(obj)/resetvec.S: | 61 | $(obj)/resetvec.S: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ | 63 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ |
63 | 64 | ||
64 | $(obj)/start.S: | 65 | $(obj)/start.S: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ | 67 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ |
67 | 68 | ||
68 | # from nand_spl directory | 69 | # from nand_spl directory |
69 | $(obj)/nand_boot.c: | 70 | $(obj)/nand_boot.c: |
70 | @rm -f $@ | 71 | @rm -f $@ |
71 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ | 72 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ |
72 | 73 | ||
73 | # from drivers/nand directory | 74 | # from drivers/nand directory |
74 | $(obj)/nand_ecc.c: | 75 | $(obj)/nand_ecc.c: |
75 | @rm -f $@ | 76 | @rm -f $@ |
76 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ | 77 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ |
nand_spl/board/amcc/sequoia/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2006-2007 | 2 | # (C) Copyright 2006-2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk | 8 | include $(TOPDIR)/nand_spl/board/$(BOARDDIR)/config.mk |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE) $(LDFLAGS) \ |
14 | $(LDFLAGS_FINAL) | 14 | $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS = start.o init.o resetvec.o | 18 | SOBJS = start.o init.o resetvec.o |
19 | COBJS = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o | 19 | COBJS = denali_data_eye.o nand_boot.o nand_ecc.o ndfc.o sdram.o |
20 | 20 | ||
21 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 21 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
23 | __OBJS := $(SOBJS) $(COBJS) | 22 | __OBJS := $(SOBJS) $(COBJS) |
24 | LNDIR := $(nandobj)board/$(BOARDDIR) | 23 | LNDIR := $(nandobj)board/$(BOARDDIR) |
25 | 24 | ||
25 | targets += $(__OBJS) | ||
26 | |||
26 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
27 | 28 | ||
28 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
29 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
30 | 31 | ||
31 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
32 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
33 | 34 | ||
34 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
35 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
36 | -Map $(nandobj)u-boot-spl.map -o $@ | 37 | -Map $(nandobj)u-boot-spl.map -o $@ |
37 | 38 | ||
38 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 39 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 40 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
40 | 41 | ||
41 | # create symbolic links for common files | 42 | # create symbolic links for common files |
42 | 43 | ||
43 | # from cpu directory | 44 | # from cpu directory |
44 | $(obj)/denali_data_eye.c: | 45 | $(obj)/denali_data_eye.c: |
45 | @rm -f $@ | 46 | @rm -f $@ |
46 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/denali_data_eye.c $@ | 47 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/denali_data_eye.c $@ |
47 | 48 | ||
48 | $(obj)/ndfc.c: | 49 | $(obj)/ndfc.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ | 51 | ln -s $(SRCTREE)/drivers/mtd/nand/ndfc.c $@ |
51 | 52 | ||
52 | $(obj)/resetvec.S: | 53 | $(obj)/resetvec.S: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ | 55 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/resetvec.S $@ |
55 | 56 | ||
56 | $(obj)/start.S: | 57 | $(obj)/start.S: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ | 59 | ln -s $(SRCTREE)/arch/powerpc/cpu/ppc4xx/start.S $@ |
59 | 60 | ||
60 | # from board directory | 61 | # from board directory |
61 | $(obj)/init.S: | 62 | $(obj)/init.S: |
62 | @rm -f $@ | 63 | @rm -f $@ |
63 | ln -s $(SRCTREE)/board/amcc/sequoia/init.S $@ | 64 | ln -s $(SRCTREE)/board/amcc/sequoia/init.S $@ |
64 | 65 | ||
65 | $(obj)/sdram.c: | 66 | $(obj)/sdram.c: |
66 | @rm -f $@ | 67 | @rm -f $@ |
67 | @rm -f $(obj)/sdram.h | 68 | @rm -f $(obj)/sdram.h |
68 | ln -s $(SRCTREE)/board/amcc/sequoia/sdram.c $@ | 69 | ln -s $(SRCTREE)/board/amcc/sequoia/sdram.c $@ |
69 | ln -s $(SRCTREE)/board/amcc/sequoia/sdram.h $(obj)/sdram.h | 70 | ln -s $(SRCTREE)/board/amcc/sequoia/sdram.h $(obj)/sdram.h |
70 | 71 | ||
71 | # from nand_spl directory | 72 | # from nand_spl directory |
72 | $(obj)/nand_boot.c: | 73 | $(obj)/nand_boot.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ | 75 | ln -s $(SRCTREE)/nand_spl/nand_boot.c $@ |
75 | 76 | ||
76 | # from drivers/mtd/nand directory | 77 | # from drivers/mtd/nand directory |
77 | $(obj)/nand_ecc.c: | 78 | $(obj)/nand_ecc.c: |
78 | @rm -f $@ | 79 | @rm -f $@ |
79 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ | 80 | ln -s $(SRCTREE)/drivers/mtd/nand/nand_ecc.c $@ |
nand_spl/board/freescale/mpc8315erdb/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # (C) Copyright 2008 Freescale Semiconductor | 4 | # (C) Copyright 2008 Freescale Semiconductor |
5 | # | 5 | # |
6 | # SPDX-License-Identifier: GPL-2.0+ | 6 | # SPDX-License-Identifier: GPL-2.0+ |
7 | # | 7 | # |
8 | 8 | ||
9 | PAD_TO := 0xfff04000 | 9 | PAD_TO := 0xfff04000 |
10 | 10 | ||
11 | nandobj := $(OBJTREE)/nand_spl/ | 11 | nandobj := $(OBJTREE)/nand_spl/ |
12 | 12 | ||
13 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 13 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
14 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 14 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
15 | $(LDFLAGS) $(LDFLAGS_FINAL) | 15 | $(LDFLAGS) $(LDFLAGS_FINAL) |
16 | AFLAGS += -DCONFIG_NAND_SPL | 16 | asflags-y += -DCONFIG_NAND_SPL |
17 | CFLAGS += -DCONFIG_NAND_SPL | 17 | ccflags-y += -DCONFIG_NAND_SPL |
18 | 18 | ||
19 | SOBJS = start.o ticks.o | 19 | SOBJS = start.o ticks.o |
20 | COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ | 20 | COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ |
21 | time.o cache.o | 21 | time.o cache.o |
22 | 22 | ||
23 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
24 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 23 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
25 | __OBJS := $(SOBJS) $(COBJS) | 24 | __OBJS := $(SOBJS) $(COBJS) |
26 | LNDIR := $(nandobj)board/$(BOARDDIR) | 25 | LNDIR := $(nandobj)board/$(BOARDDIR) |
27 | 26 | ||
27 | targets += $(__OBJS) | ||
28 | |||
28 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 29 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
29 | 30 | ||
30 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 31 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
31 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 32 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
32 | 33 | ||
33 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 34 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
34 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 35 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
35 | 36 | ||
36 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 37 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
37 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 38 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
38 | -Map $(nandobj)u-boot-spl.map -o $@ | 39 | -Map $(nandobj)u-boot-spl.map -o $@ |
39 | 40 | ||
40 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 41 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
41 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 42 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
42 | 43 | ||
43 | # create symbolic links for common files | 44 | # create symbolic links for common files |
44 | 45 | ||
45 | $(obj)/start.S: | 46 | $(obj)/start.S: |
46 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ | 47 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ |
47 | 48 | ||
48 | $(obj)/nand_boot_fsl_elbc.c: | 49 | $(obj)/nand_boot_fsl_elbc.c: |
49 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 50 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
50 | 51 | ||
51 | $(obj)/sdram.c: | 52 | $(obj)/sdram.c: |
52 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ | 53 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ |
53 | 54 | ||
54 | $(obj)/$(BOARD).c: | 55 | $(obj)/$(BOARD).c: |
55 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ | 56 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ |
56 | 57 | ||
57 | $(obj)/ns16550.c: | 58 | $(obj)/ns16550.c: |
58 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 59 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
59 | 60 | ||
60 | $(obj)/spl_minimal.c: | 61 | $(obj)/spl_minimal.c: |
61 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ | 62 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ |
62 | 63 | ||
63 | $(obj)/cache.c: | 64 | $(obj)/cache.c: |
64 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 65 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
65 | 66 | ||
66 | $(obj)/time.c: | 67 | $(obj)/time.c: |
67 | ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $@ | 68 | ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $@ |
68 | 69 | ||
69 | $(obj)/ticks.S: | 70 | $(obj)/ticks.S: |
70 | ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $@ | 71 | ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $@ |
nand_spl/board/freescale/mpc8536ds/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. | 5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 | 10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 |
11 | PAD_TO := 0xfff01000 | 11 | PAD_TO := 0xfff01000 |
12 | 12 | ||
13 | nandobj := $(OBJTREE)/nand_spl/ | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | ||
15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | 15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | $(LDFLAGS) $(LDFLAGS_FINAL) | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | AFLAGS += -DCONFIG_NAND_SPL | 18 | asflags-y += -DCONFIG_NAND_SPL |
19 | CFLAGS += -DCONFIG_NAND_SPL | 19 | ccflags-y += -DCONFIG_NAND_SPL |
20 | 20 | ||
21 | SOBJS = start.o resetvec.o | 21 | SOBJS = start.o resetvec.o |
22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ | 22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ |
23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o | 23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o |
24 | 24 | ||
25 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
26 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 25 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
27 | __OBJS := $(SOBJS) $(COBJS) | 26 | __OBJS := $(SOBJS) $(COBJS) |
28 | LNDIR := $(nandobj)board/$(BOARDDIR) | 27 | LNDIR := $(nandobj)board/$(BOARDDIR) |
29 | 28 | ||
29 | targets += $(__OBJS) | ||
30 | |||
30 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 31 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
31 | 32 | ||
32 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 36 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
36 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 37 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
37 | 38 | ||
38 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds | 39 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds |
39 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 40 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
40 | -Map $(nandobj)u-boot-spl.map -o $@ | 41 | -Map $(nandobj)u-boot-spl.map -o $@ |
41 | 42 | ||
42 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | 43 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) |
43 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ | 44 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
44 | -ansi -D__ASSEMBLY__ -P - <$< >$@ | 45 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
45 | 46 | ||
46 | # create symbolic links for common files | 47 | # create symbolic links for common files |
47 | 48 | ||
48 | $(obj)/cache.c: | 49 | $(obj)/cache.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 51 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
51 | 52 | ||
52 | $(obj)/cpu_init_early.c: | 53 | $(obj)/cpu_init_early.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ | 55 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ |
55 | 56 | ||
56 | $(obj)/spl_minimal.c: | 57 | $(obj)/spl_minimal.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ | 59 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ |
59 | 60 | ||
60 | $(obj)/fsl_law.c: | 61 | $(obj)/fsl_law.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ | 63 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ |
63 | 64 | ||
64 | $(obj)/law.c: | 65 | $(obj)/law.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ | 67 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ |
67 | 68 | ||
68 | $(obj)/nand_boot_fsl_elbc.c: | 69 | $(obj)/nand_boot_fsl_elbc.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 71 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
71 | 72 | ||
72 | $(obj)/ns16550.c: | 73 | $(obj)/ns16550.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 75 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
75 | 76 | ||
76 | $(obj)/resetvec.S: | 77 | $(obj)/resetvec.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ | 79 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ |
79 | 80 | ||
80 | $(obj)/fixed_ivor.S: | 81 | $(obj)/fixed_ivor.S: |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ | 83 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ |
83 | 84 | ||
84 | $(obj)/start.S: $(obj)/fixed_ivor.S | 85 | $(obj)/start.S: $(obj)/fixed_ivor.S |
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ | 87 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ |
87 | 88 | ||
88 | $(obj)/tlb.c: | 89 | $(obj)/tlb.c: |
89 | @rm -f $@ | 90 | @rm -f $@ |
90 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ | 91 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ |
91 | 92 | ||
92 | $(obj)/tlb_table.c: | 93 | $(obj)/tlb_table.c: |
93 | @rm -f $@ | 94 | @rm -f $@ |
94 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ | 95 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ |
nand_spl/board/freescale/mpc8569mds/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. | 5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 | 10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 |
11 | PAD_TO := 0xfff01000 | 11 | PAD_TO := 0xfff01000 |
12 | 12 | ||
13 | nandobj := $(OBJTREE)/nand_spl/ | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | ||
15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | 15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | $(LDFLAGS) $(LDFLAGS_FINAL) | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | AFLAGS += -DCONFIG_NAND_SPL | 18 | asflags-y += -DCONFIG_NAND_SPL |
19 | CFLAGS += -DCONFIG_NAND_SPL | 19 | ccflags-y += -DCONFIG_NAND_SPL |
20 | 20 | ||
21 | SOBJS = start.o resetvec.o | 21 | SOBJS = start.o resetvec.o |
22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ | 22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ |
23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o | 23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o |
24 | 24 | ||
25 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
26 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 25 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
27 | __OBJS := $(SOBJS) $(COBJS) | 26 | __OBJS := $(SOBJS) $(COBJS) |
28 | LNDIR := $(nandobj)board/$(BOARDDIR) | 27 | LNDIR := $(nandobj)board/$(BOARDDIR) |
29 | 28 | ||
29 | targets += $(__OBJS) | ||
30 | |||
30 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 31 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
31 | 32 | ||
32 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 36 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
36 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 37 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
37 | 38 | ||
38 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds | 39 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds |
39 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 40 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
40 | -Map $(nandobj)u-boot-spl.map -o $@ | 41 | -Map $(nandobj)u-boot-spl.map -o $@ |
41 | 42 | ||
42 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | 43 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) |
43 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ | 44 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
44 | -ansi -D__ASSEMBLY__ -P - <$< >$@ | 45 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
45 | 46 | ||
46 | # create symbolic links for common files | 47 | # create symbolic links for common files |
47 | 48 | ||
48 | $(obj)/cache.c: | 49 | $(obj)/cache.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 51 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
51 | 52 | ||
52 | $(obj)/cpu_init_early.c: | 53 | $(obj)/cpu_init_early.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ | 55 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ |
55 | 56 | ||
56 | $(obj)/spl_minimal.c: | 57 | $(obj)/spl_minimal.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ | 59 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ |
59 | 60 | ||
60 | $(obj)/fsl_law.c: | 61 | $(obj)/fsl_law.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ | 63 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ |
63 | 64 | ||
64 | $(obj)/law.c: | 65 | $(obj)/law.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ | 67 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ |
67 | 68 | ||
68 | $(obj)/nand_boot_fsl_elbc.c: | 69 | $(obj)/nand_boot_fsl_elbc.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 71 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
71 | 72 | ||
72 | $(obj)/ns16550.c: | 73 | $(obj)/ns16550.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 75 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
75 | 76 | ||
76 | $(obj)/resetvec.S: | 77 | $(obj)/resetvec.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ | 79 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ |
79 | 80 | ||
80 | $(obj)/fixed_ivor.S: | 81 | $(obj)/fixed_ivor.S: |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ | 83 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ |
83 | 84 | ||
84 | $(obj)/start.S: $(obj)/fixed_ivor.S | 85 | $(obj)/start.S: $(obj)/fixed_ivor.S |
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ | 87 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ |
87 | 88 | ||
88 | $(obj)/tlb.c: | 89 | $(obj)/tlb.c: |
89 | @rm -f $@ | 90 | @rm -f $@ |
90 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ | 91 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ |
91 | 92 | ||
92 | $(obj)/tlb_table.c: | 93 | $(obj)/tlb_table.c: |
93 | @rm -f $@ | 94 | @rm -f $@ |
94 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ | 95 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ |
nand_spl/board/freescale/mpc8572ds/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. | 5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 | 10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 |
11 | PAD_TO := 0xfff01000 | 11 | PAD_TO := 0xfff01000 |
12 | 12 | ||
13 | nandobj := $(OBJTREE)/nand_spl/ | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | ||
15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | 15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | $(LDFLAGS) $(LDFLAGS_FINAL) | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | AFLAGS += -DCONFIG_NAND_SPL | 18 | asflags-y += -DCONFIG_NAND_SPL |
19 | CFLAGS += -DCONFIG_NAND_SPL | 19 | ccflags-y += -DCONFIG_NAND_SPL |
20 | 20 | ||
21 | SOBJS = start.o resetvec.o | 21 | SOBJS = start.o resetvec.o |
22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ | 22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ |
23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o | 23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o |
24 | 24 | ||
25 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
26 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 25 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
27 | __OBJS := $(SOBJS) $(COBJS) | 26 | __OBJS := $(SOBJS) $(COBJS) |
28 | LNDIR := $(nandobj)board/$(BOARDDIR) | 27 | LNDIR := $(nandobj)board/$(BOARDDIR) |
29 | 28 | ||
29 | targets += $(__OBJS) | ||
30 | |||
30 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 31 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
31 | 32 | ||
32 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 36 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
36 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 37 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
37 | 38 | ||
38 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds | 39 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds |
39 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 40 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
40 | -Map $(nandobj)u-boot-spl.map -o $@ | 41 | -Map $(nandobj)u-boot-spl.map -o $@ |
41 | 42 | ||
42 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | 43 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) |
43 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ | 44 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
44 | -ansi -D__ASSEMBLY__ -P - <$< >$@ | 45 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
45 | 46 | ||
46 | # create symbolic links for common files | 47 | # create symbolic links for common files |
47 | 48 | ||
48 | $(obj)/cache.c: | 49 | $(obj)/cache.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 51 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
51 | 52 | ||
52 | $(obj)/cpu_init_early.c: | 53 | $(obj)/cpu_init_early.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ | 55 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ |
55 | 56 | ||
56 | $(obj)/spl_minimal.c: | 57 | $(obj)/spl_minimal.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ | 59 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ |
59 | 60 | ||
60 | $(obj)/fsl_law.c: | 61 | $(obj)/fsl_law.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ | 63 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ |
63 | 64 | ||
64 | $(obj)/law.c: | 65 | $(obj)/law.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ | 67 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ |
67 | 68 | ||
68 | $(obj)/nand_boot_fsl_elbc.c: | 69 | $(obj)/nand_boot_fsl_elbc.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 71 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
71 | 72 | ||
72 | $(obj)/ns16550.c: | 73 | $(obj)/ns16550.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 75 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
75 | 76 | ||
76 | $(obj)/resetvec.S: | 77 | $(obj)/resetvec.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ | 79 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ |
79 | 80 | ||
80 | $(obj)/fixed_ivor.S: | 81 | $(obj)/fixed_ivor.S: |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ | 83 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ |
83 | 84 | ||
84 | $(obj)/start.S: $(obj)/fixed_ivor.S | 85 | $(obj)/start.S: $(obj)/fixed_ivor.S |
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ | 87 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ |
87 | 88 | ||
88 | $(obj)/tlb.c: | 89 | $(obj)/tlb.c: |
89 | @rm -f $@ | 90 | @rm -f $@ |
90 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ | 91 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ |
91 | 92 | ||
92 | $(obj)/tlb_table.c: | 93 | $(obj)/tlb_table.c: |
93 | @rm -f $@ | 94 | @rm -f $@ |
94 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ | 95 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ |
nand_spl/board/freescale/p1023rds/Makefile
1 | # | 1 | # |
2 | # Copyright 2010-2011 Freescale Semiconductor, Inc. | 2 | # Copyright 2010-2011 Freescale Semiconductor, Inc. |
3 | # | 3 | # |
4 | # SPDX-License-Identifier: GPL-2.0+ | 4 | # SPDX-License-Identifier: GPL-2.0+ |
5 | # | 5 | # |
6 | 6 | ||
7 | PAD_TO := 0xfff01000 | 7 | PAD_TO := 0xfff01000 |
8 | 8 | ||
9 | nandobj := $(OBJTREE)/nand_spl/ | 9 | nandobj := $(OBJTREE)/nand_spl/ |
10 | 10 | ||
11 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | 11 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
12 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 12 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
13 | $(LDFLAGS) $(LDFLAGS_FINAL) | 13 | $(LDFLAGS) $(LDFLAGS_FINAL) |
14 | AFLAGS += -DCONFIG_NAND_SPL | 14 | asflags-y += -DCONFIG_NAND_SPL |
15 | CFLAGS += -DCONFIG_NAND_SPL | 15 | ccflags-y += -DCONFIG_NAND_SPL |
16 | 16 | ||
17 | SOBJS = start.o resetvec.o | 17 | SOBJS = start.o resetvec.o |
18 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ | 18 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ |
19 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o | 19 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o |
20 | 20 | ||
21 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 21 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
23 | __OBJS := $(SOBJS) $(COBJS) | 22 | __OBJS := $(SOBJS) $(COBJS) |
24 | LNDIR := $(nandobj)board/$(BOARDDIR) | 23 | LNDIR := $(nandobj)board/$(BOARDDIR) |
25 | 24 | ||
25 | targets += $(__OBJS) | ||
26 | |||
26 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
27 | 28 | ||
28 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
29 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
30 | 31 | ||
31 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
32 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
33 | 34 | ||
34 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds | 35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds |
35 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
36 | -Map $(nandobj)u-boot-spl.map -o $@ | 37 | -Map $(nandobj)u-boot-spl.map -o $@ |
37 | 38 | ||
38 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | 39 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) |
39 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ | 40 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
40 | -ansi -D__ASSEMBLY__ -P - <$< >$@ | 41 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
41 | 42 | ||
42 | # create symbolic links for common files | 43 | # create symbolic links for common files |
43 | 44 | ||
44 | $(obj)/cache.c: | 45 | $(obj)/cache.c: |
45 | @rm -f $@ | 46 | @rm -f $@ |
46 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 47 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
47 | 48 | ||
48 | $(obj)/cpu_init_early.c: | 49 | $(obj)/cpu_init_early.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $@ | 51 | ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $@ |
51 | 52 | ||
52 | $(obj)/spl_minimal.c: | 53 | $(obj)/spl_minimal.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $@ | 55 | ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $@ |
55 | 56 | ||
56 | $(obj)/fsl_law.c: | 57 | $(obj)/fsl_law.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ | 59 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ |
59 | 60 | ||
60 | $(obj)/law.c: | 61 | $(obj)/law.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ | 63 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ |
63 | 64 | ||
64 | $(obj)/nand_boot_fsl_elbc.c: | 65 | $(obj)/nand_boot_fsl_elbc.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 67 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
67 | 68 | ||
68 | $(obj)/ns16550.c: | 69 | $(obj)/ns16550.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 71 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
71 | 72 | ||
72 | $(obj)/resetvec.S: | 73 | $(obj)/resetvec.S: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ | 75 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ |
75 | 76 | ||
76 | $(obj)/fixed_ivor.S: | 77 | $(obj)/fixed_ivor.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $@ | 79 | ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $@ |
79 | 80 | ||
80 | $(obj)/start.S: $(obj)/fixed_ivor.S | 81 | $(obj)/start.S: $(obj)/fixed_ivor.S |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -sf $(SRCTREE)/$(CPUDIR)/start.S $@ | 83 | ln -sf $(SRCTREE)/$(CPUDIR)/start.S $@ |
83 | 84 | ||
84 | $(obj)/tlb.c: | 85 | $(obj)/tlb.c: |
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $@ | 87 | ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $@ |
87 | 88 | ||
88 | $(obj)/tlb_table.c: | 89 | $(obj)/tlb_table.c: |
89 | @rm -f $@ | 90 | @rm -f $@ |
90 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ | 91 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ |
nand_spl/board/freescale/p1_p2_rdb/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # | 4 | # |
5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. | 5 | # Copyright 2009-2011 Freescale Semiconductor, Inc. |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 | 10 | CONFIG_SYS_TEXT_BASE_SPL := 0xfff00000 |
11 | PAD_TO := 0xfff01000 | 11 | PAD_TO := 0xfff01000 |
12 | 12 | ||
13 | nandobj := $(OBJTREE)/nand_spl/ | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | ||
15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | 15 | LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds |
16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | $(LDFLAGS) $(LDFLAGS_FINAL) | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | AFLAGS += -DCONFIG_NAND_SPL | 18 | asflags-y += -DCONFIG_NAND_SPL |
19 | CFLAGS += -DCONFIG_NAND_SPL | 19 | ccflags-y += -DCONFIG_NAND_SPL |
20 | 20 | ||
21 | SOBJS = start.o resetvec.o | 21 | SOBJS = start.o resetvec.o |
22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ | 22 | COBJS = cache.o cpu_init_early.o spl_minimal.o fsl_law.o law.o \ |
23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o | 23 | nand_boot.o nand_boot_fsl_elbc.o ns16550.o tlb.o tlb_table.o |
24 | 24 | ||
25 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
26 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 25 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
27 | __OBJS := $(SOBJS) $(COBJS) | 26 | __OBJS := $(SOBJS) $(COBJS) |
28 | LNDIR := $(nandobj)board/$(BOARDDIR) | 27 | LNDIR := $(nandobj)board/$(BOARDDIR) |
29 | 28 | ||
29 | targets += $(__OBJS) | ||
30 | |||
30 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 31 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
31 | 32 | ||
32 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 36 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
36 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 37 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
37 | 38 | ||
38 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds | 39 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot-nand_spl.lds |
39 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 40 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
40 | -Map $(nandobj)u-boot-spl.map -o $@ | 41 | -Map $(nandobj)u-boot-spl.map -o $@ |
41 | 42 | ||
42 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) | 43 | $(nandobj)u-boot-nand_spl.lds: $(LDSCRIPT) |
43 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ | 44 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(nandobj)/board/$(BOARDDIR) \ |
44 | -ansi -D__ASSEMBLY__ -P - <$< >$@ | 45 | -ansi -D__ASSEMBLY__ -P - <$< >$@ |
45 | 46 | ||
46 | # create symbolic links for common files | 47 | # create symbolic links for common files |
47 | 48 | ||
48 | $(obj)/cache.c: | 49 | $(obj)/cache.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 51 | ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
51 | 52 | ||
52 | $(obj)/cpu_init_early.c: | 53 | $(obj)/cpu_init_early.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ | 55 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@ |
55 | 56 | ||
56 | $(obj)/spl_minimal.c: | 57 | $(obj)/spl_minimal.c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ | 59 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@ |
59 | 60 | ||
60 | $(obj)/fsl_law.c: | 61 | $(obj)/fsl_law.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ | 63 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@ |
63 | 64 | ||
64 | $(obj)/law.c: | 65 | $(obj)/law.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ | 67 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@ |
67 | 68 | ||
68 | $(obj)/nand_boot_fsl_elbc.c: | 69 | $(obj)/nand_boot_fsl_elbc.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 71 | ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
71 | 72 | ||
72 | $(obj)/ns16550.c: | 73 | $(obj)/ns16550.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ | 75 | ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@ |
75 | 76 | ||
76 | $(obj)/resetvec.S: | 77 | $(obj)/resetvec.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ | 79 | ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@ |
79 | 80 | ||
80 | $(obj)/fixed_ivor.S: | 81 | $(obj)/fixed_ivor.S: |
81 | @rm -f $@ | 82 | @rm -f $@ |
82 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ | 83 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@ |
83 | 84 | ||
84 | $(obj)/start.S: $(obj)/fixed_ivor.S | 85 | $(obj)/start.S: $(obj)/fixed_ivor.S |
85 | @rm -f $@ | 86 | @rm -f $@ |
86 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ | 87 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@ |
87 | 88 | ||
88 | $(obj)/tlb.c: | 89 | $(obj)/tlb.c: |
89 | @rm -f $@ | 90 | @rm -f $@ |
90 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ | 91 | ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@ |
91 | 92 | ||
92 | $(obj)/tlb_table.c: | 93 | $(obj)/tlb_table.c: |
93 | @rm -f $@ | 94 | @rm -f $@ |
94 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ | 95 | ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@ |
nand_spl/board/sheldon/simpc8313/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. | 3 | # Stefan Roese, DENX Software Engineering, sr@denx.de. |
4 | # (C) Copyright 2008 Freescale Semiconductor | 4 | # (C) Copyright 2008 Freescale Semiconductor |
5 | # (C) Copyright Sheldon Instruments, Inc. 2008 | 5 | # (C) Copyright Sheldon Instruments, Inc. 2008 |
6 | # | 6 | # |
7 | # SPDX-License-Identifier: GPL-2.0+ | 7 | # SPDX-License-Identifier: GPL-2.0+ |
8 | # | 8 | # |
9 | 9 | ||
10 | nandobj := $(OBJTREE)/nand_spl/ | 10 | nandobj := $(OBJTREE)/nand_spl/ |
11 | 11 | ||
12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | 12 | LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds |
13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ | 13 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
14 | $(LDFLAGS) $(LDFLAGS_FINAL) | 14 | $(LDFLAGS) $(LDFLAGS_FINAL) |
15 | AFLAGS += -DCONFIG_NAND_SPL | 15 | asflags-y += -DCONFIG_NAND_SPL |
16 | CFLAGS += -DCONFIG_NAND_SPL | 16 | ccflags-y += -DCONFIG_NAND_SPL |
17 | 17 | ||
18 | SOBJS = start.o ticks.o | 18 | SOBJS = start.o ticks.o |
19 | COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ | 19 | COBJS = nand_boot_fsl_elbc.o $(BOARD).o sdram.o ns16550.o spl_minimal.o \ |
20 | time.o cache.o | 20 | time.o cache.o |
21 | 21 | ||
22 | SRCS := $(addprefix $(obj)/,$(SOBJS:.o=.S) $(COBJS:.o=.c)) | ||
23 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) | 22 | OBJS := $(addprefix $(obj)/,$(SOBJS) $(COBJS)) |
24 | __OBJS := $(SOBJS) $(COBJS) | 23 | __OBJS := $(SOBJS) $(COBJS) |
25 | LNDIR := $(nandobj)board/$(BOARDDIR) | 24 | LNDIR := $(nandobj)board/$(BOARDDIR) |
26 | 25 | ||
26 | targets += $(__OBJS) | ||
27 | |||
27 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin | 28 | all: $(nandobj)u-boot-spl.bin $(nandobj)u-boot-spl-16k.bin |
28 | 29 | ||
29 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl | 30 | $(nandobj)u-boot-spl-16k.bin: $(nandobj)u-boot-spl |
30 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ | 31 | $(OBJCOPY) ${OBJCFLAGS} --pad-to=$(PAD_TO) -O binary $< $@ |
31 | 32 | ||
32 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl | 33 | $(nandobj)u-boot-spl.bin: $(nandobj)u-boot-spl |
33 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ | 34 | $(OBJCOPY) ${OBJCFLAGS} -O binary $< $@ |
34 | 35 | ||
35 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds | 36 | $(nandobj)u-boot-spl: $(OBJS) $(nandobj)u-boot.lds |
36 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ | 37 | cd $(LNDIR) && $(LD) $(LDFLAGS) $(__OBJS) $(PLATFORM_LIBS) \ |
37 | -Map $(nandobj)u-boot-spl.map -o $@ | 38 | -Map $(nandobj)u-boot-spl.map -o $@ |
38 | 39 | ||
39 | $(nandobj)u-boot.lds: $(LDSCRIPT) | 40 | $(nandobj)u-boot.lds: $(LDSCRIPT) |
40 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ | 41 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -ansi -D__ASSEMBLY__ -P - <$^ >$@ |
41 | 42 | ||
42 | # create symbolic links for common files | 43 | # create symbolic links for common files |
43 | 44 | ||
44 | $(obj)/start.S: | 45 | $(obj)/start.S: |
45 | @rm -f $@ | 46 | @rm -f $@ |
46 | ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ | 47 | ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@ |
47 | 48 | ||
48 | $(obj)/nand_boot_fsl_elbc.c: | 49 | $(obj)/nand_boot_fsl_elbc.c: |
49 | @rm -f $@ | 50 | @rm -f $@ |
50 | ln -s $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ | 51 | ln -s $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@ |
51 | 52 | ||
52 | $(obj)/sdram.c: | 53 | $(obj)/sdram.c: |
53 | @rm -f $@ | 54 | @rm -f $@ |
54 | ln -s $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ | 55 | ln -s $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@ |
55 | 56 | ||
56 | $(obj)/$(BOARD).c: | 57 | $(obj)/$(BOARD).c: |
57 | @rm -f $@ | 58 | @rm -f $@ |
58 | ln -s $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ | 59 | ln -s $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@ |
59 | 60 | ||
60 | $(obj)/ns16550.c: | 61 | $(obj)/ns16550.c: |
61 | @rm -f $@ | 62 | @rm -f $@ |
62 | ln -s $(SRCTREE)/drivers/serial/ns16550.c $@ | 63 | ln -s $(SRCTREE)/drivers/serial/ns16550.c $@ |
63 | 64 | ||
64 | $(obj)/spl_minimal.c: | 65 | $(obj)/spl_minimal.c: |
65 | @rm -f $@ | 66 | @rm -f $@ |
66 | ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ | 67 | ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@ |
67 | 68 | ||
68 | $(obj)/cache.c: | 69 | $(obj)/cache.c: |
69 | @rm -f $@ | 70 | @rm -f $@ |
70 | ln -s $(SRCTREE)/arch/powerpc/lib/cache.c $@ | 71 | ln -s $(SRCTREE)/arch/powerpc/lib/cache.c $@ |
71 | 72 | ||
72 | $(obj)/time.c: | 73 | $(obj)/time.c: |
73 | @rm -f $@ | 74 | @rm -f $@ |
74 | ln -s $(SRCTREE)/arch/powerpc/lib/time.c $@ | 75 | ln -s $(SRCTREE)/arch/powerpc/lib/time.c $@ |
75 | 76 | ||
76 | $(obj)/ticks.S: | 77 | $(obj)/ticks.S: |
77 | @rm -f $@ | 78 | @rm -f $@ |
78 | ln -s $(SRCTREE)/arch/powerpc/lib/ticks.S $@ | 79 | ln -s $(SRCTREE)/arch/powerpc/lib/ticks.S $@ |
net/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # CFLAGS += -DDEBUG | 8 | #ccflags-y += -DDEBUG |
9 | 9 | ||
10 | obj-$(CONFIG_CMD_NET) += arp.o | 10 | obj-$(CONFIG_CMD_NET) += arp.o |
11 | obj-$(CONFIG_CMD_NET) += bootp.o | 11 | obj-$(CONFIG_CMD_NET) += bootp.o |
12 | obj-$(CONFIG_CMD_CDP) += cdp.o | 12 | obj-$(CONFIG_CMD_CDP) += cdp.o |
13 | obj-$(CONFIG_CMD_DNS) += dns.o | 13 | obj-$(CONFIG_CMD_DNS) += dns.o |
14 | obj-$(CONFIG_CMD_NET) += eth.o | 14 | obj-$(CONFIG_CMD_NET) += eth.o |
15 | obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o | 15 | obj-$(CONFIG_CMD_LINK_LOCAL) += link_local.o |
16 | obj-$(CONFIG_CMD_NET) += net.o | 16 | obj-$(CONFIG_CMD_NET) += net.o |
17 | obj-$(CONFIG_CMD_NFS) += nfs.o | 17 | obj-$(CONFIG_CMD_NFS) += nfs.o |
18 | obj-$(CONFIG_CMD_PING) += ping.o | 18 | obj-$(CONFIG_CMD_PING) += ping.o |
19 | obj-$(CONFIG_CMD_RARP) += rarp.o | 19 | obj-$(CONFIG_CMD_RARP) += rarp.o |
20 | obj-$(CONFIG_CMD_SNTP) += sntp.o | 20 | obj-$(CONFIG_CMD_SNTP) += sntp.o |
21 | obj-$(CONFIG_CMD_NET) += tftp.o | 21 | obj-$(CONFIG_CMD_NET) += tftp.o |
22 | 22 |
post/lib_powerpc/fpu/Makefile
1 | # | 1 | # |
2 | # (C) Copyright 2007 | 2 | # (C) Copyright 2007 |
3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. | 3 | # Wolfgang Denk, DENX Software Engineering, wd@denx.de. |
4 | # | 4 | # |
5 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | obj-y += 20001122-1.o | 8 | objs-before-objcopy := 20001122-1.o 20010114-2.o 20010226-1.o 980619-1.o \ |
9 | obj-y += 20010114-2.o | 9 | acc1.o compare-fp-1.o fpu.o mul-subnormal-single-1.o darwin-ldouble.o |
10 | obj-y += 20010226-1.o | 10 | targets += $(objs-before-objcopy) |
11 | obj-y += 980619-1.o | ||
12 | obj-y += acc1.o | ||
13 | obj-y += compare-fp-1.o | ||
14 | obj-y += fpu.o | ||
15 | obj-y += mul-subnormal-single-1.o | ||
16 | obj-y += darwin-ldouble.o | ||
17 | 11 | ||
18 | CFLAGS := $(shell echo $(CFLAGS) | sed s/-msoft-float//) | 12 | # remove -msoft-float flag |
19 | CFLAGS += -mhard-float -fkeep-inline-functions | 13 | $(foreach m, $(objs-before-objcopy), $(eval CFLAGS_REMOVE_$m := -msoft-float)) |
14 | ccflags-y := -mhard-float -fkeep-inline-functions | ||
20 | 15 | ||
21 | $(addprefix $(obj)/,$(obj-y)): $(obj)/%.o: $(src)/%.c | 16 | # Do not delete intermidiate files (*.o) |
22 | $(CC) $(ALL_CFLAGS) -o $@.fp $< -c | 17 | .SECONDARY: $(call objectify, $(objs-before-objcopy)) |
23 | $(OBJCOPY) -R .gnu.attributes $@.fp $@ | 18 | |
24 | rm -f $@.fp | 19 | obj-y := $(objs-before-objcopy:.o=_.o) |
scripts/Kbuild.include
1 | #### | 1 | #### |
2 | # kbuild: Generic definitions | 2 | # kbuild: Generic definitions |
3 | 3 | ||
4 | # Convenient variables | 4 | # Convenient variables |
5 | comma := , | 5 | comma := , |
6 | squote := ' | 6 | squote := ' |
7 | empty := | 7 | empty := |
8 | space := $(empty) $(empty) | 8 | space := $(empty) $(empty) |
9 | 9 | ||
10 | ### | 10 | ### |
11 | # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o | 11 | # Name of target with a '.' as filename prefix. foo/bar.o => foo/.bar.o |
12 | dot-target = $(dir $@).$(notdir $@) | 12 | dot-target = $(dir $@).$(notdir $@) |
13 | 13 | ||
14 | ### | 14 | ### |
15 | # The temporary file to save gcc -MD generated dependencies must not | 15 | # The temporary file to save gcc -MD generated dependencies must not |
16 | # contain a comma | 16 | # contain a comma |
17 | depfile = $(subst $(comma),_,$(dot-target).d) | 17 | depfile = $(subst $(comma),_,$(dot-target).d) |
18 | 18 | ||
19 | ### | 19 | ### |
20 | # filename of target with directory and extension stripped | 20 | # filename of target with directory and extension stripped |
21 | basetarget = $(basename $(notdir $@)) | 21 | basetarget = $(basename $(notdir $@)) |
22 | 22 | ||
23 | ### | 23 | ### |
24 | # filename of first prerequisite with directory and extension stripped | 24 | # filename of first prerequisite with directory and extension stripped |
25 | baseprereq = $(basename $(notdir $<)) | 25 | baseprereq = $(basename $(notdir $<)) |
26 | 26 | ||
27 | ### | 27 | ### |
28 | # Escape single quote for use in echo statements | 28 | # Escape single quote for use in echo statements |
29 | escsq = $(subst $(squote),'\$(squote)',$1) | 29 | escsq = $(subst $(squote),'\$(squote)',$1) |
30 | 30 | ||
31 | ### | 31 | ### |
32 | # Easy method for doing a status message | 32 | # Easy method for doing a status message |
33 | kecho := : | 33 | kecho := : |
34 | quiet_kecho := echo | 34 | quiet_kecho := echo |
35 | silent_kecho := : | 35 | silent_kecho := : |
36 | kecho := $($(quiet)kecho) | 36 | kecho := $($(quiet)kecho) |
37 | 37 | ||
38 | ### | 38 | ### |
39 | # filechk is used to check if the content of a generated file is updated. | 39 | # filechk is used to check if the content of a generated file is updated. |
40 | # Sample usage: | 40 | # Sample usage: |
41 | # define filechk_sample | 41 | # define filechk_sample |
42 | # echo $KERNELRELEASE | 42 | # echo $KERNELRELEASE |
43 | # endef | 43 | # endef |
44 | # version.h : Makefile | 44 | # version.h : Makefile |
45 | # $(call filechk,sample) | 45 | # $(call filechk,sample) |
46 | # The rule defined shall write to stdout the content of the new file. | 46 | # The rule defined shall write to stdout the content of the new file. |
47 | # The existing file will be compared with the new one. | 47 | # The existing file will be compared with the new one. |
48 | # - If no file exist it is created | 48 | # - If no file exist it is created |
49 | # - If the content differ the new file is used | 49 | # - If the content differ the new file is used |
50 | # - If they are equal no change, and no timestamp update | 50 | # - If they are equal no change, and no timestamp update |
51 | # - stdin is piped in from the first prerequisite ($<) so one has | 51 | # - stdin is piped in from the first prerequisite ($<) so one has |
52 | # to specify a valid file as first prerequisite (often the kbuild file) | 52 | # to specify a valid file as first prerequisite (often the kbuild file) |
53 | define filechk | 53 | define filechk |
54 | $(Q)set -e; \ | 54 | $(Q)set -e; \ |
55 | $(kecho) ' CHK $@'; \ | 55 | $(kecho) ' CHK $@'; \ |
56 | mkdir -p $(dir $@); \ | 56 | mkdir -p $(dir $@); \ |
57 | $(filechk_$(1)) < $< > $@.tmp; \ | 57 | $(filechk_$(1)) < $< > $@.tmp; \ |
58 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ | 58 | if [ -r $@ ] && cmp -s $@ $@.tmp; then \ |
59 | rm -f $@.tmp; \ | 59 | rm -f $@.tmp; \ |
60 | else \ | 60 | else \ |
61 | $(kecho) ' UPD $@'; \ | 61 | $(kecho) ' UPD $@'; \ |
62 | mv -f $@.tmp $@; \ | 62 | mv -f $@.tmp $@; \ |
63 | fi | 63 | fi |
64 | endef | 64 | endef |
65 | 65 | ||
66 | ###### | 66 | ###### |
67 | # gcc support functions | 67 | # gcc support functions |
68 | # See documentation in Documentation/kbuild/makefiles.txt | 68 | # See documentation in Documentation/kbuild/makefiles.txt |
69 | 69 | ||
70 | # cc-cross-prefix | 70 | # cc-cross-prefix |
71 | # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) | 71 | # Usage: CROSS_COMPILE := $(call cc-cross-prefix, m68k-linux-gnu- m68k-linux-) |
72 | # Return first prefix where a prefix$(CC) is found in PATH. | 72 | # Return first prefix where a prefix$(CC) is found in PATH. |
73 | # If no $(CC) found in PATH with listed prefixes return nothing | 73 | # If no $(CC) found in PATH with listed prefixes return nothing |
74 | cc-cross-prefix = \ | 74 | cc-cross-prefix = \ |
75 | $(word 1, $(foreach c,$(1), \ | 75 | $(word 1, $(foreach c,$(1), \ |
76 | $(shell set -e; \ | 76 | $(shell set -e; \ |
77 | if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ | 77 | if (which $(strip $(c))$(CC)) > /dev/null 2>&1 ; then \ |
78 | echo $(c); \ | 78 | echo $(c); \ |
79 | fi))) | 79 | fi))) |
80 | 80 | ||
81 | # output directory for tests below | 81 | # output directory for tests below |
82 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) | 82 | TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/) |
83 | 83 | ||
84 | # try-run | 84 | # try-run |
85 | # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) | 85 | # Usage: option = $(call try-run, $(CC)...-o "$$TMP",option-ok,otherwise) |
86 | # Exit code chooses option. "$$TMP" is can be used as temporary file and | 86 | # Exit code chooses option. "$$TMP" is can be used as temporary file and |
87 | # is automatically cleaned up. | 87 | # is automatically cleaned up. |
88 | try-run = $(shell set -e; \ | 88 | try-run = $(shell set -e; \ |
89 | TMP="$(TMPOUT).$$$$.tmp"; \ | 89 | TMP="$(TMPOUT).$$$$.tmp"; \ |
90 | TMPO="$(TMPOUT).$$$$.o"; \ | 90 | TMPO="$(TMPOUT).$$$$.o"; \ |
91 | if ($(1)) >/dev/null 2>&1; \ | 91 | if ($(1)) >/dev/null 2>&1; \ |
92 | then echo "$(2)"; \ | 92 | then echo "$(2)"; \ |
93 | else echo "$(3)"; \ | 93 | else echo "$(3)"; \ |
94 | fi; \ | 94 | fi; \ |
95 | rm -f "$$TMP" "$$TMPO") | 95 | rm -f "$$TMP" "$$TMPO") |
96 | 96 | ||
97 | # as-option | 97 | # as-option |
98 | # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) | 98 | # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,) |
99 | 99 | ||
100 | as-option = $(call try-run,\ | 100 | as-option = $(call try-run,\ |
101 | $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2)) | 101 | $(CC) $(KBUILD_CFLAGS) $(1) -c -x assembler /dev/null -o "$$TMP",$(1),$(2)) |
102 | 102 | ||
103 | # as-instr | 103 | # as-instr |
104 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) | 104 | # Usage: cflags-y += $(call as-instr,instr,option1,option2) |
105 | 105 | ||
106 | as-instr = $(call try-run,\ | 106 | as-instr = $(call try-run,\ |
107 | printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) | 107 | printf "%b\n" "$(1)" | $(CC) $(KBUILD_AFLAGS) -c -x assembler -o "$$TMP" -,$(2),$(3)) |
108 | 108 | ||
109 | # cc-option | 109 | # cc-option |
110 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) | 110 | # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586) |
111 | 111 | ||
112 | cc-option = $(call try-run,\ | 112 | cc-option = $(call try-run,\ |
113 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) | 113 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",$(1),$(2)) |
114 | 114 | ||
115 | # cc-option-yn | 115 | # cc-option-yn |
116 | # Usage: flag := $(call cc-option-yn,-march=winchip-c6) | 116 | # Usage: flag := $(call cc-option-yn,-march=winchip-c6) |
117 | cc-option-yn = $(call try-run,\ | 117 | cc-option-yn = $(call try-run,\ |
118 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) | 118 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(1) -c -x c /dev/null -o "$$TMP",y,n) |
119 | 119 | ||
120 | # cc-option-align | 120 | # cc-option-align |
121 | # Prefix align with either -falign or -malign | 121 | # Prefix align with either -falign or -malign |
122 | cc-option-align = $(subst -functions=0,,\ | 122 | cc-option-align = $(subst -functions=0,,\ |
123 | $(call cc-option,-falign-functions=0,-malign-functions=0)) | 123 | $(call cc-option,-falign-functions=0,-malign-functions=0)) |
124 | 124 | ||
125 | # cc-disable-warning | 125 | # cc-disable-warning |
126 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) | 126 | # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable) |
127 | cc-disable-warning = $(call try-run,\ | 127 | cc-disable-warning = $(call try-run,\ |
128 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) | 128 | $(CC) $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) -W$(strip $(1)) -c -x c /dev/null -o "$$TMP",-Wno-$(strip $(1))) |
129 | 129 | ||
130 | # cc-version | 130 | # cc-version |
131 | # Usage gcc-ver := $(call cc-version) | 131 | # Usage gcc-ver := $(call cc-version) |
132 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) | 132 | cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh $(CC)) |
133 | 133 | ||
134 | # cc-fullversion | 134 | # cc-fullversion |
135 | # Usage gcc-ver := $(call cc-fullversion) | 135 | # Usage gcc-ver := $(call cc-fullversion) |
136 | cc-fullversion = $(shell $(CONFIG_SHELL) \ | 136 | cc-fullversion = $(shell $(CONFIG_SHELL) \ |
137 | $(srctree)/scripts/gcc-version.sh -p $(CC)) | 137 | $(srctree)/scripts/gcc-version.sh -p $(CC)) |
138 | 138 | ||
139 | # cc-ifversion | 139 | # cc-ifversion |
140 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) | 140 | # Usage: EXTRA_CFLAGS += $(call cc-ifversion, -lt, 0402, -O1) |
141 | cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) | 141 | cc-ifversion = $(shell [ $(call cc-version, $(CC)) $(1) $(2) ] && echo $(3)) |
142 | 142 | ||
143 | # added for U-Boot | 143 | # added for U-Boot |
144 | binutils-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/binutils-version.sh $(AS)) | 144 | binutils-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/binutils-version.sh $(AS)) |
145 | dtc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/dtc-version.sh $(DTC)) | 145 | dtc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/dtc-version.sh $(DTC)) |
146 | 146 | ||
147 | # cc-ldoption | 147 | # cc-ldoption |
148 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) | 148 | # Usage: ldflags += $(call cc-ldoption, -Wl$(comma)--hash-style=both) |
149 | cc-ldoption = $(call try-run,\ | 149 | cc-ldoption = $(call try-run,\ |
150 | $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) | 150 | $(CC) $(1) -nostdlib -x c /dev/null -o "$$TMP",$(1),$(2)) |
151 | 151 | ||
152 | # ld-option | 152 | # ld-option |
153 | # Usage: LDFLAGS += $(call ld-option, -X) | 153 | # Usage: LDFLAGS += $(call ld-option, -X) |
154 | ld-option = $(call try-run,\ | 154 | ld-option = $(call try-run,\ |
155 | $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) | 155 | $(CC) -x c /dev/null -c -o "$$TMPO" ; $(LD) $(1) "$$TMPO" -o "$$TMP",$(1),$(2)) |
156 | 156 | ||
157 | # ar-option | 157 | # ar-option |
158 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) | 158 | # Usage: KBUILD_ARFLAGS := $(call ar-option,D) |
159 | # Important: no spaces around options | 159 | # Important: no spaces around options |
160 | ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) | 160 | ar-option = $(call try-run, $(AR) rc$(1) "$$TMP",$(1),$(2)) |
161 | 161 | ||
162 | ###### | 162 | ###### |
163 | 163 | ||
164 | ### | 164 | ### |
165 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= | 165 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj= |
166 | # Usage: | 166 | # Usage: |
167 | # $(Q)$(MAKE) $(build)=dir | 167 | # $(Q)$(MAKE) $(build)=dir |
168 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj | 168 | build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj |
169 | 169 | ||
170 | ### | 170 | ### |
171 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= | 171 | # Shorthand for $(Q)$(MAKE) -f scripts/Makefile.modbuiltin obj= |
172 | # Usage: | 172 | # Usage: |
173 | # $(Q)$(MAKE) $(modbuiltin)=dir | 173 | # $(Q)$(MAKE) $(modbuiltin)=dir |
174 | modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj | 174 | modbuiltin := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.modbuiltin obj |
175 | 175 | ||
176 | # Prefix -I with $(srctree) if it is not an absolute path. | 176 | # Prefix -I with $(srctree) if it is not an absolute path. |
177 | # skip if -I has no parameter | 177 | # skip if -I has no parameter |
178 | addtree = $(if $(patsubst -I%,%,$(1)), \ | 178 | addtree = $(if $(patsubst -I%,%,$(1)), \ |
179 | $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)) | 179 | $(if $(filter-out -I/%,$(1)),$(patsubst -I%,-I$(srctree)/%,$(1))) $(1)) |
180 | 180 | ||
181 | # Find all -I options and call addtree | 181 | # Find all -I options and call addtree |
182 | flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) | 182 | flags = $(foreach o,$($(1)),$(if $(filter -I%,$(o)),$(call addtree,$(o)),$(o))) |
183 | 183 | ||
184 | # echo command. | 184 | # echo command. |
185 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. | 185 | # Short version is used, if $(quiet) equals `quiet_', otherwise full one. |
186 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ | 186 | echo-cmd = $(if $($(quiet)cmd_$(1)),\ |
187 | echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) | 187 | echo ' $(call escsq,$($(quiet)cmd_$(1)))$(echo-why)';) |
188 | 188 | ||
189 | # printing commands | 189 | # printing commands |
190 | cmd = @$(echo-cmd) $(cmd_$(1)) | 190 | cmd = @$(echo-cmd) $(cmd_$(1)) |
191 | 191 | ||
192 | # Add $(obj)/ for paths that are not absolute | 192 | # Add $(obj)/ for paths that are not absolute |
193 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) | 193 | objectify = $(foreach o,$(1),$(if $(filter /%,$(o)),$(o),$(obj)/$(o))) |
194 | 194 | ||
195 | ### | 195 | ### |
196 | # if_changed - execute command if any prerequisite is newer than | 196 | # if_changed - execute command if any prerequisite is newer than |
197 | # target, or command line has changed | 197 | # target, or command line has changed |
198 | # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies | 198 | # if_changed_dep - as if_changed, but uses fixdep to reveal dependencies |
199 | # including used config symbols | 199 | # including used config symbols |
200 | # if_changed_rule - as if_changed but execute rule instead | 200 | # if_changed_rule - as if_changed but execute rule instead |
201 | # See Documentation/kbuild/makefiles.txt for more info | 201 | # See Documentation/kbuild/makefiles.txt for more info |
202 | 202 | ||
203 | ifneq ($(KBUILD_NOCMDDEP),1) | 203 | ifneq ($(KBUILD_NOCMDDEP),1) |
204 | # Check if both arguments has same arguments. Result is empty string if equal. | 204 | # Check if both arguments has same arguments. Result is empty string if equal. |
205 | # User may override this check using make KBUILD_NOCMDDEP=1 | 205 | # User may override this check using make KBUILD_NOCMDDEP=1 |
206 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ | 206 | arg-check = $(strip $(filter-out $(cmd_$(1)), $(cmd_$@)) \ |
207 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) | 207 | $(filter-out $(cmd_$@), $(cmd_$(1))) ) |
208 | else | 208 | else |
209 | arg-check = $(if $(strip $(cmd_$@)),,1) | 209 | arg-check = $(if $(strip $(cmd_$@)),,1) |
210 | endif | 210 | endif |
211 | 211 | ||
212 | # >'< substitution is for echo to work, | 212 | # >'< substitution is for echo to work, |
213 | # >$< substitution to preserve $ when reloading .cmd file | 213 | # >$< substitution to preserve $ when reloading .cmd file |
214 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] | 214 | # note: when using inline perl scripts [perl -e '...$$t=1;...'] |
215 | # in $(cmd_xxx) double $$ your perl vars | 215 | # in $(cmd_xxx) double $$ your perl vars |
216 | make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))) | 216 | make-cmd = $(subst \\,\\\\,$(subst \#,\\\#,$(subst $$,$$$$,$(call escsq,$(cmd_$(1)))))) |
217 | 217 | ||
218 | # Find any prerequisites that is newer than target or that does not exist. | 218 | # Find any prerequisites that is newer than target or that does not exist. |
219 | # PHONY targets skipped in both cases. | 219 | # PHONY targets skipped in both cases. |
220 | any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) | 220 | any-prereq = $(filter-out $(PHONY),$?) $(filter-out $(PHONY) $(wildcard $^),$^) |
221 | 221 | ||
222 | # Execute command if command has changed or prerequisite(s) are updated. | 222 | # Execute command if command has changed or prerequisite(s) are updated. |
223 | # | 223 | # |
224 | if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ | 224 | if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ |
225 | @set -e; \ | 225 | @set -e; \ |
226 | $(echo-cmd) $(cmd_$(1)); \ | 226 | $(echo-cmd) $(cmd_$(1)); \ |
227 | echo 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) | 227 | echo 'cmd_$@ := $(make-cmd)' > $(dot-target).cmd) |
228 | 228 | ||
229 | # Execute the command and also postprocess generated .d dependencies file. | 229 | # Execute the command and also postprocess generated .d dependencies file. |
230 | if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ | 230 | if_changed_dep = $(if $(strip $(any-prereq) $(arg-check) ), \ |
231 | @set -e; \ | 231 | @set -e; \ |
232 | $(echo-cmd) $(cmd_$(1)); \ | 232 | $(echo-cmd) $(cmd_$(1)); \ |
233 | scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ | 233 | scripts/basic/fixdep $(depfile) $@ '$(make-cmd)' > $(dot-target).tmp;\ |
234 | rm -f $(depfile); \ | 234 | rm -f $(depfile); \ |
235 | mv -f $(dot-target).tmp $(dot-target).cmd) | 235 | mv -f $(dot-target).tmp $(dot-target).cmd) |
236 | 236 | ||
237 | # Usage: $(call if_changed_rule,foo) | 237 | # Usage: $(call if_changed_rule,foo) |
238 | # Will check if $(cmd_foo) or any of the prerequisites changed, | 238 | # Will check if $(cmd_foo) or any of the prerequisites changed, |
239 | # and if so will execute $(rule_foo). | 239 | # and if so will execute $(rule_foo). |
240 | if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ | 240 | if_changed_rule = $(if $(strip $(any-prereq) $(arg-check) ), \ |
241 | @set -e; \ | 241 | @set -e; \ |
242 | $(rule_$(1))) | 242 | $(rule_$(1))) |
243 | 243 | ||
244 | ### | 244 | ### |
245 | # why - tell why a a target got build | 245 | # why - tell why a a target got build |
246 | # enabled by make V=2 | 246 | # enabled by make V=2 |
247 | # Output (listed in the order they are checked): | 247 | # Output (listed in the order they are checked): |
248 | # (1) - due to target is PHONY | 248 | # (1) - due to target is PHONY |
249 | # (2) - due to target missing | 249 | # (2) - due to target missing |
250 | # (3) - due to: file1.h file2.h | 250 | # (3) - due to: file1.h file2.h |
251 | # (4) - due to command line change | 251 | # (4) - due to command line change |
252 | # (5) - due to missing .cmd file | 252 | # (5) - due to missing .cmd file |
253 | # (6) - due to target not in $(targets) | 253 | # (6) - due to target not in $(targets) |
254 | # (1) PHONY targets are always build | 254 | # (1) PHONY targets are always build |
255 | # (2) No target, so we better build it | 255 | # (2) No target, so we better build it |
256 | # (3) Prerequisite is newer than target | 256 | # (3) Prerequisite is newer than target |
257 | # (4) The command line stored in the file named dir/.target.cmd | 257 | # (4) The command line stored in the file named dir/.target.cmd |
258 | # differed from actual command line. This happens when compiler | 258 | # differed from actual command line. This happens when compiler |
259 | # options changes | 259 | # options changes |
260 | # (5) No dir/.target.cmd file (used to store command line) | 260 | # (5) No dir/.target.cmd file (used to store command line) |
261 | # (6) No dir/.target.cmd file and target not listed in $(targets) | 261 | # (6) No dir/.target.cmd file and target not listed in $(targets) |
262 | # This is a good hint that there is a bug in the kbuild file | 262 | # This is a good hint that there is a bug in the kbuild file |
263 | ifeq ($(KBUILD_VERBOSE),2) | 263 | ifeq ($(KBUILD_VERBOSE),2) |
264 | why = \ | 264 | why = \ |
265 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ | 265 | $(if $(filter $@, $(PHONY)),- due to target is PHONY, \ |
266 | $(if $(wildcard $@), \ | 266 | $(if $(wildcard $@), \ |
267 | $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ | 267 | $(if $(strip $(any-prereq)),- due to: $(any-prereq), \ |
268 | $(if $(arg-check), \ | 268 | $(if $(arg-check), \ |
269 | $(if $(cmd_$@),- due to command line change, \ | 269 | $(if $(cmd_$@),- due to command line change, \ |
270 | $(if $(filter $@, $(targets)), \ | 270 | $(if $(filter $@, $(targets)), \ |
271 | - due to missing .cmd file, \ | 271 | - due to missing .cmd file, \ |
272 | - due to $(notdir $@) not in $$(targets) \ | 272 | - due to $(notdir $@) not in $$(targets) \ |
273 | ) \ | 273 | ) \ |
274 | ) \ | 274 | ) \ |
275 | ) \ | 275 | ) \ |
276 | ), \ | 276 | ), \ |
277 | - due to target missing \ | 277 | - due to target missing \ |
278 | ) \ | 278 | ) \ |
279 | ) | 279 | ) |
280 | 280 | ||
281 | echo-why = $(call escsq, $(strip $(why))) | 281 | echo-why = $(call escsq, $(strip $(why))) |
282 | endif | 282 | endif |
283 | 283 |
scripts/Makefile.build
1 | # ========================================================================== | 1 | # ========================================================================== |
2 | # Building | 2 | # Building |
3 | # ========================================================================== | 3 | # ========================================================================== |
4 | 4 | ||
5 | src := $(obj) | 5 | # Modified for U-Boot |
6 | ifeq ($(CONFIG_TPL_BUILD),y) | ||
7 | src := $(patsubst tpl/%,%,$(obj)) | ||
8 | else | ||
9 | ifeq ($(CONFIG_SPL_BUILD),y) | ||
10 | src := $(patsubst spl/%,%,$(obj)) | ||
11 | else | ||
12 | src := $(obj) | ||
13 | endif | ||
14 | endif | ||
6 | 15 | ||
7 | PHONY := __build | 16 | PHONY := __build |
8 | __build: | 17 | __build: |
9 | 18 | ||
10 | # Init all relevant variables used in kbuild files so | 19 | # Init all relevant variables used in kbuild files so |
11 | # 1) they have correct type | 20 | # 1) they have correct type |
12 | # 2) they do not inherit any value from the environment | 21 | # 2) they do not inherit any value from the environment |
13 | obj-y := | 22 | obj-y := |
14 | obj-m := | 23 | obj-m := |
15 | lib-y := | 24 | lib-y := |
16 | lib-m := | 25 | lib-m := |
17 | always := | 26 | always := |
18 | targets := | 27 | targets := |
19 | subdir-y := | 28 | subdir-y := |
20 | subdir-m := | 29 | subdir-m := |
21 | EXTRA_AFLAGS := | 30 | EXTRA_AFLAGS := |
22 | EXTRA_CFLAGS := | 31 | EXTRA_CFLAGS := |
23 | EXTRA_CPPFLAGS := | 32 | EXTRA_CPPFLAGS := |
24 | EXTRA_LDFLAGS := | 33 | EXTRA_LDFLAGS := |
25 | asflags-y := | 34 | asflags-y := |
26 | ccflags-y := | 35 | ccflags-y := |
27 | cppflags-y := | 36 | cppflags-y := |
28 | ldflags-y := | 37 | ldflags-y := |
29 | 38 | ||
30 | subdir-asflags-y := | 39 | subdir-asflags-y := |
31 | subdir-ccflags-y := | 40 | subdir-ccflags-y := |
32 | 41 | ||
33 | # Read auto.conf if it exists, otherwise ignore | 42 | # Read auto.conf if it exists, otherwise ignore |
34 | -include include/config/auto.conf | 43 | -include include/config/auto.conf |
35 | 44 | ||
36 | include scripts/Kbuild.include | 45 | include scripts/Kbuild.include |
37 | 46 | ||
47 | # Added for U-Boot | ||
48 | # We must include config.mk after Kbuild.include | ||
49 | # so that some config.mk can use cc-option. | ||
50 | include config.mk | ||
51 | |||
38 | # For backward compatibility check that these variables do not change | 52 | # For backward compatibility check that these variables do not change |
39 | save-cflags := $(CFLAGS) | 53 | save-cflags := $(CFLAGS) |
40 | 54 | ||
41 | # The filename Kbuild has precedence over Makefile | 55 | # The filename Kbuild has precedence over Makefile |
42 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) | 56 | kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src)) |
43 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) | 57 | kbuild-file := $(if $(wildcard $(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile) |
44 | include $(kbuild-file) | 58 | include $(kbuild-file) |
45 | 59 | ||
46 | # If the save-* variables changed error out | 60 | # If the save-* variables changed error out |
47 | ifeq ($(KBUILD_NOPEDANTIC),) | 61 | ifeq ($(KBUILD_NOPEDANTIC),) |
48 | ifneq ("$(save-cflags)","$(CFLAGS)") | 62 | ifneq ("$(save-cflags)","$(CFLAGS)") |
49 | $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y) | 63 | $(error CFLAGS was changed in "$(kbuild-file)". Fix it to use ccflags-y) |
50 | endif | 64 | endif |
51 | endif | 65 | endif |
52 | 66 | ||
53 | # | 67 | # |
54 | # make W=... settings | 68 | # make W=... settings |
55 | # | 69 | # |
56 | # W=1 - warnings that may be relevant and does not occur too often | 70 | # W=1 - warnings that may be relevant and does not occur too often |
57 | # W=2 - warnings that occur quite often but may still be relevant | 71 | # W=2 - warnings that occur quite often but may still be relevant |
58 | # W=3 - the more obscure warnings, can most likely be ignored | 72 | # W=3 - the more obscure warnings, can most likely be ignored |
59 | # | 73 | # |
60 | # $(call cc-option, -W...) handles gcc -W.. options which | 74 | # $(call cc-option, -W...) handles gcc -W.. options which |
61 | # are not supported by all versions of the compiler | 75 | # are not supported by all versions of the compiler |
62 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS | 76 | ifdef KBUILD_ENABLE_EXTRA_GCC_CHECKS |
63 | warning- := $(empty) | 77 | warning- := $(empty) |
64 | 78 | ||
65 | warning-1 := -Wextra -Wunused -Wno-unused-parameter | 79 | warning-1 := -Wextra -Wunused -Wno-unused-parameter |
66 | warning-1 += -Wmissing-declarations | 80 | warning-1 += -Wmissing-declarations |
67 | warning-1 += -Wmissing-format-attribute | 81 | warning-1 += -Wmissing-format-attribute |
68 | warning-1 += -Wmissing-prototypes | 82 | warning-1 += -Wmissing-prototypes |
69 | warning-1 += -Wold-style-definition | 83 | warning-1 += -Wold-style-definition |
70 | warning-1 += $(call cc-option, -Wmissing-include-dirs) | 84 | warning-1 += $(call cc-option, -Wmissing-include-dirs) |
71 | warning-1 += $(call cc-option, -Wunused-but-set-variable) | 85 | warning-1 += $(call cc-option, -Wunused-but-set-variable) |
72 | warning-1 += $(call cc-disable-warning, missing-field-initializers) | 86 | warning-1 += $(call cc-disable-warning, missing-field-initializers) |
73 | 87 | ||
74 | warning-2 := -Waggregate-return | 88 | warning-2 := -Waggregate-return |
75 | warning-2 += -Wcast-align | 89 | warning-2 += -Wcast-align |
76 | warning-2 += -Wdisabled-optimization | 90 | warning-2 += -Wdisabled-optimization |
77 | warning-2 += -Wnested-externs | 91 | warning-2 += -Wnested-externs |
78 | warning-2 += -Wshadow | 92 | warning-2 += -Wshadow |
79 | warning-2 += $(call cc-option, -Wlogical-op) | 93 | warning-2 += $(call cc-option, -Wlogical-op) |
80 | warning-2 += $(call cc-option, -Wmissing-field-initializers) | 94 | warning-2 += $(call cc-option, -Wmissing-field-initializers) |
81 | 95 | ||
82 | warning-3 := -Wbad-function-cast | 96 | warning-3 := -Wbad-function-cast |
83 | warning-3 += -Wcast-qual | 97 | warning-3 += -Wcast-qual |
84 | warning-3 += -Wconversion | 98 | warning-3 += -Wconversion |
85 | warning-3 += -Wpacked | 99 | warning-3 += -Wpacked |
86 | warning-3 += -Wpadded | 100 | warning-3 += -Wpadded |
87 | warning-3 += -Wpointer-arith | 101 | warning-3 += -Wpointer-arith |
88 | warning-3 += -Wredundant-decls | 102 | warning-3 += -Wredundant-decls |
89 | warning-3 += -Wswitch-default | 103 | warning-3 += -Wswitch-default |
90 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) | 104 | warning-3 += $(call cc-option, -Wpacked-bitfield-compat) |
91 | warning-3 += $(call cc-option, -Wvla) | 105 | warning-3 += $(call cc-option, -Wvla) |
92 | 106 | ||
93 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | 107 | warning := $(warning-$(findstring 1, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) |
94 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | 108 | warning += $(warning-$(findstring 2, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) |
95 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) | 109 | warning += $(warning-$(findstring 3, $(KBUILD_ENABLE_EXTRA_GCC_CHECKS))) |
96 | 110 | ||
97 | ifeq ("$(strip $(warning))","") | 111 | ifeq ("$(strip $(warning))","") |
98 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) | 112 | $(error W=$(KBUILD_ENABLE_EXTRA_GCC_CHECKS) is unknown) |
99 | endif | 113 | endif |
100 | 114 | ||
101 | KBUILD_CFLAGS += $(warning) | 115 | KBUILD_CFLAGS += $(warning) |
102 | endif | 116 | endif |
103 | 117 | ||
104 | include scripts/Makefile.lib | 118 | include scripts/Makefile.lib |
105 | 119 | ||
106 | ifdef host-progs | 120 | ifdef host-progs |
107 | ifneq ($(hostprogs-y),$(host-progs)) | 121 | ifneq ($(hostprogs-y),$(host-progs)) |
108 | $(warning kbuild: $(obj)/Makefile - Usage of host-progs is deprecated. Please replace with hostprogs-y!) | 122 | $(warning kbuild: $(obj)/Makefile - Usage of host-progs is deprecated. Please replace with hostprogs-y!) |
109 | hostprogs-y += $(host-progs) | 123 | hostprogs-y += $(host-progs) |
110 | endif | 124 | endif |
111 | endif | 125 | endif |
112 | 126 | ||
113 | # Do not include host rules unless needed | 127 | # Do not include host rules unless needed |
114 | ifneq ($(hostprogs-y)$(hostprogs-m),) | 128 | ifneq ($(hostprogs-y)$(hostprogs-m),) |
115 | include scripts/Makefile.host | 129 | include scripts/Makefile.host |
116 | endif | 130 | endif |
117 | 131 | ||
118 | ifneq ($(KBUILD_SRC),) | 132 | # Uncommented for U-Boot |
133 | # We need to create output dicrectory for SPL and TPL even for in-tree build | ||
134 | #ifneq ($(KBUILD_SRC),) | ||
119 | # Create output directory if not already present | 135 | # Create output directory if not already present |
120 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | 136 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) |
121 | 137 | ||
122 | # Create directories for object files if directory does not exist | 138 | # Create directories for object files if directory does not exist |
123 | # Needed when obj-y := dir/file.o syntax is used | 139 | # Needed when obj-y := dir/file.o syntax is used |
124 | _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) | 140 | _dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d))) |
125 | endif | 141 | #endif |
126 | 142 | ||
127 | ifndef obj | 143 | ifndef obj |
128 | $(warning kbuild: Makefile.build is included improperly) | 144 | $(warning kbuild: Makefile.build is included improperly) |
129 | endif | 145 | endif |
130 | 146 | ||
131 | # =========================================================================== | 147 | # =========================================================================== |
132 | 148 | ||
133 | ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),) | 149 | ifneq ($(strip $(lib-y) $(lib-m) $(lib-n) $(lib-)),) |
134 | lib-target := $(obj)/lib.a | 150 | lib-target := $(obj)/lib.a |
135 | endif | 151 | endif |
136 | 152 | ||
137 | ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),) | 153 | ifneq ($(strip $(obj-y) $(obj-m) $(obj-n) $(obj-) $(subdir-m) $(lib-target)),) |
138 | builtin-target := $(obj)/built-in.o | 154 | builtin-target := $(obj)/built-in.o |
139 | endif | 155 | endif |
140 | 156 | ||
141 | modorder-target := $(obj)/modules.order | 157 | modorder-target := $(obj)/modules.order |
142 | 158 | ||
143 | # We keep a list of all modules in $(MODVERDIR) | 159 | # We keep a list of all modules in $(MODVERDIR) |
144 | 160 | ||
145 | __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ | 161 | __build: $(if $(KBUILD_BUILTIN),$(builtin-target) $(lib-target) $(extra-y)) \ |
146 | $(if $(KBUILD_MODULES),$(obj-m) $(modorder-target)) \ | 162 | $(if $(KBUILD_MODULES),$(obj-m) $(modorder-target)) \ |
147 | $(subdir-ym) $(always) | 163 | $(subdir-ym) $(always) |
148 | @: | 164 | @: |
149 | 165 | ||
150 | # Linus' kernel sanity checking tool | 166 | # Linus' kernel sanity checking tool |
151 | ifneq ($(KBUILD_CHECKSRC),0) | 167 | ifneq ($(KBUILD_CHECKSRC),0) |
152 | ifeq ($(KBUILD_CHECKSRC),2) | 168 | ifeq ($(KBUILD_CHECKSRC),2) |
153 | quiet_cmd_force_checksrc = CHECK $< | 169 | quiet_cmd_force_checksrc = CHECK $< |
154 | cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; | 170 | cmd_force_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; |
155 | else | 171 | else |
156 | quiet_cmd_checksrc = CHECK $< | 172 | quiet_cmd_checksrc = CHECK $< |
157 | cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; | 173 | cmd_checksrc = $(CHECK) $(CHECKFLAGS) $(c_flags) $< ; |
158 | endif | 174 | endif |
159 | endif | 175 | endif |
160 | 176 | ||
161 | # Do section mismatch analysis for each module/built-in.o | 177 | # Do section mismatch analysis for each module/built-in.o |
162 | ifdef CONFIG_DEBUG_SECTION_MISMATCH | 178 | ifdef CONFIG_DEBUG_SECTION_MISMATCH |
163 | cmd_secanalysis = ; scripts/mod/modpost $@ | 179 | cmd_secanalysis = ; scripts/mod/modpost $@ |
164 | endif | 180 | endif |
165 | 181 | ||
166 | # Compile C sources (.c) | 182 | # Compile C sources (.c) |
167 | # --------------------------------------------------------------------------- | 183 | # --------------------------------------------------------------------------- |
168 | 184 | ||
169 | # Default is built-in, unless we know otherwise | 185 | # Default is built-in, unless we know otherwise |
170 | modkern_cflags = \ | 186 | modkern_cflags = \ |
171 | $(if $(part-of-module), \ | 187 | $(if $(part-of-module), \ |
172 | $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ | 188 | $(KBUILD_CFLAGS_MODULE) $(CFLAGS_MODULE), \ |
173 | $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) | 189 | $(KBUILD_CFLAGS_KERNEL) $(CFLAGS_KERNEL)) |
174 | quiet_modtag := $(empty) $(empty) | 190 | quiet_modtag := $(empty) $(empty) |
175 | 191 | ||
176 | $(real-objs-m) : part-of-module := y | 192 | $(real-objs-m) : part-of-module := y |
177 | $(real-objs-m:.o=.i) : part-of-module := y | 193 | $(real-objs-m:.o=.i) : part-of-module := y |
178 | $(real-objs-m:.o=.s) : part-of-module := y | 194 | $(real-objs-m:.o=.s) : part-of-module := y |
179 | $(real-objs-m:.o=.lst): part-of-module := y | 195 | $(real-objs-m:.o=.lst): part-of-module := y |
180 | 196 | ||
181 | $(real-objs-m) : quiet_modtag := [M] | 197 | $(real-objs-m) : quiet_modtag := [M] |
182 | $(real-objs-m:.o=.i) : quiet_modtag := [M] | 198 | $(real-objs-m:.o=.i) : quiet_modtag := [M] |
183 | $(real-objs-m:.o=.s) : quiet_modtag := [M] | 199 | $(real-objs-m:.o=.s) : quiet_modtag := [M] |
184 | $(real-objs-m:.o=.lst): quiet_modtag := [M] | 200 | $(real-objs-m:.o=.lst): quiet_modtag := [M] |
185 | 201 | ||
186 | $(obj-m) : quiet_modtag := [M] | 202 | $(obj-m) : quiet_modtag := [M] |
187 | 203 | ||
188 | # Default for not multi-part modules | 204 | # Default for not multi-part modules |
189 | modname = $(basetarget) | 205 | modname = $(basetarget) |
190 | 206 | ||
191 | $(multi-objs-m) : modname = $(modname-multi) | 207 | $(multi-objs-m) : modname = $(modname-multi) |
192 | $(multi-objs-m:.o=.i) : modname = $(modname-multi) | 208 | $(multi-objs-m:.o=.i) : modname = $(modname-multi) |
193 | $(multi-objs-m:.o=.s) : modname = $(modname-multi) | 209 | $(multi-objs-m:.o=.s) : modname = $(modname-multi) |
194 | $(multi-objs-m:.o=.lst) : modname = $(modname-multi) | 210 | $(multi-objs-m:.o=.lst) : modname = $(modname-multi) |
195 | $(multi-objs-y) : modname = $(modname-multi) | 211 | $(multi-objs-y) : modname = $(modname-multi) |
196 | $(multi-objs-y:.o=.i) : modname = $(modname-multi) | 212 | $(multi-objs-y:.o=.i) : modname = $(modname-multi) |
197 | $(multi-objs-y:.o=.s) : modname = $(modname-multi) | 213 | $(multi-objs-y:.o=.s) : modname = $(modname-multi) |
198 | $(multi-objs-y:.o=.lst) : modname = $(modname-multi) | 214 | $(multi-objs-y:.o=.lst) : modname = $(modname-multi) |
199 | 215 | ||
200 | quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ | 216 | quiet_cmd_cc_s_c = CC $(quiet_modtag) $@ |
201 | cmd_cc_s_c = $(CC) $(c_flags) -fverbose-asm -S -o $@ $< | 217 | cmd_cc_s_c = $(CC) $(c_flags) -fverbose-asm -S -o $@ $< |
202 | 218 | ||
203 | $(obj)/%.s: $(src)/%.c FORCE | 219 | $(obj)/%.s: $(src)/%.c FORCE |
204 | $(call if_changed_dep,cc_s_c) | 220 | $(call if_changed_dep,cc_s_c) |
205 | 221 | ||
206 | quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@ | 222 | quiet_cmd_cc_i_c = CPP $(quiet_modtag) $@ |
207 | cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< | 223 | cmd_cc_i_c = $(CPP) $(c_flags) -o $@ $< |
208 | 224 | ||
209 | $(obj)/%.i: $(src)/%.c FORCE | 225 | $(obj)/%.i: $(src)/%.c FORCE |
210 | $(call if_changed_dep,cc_i_c) | 226 | $(call if_changed_dep,cc_i_c) |
211 | 227 | ||
212 | cmd_gensymtypes = \ | 228 | cmd_gensymtypes = \ |
213 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ | 229 | $(CPP) -D__GENKSYMS__ $(c_flags) $< | \ |
214 | $(GENKSYMS) $(if $(1), -T $(2)) \ | 230 | $(GENKSYMS) $(if $(1), -T $(2)) \ |
215 | $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \ | 231 | $(patsubst y,-s _,$(CONFIG_HAVE_UNDERSCORE_SYMBOL_PREFIX)) \ |
216 | $(if $(KBUILD_PRESERVE),-p) \ | 232 | $(if $(KBUILD_PRESERVE),-p) \ |
217 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) | 233 | -r $(firstword $(wildcard $(2:.symtypes=.symref) /dev/null)) |
218 | 234 | ||
219 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ | 235 | quiet_cmd_cc_symtypes_c = SYM $(quiet_modtag) $@ |
220 | cmd_cc_symtypes_c = \ | 236 | cmd_cc_symtypes_c = \ |
221 | set -e; \ | 237 | set -e; \ |
222 | $(call cmd_gensymtypes,true,$@) >/dev/null; \ | 238 | $(call cmd_gensymtypes,true,$@) >/dev/null; \ |
223 | test -s $@ || rm -f $@ | 239 | test -s $@ || rm -f $@ |
224 | 240 | ||
225 | $(obj)/%.symtypes : $(src)/%.c FORCE | 241 | $(obj)/%.symtypes : $(src)/%.c FORCE |
226 | $(call cmd,cc_symtypes_c) | 242 | $(call cmd,cc_symtypes_c) |
227 | 243 | ||
228 | # C (.c) files | 244 | # C (.c) files |
229 | # The C file is compiled and updated dependency information is generated. | 245 | # The C file is compiled and updated dependency information is generated. |
230 | # (See cmd_cc_o_c + relevant part of rule_cc_o_c) | 246 | # (See cmd_cc_o_c + relevant part of rule_cc_o_c) |
231 | 247 | ||
232 | quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ | 248 | quiet_cmd_cc_o_c = CC $(quiet_modtag) $@ |
233 | 249 | ||
234 | ifndef CONFIG_MODVERSIONS | 250 | ifndef CONFIG_MODVERSIONS |
235 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< | 251 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< |
236 | 252 | ||
237 | else | 253 | else |
238 | # When module versioning is enabled the following steps are executed: | 254 | # When module versioning is enabled the following steps are executed: |
239 | # o compile a .tmp_<file>.o from <file>.c | 255 | # o compile a .tmp_<file>.o from <file>.c |
240 | # o if .tmp_<file>.o doesn't contain a __ksymtab version, i.e. does | 256 | # o if .tmp_<file>.o doesn't contain a __ksymtab version, i.e. does |
241 | # not export symbols, we just rename .tmp_<file>.o to <file>.o and | 257 | # not export symbols, we just rename .tmp_<file>.o to <file>.o and |
242 | # are done. | 258 | # are done. |
243 | # o otherwise, we calculate symbol versions using the good old | 259 | # o otherwise, we calculate symbol versions using the good old |
244 | # genksyms on the preprocessed source and postprocess them in a way | 260 | # genksyms on the preprocessed source and postprocess them in a way |
245 | # that they are usable as a linker script | 261 | # that they are usable as a linker script |
246 | # o generate <file>.o from .tmp_<file>.o using the linker to | 262 | # o generate <file>.o from .tmp_<file>.o using the linker to |
247 | # replace the unresolved symbols __crc_exported_symbol with | 263 | # replace the unresolved symbols __crc_exported_symbol with |
248 | # the actual value of the checksum generated by genksyms | 264 | # the actual value of the checksum generated by genksyms |
249 | 265 | ||
250 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< | 266 | cmd_cc_o_c = $(CC) $(c_flags) -c -o $(@D)/.tmp_$(@F) $< |
251 | cmd_modversions = \ | 267 | cmd_modversions = \ |
252 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ | 268 | if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \ |
253 | $(call cmd_gensymtypes,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ | 269 | $(call cmd_gensymtypes,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \ |
254 | > $(@D)/.tmp_$(@F:.o=.ver); \ | 270 | > $(@D)/.tmp_$(@F:.o=.ver); \ |
255 | \ | 271 | \ |
256 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ | 272 | $(LD) $(LDFLAGS) -r -o $@ $(@D)/.tmp_$(@F) \ |
257 | -T $(@D)/.tmp_$(@F:.o=.ver); \ | 273 | -T $(@D)/.tmp_$(@F:.o=.ver); \ |
258 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ | 274 | rm -f $(@D)/.tmp_$(@F) $(@D)/.tmp_$(@F:.o=.ver); \ |
259 | else \ | 275 | else \ |
260 | mv -f $(@D)/.tmp_$(@F) $@; \ | 276 | mv -f $(@D)/.tmp_$(@F) $@; \ |
261 | fi; | 277 | fi; |
262 | endif | 278 | endif |
263 | 279 | ||
264 | ifdef CONFIG_FTRACE_MCOUNT_RECORD | 280 | ifdef CONFIG_FTRACE_MCOUNT_RECORD |
265 | ifdef BUILD_C_RECORDMCOUNT | 281 | ifdef BUILD_C_RECORDMCOUNT |
266 | ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") | 282 | ifeq ("$(origin RECORDMCOUNT_WARN)", "command line") |
267 | RECORDMCOUNT_FLAGS = -w | 283 | RECORDMCOUNT_FLAGS = -w |
268 | endif | 284 | endif |
269 | # Due to recursion, we must skip empty.o. | 285 | # Due to recursion, we must skip empty.o. |
270 | # The empty.o file is created in the make process in order to determine | 286 | # The empty.o file is created in the make process in order to determine |
271 | # the target endianness and word size. It is made before all other C | 287 | # the target endianness and word size. It is made before all other C |
272 | # files, including recordmcount. | 288 | # files, including recordmcount. |
273 | sub_cmd_record_mcount = \ | 289 | sub_cmd_record_mcount = \ |
274 | if [ $(@) != "scripts/mod/empty.o" ]; then \ | 290 | if [ $(@) != "scripts/mod/empty.o" ]; then \ |
275 | $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ | 291 | $(objtree)/scripts/recordmcount $(RECORDMCOUNT_FLAGS) "$(@)"; \ |
276 | fi; | 292 | fi; |
277 | recordmcount_source := $(srctree)/scripts/recordmcount.c \ | 293 | recordmcount_source := $(srctree)/scripts/recordmcount.c \ |
278 | $(srctree)/scripts/recordmcount.h | 294 | $(srctree)/scripts/recordmcount.h |
279 | else | 295 | else |
280 | sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ | 296 | sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ |
281 | "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ | 297 | "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ |
282 | "$(if $(CONFIG_64BIT),64,32)" \ | 298 | "$(if $(CONFIG_64BIT),64,32)" \ |
283 | "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ | 299 | "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ |
284 | "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ | 300 | "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ |
285 | "$(if $(part-of-module),1,0)" "$(@)"; | 301 | "$(if $(part-of-module),1,0)" "$(@)"; |
286 | recordmcount_source := $(srctree)/scripts/recordmcount.pl | 302 | recordmcount_source := $(srctree)/scripts/recordmcount.pl |
287 | endif | 303 | endif |
288 | cmd_record_mcount = \ | 304 | cmd_record_mcount = \ |
289 | if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ | 305 | if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ |
290 | $(sub_cmd_record_mcount) \ | 306 | $(sub_cmd_record_mcount) \ |
291 | fi; | 307 | fi; |
292 | endif | 308 | endif |
293 | 309 | ||
294 | define rule_cc_o_c | 310 | define rule_cc_o_c |
295 | $(call echo-cmd,checksrc) $(cmd_checksrc) \ | 311 | $(call echo-cmd,checksrc) $(cmd_checksrc) \ |
296 | $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ | 312 | $(call echo-cmd,cc_o_c) $(cmd_cc_o_c); \ |
297 | $(cmd_modversions) \ | 313 | $(cmd_modversions) \ |
298 | $(call echo-cmd,record_mcount) \ | 314 | $(call echo-cmd,record_mcount) \ |
299 | $(cmd_record_mcount) \ | 315 | $(cmd_record_mcount) \ |
300 | scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ | 316 | scripts/basic/fixdep $(depfile) $@ '$(call make-cmd,cc_o_c)' > \ |
301 | $(dot-target).tmp; \ | 317 | $(dot-target).tmp; \ |
302 | rm -f $(depfile); \ | 318 | rm -f $(depfile); \ |
303 | mv -f $(dot-target).tmp $(dot-target).cmd | 319 | mv -f $(dot-target).tmp $(dot-target).cmd |
304 | endef | 320 | endef |
305 | 321 | ||
306 | # Built-in and composite module parts | 322 | # Built-in and composite module parts |
307 | $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE | 323 | $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE |
308 | $(call cmd,force_checksrc) | 324 | $(call cmd,force_checksrc) |
309 | $(call if_changed_rule,cc_o_c) | 325 | $(call if_changed_rule,cc_o_c) |
310 | 326 | ||
311 | # Single-part modules are special since we need to mark them in $(MODVERDIR) | 327 | # Single-part modules are special since we need to mark them in $(MODVERDIR) |
312 | 328 | ||
313 | $(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE | 329 | $(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE |
314 | $(call cmd,force_checksrc) | 330 | $(call cmd,force_checksrc) |
315 | $(call if_changed_rule,cc_o_c) | 331 | $(call if_changed_rule,cc_o_c) |
316 | @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod) | 332 | @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod) |
317 | 333 | ||
318 | quiet_cmd_cc_lst_c = MKLST $@ | 334 | quiet_cmd_cc_lst_c = MKLST $@ |
319 | cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && \ | 335 | cmd_cc_lst_c = $(CC) $(c_flags) -g -c -o $*.o $< && \ |
320 | $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \ | 336 | $(CONFIG_SHELL) $(srctree)/scripts/makelst $*.o \ |
321 | System.map $(OBJDUMP) > $@ | 337 | System.map $(OBJDUMP) > $@ |
322 | 338 | ||
323 | $(obj)/%.lst: $(src)/%.c FORCE | 339 | $(obj)/%.lst: $(src)/%.c FORCE |
324 | $(call if_changed_dep,cc_lst_c) | 340 | $(call if_changed_dep,cc_lst_c) |
325 | 341 | ||
326 | # Compile assembler sources (.S) | 342 | # Compile assembler sources (.S) |
327 | # --------------------------------------------------------------------------- | 343 | # --------------------------------------------------------------------------- |
328 | 344 | ||
329 | modkern_aflags := $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL) | 345 | modkern_aflags := $(KBUILD_AFLAGS_KERNEL) $(AFLAGS_KERNEL) |
330 | 346 | ||
331 | $(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) | 347 | $(real-objs-m) : modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) |
332 | $(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) | 348 | $(real-objs-m:.o=.s): modkern_aflags := $(KBUILD_AFLAGS_MODULE) $(AFLAGS_MODULE) |
333 | 349 | ||
334 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ | 350 | quiet_cmd_as_s_S = CPP $(quiet_modtag) $@ |
335 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< | 351 | cmd_as_s_S = $(CPP) $(a_flags) -o $@ $< |
336 | 352 | ||
337 | $(obj)/%.s: $(src)/%.S FORCE | 353 | $(obj)/%.s: $(src)/%.S FORCE |
338 | $(call if_changed_dep,as_s_S) | 354 | $(call if_changed_dep,as_s_S) |
339 | 355 | ||
340 | quiet_cmd_as_o_S = AS $(quiet_modtag) $@ | 356 | quiet_cmd_as_o_S = AS $(quiet_modtag) $@ |
341 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< | 357 | cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< |
342 | 358 | ||
343 | $(obj)/%.o: $(src)/%.S FORCE | 359 | $(obj)/%.o: $(src)/%.S FORCE |
344 | $(call if_changed_dep,as_o_S) | 360 | $(call if_changed_dep,as_o_S) |
345 | 361 | ||
346 | targets += $(real-objs-y) $(real-objs-m) $(lib-y) | 362 | targets += $(real-objs-y) $(real-objs-m) $(lib-y) |
347 | targets += $(extra-y) $(MAKECMDGOALS) $(always) | 363 | targets += $(extra-y) $(MAKECMDGOALS) $(always) |
348 | 364 | ||
349 | # Linker scripts preprocessor (.lds.S -> .lds) | 365 | # Linker scripts preprocessor (.lds.S -> .lds) |
350 | # --------------------------------------------------------------------------- | 366 | # --------------------------------------------------------------------------- |
351 | quiet_cmd_cpp_lds_S = LDS $@ | 367 | quiet_cmd_cpp_lds_S = LDS $@ |
352 | cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \ | 368 | cmd_cpp_lds_S = $(CPP) $(cpp_flags) -P -C -U$(ARCH) \ |
353 | -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< | 369 | -D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $< |
354 | 370 | ||
355 | $(obj)/%.lds: $(src)/%.lds.S FORCE | 371 | $(obj)/%.lds: $(src)/%.lds.S FORCE |
356 | $(call if_changed_dep,cpp_lds_S) | 372 | $(call if_changed_dep,cpp_lds_S) |
357 | 373 | ||
358 | # ASN.1 grammar | 374 | # ASN.1 grammar |
359 | # --------------------------------------------------------------------------- | 375 | # --------------------------------------------------------------------------- |
360 | quiet_cmd_asn1_compiler = ASN.1 $@ | 376 | quiet_cmd_asn1_compiler = ASN.1 $@ |
361 | cmd_asn1_compiler = $(objtree)/scripts/asn1_compiler $< \ | 377 | cmd_asn1_compiler = $(objtree)/scripts/asn1_compiler $< \ |
362 | $(subst .h,.c,$@) $(subst .c,.h,$@) | 378 | $(subst .h,.c,$@) $(subst .c,.h,$@) |
363 | 379 | ||
364 | .PRECIOUS: $(objtree)/$(obj)/%-asn1.c $(objtree)/$(obj)/%-asn1.h | 380 | .PRECIOUS: $(objtree)/$(obj)/%-asn1.c $(objtree)/$(obj)/%-asn1.h |
365 | 381 | ||
366 | $(obj)/%-asn1.c $(obj)/%-asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler | 382 | $(obj)/%-asn1.c $(obj)/%-asn1.h: $(src)/%.asn1 $(objtree)/scripts/asn1_compiler |
367 | $(call cmd,asn1_compiler) | 383 | $(call cmd,asn1_compiler) |
368 | 384 | ||
369 | # Build the compiled-in targets | 385 | # Build the compiled-in targets |
370 | # --------------------------------------------------------------------------- | 386 | # --------------------------------------------------------------------------- |
371 | 387 | ||
372 | # To build objects in subdirs, we need to descend into the directories | 388 | # To build objects in subdirs, we need to descend into the directories |
373 | $(sort $(subdir-obj-y)): $(subdir-ym) ; | 389 | $(sort $(subdir-obj-y)): $(subdir-ym) ; |
374 | 390 | ||
375 | # | 391 | # |
376 | # Rule to compile a set of .o files into one .o file | 392 | # Rule to compile a set of .o files into one .o file |
377 | # | 393 | # |
378 | ifdef builtin-target | 394 | ifdef builtin-target |
379 | quiet_cmd_link_o_target = LD $@ | 395 | quiet_cmd_link_o_target = LD $@ |
380 | # If the list of objects to link is empty, just create an empty built-in.o | 396 | # If the list of objects to link is empty, just create an empty built-in.o |
381 | cmd_link_o_target = $(if $(strip $(obj-y)),\ | 397 | cmd_link_o_target = $(if $(strip $(obj-y)),\ |
382 | $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \ | 398 | $(LD) $(ld_flags) -r -o $@ $(filter $(obj-y), $^) \ |
383 | $(cmd_secanalysis),\ | 399 | $(cmd_secanalysis),\ |
384 | rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@) | 400 | rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@) |
385 | 401 | ||
386 | $(builtin-target): $(obj-y) FORCE | 402 | $(builtin-target): $(obj-y) FORCE |
387 | $(call if_changed,link_o_target) | 403 | $(call if_changed,link_o_target) |
388 | 404 | ||
389 | targets += $(builtin-target) | 405 | targets += $(builtin-target) |
390 | endif # builtin-target | 406 | endif # builtin-target |
391 | 407 | ||
392 | # | 408 | # |
393 | # Rule to create modules.order file | 409 | # Rule to create modules.order file |
394 | # | 410 | # |
395 | # Create commands to either record .ko file or cat modules.order from | 411 | # Create commands to either record .ko file or cat modules.order from |
396 | # a subdirectory | 412 | # a subdirectory |
397 | modorder-cmds = \ | 413 | modorder-cmds = \ |
398 | $(foreach m, $(modorder), \ | 414 | $(foreach m, $(modorder), \ |
399 | $(if $(filter %/modules.order, $m), \ | 415 | $(if $(filter %/modules.order, $m), \ |
400 | cat $m;, echo kernel/$m;)) | 416 | cat $m;, echo kernel/$m;)) |
401 | 417 | ||
402 | $(modorder-target): $(subdir-ym) FORCE | 418 | $(modorder-target): $(subdir-ym) FORCE |
403 | $(Q)(cat /dev/null; $(modorder-cmds)) > $@ | 419 | $(Q)(cat /dev/null; $(modorder-cmds)) > $@ |
404 | 420 | ||
405 | # | 421 | # |
406 | # Rule to compile a set of .o files into one .a file | 422 | # Rule to compile a set of .o files into one .a file |
407 | # | 423 | # |
408 | ifdef lib-target | 424 | ifdef lib-target |
409 | quiet_cmd_link_l_target = AR $@ | 425 | quiet_cmd_link_l_target = AR $@ |
410 | cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y) | 426 | cmd_link_l_target = rm -f $@; $(AR) rcs$(KBUILD_ARFLAGS) $@ $(lib-y) |
411 | 427 | ||
412 | $(lib-target): $(lib-y) FORCE | 428 | $(lib-target): $(lib-y) FORCE |
413 | $(call if_changed,link_l_target) | 429 | $(call if_changed,link_l_target) |
414 | 430 | ||
415 | targets += $(lib-target) | 431 | targets += $(lib-target) |
416 | endif | 432 | endif |
417 | 433 | ||
418 | # | 434 | # |
419 | # Rule to link composite objects | 435 | # Rule to link composite objects |
420 | # | 436 | # |
421 | # Composite objects are specified in kbuild makefile as follows: | 437 | # Composite objects are specified in kbuild makefile as follows: |
422 | # <composite-object>-objs := <list of .o files> | 438 | # <composite-object>-objs := <list of .o files> |
423 | # or | 439 | # or |
424 | # <composite-object>-y := <list of .o files> | 440 | # <composite-object>-y := <list of .o files> |
425 | link_multi_deps = \ | 441 | link_multi_deps = \ |
426 | $(filter $(addprefix $(obj)/, \ | 442 | $(filter $(addprefix $(obj)/, \ |
427 | $($(subst $(obj)/,,$(@:.o=-objs))) \ | 443 | $($(subst $(obj)/,,$(@:.o=-objs))) \ |
428 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) | 444 | $($(subst $(obj)/,,$(@:.o=-y)))), $^) |
429 | 445 | ||
430 | quiet_cmd_link_multi-y = LD $@ | 446 | quiet_cmd_link_multi-y = LD $@ |
431 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) | 447 | cmd_link_multi-y = $(LD) $(ld_flags) -r -o $@ $(link_multi_deps) $(cmd_secanalysis) |
432 | 448 | ||
433 | quiet_cmd_link_multi-m = LD [M] $@ | 449 | quiet_cmd_link_multi-m = LD [M] $@ |
434 | cmd_link_multi-m = $(cmd_link_multi-y) | 450 | cmd_link_multi-m = $(cmd_link_multi-y) |
435 | 451 | ||
436 | # We would rather have a list of rules like | 452 | # We would rather have a list of rules like |
437 | # foo.o: $(foo-objs) | 453 | # foo.o: $(foo-objs) |
438 | # but that's not so easy, so we rather make all composite objects depend | 454 | # but that's not so easy, so we rather make all composite objects depend |
439 | # on the set of all their parts | 455 | # on the set of all their parts |
440 | $(multi-used-y) : %.o: $(multi-objs-y) FORCE | 456 | $(multi-used-y) : %.o: $(multi-objs-y) FORCE |
441 | $(call if_changed,link_multi-y) | 457 | $(call if_changed,link_multi-y) |
442 | 458 | ||
443 | $(multi-used-m) : %.o: $(multi-objs-m) FORCE | 459 | $(multi-used-m) : %.o: $(multi-objs-m) FORCE |
444 | $(call if_changed,link_multi-m) | 460 | $(call if_changed,link_multi-m) |
445 | @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) | 461 | @{ echo $(@:.o=.ko); echo $(link_multi_deps); } > $(MODVERDIR)/$(@F:.o=.mod) |
446 | 462 | ||
447 | targets += $(multi-used-y) $(multi-used-m) | 463 | targets += $(multi-used-y) $(multi-used-m) |
448 | 464 | ||
449 | 465 | ||
450 | # Descending | 466 | # Descending |
451 | # --------------------------------------------------------------------------- | 467 | # --------------------------------------------------------------------------- |
452 | 468 | ||
453 | PHONY += $(subdir-ym) | 469 | PHONY += $(subdir-ym) |
454 | $(subdir-ym): | 470 | $(subdir-ym): |
455 | $(Q)$(MAKE) $(build)=$@ | 471 | $(Q)$(MAKE) $(build)=$@ |
456 | 472 | ||
457 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. | 473 | # Add FORCE to the prequisites of a target to force it to be always rebuilt. |
458 | # --------------------------------------------------------------------------- | 474 | # --------------------------------------------------------------------------- |
459 | 475 | ||
460 | PHONY += FORCE | 476 | PHONY += FORCE |
461 | 477 | ||
462 | FORCE: | 478 | FORCE: |
463 | 479 | ||
464 | # Read all saved command lines and dependencies for the $(targets) we | 480 | # Read all saved command lines and dependencies for the $(targets) we |
465 | # may be building above, using $(if_changed{,_dep}). As an | 481 | # may be building above, using $(if_changed{,_dep}). As an |
466 | # optimization, we don't need to read them if the target does not | 482 | # optimization, we don't need to read them if the target does not |
467 | # exist, we will rebuild anyway in that case. | 483 | # exist, we will rebuild anyway in that case. |
468 | 484 | ||
469 | targets := $(wildcard $(sort $(targets))) | 485 | targets := $(wildcard $(sort $(targets))) |
470 | cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) | 486 | cmd_files := $(wildcard $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) |
471 | 487 | ||
472 | ifneq ($(cmd_files),) | 488 | ifneq ($(cmd_files),) |
473 | include $(cmd_files) | 489 | include $(cmd_files) |
474 | endif | 490 | endif |
475 | 491 | ||
476 | # Declare the contents of the .PHONY variable as phony. We keep that | 492 | # Declare the contents of the .PHONY variable as phony. We keep that |
477 | # information in a variable se we can use it in if_changed and friends. | 493 | # information in a variable se we can use it in if_changed and friends. |
478 | 494 | ||
479 | .PHONY: $(PHONY) | 495 | .PHONY: $(PHONY) |
480 | 496 |
scripts/Makefile.lib
1 | # Backward compatibility | 1 | # Backward compatibility |
2 | asflags-y += $(EXTRA_AFLAGS) | 2 | asflags-y += $(EXTRA_AFLAGS) |
3 | ccflags-y += $(EXTRA_CFLAGS) | 3 | ccflags-y += $(EXTRA_CFLAGS) |
4 | cppflags-y += $(EXTRA_CPPFLAGS) | 4 | cppflags-y += $(EXTRA_CPPFLAGS) |
5 | ldflags-y += $(EXTRA_LDFLAGS) | 5 | ldflags-y += $(EXTRA_LDFLAGS) |
6 | 6 | ||
7 | # | 7 | # |
8 | # flags that take effect in sub directories | 8 | # flags that take effect in sub directories |
9 | export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y) | 9 | export KBUILD_SUBDIR_ASFLAGS := $(KBUILD_SUBDIR_ASFLAGS) $(subdir-asflags-y) |
10 | export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y) | 10 | export KBUILD_SUBDIR_CCFLAGS := $(KBUILD_SUBDIR_CCFLAGS) $(subdir-ccflags-y) |
11 | 11 | ||
12 | # Figure out what we need to build from the various variables | 12 | # Figure out what we need to build from the various variables |
13 | # =========================================================================== | 13 | # =========================================================================== |
14 | 14 | ||
15 | # When an object is listed to be built compiled-in and modular, | 15 | # When an object is listed to be built compiled-in and modular, |
16 | # only build the compiled-in version | 16 | # only build the compiled-in version |
17 | 17 | ||
18 | obj-m := $(filter-out $(obj-y),$(obj-m)) | 18 | obj-m := $(filter-out $(obj-y),$(obj-m)) |
19 | 19 | ||
20 | # Libraries are always collected in one lib file. | 20 | # Libraries are always collected in one lib file. |
21 | # Filter out objects already built-in | 21 | # Filter out objects already built-in |
22 | 22 | ||
23 | lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) | 23 | lib-y := $(filter-out $(obj-y), $(sort $(lib-y) $(lib-m))) |
24 | 24 | ||
25 | 25 | ||
26 | # Handle objects in subdirs | 26 | # Handle objects in subdirs |
27 | # --------------------------------------------------------------------------- | 27 | # --------------------------------------------------------------------------- |
28 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o | 28 | # o if we encounter foo/ in $(obj-y), replace it by foo/built-in.o |
29 | # and add the directory to the list of dirs to descend into: $(subdir-y) | 29 | # and add the directory to the list of dirs to descend into: $(subdir-y) |
30 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) | 30 | # o if we encounter foo/ in $(obj-m), remove it from $(obj-m) |
31 | # and add the directory to the list of dirs to descend into: $(subdir-m) | 31 | # and add the directory to the list of dirs to descend into: $(subdir-m) |
32 | 32 | ||
33 | # Determine modorder. | 33 | # Determine modorder. |
34 | # Unfortunately, we don't have information about ordering between -y | 34 | # Unfortunately, we don't have information about ordering between -y |
35 | # and -m subdirs. Just put -y's first. | 35 | # and -m subdirs. Just put -y's first. |
36 | modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko)) | 36 | modorder := $(patsubst %/,%/modules.order, $(filter %/, $(obj-y)) $(obj-m:.o=.ko)) |
37 | 37 | ||
38 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) | 38 | __subdir-y := $(patsubst %/,%,$(filter %/, $(obj-y))) |
39 | subdir-y += $(__subdir-y) | 39 | subdir-y += $(__subdir-y) |
40 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) | 40 | __subdir-m := $(patsubst %/,%,$(filter %/, $(obj-m))) |
41 | subdir-m += $(__subdir-m) | 41 | subdir-m += $(__subdir-m) |
42 | obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) | 42 | obj-y := $(patsubst %/, %/built-in.o, $(obj-y)) |
43 | obj-m := $(filter-out %/, $(obj-m)) | 43 | obj-m := $(filter-out %/, $(obj-m)) |
44 | 44 | ||
45 | # Subdirectories we need to descend into | 45 | # Subdirectories we need to descend into |
46 | 46 | ||
47 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) | 47 | subdir-ym := $(sort $(subdir-y) $(subdir-m)) |
48 | 48 | ||
49 | # if $(foo-objs) exists, foo.o is a composite object | 49 | # if $(foo-objs) exists, foo.o is a composite object |
50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 50 | multi-used-y := $(sort $(foreach m,$(obj-y), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) | 51 | multi-used-m := $(sort $(foreach m,$(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))), $(m)))) |
52 | multi-used := $(multi-used-y) $(multi-used-m) | 52 | multi-used := $(multi-used-y) $(multi-used-m) |
53 | single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) | 53 | single-used-m := $(sort $(filter-out $(multi-used-m),$(obj-m))) |
54 | 54 | ||
55 | # Build list of the parts of our composite objects, our composite | 55 | # Build list of the parts of our composite objects, our composite |
56 | # objects depend on those (obviously) | 56 | # objects depend on those (obviously) |
57 | multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y))) | 57 | multi-objs-y := $(foreach m, $(multi-used-y), $($(m:.o=-objs)) $($(m:.o=-y))) |
58 | multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) | 58 | multi-objs-m := $(foreach m, $(multi-used-m), $($(m:.o=-objs)) $($(m:.o=-y))) |
59 | multi-objs := $(multi-objs-y) $(multi-objs-m) | 59 | multi-objs := $(multi-objs-y) $(multi-objs-m) |
60 | 60 | ||
61 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to | 61 | # $(subdir-obj-y) is the list of objects in $(obj-y) which uses dir/ to |
62 | # tell kbuild to descend | 62 | # tell kbuild to descend |
63 | subdir-obj-y := $(filter %/built-in.o, $(obj-y)) | 63 | subdir-obj-y := $(filter %/built-in.o, $(obj-y)) |
64 | 64 | ||
65 | # $(obj-dirs) is a list of directories that contain object files | 65 | # $(obj-dirs) is a list of directories that contain object files |
66 | obj-dirs := $(dir $(multi-objs) $(obj-y)) | 66 | obj-dirs := $(dir $(multi-objs) $(obj-y)) |
67 | 67 | ||
68 | # Replace multi-part objects by their individual parts, look at local dir only | 68 | # Replace multi-part objects by their individual parts, look at local dir only |
69 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) | 69 | real-objs-y := $(foreach m, $(filter-out $(subdir-obj-y), $(obj-y)), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) $(extra-y) |
70 | real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) | 70 | real-objs-m := $(foreach m, $(obj-m), $(if $(strip $($(m:.o=-objs)) $($(m:.o=-y))),$($(m:.o=-objs)) $($(m:.o=-y)),$(m))) |
71 | 71 | ||
72 | # Add subdir path | 72 | # Add subdir path |
73 | 73 | ||
74 | extra-y := $(addprefix $(obj)/,$(extra-y)) | 74 | extra-y := $(addprefix $(obj)/,$(extra-y)) |
75 | always := $(addprefix $(obj)/,$(always)) | 75 | always := $(addprefix $(obj)/,$(always)) |
76 | targets := $(addprefix $(obj)/,$(targets)) | 76 | targets := $(addprefix $(obj)/,$(targets)) |
77 | modorder := $(addprefix $(obj)/,$(modorder)) | 77 | modorder := $(addprefix $(obj)/,$(modorder)) |
78 | obj-y := $(addprefix $(obj)/,$(obj-y)) | 78 | obj-y := $(addprefix $(obj)/,$(obj-y)) |
79 | obj-m := $(addprefix $(obj)/,$(obj-m)) | 79 | obj-m := $(addprefix $(obj)/,$(obj-m)) |
80 | lib-y := $(addprefix $(obj)/,$(lib-y)) | 80 | lib-y := $(addprefix $(obj)/,$(lib-y)) |
81 | subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) | 81 | subdir-obj-y := $(addprefix $(obj)/,$(subdir-obj-y)) |
82 | real-objs-y := $(addprefix $(obj)/,$(real-objs-y)) | 82 | real-objs-y := $(addprefix $(obj)/,$(real-objs-y)) |
83 | real-objs-m := $(addprefix $(obj)/,$(real-objs-m)) | 83 | real-objs-m := $(addprefix $(obj)/,$(real-objs-m)) |
84 | single-used-m := $(addprefix $(obj)/,$(single-used-m)) | 84 | single-used-m := $(addprefix $(obj)/,$(single-used-m)) |
85 | multi-used-y := $(addprefix $(obj)/,$(multi-used-y)) | 85 | multi-used-y := $(addprefix $(obj)/,$(multi-used-y)) |
86 | multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) | 86 | multi-used-m := $(addprefix $(obj)/,$(multi-used-m)) |
87 | multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y)) | 87 | multi-objs-y := $(addprefix $(obj)/,$(multi-objs-y)) |
88 | multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m)) | 88 | multi-objs-m := $(addprefix $(obj)/,$(multi-objs-m)) |
89 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) | 89 | subdir-ym := $(addprefix $(obj)/,$(subdir-ym)) |
90 | obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) | 90 | obj-dirs := $(addprefix $(obj)/,$(obj-dirs)) |
91 | 91 | ||
92 | # These flags are needed for modversions and compiling, so we define them here | 92 | # These flags are needed for modversions and compiling, so we define them here |
93 | # already | 93 | # already |
94 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will | 94 | # $(modname_flags) #defines KBUILD_MODNAME as the name of the module it will |
95 | # end up in (or would, if it gets compiled in) | 95 | # end up in (or would, if it gets compiled in) |
96 | # Note: Files that end up in two or more modules are compiled without the | 96 | # Note: Files that end up in two or more modules are compiled without the |
97 | # KBUILD_MODNAME definition. The reason is that any made-up name would | 97 | # KBUILD_MODNAME definition. The reason is that any made-up name would |
98 | # differ in different configs. | 98 | # differ in different configs. |
99 | name-fix = $(subst $(comma),_,$(subst -,_,$1)) | 99 | name-fix = $(subst $(comma),_,$(subst -,_,$1)) |
100 | basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" | 100 | basename_flags = -D"KBUILD_BASENAME=KBUILD_STR($(call name-fix,$(basetarget)))" |
101 | modname_flags = $(if $(filter 1,$(words $(modname))),\ | 101 | modname_flags = $(if $(filter 1,$(words $(modname))),\ |
102 | -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") | 102 | -D"KBUILD_MODNAME=KBUILD_STR($(call name-fix,$(modname)))") |
103 | 103 | ||
104 | orig_c_flags = $(KBUILD_CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ | 104 | # U-Boot also uses $(CPPFLAGS) |
105 | orig_c_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_CFLAGS) $(KBUILD_SUBDIR_CCFLAGS) \ | ||
105 | $(ccflags-y) $(CFLAGS_$(basetarget).o) | 106 | $(ccflags-y) $(CFLAGS_$(basetarget).o) |
106 | _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags)) | 107 | _c_flags = $(filter-out $(CFLAGS_REMOVE_$(basetarget).o), $(orig_c_flags)) |
107 | _a_flags = $(KBUILD_CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \ | 108 | _a_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(KBUILD_AFLAGS) $(KBUILD_SUBDIR_ASFLAGS) \ |
108 | $(asflags-y) $(AFLAGS_$(basetarget).o) | 109 | $(asflags-y) $(AFLAGS_$(basetarget).o) |
109 | _cpp_flags = $(KBUILD_CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) | 110 | _cpp_flags = $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(cppflags-y) $(CPPFLAGS_$(@F)) |
110 | 111 | ||
111 | # | 112 | # |
112 | # Enable gcov profiling flags for a file, directory or for all files depending | 113 | # Enable gcov profiling flags for a file, directory or for all files depending |
113 | # on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL | 114 | # on variables GCOV_PROFILE_obj.o, GCOV_PROFILE and CONFIG_GCOV_PROFILE_ALL |
114 | # (in this order) | 115 | # (in this order) |
115 | # | 116 | # |
116 | ifeq ($(CONFIG_GCOV_KERNEL),y) | 117 | ifeq ($(CONFIG_GCOV_KERNEL),y) |
117 | _c_flags += $(if $(patsubst n%,, \ | 118 | _c_flags += $(if $(patsubst n%,, \ |
118 | $(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \ | 119 | $(GCOV_PROFILE_$(basetarget).o)$(GCOV_PROFILE)$(CONFIG_GCOV_PROFILE_ALL)), \ |
119 | $(CFLAGS_GCOV)) | 120 | $(CFLAGS_GCOV)) |
120 | endif | 121 | endif |
121 | 122 | ||
122 | # If building the kernel in a separate objtree expand all occurrences | 123 | # If building the kernel in a separate objtree expand all occurrences |
123 | # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). | 124 | # of -Idir to -I$(srctree)/dir except for absolute paths (starting with '/'). |
124 | 125 | ||
125 | ifeq ($(KBUILD_SRC),) | 126 | ifeq ($(KBUILD_SRC),) |
126 | __c_flags = $(_c_flags) | 127 | __c_flags = $(_c_flags) |
127 | __a_flags = $(_a_flags) | 128 | __a_flags = $(_a_flags) |
128 | __cpp_flags = $(_cpp_flags) | 129 | __cpp_flags = $(_cpp_flags) |
129 | else | 130 | else |
130 | 131 | ||
131 | # -I$(obj) locates generated .h files | 132 | # -I$(obj) locates generated .h files |
132 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files | 133 | # $(call addtree,-I$(obj)) locates .h files in srctree, from generated .c files |
133 | # and locates generated .h files | 134 | # and locates generated .h files |
134 | # FIXME: Replace both with specific CFLAGS* statements in the makefiles | 135 | # FIXME: Replace both with specific CFLAGS* statements in the makefiles |
135 | __c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags) | 136 | __c_flags = $(call addtree,-I$(obj)) $(call flags,_c_flags) |
136 | __a_flags = $(call flags,_a_flags) | 137 | __a_flags = $(call flags,_a_flags) |
137 | __cpp_flags = $(call flags,_cpp_flags) | 138 | __cpp_flags = $(call flags,_cpp_flags) |
138 | endif | 139 | endif |
139 | 140 | ||
140 | c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | 141 | # Modified for U-Boot: LINUXINCLUDE -> UBOOTINCLUDE |
142 | c_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ | ||
141 | $(__c_flags) $(modkern_cflags) \ | 143 | $(__c_flags) $(modkern_cflags) \ |
142 | -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) | 144 | -D"KBUILD_STR(s)=\#s" $(basename_flags) $(modname_flags) |
143 | 145 | ||
144 | a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | 146 | a_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ |
145 | $(__a_flags) $(modkern_aflags) | 147 | $(__a_flags) $(modkern_aflags) |
146 | 148 | ||
147 | cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(LINUXINCLUDE) \ | 149 | cpp_flags = -Wp,-MD,$(depfile) $(NOSTDINC_FLAGS) $(UBOOTINCLUDE) \ |
148 | $(__cpp_flags) | 150 | $(__cpp_flags) |
149 | 151 | ||
150 | ld_flags = $(LDFLAGS) $(ldflags-y) | 152 | ld_flags = $(LDFLAGS) $(ldflags-y) |
151 | 153 | ||
152 | dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ | 154 | dtc_cpp_flags = -Wp,-MD,$(depfile).pre.tmp -nostdinc \ |
153 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ | 155 | -I$(srctree)/arch/$(SRCARCH)/boot/dts \ |
154 | -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ | 156 | -I$(srctree)/arch/$(SRCARCH)/boot/dts/include \ |
155 | -undef -D__DTS__ | 157 | -undef -D__DTS__ |
156 | 158 | ||
157 | # Finds the multi-part object the current object will be linked into | 159 | # Finds the multi-part object the current object will be linked into |
158 | modname-multi = $(sort $(foreach m,$(multi-used),\ | 160 | modname-multi = $(sort $(foreach m,$(multi-used),\ |
159 | $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) | 161 | $(if $(filter $(subst $(obj)/,,$*.o), $($(m:.o=-objs)) $($(m:.o=-y))),$(m:.o=)))) |
160 | 162 | ||
161 | ifdef REGENERATE_PARSERS | 163 | ifdef REGENERATE_PARSERS |
162 | 164 | ||
163 | # GPERF | 165 | # GPERF |
164 | # --------------------------------------------------------------------------- | 166 | # --------------------------------------------------------------------------- |
165 | quiet_cmd_gperf = GPERF $@ | 167 | quiet_cmd_gperf = GPERF $@ |
166 | cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< | 168 | cmd_gperf = gperf -t --output-file $@ -a -C -E -g -k 1,3,$$ -p -t $< |
167 | 169 | ||
168 | .PRECIOUS: $(src)/%.hash.c_shipped | 170 | .PRECIOUS: $(src)/%.hash.c_shipped |
169 | $(src)/%.hash.c_shipped: $(src)/%.gperf | 171 | $(src)/%.hash.c_shipped: $(src)/%.gperf |
170 | $(call cmd,gperf) | 172 | $(call cmd,gperf) |
171 | 173 | ||
172 | # LEX | 174 | # LEX |
173 | # --------------------------------------------------------------------------- | 175 | # --------------------------------------------------------------------------- |
174 | LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy) | 176 | LEX_PREFIX = $(if $(LEX_PREFIX_${baseprereq}),$(LEX_PREFIX_${baseprereq}),yy) |
175 | 177 | ||
176 | quiet_cmd_flex = LEX $@ | 178 | quiet_cmd_flex = LEX $@ |
177 | cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< | 179 | cmd_flex = flex -o$@ -L -P $(LEX_PREFIX) $< |
178 | 180 | ||
179 | .PRECIOUS: $(src)/%.lex.c_shipped | 181 | .PRECIOUS: $(src)/%.lex.c_shipped |
180 | $(src)/%.lex.c_shipped: $(src)/%.l | 182 | $(src)/%.lex.c_shipped: $(src)/%.l |
181 | $(call cmd,flex) | 183 | $(call cmd,flex) |
182 | 184 | ||
183 | # YACC | 185 | # YACC |
184 | # --------------------------------------------------------------------------- | 186 | # --------------------------------------------------------------------------- |
185 | YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) | 187 | YACC_PREFIX = $(if $(YACC_PREFIX_${baseprereq}),$(YACC_PREFIX_${baseprereq}),yy) |
186 | 188 | ||
187 | quiet_cmd_bison = YACC $@ | 189 | quiet_cmd_bison = YACC $@ |
188 | cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< | 190 | cmd_bison = bison -o$@ -t -l -p $(YACC_PREFIX) $< |
189 | 191 | ||
190 | .PRECIOUS: $(src)/%.tab.c_shipped | 192 | .PRECIOUS: $(src)/%.tab.c_shipped |
191 | $(src)/%.tab.c_shipped: $(src)/%.y | 193 | $(src)/%.tab.c_shipped: $(src)/%.y |
192 | $(call cmd,bison) | 194 | $(call cmd,bison) |
193 | 195 | ||
194 | quiet_cmd_bison_h = YACC $@ | 196 | quiet_cmd_bison_h = YACC $@ |
195 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< | 197 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l -p $(YACC_PREFIX) $< |
196 | 198 | ||
197 | .PRECIOUS: $(src)/%.tab.h_shipped | 199 | .PRECIOUS: $(src)/%.tab.h_shipped |
198 | $(src)/%.tab.h_shipped: $(src)/%.y | 200 | $(src)/%.tab.h_shipped: $(src)/%.y |
199 | $(call cmd,bison_h) | 201 | $(call cmd,bison_h) |
200 | 202 | ||
201 | endif | 203 | endif |
202 | 204 | ||
203 | # Shipped files | 205 | # Shipped files |
204 | # =========================================================================== | 206 | # =========================================================================== |
205 | 207 | ||
206 | quiet_cmd_shipped = SHIPPED $@ | 208 | quiet_cmd_shipped = SHIPPED $@ |
207 | cmd_shipped = cat $< > $@ | 209 | cmd_shipped = cat $< > $@ |
208 | 210 | ||
209 | $(obj)/%: $(src)/%_shipped | 211 | $(obj)/%: $(src)/%_shipped |
210 | $(call cmd,shipped) | 212 | $(call cmd,shipped) |
211 | 213 | ||
212 | # Commands useful for building a boot image | 214 | # Commands useful for building a boot image |
213 | # =========================================================================== | 215 | # =========================================================================== |
214 | # | 216 | # |
215 | # Use as following: | 217 | # Use as following: |
216 | # | 218 | # |
217 | # target: source(s) FORCE | 219 | # target: source(s) FORCE |
218 | # $(if_changed,ld/objcopy/gzip) | 220 | # $(if_changed,ld/objcopy/gzip) |
219 | # | 221 | # |
220 | # and add target to extra-y so that we know we have to | 222 | # and add target to extra-y so that we know we have to |
221 | # read in the saved command line | 223 | # read in the saved command line |
222 | 224 | ||
223 | # Linking | 225 | # Linking |
224 | # --------------------------------------------------------------------------- | 226 | # --------------------------------------------------------------------------- |
225 | 227 | ||
226 | quiet_cmd_ld = LD $@ | 228 | quiet_cmd_ld = LD $@ |
227 | cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ | 229 | cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$(@F)) \ |
228 | $(filter-out FORCE,$^) -o $@ | 230 | $(filter-out FORCE,$^) -o $@ |
229 | 231 | ||
230 | # Objcopy | 232 | # Objcopy |
231 | # --------------------------------------------------------------------------- | 233 | # --------------------------------------------------------------------------- |
232 | 234 | ||
233 | quiet_cmd_objcopy = OBJCOPY $@ | 235 | quiet_cmd_objcopy = OBJCOPY $@ |
234 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ | 236 | cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$(@F)) $< $@ |
235 | 237 | ||
236 | # Gzip | 238 | # Gzip |
237 | # --------------------------------------------------------------------------- | 239 | # --------------------------------------------------------------------------- |
238 | 240 | ||
239 | quiet_cmd_gzip = GZIP $@ | 241 | quiet_cmd_gzip = GZIP $@ |
240 | cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ | 242 | cmd_gzip = (cat $(filter-out FORCE,$^) | gzip -n -f -9 > $@) || \ |
241 | (rm -f $@ ; false) | 243 | (rm -f $@ ; false) |
242 | 244 | ||
243 | # DTC | 245 | # DTC |
244 | # --------------------------------------------------------------------------- | 246 | # --------------------------------------------------------------------------- |
245 | 247 | ||
246 | # Generate an assembly file to wrap the output of the device tree compiler | 248 | # Generate an assembly file to wrap the output of the device tree compiler |
247 | quiet_cmd_dt_S_dtb= DTB $@ | 249 | quiet_cmd_dt_S_dtb= DTB $@ |
248 | cmd_dt_S_dtb= \ | 250 | cmd_dt_S_dtb= \ |
249 | ( \ | 251 | ( \ |
250 | echo '\#include <asm-generic/vmlinux.lds.h>'; \ | 252 | echo '\#include <asm-generic/vmlinux.lds.h>'; \ |
251 | echo '.section .dtb.init.rodata,"a"'; \ | 253 | echo '.section .dtb.init.rodata,"a"'; \ |
252 | echo '.balign STRUCT_ALIGNMENT'; \ | 254 | echo '.balign STRUCT_ALIGNMENT'; \ |
253 | echo '.global __dtb_$(*F)_begin'; \ | 255 | echo '.global __dtb_$(*F)_begin'; \ |
254 | echo '__dtb_$(*F)_begin:'; \ | 256 | echo '__dtb_$(*F)_begin:'; \ |
255 | echo '.incbin "$<" '; \ | 257 | echo '.incbin "$<" '; \ |
256 | echo '__dtb_$(*F)_end:'; \ | 258 | echo '__dtb_$(*F)_end:'; \ |
257 | echo '.global __dtb_$(*F)_end'; \ | 259 | echo '.global __dtb_$(*F)_end'; \ |
258 | echo '.balign STRUCT_ALIGNMENT'; \ | 260 | echo '.balign STRUCT_ALIGNMENT'; \ |
259 | ) > $@ | 261 | ) > $@ |
260 | 262 | ||
261 | $(obj)/%.dtb.S: $(obj)/%.dtb | 263 | $(obj)/%.dtb.S: $(obj)/%.dtb |
262 | $(call cmd,dt_S_dtb) | 264 | $(call cmd,dt_S_dtb) |
263 | 265 | ||
264 | quiet_cmd_dtc = DTC $@ | 266 | quiet_cmd_dtc = DTC $@ |
265 | cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ | 267 | cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \ |
266 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ | 268 | $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \ |
267 | -i $(dir $<) $(DTC_FLAGS) \ | 269 | -i $(dir $<) $(DTC_FLAGS) \ |
268 | -d $(depfile).dtc.tmp $(dtc-tmp) ; \ | 270 | -d $(depfile).dtc.tmp $(dtc-tmp) ; \ |
269 | cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) | 271 | cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile) |
270 | 272 | ||
271 | $(obj)/%.dtb: $(src)/%.dts FORCE | 273 | $(obj)/%.dtb: $(src)/%.dts FORCE |
272 | $(call if_changed_dep,dtc) | 274 | $(call if_changed_dep,dtc) |
273 | 275 | ||
274 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) | 276 | dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp) |
275 | 277 | ||
276 | # Bzip2 | 278 | # Bzip2 |
277 | # --------------------------------------------------------------------------- | 279 | # --------------------------------------------------------------------------- |
278 | 280 | ||
279 | # Bzip2 and LZMA do not include size in file... so we have to fake that; | 281 | # Bzip2 and LZMA do not include size in file... so we have to fake that; |
280 | # append the size as a 32-bit littleendian number as gzip does. | 282 | # append the size as a 32-bit littleendian number as gzip does. |
281 | size_append = printf $(shell \ | 283 | size_append = printf $(shell \ |
282 | dec_size=0; \ | 284 | dec_size=0; \ |
283 | for F in $1; do \ | 285 | for F in $1; do \ |
284 | fsize=$$(stat -c "%s" $$F); \ | 286 | fsize=$$(stat -c "%s" $$F); \ |
285 | dec_size=$$(expr $$dec_size + $$fsize); \ | 287 | dec_size=$$(expr $$dec_size + $$fsize); \ |
286 | done; \ | 288 | done; \ |
287 | printf "%08x\n" $$dec_size | \ | 289 | printf "%08x\n" $$dec_size | \ |
288 | sed 's/\(..\)/\1 /g' | { \ | 290 | sed 's/\(..\)/\1 /g' | { \ |
289 | read ch0 ch1 ch2 ch3; \ | 291 | read ch0 ch1 ch2 ch3; \ |
290 | for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \ | 292 | for ch in $$ch3 $$ch2 $$ch1 $$ch0; do \ |
291 | printf '%s%03o' '\\' $$((0x$$ch)); \ | 293 | printf '%s%03o' '\\' $$((0x$$ch)); \ |
292 | done; \ | 294 | done; \ |
293 | } \ | 295 | } \ |
294 | ) | 296 | ) |
295 | 297 | ||
296 | quiet_cmd_bzip2 = BZIP2 $@ | 298 | quiet_cmd_bzip2 = BZIP2 $@ |
297 | cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ | 299 | cmd_bzip2 = (cat $(filter-out FORCE,$^) | \ |
298 | bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 300 | bzip2 -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
299 | (rm -f $@ ; false) | 301 | (rm -f $@ ; false) |
300 | 302 | ||
301 | # Lzma | 303 | # Lzma |
302 | # --------------------------------------------------------------------------- | 304 | # --------------------------------------------------------------------------- |
303 | 305 | ||
304 | quiet_cmd_lzma = LZMA $@ | 306 | quiet_cmd_lzma = LZMA $@ |
305 | cmd_lzma = (cat $(filter-out FORCE,$^) | \ | 307 | cmd_lzma = (cat $(filter-out FORCE,$^) | \ |
306 | lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 308 | lzma -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
307 | (rm -f $@ ; false) | 309 | (rm -f $@ ; false) |
308 | 310 | ||
309 | quiet_cmd_lzo = LZO $@ | 311 | quiet_cmd_lzo = LZO $@ |
310 | cmd_lzo = (cat $(filter-out FORCE,$^) | \ | 312 | cmd_lzo = (cat $(filter-out FORCE,$^) | \ |
311 | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 313 | lzop -9 && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
312 | (rm -f $@ ; false) | 314 | (rm -f $@ ; false) |
313 | 315 | ||
314 | quiet_cmd_lz4 = LZ4 $@ | 316 | quiet_cmd_lz4 = LZ4 $@ |
315 | cmd_lz4 = (cat $(filter-out FORCE,$^) | \ | 317 | cmd_lz4 = (cat $(filter-out FORCE,$^) | \ |
316 | lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 318 | lz4c -l -c1 stdin stdout && $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
317 | (rm -f $@ ; false) | 319 | (rm -f $@ ; false) |
318 | 320 | ||
319 | # U-Boot mkimage | 321 | # U-Boot mkimage |
320 | # --------------------------------------------------------------------------- | 322 | # --------------------------------------------------------------------------- |
321 | 323 | ||
322 | MKIMAGE := $(srctree)/scripts/mkuboot.sh | 324 | MKIMAGE := $(srctree)/scripts/mkuboot.sh |
323 | 325 | ||
324 | # SRCARCH just happens to match slightly more than ARCH (on sparc), so reduces | 326 | # SRCARCH just happens to match slightly more than ARCH (on sparc), so reduces |
325 | # the number of overrides in arch makefiles | 327 | # the number of overrides in arch makefiles |
326 | UIMAGE_ARCH ?= $(SRCARCH) | 328 | UIMAGE_ARCH ?= $(SRCARCH) |
327 | UIMAGE_COMPRESSION ?= $(if $(2),$(2),none) | 329 | UIMAGE_COMPRESSION ?= $(if $(2),$(2),none) |
328 | UIMAGE_OPTS-y ?= | 330 | UIMAGE_OPTS-y ?= |
329 | UIMAGE_TYPE ?= kernel | 331 | UIMAGE_TYPE ?= kernel |
330 | UIMAGE_LOADADDR ?= arch_must_set_this | 332 | UIMAGE_LOADADDR ?= arch_must_set_this |
331 | UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR) | 333 | UIMAGE_ENTRYADDR ?= $(UIMAGE_LOADADDR) |
332 | UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)' | 334 | UIMAGE_NAME ?= 'Linux-$(KERNELRELEASE)' |
333 | UIMAGE_IN ?= $< | 335 | UIMAGE_IN ?= $< |
334 | UIMAGE_OUT ?= $@ | 336 | UIMAGE_OUT ?= $@ |
335 | 337 | ||
336 | quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT) | 338 | quiet_cmd_uimage = UIMAGE $(UIMAGE_OUT) |
337 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \ | 339 | cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A $(UIMAGE_ARCH) -O linux \ |
338 | -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \ | 340 | -C $(UIMAGE_COMPRESSION) $(UIMAGE_OPTS-y) \ |
339 | -T $(UIMAGE_TYPE) \ | 341 | -T $(UIMAGE_TYPE) \ |
340 | -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \ | 342 | -a $(UIMAGE_LOADADDR) -e $(UIMAGE_ENTRYADDR) \ |
341 | -n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT) | 343 | -n $(UIMAGE_NAME) -d $(UIMAGE_IN) $(UIMAGE_OUT) |
342 | 344 | ||
343 | # XZ | 345 | # XZ |
344 | # --------------------------------------------------------------------------- | 346 | # --------------------------------------------------------------------------- |
345 | # Use xzkern to compress the kernel image and xzmisc to compress other things. | 347 | # Use xzkern to compress the kernel image and xzmisc to compress other things. |
346 | # | 348 | # |
347 | # xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage | 349 | # xzkern uses a big LZMA2 dictionary since it doesn't increase memory usage |
348 | # of the kernel decompressor. A BCJ filter is used if it is available for | 350 | # of the kernel decompressor. A BCJ filter is used if it is available for |
349 | # the target architecture. xzkern also appends uncompressed size of the data | 351 | # the target architecture. xzkern also appends uncompressed size of the data |
350 | # using size_append. The .xz format has the size information available at | 352 | # using size_append. The .xz format has the size information available at |
351 | # the end of the file too, but it's in more complex format and it's good to | 353 | # the end of the file too, but it's in more complex format and it's good to |
352 | # avoid changing the part of the boot code that reads the uncompressed size. | 354 | # avoid changing the part of the boot code that reads the uncompressed size. |
353 | # Note that the bytes added by size_append will make the xz tool think that | 355 | # Note that the bytes added by size_append will make the xz tool think that |
354 | # the file is corrupt. This is expected. | 356 | # the file is corrupt. This is expected. |
355 | # | 357 | # |
356 | # xzmisc doesn't use size_append, so it can be used to create normal .xz | 358 | # xzmisc doesn't use size_append, so it can be used to create normal .xz |
357 | # files. xzmisc uses smaller LZMA2 dictionary than xzkern, because a very | 359 | # files. xzmisc uses smaller LZMA2 dictionary than xzkern, because a very |
358 | # big dictionary would increase the memory usage too much in the multi-call | 360 | # big dictionary would increase the memory usage too much in the multi-call |
359 | # decompression mode. A BCJ filter isn't used either. | 361 | # decompression mode. A BCJ filter isn't used either. |
360 | quiet_cmd_xzkern = XZKERN $@ | 362 | quiet_cmd_xzkern = XZKERN $@ |
361 | cmd_xzkern = (cat $(filter-out FORCE,$^) | \ | 363 | cmd_xzkern = (cat $(filter-out FORCE,$^) | \ |
362 | sh $(srctree)/scripts/xz_wrap.sh && \ | 364 | sh $(srctree)/scripts/xz_wrap.sh && \ |
363 | $(call size_append, $(filter-out FORCE,$^))) > $@ || \ | 365 | $(call size_append, $(filter-out FORCE,$^))) > $@ || \ |
364 | (rm -f $@ ; false) | 366 | (rm -f $@ ; false) |
365 | 367 | ||
366 | quiet_cmd_xzmisc = XZMISC $@ | 368 | quiet_cmd_xzmisc = XZMISC $@ |
367 | cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ | 369 | cmd_xzmisc = (cat $(filter-out FORCE,$^) | \ |
368 | xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ | 370 | xz --check=crc32 --lzma2=dict=1MiB) > $@ || \ |
369 | (rm -f $@ ; false) | 371 | (rm -f $@ ; false) |
370 | 372 | ||
371 | # misc stuff | 373 | # misc stuff |
372 | # --------------------------------------------------------------------------- | 374 | # --------------------------------------------------------------------------- |
373 | quote:=" | 375 | quote:=" |
374 | 376 |
spl/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 | # (C) Copyright 2011 | 5 | # (C) Copyright 2011 |
6 | # Daniel Schwierzeck, daniel.schwierzeck@googlemail.com. | 6 | # Daniel Schwierzeck, daniel.schwierzeck@googlemail.com. |
7 | # | 7 | # |
8 | # (C) Copyright 2011 | 8 | # (C) Copyright 2011 |
9 | # Texas Instruments Incorporated - http://www.ti.com/ | 9 | # Texas Instruments Incorporated - http://www.ti.com/ |
10 | # Aneesh V <aneesh@ti.com> | 10 | # Aneesh V <aneesh@ti.com> |
11 | # | 11 | # |
12 | # SPDX-License-Identifier: GPL-2.0+ | 12 | # SPDX-License-Identifier: GPL-2.0+ |
13 | # | 13 | # |
14 | # Based on top-level Makefile. | 14 | # Based on top-level Makefile. |
15 | # | 15 | # |
16 | 16 | ||
17 | src := $(obj) | 17 | src := $(obj) |
18 | 18 | ||
19 | # Create output directory if not already present | 19 | # Create output directory if not already present |
20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) | 20 | _dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj)) |
21 | 21 | ||
22 | include $(srctree)/scripts/Kbuild.include | 22 | include $(srctree)/scripts/Kbuild.include |
23 | 23 | ||
24 | CONFIG_SPL_BUILD := y | 24 | CONFIG_SPL_BUILD := y |
25 | export CONFIG_SPL_BUILD | 25 | export CONFIG_SPL_BUILD |
26 | 26 | ||
27 | KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD | 27 | KBUILD_CPPFLAGS += -DCONFIG_SPL_BUILD |
28 | ifeq ($(CONFIG_TPL_BUILD),y) | 28 | ifeq ($(CONFIG_TPL_BUILD),y) |
29 | KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD | 29 | KBUILD_CPPFLAGS += -DCONFIG_TPL_BUILD |
30 | endif | 30 | endif |
31 | 31 | ||
32 | # Enable garbage collection of un-used sections for SPL | 32 | # Enable garbage collection of un-used sections for SPL |
33 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections | 33 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
34 | LDFLAGS_FINAL += --gc-sections | 34 | LDFLAGS_FINAL += --gc-sections |
35 | 35 | ||
36 | ifeq ($(CONFIG_TPL_BUILD),y) | 36 | ifeq ($(CONFIG_TPL_BUILD),y) |
37 | export CONFIG_TPL_BUILD | 37 | export CONFIG_TPL_BUILD |
38 | SPL_BIN := u-boot-tpl | 38 | SPL_BIN := u-boot-tpl |
39 | else | 39 | else |
40 | SPL_BIN := u-boot-spl | 40 | SPL_BIN := u-boot-spl |
41 | endif | 41 | endif |
42 | 42 | ||
43 | include $(TOPDIR)/config.mk | 43 | include $(TOPDIR)/config.mk |
44 | 44 | ||
45 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) | 45 | HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n) |
46 | 46 | ||
47 | ifdef CONFIG_SPL_START_S_PATH | 47 | ifdef CONFIG_SPL_START_S_PATH |
48 | START_PATH := $(CONFIG_SPL_START_S_PATH:"%"=%) | 48 | START_PATH := $(CONFIG_SPL_START_S_PATH:"%"=%) |
49 | else | 49 | else |
50 | START_PATH := $(CPUDIR) | 50 | START_PATH := $(CPUDIR) |
51 | endif | 51 | endif |
52 | 52 | ||
53 | head-y := $(START_PATH)/start.o | 53 | head-y := $(START_PATH)/start.o |
54 | head-$(CONFIG_X86) += $(START_PATH)/start16.o $(START_PATH)/resetvec.o | 54 | head-$(CONFIG_X86) += $(START_PATH)/start16.o $(START_PATH)/resetvec.o |
55 | head-$(CONFIG_4xx) += $(START_PATH)/resetvec.o | 55 | head-$(CONFIG_4xx) += $(START_PATH)/resetvec.o |
56 | head-$(CONFIG_MPC85xx) += $(START_PATH)/resetvec.o | 56 | head-$(CONFIG_MPC85xx) += $(START_PATH)/resetvec.o |
57 | 57 | ||
58 | LIBS-y += arch/$(ARCH)/lib/ | 58 | LIBS-y += arch/$(ARCH)/lib/ |
59 | 59 | ||
60 | LIBS-y += $(CPUDIR)/ | 60 | LIBS-y += $(CPUDIR)/ |
61 | 61 | ||
62 | ifdef SOC | 62 | ifdef SOC |
63 | LIBS-y += $(CPUDIR)/$(SOC)/ | 63 | LIBS-y += $(CPUDIR)/$(SOC)/ |
64 | endif | 64 | endif |
65 | LIBS-y += board/$(BOARDDIR)/ | 65 | LIBS-y += board/$(BOARDDIR)/ |
66 | LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ | 66 | LIBS-$(HAVE_VENDOR_COMMON_LIB) += board/$(VENDOR)/common/ |
67 | 67 | ||
68 | LIBS-$(CONFIG_SPL_FRAMEWORK) += common/spl/ | 68 | LIBS-$(CONFIG_SPL_FRAMEWORK) += common/spl/ |
69 | LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ | 69 | LIBS-$(CONFIG_SPL_LIBCOMMON_SUPPORT) += common/ |
70 | LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ | 70 | LIBS-$(CONFIG_SPL_LIBDISK_SUPPORT) += disk/ |
71 | LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/ | 71 | LIBS-$(CONFIG_SPL_I2C_SUPPORT) += drivers/i2c/ |
72 | LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/ | 72 | LIBS-$(CONFIG_SPL_GPIO_SUPPORT) += drivers/gpio/ |
73 | LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/ | 73 | LIBS-$(CONFIG_SPL_MMC_SUPPORT) += drivers/mmc/ |
74 | LIBS-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += drivers/ddr/fsl/ | 74 | LIBS-$(CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT) += drivers/ddr/fsl/ |
75 | LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/ | 75 | LIBS-$(CONFIG_SPL_SERIAL_SUPPORT) += drivers/serial/ |
76 | LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/ | 76 | LIBS-$(CONFIG_SPL_SPI_FLASH_SUPPORT) += drivers/mtd/spi/ |
77 | LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/ | 77 | LIBS-$(CONFIG_SPL_SPI_SUPPORT) += drivers/spi/ |
78 | LIBS-y += fs/ | 78 | LIBS-y += fs/ |
79 | LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ | 79 | LIBS-$(CONFIG_SPL_LIBGENERIC_SUPPORT) += lib/ |
80 | LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \ | 80 | LIBS-$(CONFIG_SPL_POWER_SUPPORT) += drivers/power/ \ |
81 | drivers/power/pmic/ | 81 | drivers/power/pmic/ |
82 | LIBS-$(if $(CONFIG_CMD_NAND),$(CONFIG_SPL_NAND_SUPPORT)) += drivers/mtd/nand/ | 82 | LIBS-$(if $(CONFIG_CMD_NAND),$(CONFIG_SPL_NAND_SUPPORT)) += drivers/mtd/nand/ |
83 | LIBS-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += drivers/misc/ | 83 | LIBS-$(CONFIG_SPL_DRIVERS_MISC_SUPPORT) += drivers/misc/ |
84 | LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/ | 84 | LIBS-$(CONFIG_SPL_ONENAND_SUPPORT) += drivers/mtd/onenand/ |
85 | LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/ | 85 | LIBS-$(CONFIG_SPL_DMA_SUPPORT) += drivers/dma/ |
86 | LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ | 86 | LIBS-$(CONFIG_SPL_POST_MEM_SUPPORT) += post/drivers/ |
87 | LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/ | 87 | LIBS-$(CONFIG_SPL_NET_SUPPORT) += net/ |
88 | LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/ | 88 | LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/ |
89 | LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/ | 89 | LIBS-$(CONFIG_SPL_ETH_SUPPORT) += drivers/net/phy/ |
90 | LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/ | 90 | LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/net/phy/ |
91 | LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/ | 91 | LIBS-$(CONFIG_SPL_MUSB_NEW_SUPPORT) += drivers/usb/musb-new/ |
92 | LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/ | 92 | LIBS-$(CONFIG_SPL_USBETH_SUPPORT) += drivers/usb/gadget/ |
93 | LIBS-$(CONFIG_SPL_WATCHDOG_SUPPORT) += drivers/watchdog/ | 93 | LIBS-$(CONFIG_SPL_WATCHDOG_SUPPORT) += drivers/watchdog/ |
94 | LIBS-$(CONFIG_SPL_USB_HOST_SUPPORT) += drivers/usb/host/ | 94 | LIBS-$(CONFIG_SPL_USB_HOST_SUPPORT) += drivers/usb/host/ |
95 | LIBS-$(CONFIG_OMAP_USB_PHY) += drivers/usb/phy/ | 95 | LIBS-$(CONFIG_OMAP_USB_PHY) += drivers/usb/phy/ |
96 | LIBS-$(CONFIG_SPL_SATA_SUPPORT) += drivers/block/ | 96 | LIBS-$(CONFIG_SPL_SATA_SUPPORT) += drivers/block/ |
97 | 97 | ||
98 | ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) | 98 | ifneq (,$(CONFIG_MX23)$(CONFIG_MX35)$(filter $(SOC), mx25 mx27 mx5 mx6 mx31 mx35)) |
99 | LIBS-y += arch/$(ARCH)/imx-common/ | 99 | LIBS-y += arch/$(ARCH)/imx-common/ |
100 | endif | 100 | endif |
101 | 101 | ||
102 | LIBS-$(CONFIG_ARM) += arch/arm/cpu/ | 102 | LIBS-$(CONFIG_ARM) += arch/arm/cpu/ |
103 | LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/ | 103 | LIBS-$(CONFIG_PPC) += arch/powerpc/cpu/ |
104 | 104 | ||
105 | LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) | 105 | LIBS-y := $(patsubst %/, %/built-in.o, $(LIBS-y)) |
106 | 106 | ||
107 | # Add GCC lib | 107 | # Add GCC lib |
108 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") | 108 | ifeq ("$(USE_PRIVATE_LIBGCC)", "yes") |
109 | PLATFORM_LIBGCC = $(SPLTREE)/arch/$(ARCH)/lib/libgcc.o | 109 | PLATFORM_LIBS := $(SPLTREE)/arch/$(ARCH)/lib/lib.a |
110 | PLATFORM_LIBS := $(filter-out %/libgcc.o, $(filter-out -lgcc, $(PLATFORM_LIBS))) $(PLATFORM_LIBGCC) | ||
111 | endif | 110 | endif |
112 | 111 | ||
113 | LIBS-y := $(sort $(LIBS-y)) | 112 | LIBS-y := $(sort $(LIBS-y)) |
114 | 113 | ||
115 | __START := $(head-y) | 114 | __START := $(head-y) |
116 | __LIBS := $(LIBS-y) | 115 | __LIBS := $(LIBS-y) |
117 | 116 | ||
118 | START := $(addprefix $(obj)/,$(head-y)) | 117 | START := $(addprefix $(obj)/,$(head-y)) |
119 | LIBS := $(addprefix $(obj)/,$(LIBS-y)) | 118 | LIBS := $(addprefix $(obj)/,$(LIBS-y)) |
120 | 119 | ||
121 | # Linker Script | 120 | # Linker Script |
122 | ifdef CONFIG_SPL_LDSCRIPT | 121 | ifdef CONFIG_SPL_LDSCRIPT |
123 | # need to strip off double quotes | 122 | # need to strip off double quotes |
124 | LDSCRIPT := $(addprefix $(SRCTREE)/,$(CONFIG_SPL_LDSCRIPT:"%"=%)) | 123 | LDSCRIPT := $(addprefix $(SRCTREE)/,$(CONFIG_SPL_LDSCRIPT:"%"=%)) |
125 | endif | 124 | endif |
126 | 125 | ||
127 | ifeq ($(wildcard $(LDSCRIPT)),) | 126 | ifeq ($(wildcard $(LDSCRIPT)),) |
128 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-spl.lds | 127 | LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-spl.lds |
129 | endif | 128 | endif |
130 | ifeq ($(wildcard $(LDSCRIPT)),) | 129 | ifeq ($(wildcard $(LDSCRIPT)),) |
131 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds | 130 | LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds |
132 | endif | 131 | endif |
133 | ifeq ($(wildcard $(LDSCRIPT)),) | 132 | ifeq ($(wildcard $(LDSCRIPT)),) |
134 | LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot-spl.lds | 133 | LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot-spl.lds |
135 | endif | 134 | endif |
136 | ifeq ($(wildcard $(LDSCRIPT)),) | 135 | ifeq ($(wildcard $(LDSCRIPT)),) |
137 | $(error could not find linker script) | 136 | $(error could not find linker script) |
138 | endif | 137 | endif |
139 | 138 | ||
140 | # Special flags for CPP when processing the linker script. | 139 | # Special flags for CPP when processing the linker script. |
141 | # Pass the version down so we can handle backwards compatibility | 140 | # Pass the version down so we can handle backwards compatibility |
142 | # on the fly. | 141 | # on the fly. |
143 | LDPPFLAGS += \ | 142 | LDPPFLAGS += \ |
144 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ | 143 | -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ |
145 | -include $(OBJTREE)/include/config.h \ | 144 | -include $(OBJTREE)/include/config.h \ |
146 | -DCPUDIR=$(CPUDIR) \ | 145 | -DCPUDIR=$(CPUDIR) \ |
147 | $(shell $(LD) --version | \ | 146 | $(shell $(LD) --version | \ |
148 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') | 147 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
149 | 148 | ||
150 | $(OBJTREE)/MLO: $(obj)/u-boot-spl.bin | 149 | $(OBJTREE)/MLO: $(obj)/u-boot-spl.bin |
151 | $(OBJTREE)/tools/mkimage -T omapimage \ | 150 | $(OBJTREE)/tools/mkimage -T omapimage \ |
152 | -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ | 151 | -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ |
153 | 152 | ||
154 | $(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin | 153 | $(OBJTREE)/MLO.byteswap: $(obj)/u-boot-spl.bin |
155 | $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ | 154 | $(OBJTREE)/tools/mkimage -T omapimage -n byteswap \ |
156 | -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ | 155 | -a $(CONFIG_SPL_TEXT_BASE) -d $< $@ |
157 | 156 | ||
158 | $(objtree)/SPL : $(obj)/u-boot-spl.bin depend | 157 | $(objtree)/SPL : $(obj)/u-boot-spl.bin |
159 | $(MAKE) $(build)=spl/arch/arm/imx-common $@ | 158 | $(MAKE) $(build)=spl/arch/arm/imx-common $@ |
160 | 159 | ||
161 | ALL-y += $(obj)/$(SPL_BIN).bin | 160 | ALL-y += $(obj)/$(SPL_BIN).bin |
162 | 161 | ||
163 | ifdef CONFIG_SAMSUNG | 162 | ifdef CONFIG_SAMSUNG |
164 | ALL-y += $(obj)/$(BOARD)-spl.bin | 163 | ALL-y += $(obj)/$(BOARD)-spl.bin |
165 | endif | 164 | endif |
166 | 165 | ||
167 | all: $(ALL-y) | 166 | all: $(ALL-y) |
168 | 167 | ||
169 | ifdef CONFIG_SAMSUNG | 168 | ifdef CONFIG_SAMSUNG |
170 | ifdef CONFIG_VAR_SIZE_SPL | 169 | ifdef CONFIG_VAR_SIZE_SPL |
171 | VAR_SIZE_PARAM = --vs | 170 | VAR_SIZE_PARAM = --vs |
172 | else | 171 | else |
173 | VAR_SIZE_PARAM = | 172 | VAR_SIZE_PARAM = |
174 | endif | 173 | endif |
175 | $(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin | 174 | $(obj)/$(BOARD)-spl.bin: $(obj)/u-boot-spl.bin |
176 | $(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ | 175 | $(if $(wildcard $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl),\ |
177 | $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ | 176 | $(OBJTREE)/spl/board/samsung/$(BOARD)/tools/mk$(BOARD)spl,\ |
178 | $(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ | 177 | $(OBJTREE)/tools/mkexynosspl) $(VAR_SIZE_PARAM) $< $@ |
179 | endif | 178 | endif |
180 | 179 | ||
181 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) | 180 | $(obj)/$(SPL_BIN).bin: $(obj)/$(SPL_BIN) |
182 | $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $< $@ | 181 | $(OBJCOPY) $(OBJCFLAGS) $(SPL_OBJCFLAGS) -O binary $< $@ |
183 | 182 | ||
184 | LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) | 183 | LDFLAGS_$(SPL_BIN) += -T u-boot-spl.lds $(LDFLAGS_FINAL) |
185 | ifneq ($(CONFIG_SPL_TEXT_BASE),) | 184 | ifneq ($(CONFIG_SPL_TEXT_BASE),) |
186 | LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) | 185 | LDFLAGS_$(SPL_BIN) += -Ttext $(CONFIG_SPL_TEXT_BASE) |
187 | endif | 186 | endif |
188 | 187 | ||
189 | GEN_UBOOT = \ | 188 | GEN_UBOOT = \ |
190 | cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \ | 189 | cd $(obj) && $(LD) $(LDFLAGS) $(LDFLAGS_$(@F)) $(__START) \ |
191 | --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ | 190 | --start-group $(__LIBS) --end-group $(PLATFORM_LIBS) \ |
192 | -Map $(SPL_BIN).map -o $(SPL_BIN) | 191 | -Map $(SPL_BIN).map -o $(SPL_BIN) |
193 | 192 | ||
194 | $(obj)/$(SPL_BIN): depend $(START) $(LIBS) $(obj)/u-boot-spl.lds | 193 | $(obj)/$(SPL_BIN): $(START) $(LIBS) $(obj)/u-boot-spl.lds |
195 | $(GEN_UBOOT) | 194 | $(GEN_UBOOT) |
196 | 195 | ||
197 | $(START): | 196 | $(START): |
198 | @: | 197 | @: |
199 | 198 | ||
200 | $(LIBS): depend | 199 | $(LIBS): |
201 | $(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) | 200 | $(Q)$(MAKE) $(build)=$(patsubst %/,%,$(dir $@)) |
202 | 201 | ||
203 | $(obj)/u-boot-spl.lds: $(LDSCRIPT) depend | 202 | # FIX ME |
204 | $(CPP) $(CPPFLAGS) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ | 203 | cpp_flags := $(KBUILD_CPPFLAGS) $(CPPFLAGS) $(UBOOTINCLUDE) $(NOSTDINC_FLAGS) |
205 | 204 | ||
206 | depend: $(obj)/.depend | 205 | $(obj)/u-boot-spl.lds: $(LDSCRIPT) FORCE |
207 | .PHONY: depend | 206 | $(CPP) $(cpp_flags) $(LDPPFLAGS) -I$(obj). -ansi -D__ASSEMBLY__ -P - < $< > $@ |
208 | 207 | ||
209 | # defines $(obj).depend target | 208 | PHONY += FORCE |
210 | include $(SRCTREE)/rules.mk | 209 | FORCE: |
210 | |||
211 | # Declare the contents of the .PHONY variable as phony. We keep that | ||
212 | # information in a variable so we can use it in if_changed and friends. | ||
213 | .PHONY: $(PHONY) |
tools/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 | # SPDX-License-Identifier: GPL-2.0+ | 5 | # SPDX-License-Identifier: GPL-2.0+ |
6 | # | 6 | # |
7 | 7 | ||
8 | # | 8 | # |
9 | # toolchains targeting win32 generate .exe files | 9 | # toolchains targeting win32 generate .exe files |
10 | # | 10 | # |
11 | ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) | 11 | ifneq (,$(findstring WIN32 ,$(shell $(HOSTCC) -E -dM -xc /dev/null))) |
12 | SFX = .exe | 12 | SFX = .exe |
13 | else | 13 | else |
14 | SFX = | 14 | SFX = |
15 | endif | 15 | endif |
16 | 16 | ||
17 | # Enable all the config-independent tools | 17 | # Enable all the config-independent tools |
18 | ifneq ($(HOST_TOOLS_ALL),) | 18 | ifneq ($(HOST_TOOLS_ALL),) |
19 | CONFIG_LCD_LOGO = y | 19 | CONFIG_LCD_LOGO = y |
20 | CONFIG_CMD_LOADS = y | 20 | CONFIG_CMD_LOADS = y |
21 | CONFIG_CMD_NET = y | 21 | CONFIG_CMD_NET = y |
22 | CONFIG_XWAY_SWAP_BYTES = y | 22 | CONFIG_XWAY_SWAP_BYTES = y |
23 | CONFIG_NETCONSOLE = y | 23 | CONFIG_NETCONSOLE = y |
24 | CONFIG_SHA1_CHECK_UB_IMG = y | 24 | CONFIG_SHA1_CHECK_UB_IMG = y |
25 | endif | 25 | endif |
26 | 26 | ||
27 | # Merge all the different vars for envcrc into one | 27 | # Merge all the different vars for envcrc into one |
28 | ENVCRC-$(CONFIG_ENV_IS_EMBEDDED) = y | 28 | ENVCRC-$(CONFIG_ENV_IS_EMBEDDED) = y |
29 | ENVCRC-$(CONFIG_ENV_IS_IN_DATAFLASH) = y | 29 | ENVCRC-$(CONFIG_ENV_IS_IN_DATAFLASH) = y |
30 | ENVCRC-$(CONFIG_ENV_IS_IN_EEPROM) = y | 30 | ENVCRC-$(CONFIG_ENV_IS_IN_EEPROM) = y |
31 | ENVCRC-$(CONFIG_ENV_IS_IN_FLASH) = y | 31 | ENVCRC-$(CONFIG_ENV_IS_IN_FLASH) = y |
32 | ENVCRC-$(CONFIG_ENV_IS_IN_ONENAND) = y | 32 | ENVCRC-$(CONFIG_ENV_IS_IN_ONENAND) = y |
33 | ENVCRC-$(CONFIG_ENV_IS_IN_NAND) = y | 33 | ENVCRC-$(CONFIG_ENV_IS_IN_NAND) = y |
34 | ENVCRC-$(CONFIG_ENV_IS_IN_NVRAM) = y | 34 | ENVCRC-$(CONFIG_ENV_IS_IN_NVRAM) = y |
35 | ENVCRC-$(CONFIG_ENV_IS_IN_SPI_FLASH) = y | 35 | ENVCRC-$(CONFIG_ENV_IS_IN_SPI_FLASH) = y |
36 | CONFIG_BUILD_ENVCRC ?= $(ENVCRC-y) | 36 | CONFIG_BUILD_ENVCRC ?= $(ENVCRC-y) |
37 | 37 | ||
38 | # TODO: CONFIG_CMD_LICENSE does not work | 38 | # TODO: CONFIG_CMD_LICENSE does not work |
39 | hostprogs-$(CONFIG_CMD_LICENSE) += bin2header$(SFX) | 39 | hostprogs-$(CONFIG_CMD_LICENSE) += bin2header$(SFX) |
40 | 40 | ||
41 | hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX) | 41 | hostprogs-$(CONFIG_LCD_LOGO) += bmp_logo$(SFX) |
42 | hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) | 42 | hostprogs-$(CONFIG_VIDEO_LOGO) += bmp_logo$(SFX) |
43 | HOSTCFLAGS_bmp_logo$(SFX) := -pedantic | 43 | HOSTCFLAGS_bmp_logo$(SFX).o := -pedantic |
44 | 44 | ||
45 | hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX) | 45 | hostprogs-$(CONFIG_BUILD_ENVCRC) += envcrc$(SFX) |
46 | envcrc$(SFX)-objs := crc32.o env_embedded.o envcrc.o sha1.o | 46 | envcrc$(SFX)-objs := crc32.o env_embedded.o envcrc.o sha1.o |
47 | 47 | ||
48 | hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX) | 48 | hostprogs-$(CONFIG_CMD_NET) += gen_eth_addr$(SFX) |
49 | HOSTCFLAGS_gen_eth_addr$(SFX) := -pedantic | 49 | HOSTCFLAGS_gen_eth_addr$(SFX).o := -pedantic |
50 | 50 | ||
51 | hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX) | 51 | hostprogs-$(CONFIG_CMD_LOADS) += img2srec$(SFX) |
52 | HOSTCFLAGS_img2srec$(SFX) := -pedantic | 52 | HOSTCFLAGS_img2srec$(SFX).o := -pedantic |
53 | 53 | ||
54 | hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) | 54 | hostprogs-$(CONFIG_XWAY_SWAP_BYTES) += xway-swap-bytes$(SFX) |
55 | HOSTCFLAGS_xway-swap-bytes$(SFX) := -pedantic | 55 | HOSTCFLAGS_xway-swap-bytes$(SFX).o := -pedantic |
56 | 56 | ||
57 | hostprogs-y += mkenvimage$(SFX) | 57 | hostprogs-y += mkenvimage$(SFX) |
58 | mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o | 58 | mkenvimage$(SFX)-objs := crc32.o mkenvimage.o os_support.o |
59 | 59 | ||
60 | hostprogs-y += dumpimage$(SFX) mkimage$(SFX) | 60 | hostprogs-y += dumpimage$(SFX) mkimage$(SFX) |
61 | 61 | ||
62 | FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := image-sig.o | 62 | FIT_SIG_OBJS-$(CONFIG_FIT_SIGNATURE) := image-sig.o |
63 | # Flattened device tree objects | 63 | # Flattened device tree objects |
64 | LIBFDT_OBJS := fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o | 64 | LIBFDT_OBJS := fdt.o fdt_ro.o fdt_rw.o fdt_strerror.o fdt_wip.o |
65 | RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := rsa-sign.o | 65 | RSA_OBJS-$(CONFIG_FIT_SIGNATURE) := rsa-sign.o |
66 | 66 | ||
67 | # common objs for dumpimage and mkimage | 67 | # common objs for dumpimage and mkimage |
68 | dumpimage-mkimage-objs := aisimage.o \ | 68 | dumpimage-mkimage-objs := aisimage.o \ |
69 | $(FIT_SIG_OBJS-y) \ | 69 | $(FIT_SIG_OBJS-y) \ |
70 | crc32.o \ | 70 | crc32.o \ |
71 | default_image.o \ | 71 | default_image.o \ |
72 | fit_image.o \ | 72 | fit_image.o \ |
73 | image-fit.o \ | 73 | image-fit.o \ |
74 | image-host.o \ | 74 | image-host.o \ |
75 | image.o \ | 75 | image.o \ |
76 | imagetool.o \ | 76 | imagetool.o \ |
77 | imximage.o \ | 77 | imximage.o \ |
78 | kwbimage.o \ | 78 | kwbimage.o \ |
79 | md5.o \ | 79 | md5.o \ |
80 | mxsimage.o \ | 80 | mxsimage.o \ |
81 | omapimage.o \ | 81 | omapimage.o \ |
82 | os_support.o \ | 82 | os_support.o \ |
83 | pblimage.o \ | 83 | pblimage.o \ |
84 | sha1.o \ | 84 | sha1.o \ |
85 | ublimage.o \ | 85 | ublimage.o \ |
86 | $(LIBFDT_OBJS) \ | 86 | $(LIBFDT_OBJS) \ |
87 | $(RSA_OBJS-y) | 87 | $(RSA_OBJS-y) |
88 | 88 | ||
89 | dumpimage$(SFX)-objs := $(dumpimage-mkimage-objs) dumpimage.o | 89 | dumpimage$(SFX)-objs := $(dumpimage-mkimage-objs) dumpimage.o |
90 | mkimage$(SFX)-objs := $(dumpimage-mkimage-objs) mkimage.o | 90 | mkimage$(SFX)-objs := $(dumpimage-mkimage-objs) mkimage.o |
91 | 91 | ||
92 | # TODO(sjg@chromium.org): Is this correct on Mac OS? | 92 | # TODO(sjg@chromium.org): Is this correct on Mac OS? |
93 | 93 | ||
94 | # MXSImage needs LibSSL | 94 | # MXSImage needs LibSSL |
95 | ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) | 95 | ifneq ($(CONFIG_MX23)$(CONFIG_MX28),) |
96 | HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto | 96 | HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto |
97 | HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto | 97 | HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto |
98 | # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register | 98 | # Add CONFIG_MXS into host CFLAGS, so we can check whether or not register |
99 | # the mxsimage support within tools/mxsimage.c . | 99 | # the mxsimage support within tools/mxsimage.c . |
100 | HOSTCFLAGS += -DCONFIG_MXS | 100 | HOSTCFLAGS_mxsimage.o += -DCONFIG_MXS |
101 | endif | 101 | endif |
102 | 102 | ||
103 | ifdef CONFIG_FIT_SIGNATURE | 103 | ifdef CONFIG_FIT_SIGNATURE |
104 | HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto | 104 | HOSTLOADLIBES_dumpimage$(SFX) := -lssl -lcrypto |
105 | HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto | 105 | HOSTLOADLIBES_mkimage$(SFX) := -lssl -lcrypto |
106 | 106 | ||
107 | # This affects include/image.h, but including the board config file | 107 | # This affects include/image.h, but including the board config file |
108 | # is tricky, so manually define this options here. | 108 | # is tricky, so manually define this options here. |
109 | HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE | 109 | HOST_EXTRACFLAGS += -DCONFIG_FIT_SIGNATURE |
110 | endif | 110 | endif |
111 | 111 | ||
112 | hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX) | 112 | hostprogs-$(CONFIG_EXYNOS5250) += mkexynosspl$(SFX) |
113 | hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX) | 113 | hostprogs-$(CONFIG_EXYNOS5420) += mkexynosspl$(SFX) |
114 | HOSTCFLAGS_mkexynosspl$(SFX) := -pedantic | 114 | HOSTCFLAGS_mkexynosspl$(SFX).o := -pedantic |
115 | 115 | ||
116 | hostprogs-$(CONFIG_MX23) += mxsboot$(SFX) | 116 | hostprogs-$(CONFIG_MX23) += mxsboot$(SFX) |
117 | hostprogs-$(CONFIG_MX28) += mxsboot$(SFX) | 117 | hostprogs-$(CONFIG_MX28) += mxsboot$(SFX) |
118 | HOSTCFLAGS_mxsboot$(SFX) := -pedantic | 118 | HOSTCFLAGS_mxsboot$(SFX).o := -pedantic |
119 | 119 | ||
120 | hostprogs-$(CONFIG_NETCONSOLE) += ncb$(SFX) | 120 | hostprogs-$(CONFIG_NETCONSOLE) += ncb$(SFX) |
121 | hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) | 121 | hostprogs-$(CONFIG_SHA1_CHECK_UB_IMG) += ubsha1$(SFX) |
122 | 122 | ||
123 | ubsha1$(SFX)-objs := os_support.o sha1.o ubsha1.o | 123 | ubsha1$(SFX)-objs := os_support.o sha1.o ubsha1.o |
124 | 124 | ||
125 | HOSTCFLAGS_ubsha1.o := -pedantic | 125 | HOSTCFLAGS_ubsha1.o := -pedantic |
126 | 126 | ||
127 | hostprogs-$(CONFIG_KIRKWOOD) += kwboot$(SFX) | 127 | hostprogs-$(CONFIG_KIRKWOOD) += kwboot$(SFX) |
128 | hostprogs-y += proftool$(SFX) | 128 | hostprogs-y += proftool$(SFX) |
129 | hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela$(SFX) | 129 | hostprogs-$(CONFIG_STATIC_RELA) += relocate-rela$(SFX) |
130 | 130 | ||
131 | # We build some files with extra pedantic flags to try to minimize things | 131 | # We build some files with extra pedantic flags to try to minimize things |
132 | # that won't build on some weird host compiler -- though there are lots of | 132 | # that won't build on some weird host compiler -- though there are lots of |
133 | # exceptions for files that aren't complaint. | 133 | # exceptions for files that aren't complaint. |
134 | HOSTCFLAGS_crc32.o := -pedantic | 134 | HOSTCFLAGS_crc32.o := -pedantic |
135 | HOSTCFLAGS_md5.o := -pedantic | 135 | HOSTCFLAGS_md5.o := -pedantic |
136 | HOSTCFLAGS_sha1.o := -pedantic | 136 | HOSTCFLAGS_sha1.o := -pedantic |
137 | 137 | ||
138 | # Don't build by default | 138 | # Don't build by default |
139 | #hostprogs-$(CONFIG_PPC) += mpc86x_clk$(SFX) | 139 | #hostprogs-$(CONFIG_PPC) += mpc86x_clk$(SFX) |
140 | #HOSTCFLAGS_mpc86x_clk$(SFX) := -pedantic | 140 | #HOSTCFLAGS_mpc86x_clk$(SFX).o := -pedantic |
141 | 141 | ||
142 | always := $(hostprogs-y) | 142 | always := $(hostprogs-y) |
143 | 143 | ||
144 | # Generated LCD/video logo | 144 | # Generated LCD/video logo |
145 | LOGO_H = $(objtree)/include/bmp_logo.h | 145 | LOGO_H = $(objtree)/include/bmp_logo.h |
146 | LOGO_DATA_H = $(objtree)/include/bmp_logo_data.h | 146 | LOGO_DATA_H = $(objtree)/include/bmp_logo_data.h |
147 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H) | 147 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_H) |
148 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_DATA_H) | 148 | LOGO-$(CONFIG_LCD_LOGO) += $(LOGO_DATA_H) |
149 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H) | 149 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_H) |
150 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_DATA_H) | 150 | LOGO-$(CONFIG_VIDEO_LOGO) += $(LOGO_DATA_H) |
151 | 151 | ||
152 | # Generic logo | 152 | # Generic logo |
153 | ifeq ($(LOGO_BMP),) | 153 | ifeq ($(LOGO_BMP),) |
154 | LOGO_BMP= $(srctree)/$(src)/logos/denx.bmp | 154 | LOGO_BMP= $(srctree)/$(src)/logos/denx.bmp |
155 | 155 | ||
156 | # Use board logo and fallback to vendor | 156 | # Use board logo and fallback to vendor |
157 | ifneq ($(wildcard logos/$(BOARD).bmp),) | 157 | ifneq ($(wildcard logos/$(BOARD).bmp),) |
158 | LOGO_BMP= $(srctree)/$(src)/logos/$(BOARD).bmp | 158 | LOGO_BMP= $(srctree)/$(src)/logos/$(BOARD).bmp |
159 | else | 159 | else |
160 | ifneq ($(wildcard logos/$(VENDOR).bmp),) | 160 | ifneq ($(wildcard logos/$(VENDOR).bmp),) |
161 | LOGO_BMP= $(srctree)/$(src)/logos/$(VENDOR).bmp | 161 | LOGO_BMP= $(srctree)/$(src)/logos/$(VENDOR).bmp |
162 | endif | 162 | endif |
163 | endif | 163 | endif |
164 | 164 | ||
165 | endif # !LOGO_BMP | 165 | endif # !LOGO_BMP |
166 | 166 | ||
167 | # now $(obj) is defined | ||
168 | HOSTSRCS += $(addprefix $(SRCTREE)/,$(EXT_OBJ_FILES-y:.o=.c)) | ||
169 | HOSTSRCS += $(addprefix $(SRCTREE)/tools/,$(OBJ_FILES-y:.o=.c)) | ||
170 | HOSTSRCS += $(addprefix $(SRCTREE)/lib/libfdt/,$(LIBFDT_OBJ_FILES-y:.o=.c)) | ||
171 | |||
172 | # | 167 | # |
173 | # Use native tools and options | 168 | # Use native tools and options |
174 | # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps | 169 | # Define __KERNEL_STRICT_NAMES to prevent typedef overlaps |
175 | # Define _GNU_SOURCE to obtain the getline prototype from stdio.h | 170 | # Define _GNU_SOURCE to obtain the getline prototype from stdio.h |
176 | # | 171 | # |
177 | HOST_EXTRACFLAGS += -include $(SRCTREE)/include/libfdt_env.h \ | 172 | HOST_EXTRACFLAGS += -include $(SRCTREE)/include/libfdt_env.h \ |
178 | $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ | 173 | $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \ |
179 | -I$(SRCTREE)/lib/libfdt \ | 174 | -I$(SRCTREE)/lib/libfdt \ |
180 | -I$(SRCTREE)/tools \ | 175 | -I$(SRCTREE)/tools \ |
181 | -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \ | 176 | -DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \ |
182 | -DUSE_HOSTCC \ | 177 | -DUSE_HOSTCC \ |
183 | -D__KERNEL_STRICT_NAMES \ | 178 | -D__KERNEL_STRICT_NAMES \ |
184 | -D_GNU_SOURCE | 179 | -D_GNU_SOURCE |
185 | 180 | ||
186 | all: $(LOGO-y) | 181 | __build: $(LOGO-y) |
187 | 182 | ||
188 | subdir-y := kernel-doc | 183 | subdir-y := kernel-doc |
189 | 184 | ||
190 | $(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP) | 185 | $(LOGO_H): $(obj)/bmp_logo $(LOGO_BMP) |
191 | $(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@ | 186 | $(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@ |
192 | 187 | ||
193 | $(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP) | 188 | $(LOGO_DATA_H): $(obj)/bmp_logo $(LOGO_BMP) |
194 | $(obj)/bmp_logo --gen-data $(LOGO_BMP) > $@ | 189 | $(obj)/bmp_logo --gen-data $(LOGO_BMP) > $@ |
195 | 190 |