Commit 4379ac614809da2128f8bc1f62e3dde4daaf7deb
Committed by
Tom Rini
1 parent
f5c66bdb18
Exists in
v2017.01-smarct4x
and in
48 other branches
kbuild: rename TOPDIR to stctree
Prior to Kbuild, $(TOPDIR) or $(SRCTREE) was used for pointing to the top of source directory. (No difference between the two.) In Kbuild style, $(srctree) is used instead. This commit renames TOPDIR to srctree and delete the defition of TOPDIR. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Showing 19 changed files with 41 additions and 42 deletions Side-by-side Diff
- Makefile
- arch/m68k/cpu/mcf52x2/config.mk
- arch/m68k/cpu/mcf532x/config.mk
- arch/m68k/cpu/mcf5445x/config.mk
- arch/powerpc/cpu/ppc4xx/config.mk
- board/hymod/config.mk
- board/korat/config.mk
- config.mk
- doc/README.SPL
- doc/README.TPL
- doc/README.commands
- 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
- spl/Makefile
Makefile
... | ... | @@ -169,8 +169,7 @@ |
169 | 169 | SPLTREE := $(OBJTREE)/spl |
170 | 170 | TPLTREE := $(OBJTREE)/tpl |
171 | 171 | SRCTREE := $(srctree) |
172 | -TOPDIR := $(SRCTREE) | |
173 | -export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE | |
172 | +export SRCTREE OBJTREE SPLTREE TPLTREE | |
174 | 173 | |
175 | 174 | MKCONFIG := $(SRCTREE)/mkconfig |
176 | 175 | export MKCONFIG |
... | ... | @@ -490,7 +489,7 @@ |
490 | 489 | # standard location. |
491 | 490 | |
492 | 491 | ifndef LDSCRIPT |
493 | - #LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug | |
492 | + #LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug | |
494 | 493 | ifdef CONFIG_SYS_LDSCRIPT |
495 | 494 | # need to strip off double quotes |
496 | 495 | LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%) |
497 | 496 | |
498 | 497 | |
499 | 498 | |
500 | 499 | |
... | ... | @@ -500,19 +499,19 @@ |
500 | 499 | # If there is no specified link script, we look in a number of places for it |
501 | 500 | ifndef LDSCRIPT |
502 | 501 | ifeq ($(CONFIG_NAND_U_BOOT),y) |
503 | - LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds | |
502 | + LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-nand.lds | |
504 | 503 | ifeq ($(wildcard $(LDSCRIPT)),) |
505 | - LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds | |
504 | + LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-nand.lds | |
506 | 505 | endif |
507 | 506 | endif |
508 | 507 | ifeq ($(wildcard $(LDSCRIPT)),) |
509 | - LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds | |
508 | + LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds | |
510 | 509 | endif |
511 | 510 | ifeq ($(wildcard $(LDSCRIPT)),) |
512 | - LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds | |
511 | + LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds | |
513 | 512 | endif |
514 | 513 | ifeq ($(wildcard $(LDSCRIPT)),) |
515 | - LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds | |
514 | + LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds | |
516 | 515 | endif |
517 | 516 | endif |
518 | 517 | |
... | ... | @@ -666,7 +665,7 @@ |
666 | 665 | # Pass the version down so we can handle backwards compatibility |
667 | 666 | # on the fly. |
668 | 667 | LDPPFLAGS += \ |
669 | - -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ | |
668 | + -include $(srctree)/include/u-boot/u-boot.lds.h \ | |
670 | 669 | -DCPUDIR=$(CPUDIR) \ |
671 | 670 | $(shell $(LD) --version | \ |
672 | 671 | sed -ne 's/GNU ld version \([0-9][0-9]*\)\.\([0-9][0-9]*\).*/-DLD_MAJOR=\1 -DLD_MINOR=\2/p') |
... | ... | @@ -1240,7 +1239,7 @@ |
1240 | 1239 | -type f -print | xargs rm -f |
1241 | 1240 | |
1242 | 1241 | backup: |
1243 | - F=`basename $(TOPDIR)` ; cd .. ; \ | |
1242 | + F=`basename $(srctree)` ; cd .. ; \ | |
1244 | 1243 | gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F |
1245 | 1244 | |
1246 | 1245 | help: |
arch/m68k/cpu/mcf52x2/config.mk
... | ... | @@ -8,13 +8,13 @@ |
8 | 8 | # |
9 | 9 | |
10 | 10 | cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/') |
11 | -is5208:=$(shell grep CONFIG_M5208 $(TOPDIR)/include/$(cfg)) | |
12 | -is5249:=$(shell grep CONFIG_M5249 $(TOPDIR)/include/$(cfg)) | |
13 | -is5253:=$(shell grep CONFIG_M5253 $(TOPDIR)/include/$(cfg)) | |
14 | -is5271:=$(shell grep CONFIG_M5271 $(TOPDIR)/include/$(cfg)) | |
15 | -is5272:=$(shell grep CONFIG_M5272 $(TOPDIR)/include/$(cfg)) | |
16 | -is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg)) | |
17 | -is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg)) | |
11 | +is5208:=$(shell grep CONFIG_M5208 $(srctree)/include/$(cfg)) | |
12 | +is5249:=$(shell grep CONFIG_M5249 $(srctree)/include/$(cfg)) | |
13 | +is5253:=$(shell grep CONFIG_M5253 $(srctree)/include/$(cfg)) | |
14 | +is5271:=$(shell grep CONFIG_M5271 $(srctree)/include/$(cfg)) | |
15 | +is5272:=$(shell grep CONFIG_M5272 $(srctree)/include/$(cfg)) | |
16 | +is5275:=$(shell grep CONFIG_M5275 $(srctree)/include/$(cfg)) | |
17 | +is5282:=$(shell grep CONFIG_M5282 $(srctree)/include/$(cfg)) | |
18 | 18 | |
19 | 19 | ifneq (,$(findstring CONFIG_M5208,$(is5208))) |
20 | 20 | PLATFORM_CPPFLAGS += -mcpu=5208 |
arch/m68k/cpu/mcf532x/config.mk
... | ... | @@ -8,8 +8,8 @@ |
8 | 8 | # |
9 | 9 | |
10 | 10 | cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/') |
11 | -is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg)) | |
12 | -is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg)) | |
11 | +is5301x:=$(shell grep CONFIG_MCF5301x $(srctree)/include/$(cfg)) | |
12 | +is532x:=$(shell grep CONFIG_MCF532x $(srctree)/include/$(cfg)) | |
13 | 13 | |
14 | 14 | ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x))) |
15 | 15 | PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC |
arch/m68k/cpu/mcf5445x/config.mk
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | # |
11 | 11 | |
12 | 12 | cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/') |
13 | -is5441x:=$(shell grep CONFIG_MCF5441x $(TOPDIR)/include/$(cfg)) | |
13 | +is5441x:=$(shell grep CONFIG_MCF5441x $(srctree)/include/$(cfg)) | |
14 | 14 | |
15 | 15 | ifneq (,$(findstring CONFIG_MCF5441x,$(is5441x))) |
16 | 16 | PLATFORM_CPPFLAGS += -mcpu=54418 -fPIC |
arch/powerpc/cpu/ppc4xx/config.mk
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | PLATFORM_CPPFLAGS += -DCONFIG_4xx -mstring -msoft-float |
9 | 9 | |
10 | 10 | cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/') |
11 | -is440:=$(shell grep CONFIG_440 $(TOPDIR)/include/$(cfg)) | |
11 | +is440:=$(shell grep CONFIG_440 $(srctree)/include/$(cfg)) | |
12 | 12 | |
13 | 13 | ifneq (,$(findstring CONFIG_440,$(is440))) |
14 | 14 | PLATFORM_CPPFLAGS += -Wa,-m440 -mcpu=440 |
board/hymod/config.mk
board/korat/config.mk
config.mk
... | ... | @@ -29,11 +29,11 @@ |
29 | 29 | CPUDIR=arch/$(ARCH)/cpu |
30 | 30 | endif |
31 | 31 | |
32 | -sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules | |
33 | -sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules | |
32 | +sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules | |
33 | +sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules | |
34 | 34 | |
35 | 35 | ifdef SOC |
36 | -sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules | |
36 | +sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules | |
37 | 37 | endif |
38 | 38 | ifneq ($(BOARD),) |
39 | 39 | ifdef VENDOR |
... | ... | @@ -43,7 +43,7 @@ |
43 | 43 | endif |
44 | 44 | endif |
45 | 45 | ifdef BOARD |
46 | -sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules | |
46 | +sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules | |
47 | 47 | endif |
48 | 48 | |
49 | 49 | ######################################################################### |
doc/README.SPL
... | ... | @@ -13,7 +13,7 @@ |
13 | 13 | How it works |
14 | 14 | ------------ |
15 | 15 | |
16 | -There is a new directory TOPDIR/spl which contains only a Makefile. | |
16 | +There is a new directory $(srctree)/spl which contains only a Makefile. | |
17 | 17 | The object files are built separately for SPL and placed in this directory. |
18 | 18 | The final binaries which are generated are u-boot-spl, u-boot-spl.bin and |
19 | 19 | u-boot-spl.map. |
doc/README.TPL
... | ... | @@ -19,7 +19,7 @@ |
19 | 19 | How it works |
20 | 20 | ------------ |
21 | 21 | |
22 | -There has been a directory TOPDIR/spl which contains only a Makefile. The | |
22 | +There has been a directory $(srctree)/spl which contains only a Makefile. The | |
23 | 23 | Makefile is shared by SPL and TPL. |
24 | 24 | |
25 | 25 | The object files are built separately for SPL/TPL and placed in the |
doc/README.commands
... | ... | @@ -28,7 +28,7 @@ |
28 | 28 | referenced in the source code as such. |
29 | 29 | |
30 | 30 | If a new board is defined do not forget to define the command section |
31 | -by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these | |
31 | +by writing in u-boot.lds ($(srctree)/board/boardname/u-boot.lds) these | |
32 | 32 | 3 lines: |
33 | 33 | |
34 | 34 | .u_boot_list : { |
nand_spl/board/freescale/mpc8315erdb/Makefile
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | |
11 | 11 | nandobj := $(OBJTREE)/nand_spl/ |
12 | 12 | |
13 | -LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | |
13 | +LDSCRIPT= $(srctree)/nand_spl/board/$(BOARDDIR)/u-boot.lds | |
14 | 14 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
15 | 15 | $(LDFLAGS) $(LDFLAGS_FINAL) |
16 | 16 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/freescale/mpc8536ds/Makefile
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | |
13 | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | |
15 | -LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | |
15 | +LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds | |
16 | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | 18 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/freescale/mpc8569mds/Makefile
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | |
13 | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | |
15 | -LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | |
15 | +LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds | |
16 | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | 18 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/freescale/mpc8572ds/Makefile
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | |
13 | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | |
15 | -LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | |
15 | +LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds | |
16 | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | 18 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/freescale/p1023rds/Makefile
... | ... | @@ -8,7 +8,7 @@ |
8 | 8 | |
9 | 9 | nandobj := $(OBJTREE)/nand_spl/ |
10 | 10 | |
11 | -LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | |
11 | +LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds | |
12 | 12 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
13 | 13 | $(LDFLAGS) $(LDFLAGS_FINAL) |
14 | 14 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/freescale/p1_p2_rdb/Makefile
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | |
13 | 13 | nandobj := $(OBJTREE)/nand_spl/ |
14 | 14 | |
15 | -LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds | |
15 | +LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds | |
16 | 16 | LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
17 | 17 | $(LDFLAGS) $(LDFLAGS_FINAL) |
18 | 18 | asflags-y += -DCONFIG_NAND_SPL |
nand_spl/board/sheldon/simpc8313/Makefile
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | |
12 | 12 | nandobj := $(OBJTREE)/nand_spl/ |
13 | 13 | |
14 | -LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds | |
14 | +LDSCRIPT= $(srctree)/nand_spl/board/$(BOARDDIR)/u-boot.lds | |
15 | 15 | LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \ |
16 | 16 | $(LDFLAGS) $(LDFLAGS_FINAL) |
17 | 17 | asflags-y += -DCONFIG_NAND_SPL |
spl/Makefile
... | ... | @@ -44,7 +44,7 @@ |
44 | 44 | -include include/spl-autoconf.mk |
45 | 45 | endif |
46 | 46 | |
47 | -include $(TOPDIR)/config.mk | |
47 | +include $(srctree)/config.mk | |
48 | 48 | |
49 | 49 | # Enable garbage collection of un-used sections for SPL |
50 | 50 | KBUILD_CFLAGS += -ffunction-sections -fdata-sections |
51 | 51 | |
52 | 52 | |
... | ... | @@ -149,13 +149,13 @@ |
149 | 149 | endif |
150 | 150 | |
151 | 151 | ifeq ($(wildcard $(LDSCRIPT)),) |
152 | - LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-spl.lds | |
152 | + LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-spl.lds | |
153 | 153 | endif |
154 | 154 | ifeq ($(wildcard $(LDSCRIPT)),) |
155 | - LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds | |
155 | + LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-spl.lds | |
156 | 156 | endif |
157 | 157 | ifeq ($(wildcard $(LDSCRIPT)),) |
158 | - LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot-spl.lds | |
158 | + LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot-spl.lds | |
159 | 159 | endif |
160 | 160 | ifeq ($(wildcard $(LDSCRIPT)),) |
161 | 161 | $(error could not find linker script) |
... | ... | @@ -165,7 +165,7 @@ |
165 | 165 | # Pass the version down so we can handle backwards compatibility |
166 | 166 | # on the fly. |
167 | 167 | LDPPFLAGS += \ |
168 | - -include $(TOPDIR)/include/u-boot/u-boot.lds.h \ | |
168 | + -include $(srctree)/include/u-boot/u-boot.lds.h \ | |
169 | 169 | -include $(OBJTREE)/include/config.h \ |
170 | 170 | -DCPUDIR=$(CPUDIR) \ |
171 | 171 | $(shell $(LD) --version | \ |