OBJTREE := $(objtree)
SPLTREE := $(OBJTREE)/spl
TPLTREE := $(OBJTREE)/tpl
-SRCTREE := $(srctree)
-export SRCTREE OBJTREE SPLTREE TPLTREE
+export OBJTREE SPLTREE TPLTREE
-MKCONFIG := $(SRCTREE)/mkconfig
+MKCONFIG := $(srctree)/mkconfig
export MKCONFIG
# Make sure CDPATH settings don't interfere
# (mem base + reserved)
#
-UBL_CONFIG = $(SRCTREE)/board/$(BOARDDIR)/ublimage.cfg
+UBL_CONFIG = $(srctree)/board/$(BOARDDIR)/ublimage.cfg
ifndef CONFIG_SPL_BUILD
ALL-y += u-boot.ubl
else
obj-y += fx12mm.o
-include $(SRCTREE)/board/xilinx/ppc405-generic/Makefile
+include $(srctree)/board/xilinx/ppc405-generic/Makefile
obj-y += v5fx30teval.o
-include $(SRCTREE)/board/xilinx/ppc440-generic/Makefile
+include $(srctree)/board/xilinx/ppc440-generic/Makefile
obj-y += ml507.o
-include $(SRCTREE)/board/xilinx/ppc440-generic/Makefile
+include $(srctree)/board/xilinx/ppc440-generic/Makefile
# Check if arch/$ARCH/cpu/$CPU exists, otherwise assume arch/$ARCH/cpu contains
# CPU-specific code.
CPUDIR=arch/$(ARCH)/cpu/$(CPU)
-ifneq ($(SRCTREE)/$(CPUDIR),$(wildcard $(SRCTREE)/$(CPUDIR)))
+ifneq ($(srctree)/$(CPUDIR),$(wildcard $(srctree)/$(CPUDIR)))
CPUDIR=arch/$(ARCH)/cpu
endif
#
if [ -n "$KBUILD_SRC" ] ; then
mkdir -p ${OBJTREE}/include
- LNPREFIX=${SRCTREE}/arch/${arch}/include/asm/
+ LNPREFIX=${srctree}/arch/${arch}/include/asm/
cd ${OBJTREE}/include
mkdir -p asm
else
fi
if [ -z "$KBUILD_SRC" ] ; then
- cd ${SRCTREE}/include
+ cd ${srctree}/include
fi
#
# create symbolic links for common files
$(obj)/start.S:
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc83xx/start.S $@
$(obj)/nand_boot_fsl_elbc.c:
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/sdram.c:
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/sdram.c $@
$(obj)/$(BOARD).c:
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/$(BOARD).c $@
$(obj)/ns16550.c:
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/spl_minimal.c:
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@
$(obj)/cache.c:
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/time.c:
- ln -sf $(SRCTREE)/arch/powerpc/lib/time.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/time.c $@
$(obj)/ticks.S:
- ln -sf $(SRCTREE)/arch/powerpc/lib/ticks.S $@
+ ln -sf $(srctree)/arch/powerpc/lib/ticks.S $@
$(obj)/cache.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/cpu_init_early.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
$(obj)/fsl_law.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc8xxx/law.c $@
$(obj)/law.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/law.c $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/resetvec.S:
@rm -f $@
- ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
+ ln -s $(srctree)/$(CPUDIR)/resetvec.S $@
$(obj)/fixed_ivor.S:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
$(obj)/start.S: $(obj)/fixed_ivor.S
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/start.S $@
$(obj)/tlb.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/tlb.c $@
$(obj)/tlb_table.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/tlb.c $@
$(obj)/cache.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/cpu_init_early.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
$(obj)/fsl_law.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc8xxx/law.c $@
$(obj)/law.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/law.c $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/resetvec.S:
@rm -f $@
- ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
+ ln -s $(srctree)/$(CPUDIR)/resetvec.S $@
$(obj)/fixed_ivor.S:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
$(obj)/start.S: $(obj)/fixed_ivor.S
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/start.S $@
$(obj)/tlb.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/tlb.c $@
$(obj)/tlb_table.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/tlb.c $@
$(obj)/cache.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/cpu_init_early.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
$(obj)/fsl_law.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc8xxx/law.c $@
$(obj)/law.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/law.c $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/resetvec.S:
@rm -f $@
- ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
+ ln -s $(srctree)/$(CPUDIR)/resetvec.S $@
$(obj)/fixed_ivor.S:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
$(obj)/start.S: $(obj)/fixed_ivor.S
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/start.S $@
$(obj)/tlb.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/tlb.c $@
$(obj)/tlb_table.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/tlb.c $@
$(obj)/cache.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/cpu_init_early.c:
@rm -f $@
- ln -sf $(SRCTREE)/$(CPUDIR)/cpu_init_early.c $@
+ ln -sf $(srctree)/$(CPUDIR)/cpu_init_early.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -sf $(SRCTREE)/$(CPUDIR)/spl_minimal.c $@
+ ln -sf $(srctree)/$(CPUDIR)/spl_minimal.c $@
$(obj)/fsl_law.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc8xxx/law.c $@
$(obj)/law.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/law.c $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/resetvec.S:
@rm -f $@
- ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
+ ln -s $(srctree)/$(CPUDIR)/resetvec.S $@
$(obj)/fixed_ivor.S:
@rm -f $@
- ln -sf $(SRCTREE)/$(CPUDIR)/fixed_ivor.S $@
+ ln -sf $(srctree)/$(CPUDIR)/fixed_ivor.S $@
$(obj)/start.S: $(obj)/fixed_ivor.S
@rm -f $@
- ln -sf $(SRCTREE)/$(CPUDIR)/start.S $@
+ ln -sf $(srctree)/$(CPUDIR)/start.S $@
$(obj)/tlb.c:
@rm -f $@
- ln -sf $(SRCTREE)/$(CPUDIR)/tlb.c $@
+ ln -sf $(srctree)/$(CPUDIR)/tlb.c $@
$(obj)/tlb_table.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/tlb.c $@
$(obj)/cache.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -sf $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/cpu_init_early.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/cpu_init_early.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/spl_minimal.c $@
$(obj)/fsl_law.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc8xxx/law.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc8xxx/law.c $@
$(obj)/law.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/law.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/law.c $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -sf $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -sf $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -sf $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -sf $(srctree)/drivers/serial/ns16550.c $@
$(obj)/resetvec.S:
@rm -f $@
- ln -s $(SRCTREE)/$(CPUDIR)/resetvec.S $@
+ ln -s $(srctree)/$(CPUDIR)/resetvec.S $@
$(obj)/fixed_ivor.S:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/fixed_ivor.S $@
$(obj)/start.S: $(obj)/fixed_ivor.S
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/start.S $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/start.S $@
$(obj)/tlb.c:
@rm -f $@
- ln -sf $(SRCTREE)/arch/powerpc/cpu/mpc85xx/tlb.c $@
+ ln -sf $(srctree)/arch/powerpc/cpu/mpc85xx/tlb.c $@
$(obj)/tlb_table.c:
@rm -f $@
- ln -sf $(SRCTREE)/board/$(BOARDDIR)/tlb.c $@
+ ln -sf $(srctree)/board/$(BOARDDIR)/tlb.c $@
$(obj)/start.S:
@rm -f $@
- ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/start.S $@
+ ln -s $(srctree)/arch/powerpc/cpu/mpc83xx/start.S $@
$(obj)/nand_boot_fsl_elbc.c:
@rm -f $@
- ln -s $(SRCTREE)/nand_spl/nand_boot_fsl_elbc.c $@
+ ln -s $(srctree)/nand_spl/nand_boot_fsl_elbc.c $@
$(obj)/sdram.c:
@rm -f $@
- ln -s $(SRCTREE)/board/$(BOARDDIR)/sdram.c $@
+ ln -s $(srctree)/board/$(BOARDDIR)/sdram.c $@
$(obj)/$(BOARD).c:
@rm -f $@
- ln -s $(SRCTREE)/board/$(BOARDDIR)/$(BOARD).c $@
+ ln -s $(srctree)/board/$(BOARDDIR)/$(BOARD).c $@
$(obj)/ns16550.c:
@rm -f $@
- ln -s $(SRCTREE)/drivers/serial/ns16550.c $@
+ ln -s $(srctree)/drivers/serial/ns16550.c $@
$(obj)/spl_minimal.c:
@rm -f $@
- ln -s $(SRCTREE)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@
+ ln -s $(srctree)/arch/powerpc/cpu/mpc83xx/spl_minimal.c $@
$(obj)/cache.c:
@rm -f $@
- ln -s $(SRCTREE)/arch/powerpc/lib/cache.c $@
+ ln -s $(srctree)/arch/powerpc/lib/cache.c $@
$(obj)/time.c:
@rm -f $@
- ln -s $(SRCTREE)/arch/powerpc/lib/time.c $@
+ ln -s $(srctree)/arch/powerpc/lib/time.c $@
$(obj)/ticks.S:
@rm -f $@
- ln -s $(SRCTREE)/arch/powerpc/lib/ticks.S $@
+ ln -s $(srctree)/arch/powerpc/lib/ticks.S $@
include/spl-autoconf.mk: include/config.h
$(call cmd,autoconf)
-HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(SRCTREE)/board/$(VENDOR)/common/Makefile),y,n)
+HAVE_VENDOR_COMMON_LIB = $(if $(wildcard $(srctree)/board/$(VENDOR)/common/Makefile),y,n)
ifdef CONFIG_SPL_START_S_PATH
START_PATH := $(CONFIG_SPL_START_S_PATH:"%"=%)
# Linker Script
ifdef CONFIG_SPL_LDSCRIPT
# need to strip off double quotes
-LDSCRIPT := $(addprefix $(SRCTREE)/,$(CONFIG_SPL_LDSCRIPT:"%"=%))
+LDSCRIPT := $(addprefix $(srctree)/,$(CONFIG_SPL_LDSCRIPT:"%"=%))
endif
ifeq ($(wildcard $(LDSCRIPT)),)
# Define __KERNEL_STRICT_NAMES to prevent typedef overlaps
# Define _GNU_SOURCE to obtain the getline prototype from stdio.h
#
-HOST_EXTRACFLAGS += -include $(SRCTREE)/include/libfdt_env.h \
+HOST_EXTRACFLAGS += -include $(srctree)/include/libfdt_env.h \
$(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
- -I$(SRCTREE)/lib/libfdt \
- -I$(SRCTREE)/tools \
+ -I$(srctree)/lib/libfdt \
+ -I$(srctree)/tools \
-DCONFIG_SYS_TEXT_BASE=$(CONFIG_SYS_TEXT_BASE) \
-DUSE_HOSTCC \
-D__KERNEL_STRICT_NAMES \
# Compile for a hosted environment on the target
HOST_EXTRACFLAGS = $(patsubst -I%,-idirafter%, $(UBOOTINCLUDE)) \
- -idirafter $(SRCTREE)/tools/env \
+ -idirafter $(srctree)/tools/env \
-DUSE_HOSTCC \
-DTEXT_BASE=$(TEXT_BASE)