summaryrefslogtreecommitdiffstats
path: root/arch/blackfin/Makefile
blob: 381c6a9f39a92485e12a4fccf948326a68722391 (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

CPPFLAGS += -fno-strict-aliasing


board-$(CONFIG_MACH_IPE337)	:= ipe337
cpu-$(CONFIG_BF561)		:= bf561

TEXT_BASE = $(CONFIG_TEXT_BASE)

CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE)
CFLAGS += -D__blackfin__
# -Ttext $(TEXT_BASE)
KALLSYMS         += --symbol-prefix=_

ifndef CONFIG_BFIN_BOOT_BYPASS
KBUILD_IMAGE := barebox.ldr
endif

archprepare: maketools

PHONY += maketools


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

ifneq ($(cpu-y),)
CPU  := arch/blackfin/cpu-$(cpu-y)/
else
CPU  :=
endif

common-y += $(BOARD)
common-y += arch/blackfin/lib/ $(CPU)

lds-y += $(BOARD)/barebox.lds

ifdef CONFIG_BFIN_BOOT_FLASH16
FLASHBITS :=-B 16
else
FLASHBITS :=
endif

ifneq ($(cpu-y),)
ifndef CONFIG_BFIN_BOOT_BYPASS
barebox.ldr: barebox
	rm -f $@
	$(CROSS_COMPILE)ldr -T $(cpu-y) -c $(FLASHBITS) -i $(CPU)/init_sdram.o $@ $<
endif
endif