mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
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>
This commit is contained in:
parent
f5c66bdb18
commit
4379ac6148
19 changed files with 41 additions and 42 deletions
19
Makefile
19
Makefile
|
@ -169,8 +169,7 @@ OBJTREE := $(objtree)
|
|||
SPLTREE := $(OBJTREE)/spl
|
||||
TPLTREE := $(OBJTREE)/tpl
|
||||
SRCTREE := $(srctree)
|
||||
TOPDIR := $(SRCTREE)
|
||||
export TOPDIR SRCTREE OBJTREE SPLTREE TPLTREE
|
||||
export SRCTREE OBJTREE SPLTREE TPLTREE
|
||||
|
||||
MKCONFIG := $(SRCTREE)/mkconfig
|
||||
export MKCONFIG
|
||||
|
@ -490,7 +489,7 @@ endif
|
|||
# standard location.
|
||||
|
||||
ifndef LDSCRIPT
|
||||
#LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds.debug
|
||||
#LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds.debug
|
||||
ifdef CONFIG_SYS_LDSCRIPT
|
||||
# need to strip off double quotes
|
||||
LDSCRIPT := $(srctree)/$(CONFIG_SYS_LDSCRIPT:"%"=%)
|
||||
|
@ -500,19 +499,19 @@ endif
|
|||
# If there is no specified link script, we look in a number of places for it
|
||||
ifndef LDSCRIPT
|
||||
ifeq ($(CONFIG_NAND_U_BOOT),y)
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-nand.lds
|
||||
LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-nand.lds
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-nand.lds
|
||||
LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-nand.lds
|
||||
endif
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot.lds
|
||||
LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot.lds
|
||||
LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot.lds
|
||||
LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot.lds
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -666,7 +665,7 @@ export PLATFORM_LIBS
|
|||
# Pass the version down so we can handle backwards compatibility
|
||||
# on the fly.
|
||||
LDPPFLAGS += \
|
||||
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
|
||||
-include $(srctree)/include/u-boot/u-boot.lds.h \
|
||||
-DCPUDIR=$(CPUDIR) \
|
||||
$(shell $(LD) --version | \
|
||||
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 @@ distclean: mrproper
|
|||
-type f -print | xargs rm -f
|
||||
|
||||
backup:
|
||||
F=`basename $(TOPDIR)` ; cd .. ; \
|
||||
F=`basename $(srctree)` ; cd .. ; \
|
||||
gtar --force-local -zcvf `LC_ALL=C date "+$$F-%Y-%m-%d-%T.tar.gz"` $$F
|
||||
|
||||
help:
|
||||
|
|
|
@ -8,13 +8,13 @@
|
|||
#
|
||||
|
||||
cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
|
||||
is5208:=$(shell grep CONFIG_M5208 $(TOPDIR)/include/$(cfg))
|
||||
is5249:=$(shell grep CONFIG_M5249 $(TOPDIR)/include/$(cfg))
|
||||
is5253:=$(shell grep CONFIG_M5253 $(TOPDIR)/include/$(cfg))
|
||||
is5271:=$(shell grep CONFIG_M5271 $(TOPDIR)/include/$(cfg))
|
||||
is5272:=$(shell grep CONFIG_M5272 $(TOPDIR)/include/$(cfg))
|
||||
is5275:=$(shell grep CONFIG_M5275 $(TOPDIR)/include/$(cfg))
|
||||
is5282:=$(shell grep CONFIG_M5282 $(TOPDIR)/include/$(cfg))
|
||||
is5208:=$(shell grep CONFIG_M5208 $(srctree)/include/$(cfg))
|
||||
is5249:=$(shell grep CONFIG_M5249 $(srctree)/include/$(cfg))
|
||||
is5253:=$(shell grep CONFIG_M5253 $(srctree)/include/$(cfg))
|
||||
is5271:=$(shell grep CONFIG_M5271 $(srctree)/include/$(cfg))
|
||||
is5272:=$(shell grep CONFIG_M5272 $(srctree)/include/$(cfg))
|
||||
is5275:=$(shell grep CONFIG_M5275 $(srctree)/include/$(cfg))
|
||||
is5282:=$(shell grep CONFIG_M5282 $(srctree)/include/$(cfg))
|
||||
|
||||
ifneq (,$(findstring CONFIG_M5208,$(is5208)))
|
||||
PLATFORM_CPPFLAGS += -mcpu=5208
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
#
|
||||
|
||||
cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
|
||||
is5301x:=$(shell grep CONFIG_MCF5301x $(TOPDIR)/include/$(cfg))
|
||||
is532x:=$(shell grep CONFIG_MCF532x $(TOPDIR)/include/$(cfg))
|
||||
is5301x:=$(shell grep CONFIG_MCF5301x $(srctree)/include/$(cfg))
|
||||
is532x:=$(shell grep CONFIG_MCF532x $(srctree)/include/$(cfg))
|
||||
|
||||
ifneq (,$(findstring CONFIG_MCF5301x,$(is5301x)))
|
||||
PLATFORM_CPPFLAGS += -mcpu=53015 -fPIC
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#
|
||||
|
||||
cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
|
||||
is5441x:=$(shell grep CONFIG_MCF5441x $(TOPDIR)/include/$(cfg))
|
||||
is5441x:=$(shell grep CONFIG_MCF5441x $(srctree)/include/$(cfg))
|
||||
|
||||
ifneq (,$(findstring CONFIG_MCF5441x,$(is5441x)))
|
||||
PLATFORM_CPPFLAGS += -mcpu=54418 -fPIC
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
PLATFORM_CPPFLAGS += -DCONFIG_4xx -mstring -msoft-float
|
||||
|
||||
cfg=$(shell grep configs $(OBJTREE)/include/config.h | sed 's/.*<\(configs.*\)>/\1/')
|
||||
is440:=$(shell grep CONFIG_440 $(TOPDIR)/include/$(cfg))
|
||||
is440:=$(shell grep CONFIG_440 $(srctree)/include/$(cfg))
|
||||
|
||||
ifneq (,$(findstring CONFIG_440,$(is440)))
|
||||
PLATFORM_CPPFLAGS += -Wa,-m440 -mcpu=440
|
||||
|
|
|
@ -9,6 +9,6 @@
|
|||
# HYMOD boards
|
||||
#
|
||||
|
||||
PLATFORM_CPPFLAGS += -I$(TOPDIR)
|
||||
PLATFORM_CPPFLAGS += -I$(srctree)
|
||||
|
||||
OBJCOPYFLAGS = --remove-section=.ppcenv
|
||||
|
|
|
@ -23,5 +23,5 @@ PLATFORM_CPPFLAGS += -DCONFIG_SYS_INIT_DBCR=0x8CFF0000
|
|||
endif
|
||||
|
||||
ifndef CONFIG_KORAT_PERMANENT
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-F7FC.lds
|
||||
LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-F7FC.lds
|
||||
endif
|
||||
|
|
|
@ -29,11 +29,11 @@ ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
|
|||
CPUDIR=arch/$(ARCH)/cpu
|
||||
endif
|
||||
|
||||
sinclude $(TOPDIR)/arch/$(ARCH)/config.mk # include architecture dependend rules
|
||||
sinclude $(TOPDIR)/$(CPUDIR)/config.mk # include CPU specific rules
|
||||
sinclude $(srctree)/arch/$(ARCH)/config.mk # include architecture dependend rules
|
||||
sinclude $(srctree)/$(CPUDIR)/config.mk # include CPU specific rules
|
||||
|
||||
ifdef SOC
|
||||
sinclude $(TOPDIR)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
|
||||
sinclude $(srctree)/$(CPUDIR)/$(SOC)/config.mk # include SoC specific rules
|
||||
endif
|
||||
ifneq ($(BOARD),)
|
||||
ifdef VENDOR
|
||||
|
@ -43,7 +43,7 @@ BOARDDIR = $(BOARD)
|
|||
endif
|
||||
endif
|
||||
ifdef BOARD
|
||||
sinclude $(TOPDIR)/board/$(BOARDDIR)/config.mk # include board specific rules
|
||||
sinclude $(srctree)/board/$(BOARDDIR)/config.mk # include board specific rules
|
||||
endif
|
||||
|
||||
#########################################################################
|
||||
|
|
|
@ -13,7 +13,7 @@ can be reused. No code duplication or symlinking is necessary anymore.
|
|||
How it works
|
||||
------------
|
||||
|
||||
There is a new directory TOPDIR/spl which contains only a Makefile.
|
||||
There is a new directory $(srctree)/spl which contains only a Makefile.
|
||||
The object files are built separately for SPL and placed in this directory.
|
||||
The final binaries which are generated are u-boot-spl, u-boot-spl.bin and
|
||||
u-boot-spl.map.
|
||||
|
|
|
@ -19,7 +19,7 @@ board can be reused. No code duplication or symlinking is necessary anymore.
|
|||
How it works
|
||||
------------
|
||||
|
||||
There has been a directory TOPDIR/spl which contains only a Makefile. The
|
||||
There has been a directory $(srctree)/spl which contains only a Makefile. The
|
||||
Makefile is shared by SPL and TPL.
|
||||
|
||||
The object files are built separately for SPL/TPL and placed in the
|
||||
|
|
|
@ -28,7 +28,7 @@ these symbols when linking full U-Boot even though they are not
|
|||
referenced in the source code as such.
|
||||
|
||||
If a new board is defined do not forget to define the command section
|
||||
by writing in u-boot.lds ($(TOPDIR)/board/boardname/u-boot.lds) these
|
||||
by writing in u-boot.lds ($(srctree)/board/boardname/u-boot.lds) these
|
||||
3 lines:
|
||||
|
||||
.u_boot_list : {
|
||||
|
|
|
@ -10,7 +10,7 @@ PAD_TO := 0xfff04000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
|
||||
LDSCRIPT= $(srctree)/nand_spl/board/$(BOARDDIR)/u-boot.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -12,7 +12,7 @@ PAD_TO := 0xfff01000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -12,7 +12,7 @@ PAD_TO := 0xfff01000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -12,7 +12,7 @@ PAD_TO := 0xfff01000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -8,7 +8,7 @@ PAD_TO := 0xfff01000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -12,7 +12,7 @@ PAD_TO := 0xfff01000
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDSCRIPT= $(srctree)/$(CPUDIR)/u-boot-nand_spl.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot-nand_spl.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
|
@ -11,7 +11,7 @@ include $(srctree)/$(src)/config.mk
|
|||
|
||||
nandobj := $(OBJTREE)/nand_spl/
|
||||
|
||||
LDSCRIPT= $(TOPDIR)/nand_spl/board/$(BOARDDIR)/u-boot.lds
|
||||
LDSCRIPT= $(srctree)/nand_spl/board/$(BOARDDIR)/u-boot.lds
|
||||
LDFLAGS := -T $(nandobj)u-boot.lds -Ttext $(CONFIG_SYS_TEXT_BASE_SPL) \
|
||||
$(LDFLAGS) $(LDFLAGS_FINAL)
|
||||
asflags-y += -DCONFIG_NAND_SPL
|
||||
|
|
10
spl/Makefile
10
spl/Makefile
|
@ -44,7 +44,7 @@ else
|
|||
-include include/spl-autoconf.mk
|
||||
endif
|
||||
|
||||
include $(TOPDIR)/config.mk
|
||||
include $(srctree)/config.mk
|
||||
|
||||
# Enable garbage collection of un-used sections for SPL
|
||||
KBUILD_CFLAGS += -ffunction-sections -fdata-sections
|
||||
|
@ -149,13 +149,13 @@ LDSCRIPT := $(addprefix $(SRCTREE)/,$(CONFIG_SPL_LDSCRIPT:"%"=%))
|
|||
endif
|
||||
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/board/$(BOARDDIR)/u-boot-spl.lds
|
||||
LDSCRIPT := $(srctree)/board/$(BOARDDIR)/u-boot-spl.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/$(CPUDIR)/u-boot-spl.lds
|
||||
LDSCRIPT := $(srctree)/$(CPUDIR)/u-boot-spl.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
LDSCRIPT := $(TOPDIR)/arch/$(ARCH)/cpu/u-boot-spl.lds
|
||||
LDSCRIPT := $(srctree)/arch/$(ARCH)/cpu/u-boot-spl.lds
|
||||
endif
|
||||
ifeq ($(wildcard $(LDSCRIPT)),)
|
||||
$(error could not find linker script)
|
||||
|
@ -165,7 +165,7 @@ endif
|
|||
# Pass the version down so we can handle backwards compatibility
|
||||
# on the fly.
|
||||
LDPPFLAGS += \
|
||||
-include $(TOPDIR)/include/u-boot/u-boot.lds.h \
|
||||
-include $(srctree)/include/u-boot/u-boot.lds.h \
|
||||
-include $(OBJTREE)/include/config.h \
|
||||
-DCPUDIR=$(CPUDIR) \
|
||||
$(shell $(LD) --version | \
|
||||
|
|
Loading…
Add table
Reference in a new issue