summaryrefslogtreecommitdiffstats
path: root/arch/arm/Makefile
blob: a1a4630a61f53b734a9ac2429e0ca7d43429e7f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91

CPPFLAGS += -fno-builtin -ffreestanding -nostdinc -Wall 	\
	-isystem $(gccincdir) -pipe -D __ARM__ \
	-fno-strict-aliasing


machine-$(CONFIG_ARCH_IMX)	   := imx
machine-$(CONFIG_ARCH_NETX)	   := netx
machine-$(CONFIG_ARCH_AT91RM9200)  := at91rm9200
board-$(CONFIG_MACH_MX1ADS)	   := mx1ads
board-$(CONFIG_MACH_ECO920)	   := eco920
board-$(CONFIG_MACH_SCB9328)	   := scb9328
board-$(CONFIG_MACH_PCM038)	   := pcm038
board-$(CONFIG_MACH_NXDB500)       := netx
board-$(CONFIG_MACH_PCM037)	   := pcm037
# FIXME "cpu-y" never used on ARM!
cpu-$(CONFIG_ARM920T)              := arm920t
cpu-$(CONFIG_ARM926EJS)            := arm926ejs

TEXT_BASE = $(CONFIG_TEXT_BASE)

CPPFLAGS += -mabi=apcs-gnu -DTEXT_BASE=$(TEXT_BASE) -P
CFLAGS := -fno-common -msoft-float -Os
LDFLAGS_uboot  :=-L $(shell dirname `$(CC) $(CFLAGS) -print-libgcc-file-name`) -lgcc

ifeq ($(incdir-y),)
incdir-y := $(machine-y)
endif
INCDIR   := arch-$(incdir-y)

#	Update machine arch and proc symlinks if something which affects
#	them changed.  We use .arch to indicate when they were updated
#	last, otherwise make uses the target directory mtime.

include/asm-arm/.arch: $(wildcard include/config/arch/*.h) include/config/auto.conf
	@echo '  SYMLINK include/asm-arm/arch -> include/asm-arm/$(INCDIR)'
ifneq ($(KBUILD_SRC),)
	$(Q)mkdir -p include/asm-arm
	$(Q)ln -fsn $(srctree)/include/asm-arm/$(INCDIR) include/asm-arm/arch
else
	$(Q)ln -fsn $(INCDIR) include/asm-arm/arch
endif
	@echo '  SYMLINK include/asm-arm/proc -> include/asm-arm/proc-armv'
ifneq ($(KBUILD_SRC),)
	$(Q)mkdir -p include/asm-arm
	$(Q)ln -fsn $(srctree)/include/asm-arm/proc-armv include/asm-arm/proc
else
	$(Q)ln -fsn proc-armv include/asm-arm/proc
endif
	@touch $@

uboot.netx: uboot.bin
	$(Q)scripts/gen_netx_image -i uboot.bin -o uboot.netx		\
		--sdramctrl=$(CONFIG_NETX_SDRAM_CTRL)			\
		--sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL)		\
		--memctrl=$(CONFIG_NETX_MEM_CTRL)			\
		--entrypoint=$(CONFIG_TEXT_BASE)			\
		--cookie=$(CONFIG_NETX_COOKIE);

ifeq ($(machine-y),netx)
KBUILD_IMAGE := uboot.netx 
endif

all: $(KBUILD_IMAGE)

archprepare: maketools

PHONY += maketools
maketools: include/asm-arm/.arch


ifneq ($(board-y),)
BOARD  := board/$(board-y)/
else
BOARD  :=
endif

ifneq ($(machine-y),)
MACH  := arch/arm/mach-$(machine-y)/
else
MACH  :=
endif

common-y += $(BOARD) $(MACH)
common-y += arch/arm/lib/ arch/arm/cpu/

lds-$(CONFIG_GENERIC_LINKER_SCRIPT)   := arch/arm/lib/u-boot.lds
lds-$(CONFIG_BOARD_LINKER_SCRIPT)     := $(BOARD)/u-boot.lds

CLEAN_FILES    += arch/arm/lib/u-boot.lds
MRPROPER_FILES += include/asm-arm/arch include/asm-arm/proc