arm: add Nomadik 8815 SoC support
[barebox-mini2440.git] / arch / arm / Makefile
blob4d6a76d4ae2b3682adaaaab02ac1ed70544140d1
2 CPPFLAGS += -D__ARM__ -fno-strict-aliasing
3 # Explicitly specifiy 32-bit ARM ISA since toolchain default can be -mthumb:
4 CPPFLAGS +=$(call cc-option,-marm,)
6 ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
7 CPPFLAGS += -mbig-endian
8 AS += -EB
9 LD += -EB
10 else
11 CPPFLAGS += -mlittle-endian
12 AS += -EL
13 LD += -EL
14 endif
16 comma = ,
18 # This selects which instruction set is used.
19 # Note that GCC does not numerically define an architecture version
20 # macro, but instead defines a whole series of macros which makes
21 # testing for a specific architecture or later rather impossible.
22 arch-$(CONFIG_CPU_32v7) :=-D__LINUX_ARM_ARCH__=7 $(call cc-option,-march=armv7-a,-march=armv5t -Wa$(comma)-march=armv7-a)
23 arch-$(CONFIG_CPU_32v6) :=-D__LINUX_ARM_ARCH__=6 $(call cc-option,-march=armv6,-march=armv5t -Wa$(comma)-march=armv6)
24 arch-$(CONFIG_CPU_32v5) :=-D__LINUX_ARM_ARCH__=5 $(call cc-option,-march=armv5te,-march=armv4t)
25 arch-$(CONFIG_CPU_32v4T) :=-D__LINUX_ARM_ARCH__=4 -march=armv4t
27 # This selects how we optimise for the processor.
28 tune-$(CONFIG_CPU_ARM920T) :=-mtune=arm9tdmi
29 tune-$(CONFIG_CPU_ARM926T) :=-mtune=arm9tdmi
31 ifeq ($(CONFIG_AEABI),y)
32 CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork
33 else
34 CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
35 endif
37 CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y)
39 # Machine directory name. This list is sorted alphanumerically
40 # by CONFIG_* macro name.
41 machine-$(CONFIG_ARCH_AT91) := at91
42 machine-$(CONFIG_ARCH_AT91RM9200) := at91rm9200
43 machine-$(CONFIG_ARCH_EP93XX) := ep93xx
44 machine-$(CONFIG_ARCH_IMX) := imx
45 machine-$(CONFIG_ARCH_NOMADIK) := nomadik
46 machine-$(CONFIG_ARCH_NETX) := netx
47 machine-$(CONFIG_ARCH_OMAP) := omap
48 machine-$(CONFIG_ARCH_S3C24xx) := s3c24xx
50 # Board directory name. This list is sorted alphanumerically
51 # by CONFIG_* macro name.
52 board-$(CONFIG_MACH_A9M2410) := a9m2410
53 board-$(CONFIG_MACH_A9M2440) := a9m2440
54 board-$(CONFIG_MACH_AT91SAM9260EK) := at91sam9260ek
55 board-$(CONFIG_MACH_AT91SAM9263EK) := at91sam9263ek
56 board-$(CONFIG_MACH_EDB9301) := edb93xx
57 board-$(CONFIG_MACH_EDB9302) := edb93xx
58 board-$(CONFIG_MACH_EDB9302A) := edb93xx
59 board-$(CONFIG_MACH_EDB9307) := edb93xx
60 board-$(CONFIG_MACH_EDB9307A) := edb93xx
61 board-$(CONFIG_MACH_EDB93012) := edb93xx
62 board-$(CONFIG_MACH_EDB9315) := edb93xx
63 board-$(CONFIG_MACH_EDB9315A) := edb93xx
64 board-$(CONFIG_MACH_EUKREA_CPUIMX25) := eukrea_cpuimx25
65 board-$(CONFIG_MACH_EUKREA_CPUIMX27) := eukrea_cpuimx27
66 board-$(CONFIG_MACH_EUKREA_CPUIMX35) := eukrea_cpuimx35
67 board-$(CONFIG_MACH_FREESCALE_MX25_3STACK) := freescale-mx25-3-stack
68 board-$(CONFIG_MACH_FREESCALE_MX35_3STACK) := freescale-mx35-3-stack
69 board-$(CONFIG_MACH_IMX21ADS) := imx21ads
70 board-$(CONFIG_MACH_IMX27ADS) := imx27ads
71 board-$(CONFIG_MACH_MMCCPU) := mmccpu
72 board-$(CONFIG_MACH_MX1ADS) := mx1ads
73 board-$(CONFIG_MACH_NXDB500) := netx
74 board-$(CONFIG_ARCH_OMAP) := omap
75 board-$(CONFIG_MACH_PCA100) := phycard-i.MX27
76 board-$(CONFIG_MACH_PCM037) := pcm037
77 board-$(CONFIG_MACH_PCM038) := pcm038
78 board-$(CONFIG_MACH_PCM043) := pcm043
79 board-$(CONFIG_MACH_PM9263) := pm9263
80 board-$(CONFIG_MACH_SCB9328) := scb9328
81 board-$(CONFIG_MACH_NESO) := guf-neso
83 machdirs := $(patsubst %,arch/arm/mach-%/,$(machine-y))
85 ifeq ($(KBUILD_SRC),)
86 CPPFLAGS += $(patsubst %,-I%include,$(machdirs))
87 else
88 CPPFLAGS += $(patsubst %,-I$(srctree)/%include,$(machdirs))
89 endif
91 TEXT_BASE = $(CONFIG_TEXT_BASE)
93 CPPFLAGS += -DTEXT_BASE=$(TEXT_BASE) -P
95 ifndef CONFIG_MODULES
96 # Add cleanup flags
97 CPPFLAGS += -fdata-sections -ffunction-sections
98 LDFLAGS_barebox += -static --gc-sections
99 endif
101 barebox.netx: barebox.bin
102 $(Q)scripts/gen_netx_image -i barebox.bin -o barebox.netx \
103 --sdramctrl=$(CONFIG_NETX_SDRAM_CTRL) \
104 --sdramtimctrl=$(CONFIG_NETX_SDRAM_TIMING_CTRL) \
105 --memctrl=$(CONFIG_NETX_MEM_CTRL) \
106 --entrypoint=$(CONFIG_TEXT_BASE) \
107 --cookie=$(CONFIG_NETX_COOKIE);
109 ifeq ($(machine-y),netx)
110 KBUILD_IMAGE := barebox.netx
111 endif
113 all: $(KBUILD_IMAGE)
115 archprepare: maketools
116 maketools:
117 $(Q)$(MAKE) $(build)=arch/arm/tools arch/arm/include/asm/mach-types.h
119 PHONY += maketools
121 ifneq ($(board-y),)
122 BOARD := arch/arm/boards/$(board-y)/
123 else
124 BOARD :=
125 endif
127 ifneq ($(machine-y),)
128 MACH := arch/arm/mach-$(machine-y)/
129 else
130 MACH :=
131 endif
133 common-y += $(BOARD) $(MACH)
134 common-y += arch/arm/lib/ arch/arm/cpu/ arch/arm/common/
136 lds-$(CONFIG_GENERIC_LINKER_SCRIPT) := arch/arm/lib/barebox.lds
137 lds-$(CONFIG_BOARD_LINKER_SCRIPT) := $(BOARD)/barebox.lds
139 CLEAN_FILES += arch/arm/include/asm/mach-types.h arch/arm/lib/barebox.lds