summaryrefslogtreecommitdiffstats
path: root/src/target/firmware/Makefile
blob: 104ddac92399c6b627748e55fdc51ee0ea2670a6 (plain)
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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
##
## Osmocom-BB: Target firmware Makefile
##

#
# Environments
#

ENV_compalram_LDS=board/compal/ram.lds
ENV_compalram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o

ENV_highram_LDS=board/compal/highram.lds
ENV_highram_OBJS=board/compal/start.ram.o board/compal/exceptions_redirected.o board/compal/handlers.o

ENV_e88loader_LDS=board/compal_e88/loader.lds
ENV_e88loader_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirect.o

ENV_e88flash_LDS=board/compal_e88/flash.lds
ENV_e88flash_OBJS=board/compal/start.rom.o board/compal/header.o board/compal/exceptions_redirected.o board/compal/handlers.o


#
# Boards
#

# List of all supported boards (meant to be overridden on command line)
BOARDS?=compal_e88 compal_e86 compal_e99 se_j100 gta0x gtm900b fcdev3b pirelli_dpl10

# Framebuffer support, board specific drivers
FB_OBJS=fb/framebuffer.o fb/font.o fb/helvR08.o fb/helvB14.o fb/c64.o \
	fb/symbols.o

FB_e88_OBJS=$(FB_OBJS) fb/fb_bw8.o fb/fb_st7558.o
FB_e99_OBJS=$(FB_OBJS) fb/fb_rgb332.o fb/fb_ssd1783.o
FB_e86_OBJS=$(FB_OBJS) fb/fb_rgb332.o fb/fb_td014.o
FB_j100_OBJS=$(FB_OBJS) fb/fb_rgb332.o fb/fb_ssd1963.o
FB_dpl10_OBJS=$(FB_OBJS) fb/fb_rgb332.o fb/fb_s6b33b1x.o
FB_dummy_OBJS=$(FB_OBJS) fb/fb_dummy.o

# TI Calypso
calypso_COMMON_OBJS=board/common/calypso_uart.o \
	board/common/calypso_pwl.o board/common/tx_calchan.o

# OpenMoko GTA0x
BOARD_gta0x_OBJS=$(calypso_COMMON_OBJS) board/gta0x/init.o \
	board/gta0x/rffe_gta0x_triband.o board/gta0x/rf_tables.o \
	board/gta0x/afcparams.o \
	board/common/readcal_tiffs.o battery/dummy.o $(FB_dummy_OBJS)
BOARD_gta0x_ENVIRONMENTS=highram

# Huawei GTM900-B
BOARD_gtm900b_OBJS=$(calypso_COMMON_OBJS) board/gtm900b/init.o \
	board/gtm900b/rffe_gtm900b.o board/gta0x/rf_tables.o \
	board/gtm900b/afcparams.o \
	board/common/readcal_tiffs.o battery/dummy.o $(FB_dummy_OBJS)
BOARD_gtm900b_ENVIRONMENTS=highram

# FreeCalypso FCDEV3B
BOARD_fcdev3b_OBJS=$(calypso_COMMON_OBJS) board/fcdev3b/init.o \
	board/gta0x/rffe_gta0x_triband.o board/gta0x/rf_tables.o \
	board/gta0x/afcparams.o \
	board/common/readcal_tiffs.o battery/dummy.o $(FB_dummy_OBJS)
BOARD_fcdev3b_ENVIRONMENTS=highram

# Pirelli DP-L10
BOARD_pirelli_dpl10_OBJS=$(calypso_COMMON_OBJS) board/pirelli_dpl10/init.o \
	board/pirelli_dpl10/rffe_dpl10_triband.o \
	board/pirelli_dpl10/rf_tables.o board/pirelli_dpl10/readcal.o \
	battery/dummy.o $(FB_dpl10_OBJS)
BOARD_pirelli_dpl10_ENVIRONMENTS=highram

# Compal Generic
compal_COMMON_OBJS=$(calypso_COMMON_OBJS) \
	board/compal/rffe_dualband.o board/compal/rf_tables.o \
	board/compal/readcal_common.o
compal_COMMON_ENVIRONMENTS=compalram highram

# Compal E88
BOARD_compal_e88_OBJS=$(compal_COMMON_OBJS) board/compal_e88/init.o \
	board/compal/readcal_small.o board/compal_e88/tx_ramps.o \
	battery/compal_e88.o $(FB_e88_OBJS)
BOARD_compal_e88_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS) e88loader e88flash

# Compal E86 (has a different RFFE configuration)
BOARD_compal_e86_OBJS=$(calypso_COMMON_OBJS) board/compal_e86/init.o \
	board/compal_e86/rffe_dualband_e86.o board/compal/rf_tables.o \
	board/compal/readcal_common.o board/compal/readcal_small.o \
	board/compal_e86/tx_ramps.o battery/dummy.o $(FB_e86_OBJS)
BOARD_compal_e86_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)

# Compal E99
BOARD_compal_e99_OBJS=$(compal_COMMON_OBJS) board/compal_e99/init.o \
	board/compal_e99/readcal.o board/compal_e88/tx_ramps.o \
	battery/dummy.o $(FB_e99_OBJS)
BOARD_compal_e99_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)

# Sony Ericsson J100 (made by Compal)
BOARD_se_j100_OBJS=$(compal_COMMON_OBJS) board/se_j100/init.o \
	board/compal/readcal_small.o board/se_j100/tx_ramps.o \
	battery/dummy.o $(FB_j100_OBJS)
BOARD_se_j100_ENVIRONMENTS=$(compal_COMMON_ENVIRONMENTS)


#
# Applications
#

# List of all applications (meant to be overridden on command line)
APPLICATIONS?=hello_world compal_dsp_dump layer1 loader rssi menu

# Applications specific env requirements
APP_loader_ENVIRONMENTS=compalram highram
APP_rssi_ENVIRONMENTS=* -compalram
APP_menu_ENVIRONMENTS=* -highram

# Various objects that are currently linked into all applications
FLASH_OBJS=flash/cfi_flash.o
ABB_OBJS=abb/twl3025.o
RF_OBJS=rf/trf6151.o

# Objects that go in all applications
ANY_APP_OBJS+=$(ABB_OBJS) $(RF_OBJS) $(FLASH_OBJS)
ANY_APP_LIBS+=	calypso/libcalypso.a \
		layer1/liblayer1.a \
		lib/libmini.a \
		comm/libcomm.a \
		tiffs/libtiffs.a \
		../../shared/libosmocore/build-target/src/.libs/libosmocore.a \
		../../shared/libosmocore/build-target/src/gsm/.libs/libosmogsm.a \
		../../shared/libosmocore/build-target/src/codec/.libs/libosmocodec.a


#
# Build rules
#

# Global include path
INCLUDES=-Iinclude/ -I../../../include -I../../shared/libosmocore/include -I../../shared/libosmocore/build-target/include

# Libraries are defined in subdirectories
-include calypso/Makefile
-include layer1/Makefile
-include comm/Makefile
-include tiffs/Makefile
-include lib/Makefile

# Include toolchain configuration
-include Makefile.inc


#
# Build options
#

# Uncomment this line if you want to enable Tx (Transmit) Support.
#CFLAGS += -DCONFIG_TX_ENABLE

# Uncomment this line if you want to write to flash.
#CFLAGS += -DCONFIG_FLASH_WRITE

# Uncomment this line if you want to write to flash, including the bootloader.
#CFLAGS += -DCONFIG_FLASH_WRITE_LOADER