aboutsummaryrefslogtreecommitdiffstats
path: root/extras/recipes-ti/dsplink/ti-dsplink/dsplink_1_64_add_dm6446_build_support.patch
blob: 5a25dbb5888ff96c0bde2630b61d7059ff3d9479 (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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
From 7b36e94dcb33892e1df7d3327db31bd41fb6167e Mon Sep 17 00:00:00 2001
From: Roger Monk <r-monk@ti.com>
Date: Fri, 5 Mar 2010 19:22:58 +0000
Subject: [PATCH] dsplink_1_64:  Add support for building with CS tools + against 2.6.30+

   * Tweaked Patches from Niclas

Signed-off-by: Roger Monk <r-monk@ti.com>
---
 dsplink/config/bin/dsplinkcfg.pl  |   17 ++++-
 dsplink/gpp/src/DIRS              |    5 +
 dslpink/gpp/src/Makefile          |    8 ++-
 dsplink/gpp/src/Rules.mk          |    5 +
 dsplink/make/Linux/davinci_2.6.mk |  211 +++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 244 insertions(+), 2 deletions(-)
 create mode 100644 make/Linux/davinci_2.6.mk

diff --git a/dsplink/config/bin/dsplinkcfg.pl b/dsplink/config/bin/dsplinkcfg.pl
index 644aa38..e83c133 100644
--- a/dsplink/config/bin/dsplinkcfg.pl
+++ b/dsplink/config/bin/dsplinkcfg.pl
@@ -215,6 +215,18 @@ my %CFG_GPPOS_DM6467LSPuc =
     'OSPREFIX' => 'uc',
 ) ;
 
+# DM6446 Linux
+my %CFG_GPPOS_DM6446LSP =
+(
+    'NAME'   => 'DM6446LSP',
+    'PREFIX' => '2.6',
+    'ID'     => 'DM6446LSP',
+    'DESC'   => 'DM6446 LSP for DM6446',
+    'VER'    => '2.6.18',
+    'TYPE'   => 'Linux',
+    'LOADERS'=> [\%CFG_LOADER_COFF, ],
+    'COMPS'  => 'ponslrmc',
+) ;
 
 # OMAPL138 Linux with uCLibc filesystem
 my %CFG_GPPOS_OMAPL138LSPuc =
@@ -356,7 +368,7 @@ my %CFG_DSPCFG_DM6446GEMSHMEM =
     'PHYID'     => 'DM6446GEMSHMEM',
     'PHYDESC'   => 'Shared Memory Physical Interface',
     'PHYTYPE'   => 'SHMEM',
-    'GPPOS'     => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G],
+    'GPPOS'     => [\%CFG_GPPOS_MVL5U, \%CFG_GPPOS_MVL5G, \%CFG_GPPOS_DM6446LSP],
     'DSPOS'     => [\%CFG_DSPOS_5XX, \%CFG_DSPOS_6XX],
 # DSP defines
     'DSPNAME'   => 'DM6446GEM',
@@ -2994,6 +3006,9 @@ sub main {
     if ($platform {'ID'} eq 'DA850') {
         print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ;
     }
+    if ($platform {'ID'} eq 'DAVINCI') {
+        print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ;
+    }
     if ($platform {'ID'} eq 'DAVINCIHD') {
         print "GPP side distribution file: \$DSPLINK" . $DIRSEP . "gpp" . $DIRSEP. "src" . $DIRSEP. "Rules.mk\n" ;
     }
diff --git a/dsplink/gpp/src/DIRS b/dsplink/gpp/src/DIRS
index e82969c..05bad2b 100644
--- a/dsplink/gpp/src/DIRS
+++ b/dsplink/gpp/src/DIRS
@@ -63,6 +63,10 @@ ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD")
 DIRS  +=     \
     api
 else # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD")
+ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
+DIRS  +=     \
+    api
+else # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
 ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850")
 DIRS  +=     \
     api
@@ -77,6 +81,7 @@ DIRS  +=     \
 endif  # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530")
 endif  # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138")
 endif  # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD")
+endif  # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
 endif  # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850")
 else  # ifeq ("$(TI_DSPLINK_GPPOS)", "Linux")
 DIRS  +=     \
diff --git a/dsplink/gpp/src/Makefile b/dsplink/gpp/src/Makefile
index 9e6bbb1..49c3b97 100644
--- a/dsplink/gpp/src/Makefile
+++ b/dsplink/gpp/src/Makefile
@@ -78,7 +78,13 @@ ifeq ("$(TI_DSPLINK_GPPOS)", "Linux")
                     include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk
                     include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild
 		else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD") 
-	            include Makefile_bld
+		    ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
+                        include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_bld
+                        include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Rules.mk
+                        include $(DSPLINK)$(DIRSEP)gpp$(DIRSEP)src$(DIRSEP)Makefile_kbuild
+		    else # else ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
+	                include Makefile_bld
+		    endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
             	endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAP3530")
            endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850")
         endif # ifeq ("$(TI_DSPLINK_PLATFORM)", "OMAPL138")
diff --git a/dsplink/gpp/src/Rules.mk b/dsplink/gpp/src/Rules.mk
index 658ee8a..5a6f52a 100644
--- a/dsplink/gpp/src/Rules.mk
+++ b/dsplink/gpp/src/Rules.mk
@@ -63,6 +63,11 @@ KERNEL_DIR    := ${HOME}/da850/DaVinci-PSP-SDK-03.20.00.01/src/kernel/linux-03.2
 TOOL_PATH     := ${HOME}/git/arm-2008q3/bin
 endif #ifeq ("$(TI_DSPLINK_PLATFORM)", "DA850")
 
+ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
+KERNEL_DIR    := ${HOME}/linux-davinci
+TOOL_PATH     := ${HOME}/toolchains/git/arm-2009q1-203/bin
+endif #ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCI")
+
 ifeq ("$(TI_DSPLINK_PLATFORM)", "DAVINCIHD")
 KERNEL_DIR    := ${HOME}/linux-davinci
 TOOL_PATH     := ${HOME}/toolchains/git/arm-2009q1-203/bin
diff --git a/dsplink/make/Linux/davinci_2.6.mk b/dsplink/make/Linux/davinci_2.6.mk
new file mode 100644
index 0000000..834fd74
--- /dev/null
+++ b/dsplink/make/Linux/davinci_2.6.mk
@@ -0,0 +1,211 @@
+#   ============================================================================
+#   @file   davinci_2.6.mk
+#
+#   @path   $(DSPLINK)/make/Linux/
+#
+#   @desc   This makefile defines OS specific macros used by MAKE system for
+#           the Montavista Pro 5.0 Linux distribution.
+#
+#   @ver    1.64
+#   ============================================================================
+#   Copyright (C) 2002-2009, Texas Instruments Incorporated -
+#   http://www.ti.com/
+#
+#   Redistribution and use in source and binary forms, with or without
+#   modification, are permitted provided that the following conditions
+#   are met:
+#   
+#   *  Redistributions of source code must retain the above copyright
+#      notice, this list of conditions and the following disclaimer.
+#   
+#   *  Redistributions in binary form must reproduce the above copyright
+#      notice, this list of conditions and the following disclaimer in the
+#      documentation and/or other materials provided with the distribution.
+#   
+#   *  Neither the name of Texas Instruments Incorporated nor the names of
+#      its contributors may be used to endorse or promote products derived
+#      from this software without specific prior written permission.
+#   
+#   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+#   AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+#   THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#   PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+#   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+#   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+#   OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+#   WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+#   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
+#   EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#   ============================================================================
+
+
+ifndef DAVINCI_LINUX2_6_MK
+
+define DAVINCI_LINUX2_6_MK
+endef
+
+
+#   ============================================================================
+#   Let the make system know that a specific distribution for the GPP OS
+#   is being used.
+#   ============================================================================
+USE_DISTRIBUTION := 1
+
+
+#   ============================================================================
+#   Set the values of necessary variables to be used for the OS.
+#   ============================================================================
+
+#   ----------------------------------------------------------------------------
+#   Base directory for the GPP OS
+#   ----------------------------------------------------------------------------
+BASE_BUILDOS    := ${HOME}/linux-davinci
+
+#   ----------------------------------------------------------------------------
+#   Base for toolchain
+#   ----------------------------------------------------------------------------
+BASE_TOOLCHAIN    := ${HOME}/toolchains/git/arm-2009q1-203
+
+#   ----------------------------------------------------------------------------
+#   Base for code generation tools - compiler, linker, archiver etc.
+#   ----------------------------------------------------------------------------
+BASE_CGTOOLS    := $(BASE_TOOLCHAIN)/bin
+
+#   ----------------------------------------------------------------------------
+#   Base directory for include files provided by GPP OS
+#   ----------------------------------------------------------------------------
+BASE_OSINC      := $(BASE_BUILDOS)/include
+
+OSINC_GENERIC   := $(BASE_OSINC)
+OSINC_PLATFORM  := $(BASE_TOOLCHAIN)/lib/gcc/arm-none-linux-gnueabi/4.2.3/include
+OSINC_TARGET    := $(BASE_TOOLCHAIN)/arm-none-linux-gnueabi/libc/usr/include
+
+ifneq ("$(VARIANT)", "")
+OSINC_VARIANT   := $(BASE_OSINC)
+endif
+
+
+#   ----------------------------------------------------------------------------
+#   Base directory for libraries provided by GPP OS
+#   ----------------------------------------------------------------------------
+BASE_OSLIB      := $(BASE_TOOLCHAIN)/lib
+
+OSLIB_GENERIC   := $(BASE_OSLIB)
+OSLIB_PLATFORM  := $(BASE_OSLIB)
+
+
+ifneq ("$(VARIANT)", "")
+OSLIB_VARIANT   := $(BASE_OSLIB)
+endif
+
+
+#   ============================================================================
+#   COMPILER
+#   ============================================================================
+
+#   ----------------------------------------------------------------------------
+#   Name of the compiler
+#   ----------------------------------------------------------------------------
+COMPILER        := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc
+LD              := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ld
+
+CROSS_COMPILE   := arm-none-linux-gnueabi-
+export CROSS_COMPILE
+
+#   ----------------------------------------------------------------------------
+#   Command line switches used by the compiler
+#
+#   CC_SW_DEF       Command line defines
+#   CC_SW_INC       Search path for header files
+#   CC_SW_OBJ       Create object file
+#   CC_SW_DEB       Include debug information
+#   ----------------------------------------------------------------------------
+CC_SW_DEF       := -D
+CC_SW_INC       := -I
+CC_SW_OBJ       := -o
+CC_SW_DEB       := -g
+
+#   ----------------------------------------------------------------------------
+#   Standard flags for the compiler
+#   ----------------------------------------------------------------------------
+STD_USER_FLAGS  := -Wall -c
+
+#   ----------------------------------------------------------------------------
+#   Flags for the compiler when building a library
+#   ----------------------------------------------------------------------------
+EXE_CC_FLAGS    :=
+
+#   ----------------------------------------------------------------------------
+#   Standard flags for the compiler when building an executable
+#   ----------------------------------------------------------------------------
+DRV_CC_FLAGS    := -nostdinc
+
+#   ----------------------------------------------------------------------------
+#   Flags for the compiler when building a driver
+#   ----------------------------------------------------------------------------
+LIB_CC_FLAGS    :=
+
+#   ----------------------------------------------------------------------------
+#   Standard definitions for the compiler
+#   ----------------------------------------------------------------------------
+STD_CC_DEFNS    := -D_REENTRANT
+
+#   ============================================================================
+#   ARCHIVER2 - This denotes the archiver.
+#   ============================================================================
+ARCHIVER        := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-ar
+
+#   ----------------------------------------------------------------------------
+#   Standard flags for the archiver
+#   ----------------------------------------------------------------------------
+STD_AR_FLAGS    := -rs
+
+
+#   ============================================================================
+#   LINKER used for Library & Driver build
+#   ============================================================================
+LINKER      := $(BASE_CGTOOLS)/arm-none-linux-gnueabi-gcc
+
+#   ----------------------------------------------------------------------------
+#   Command line switches used by the linker
+#
+#   LD_SW_LIB       Search path for libraries
+#   LD_SW_OUT       Output filename
+#   LD_SW_RELOC     Generate relocateable output
+#   ----------------------------------------------------------------------------
+LD_SW_LIB       := -L
+LD_SW_OUT       := -o
+LD_SW_RELOC     := -r
+
+#   ----------------------------------------------------------------------------
+#   Flags for the LD when building an executable
+#   ----------------------------------------------------------------------------
+STD_LD_FLAGS    :=
+
+#   ----------------------------------------------------------------------------
+#   Standard flags for the LD
+#   ----------------------------------------------------------------------------
+EXE_LD_FLAGS    := -lpthread -lc
+
+#   ----------------------------------------------------------------------------
+#   Standard flags for the archiver
+#   ----------------------------------------------------------------------------
+DRV_LD_FLAGS    :=
+
+
+#   ============================================================================
+#   Post processing utilities for Linux 2.6
+#   ============================================================================
+ifneq ($(CONFIG_MODVERSIONS),)
+CMD_MODPOST_FLAGS := -m -i
+else
+CMD_MODPOST_FLAGS := -i
+endif
+
+CMD_MODPOST := $(BASE_BUILDOS)/scripts/mod/modpost \
+               $(CMD_MODPOST_FLAGS) $(BASE_BUILDOS)/Module.symvers \
+               $(BASE_BUILDOS)/vmlinux
+
+
+endif   # ifndef DAVINCI_LINUX2_6_MK
-- 
1.6.0.6