blob: d80421c7b302e10eae9dcd0c45fdd193c979681c [file] [log] [blame]
Bryan Wu1394f032007-05-06 14:50:22 -07001#
2# arch/blackfin/Makefile
3#
4# This file is subject to the terms and conditions of the GNU General Public
5# License. See the file "COPYING" in the main directory of this archive
6# for more details.
7#
8
9
10CROSS_COMPILE ?= bfin-uclinux-
11LDFLAGS_vmlinux := -X
12OBJCOPYFLAGS := -O binary -R .note -R .comment -S
13GZFLAGS := -9
14
15CFLAGS_MODULE += -mlong-calls
16KALLSYMS += --symbol-prefix=_
17
Mike Frysingerca9cb6f2007-05-21 18:09:35 +080018KBUILD_DEFCONFIG := BF537-STAMP_defconfig
Bryan Wu1394f032007-05-06 14:50:22 -070019
20# setup the machine name and the machine dependent settings
Michael Hennerich59003142007-10-21 16:54:27 +080021machine-$(CONFIG_BF522) := bf527
22machine-$(CONFIG_BF525) := bf527
23machine-$(CONFIG_BF527) := bf527
Bryan Wu1394f032007-05-06 14:50:22 -070024machine-$(CONFIG_BF531) := bf533
25machine-$(CONFIG_BF532) := bf533
26machine-$(CONFIG_BF533) := bf533
27machine-$(CONFIG_BF534) := bf537
28machine-$(CONFIG_BF536) := bf537
29machine-$(CONFIG_BF537) := bf537
Mike Frysingere2dd3f12007-07-24 18:20:18 +080030machine-$(CONFIG_BF542) := bf548
31machine-$(CONFIG_BF544) := bf548
Roy Huang24a07a12007-07-12 22:41:45 +080032machine-$(CONFIG_BF548) := bf548
33machine-$(CONFIG_BF549) := bf548
Bryan Wu1394f032007-05-06 14:50:22 -070034machine-$(CONFIG_BF561) := bf561
35MACHINE := $(machine-y)
36export MACHINE
37
Michael Hennerich59003142007-10-21 16:54:27 +080038cpu-$(CONFIG_BF522) := bf522
39cpu-$(CONFIG_BF525) := bf525
40cpu-$(CONFIG_BF527) := bf527
Jie Zhangde3025f2007-06-25 18:04:12 +080041cpu-$(CONFIG_BF531) := bf531
42cpu-$(CONFIG_BF532) := bf532
43cpu-$(CONFIG_BF533) := bf533
44cpu-$(CONFIG_BF534) := bf534
45cpu-$(CONFIG_BF536) := bf536
46cpu-$(CONFIG_BF537) := bf537
Mike Frysingere2dd3f12007-07-24 18:20:18 +080047cpu-$(CONFIG_BF542) := bf542
48cpu-$(CONFIG_BF544) := bf544
Jie Zhangde3025f2007-06-25 18:04:12 +080049cpu-$(CONFIG_BF548) := bf548
50cpu-$(CONFIG_BF549) := bf549
51cpu-$(CONFIG_BF561) := bf561
52
53rev-$(CONFIG_BF_REV_0_0) := 0.0
54rev-$(CONFIG_BF_REV_0_1) := 0.1
55rev-$(CONFIG_BF_REV_0_2) := 0.2
56rev-$(CONFIG_BF_REV_0_3) := 0.3
57rev-$(CONFIG_BF_REV_0_4) := 0.4
58rev-$(CONFIG_BF_REV_0_5) := 0.5
59rev-$(CONFIG_BF_REV_NONE) := none
60rev-$(CONFIG_BF_REV_ANY) := any
61
Sam Ravnborga0f97e02007-10-14 22:21:35 +020062KBUILD_CFLAGS += -mcpu=$(cpu-y)-$(rev-y)
Sam Ravnborg222d3942007-10-15 21:59:31 +020063KBUILD_AFLAGS += -mcpu=$(cpu-y)-$(rev-y)
Bryan Wu1394f032007-05-06 14:50:22 -070064
65head-y := arch/$(ARCH)/mach-$(MACHINE)/head.o arch/$(ARCH)/kernel/init_task.o
66
67core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/ arch/$(ARCH)/mach-common/
68
69# If we have a machine-specific directory, then include it in the build.
70ifneq ($(machine-y),)
71core-y += arch/$(ARCH)/mach-$(MACHINE)/
72core-y += arch/$(ARCH)/mach-$(MACHINE)/boards/
73endif
74
75libs-y += arch/$(ARCH)/lib/
76
77drivers-$(CONFIG_OPROFILE) += arch/$(ARCH)/oprofile/
78
79
80
81# Update machine arch symlinks if something which affects
82# them changed. We use .mach to indicate when they were updated
83# last, otherwise make uses the target directory mtime.
84
85include/asm-blackfin/.mach: $(wildcard include/config/arch/*.h) include/config/auto.conf
86 @echo ' SYMLINK include/asm-$(ARCH)/mach-$(MACHINE) -> include/asm-$(ARCH)/mach'
87ifneq ($(KBUILD_SRC),)
88 $(Q)mkdir -p include/asm-$(ARCH)
89 $(Q)ln -fsn $(srctree)/include/asm-$(ARCH)/mach-$(MACHINE) include/asm-$(ARCH)/mach
90else
91 $(Q)ln -fsn mach-$(MACHINE) include/asm-$(ARCH)/mach
92endif
93 @touch $@
94
95CLEAN_FILES += \
96 include/asm-$(ARCH)/asm-offsets.h \
97 arch/$(ARCH)/kernel/asm-offsets.s \
98 include/asm-$(ARCH)/mach \
99 include/asm-$(ARCH)/.mach
100
101archprepare: include/asm-blackfin/.mach
102archclean:
103 $(Q)$(MAKE) $(clean)=$(boot)
104
105
106all: vmImage
107boot := arch/$(ARCH)/boot
108BOOT_TARGETS = vmImage
109.PHONY: $(BOOT_TARGETS)
110$(BOOT_TARGETS): vmlinux
111 $(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
112define archhelp
113 echo '* vmImage - Kernel-only image for U-Boot (arch/$(ARCH)/boot/vmImage)'
114endef