summaryrefslogtreecommitdiffstats
path: root/recipes-ti/syslink
diff options
context:
space:
mode:
authorKoen Kooi <k-kooi@ti.com>2011-07-06 09:56:26 +0100
committerKoen Kooi <k-kooi@ti.com>2011-07-06 15:34:44 +0100
commite73385b2d94472040431834e32da322843c0155c (patch)
tree41ca89db8a6f0cbae9a847a179957696fe3184d0 /recipes-ti/syslink
parent8f7291208ea7195654fa5ce6a3861f6eebb5916d (diff)
downloadmeta-ti-e73385b2d94472040431834e32da322843c0155c.tar.gz
add syslink 02.00.00.78
install paths need some cleaning up e.g. slaveLoader needs to be in ${bindir} Signed-off-by: Koen Kooi <k-kooi@ti.com>
Diffstat (limited to 'recipes-ti/syslink')
-rw-r--r--recipes-ti/syslink/ti-syslink.inc241
-rw-r--r--recipes-ti/syslink/ti-syslink/syslink.pc10
-rw-r--r--recipes-ti/syslink/ti-syslink_2.00.00.78.bb8
3 files changed, 259 insertions, 0 deletions
diff --git a/recipes-ti/syslink/ti-syslink.inc b/recipes-ti/syslink/ti-syslink.inc
new file mode 100644
index 00000000..8cc57751
--- /dev/null
+++ b/recipes-ti/syslink/ti-syslink.inc
@@ -0,0 +1,241 @@
1DESCRIPTION = "SYSLINK Inter-Processor Communications (IPC) for TI ARM/DSP processors"
2HOMEPAGE = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/syslink/index.html"
3SECTION = "devel"
4LICENSE = "BSD"
5
6LIC_FILES_CHKSUM = "file://docs/bsd.pdf;md5=9f2edd962cd129f8c24e9ef1bd641029"
7
8# TODO :: multi-machine, add m3 build as well?
9# TODO :: proper staging?
10# TODO :: kernel module examples?
11# TODO :: smarter handling of config.bld
12# TODO :: review XDC parallel make - why not happening automatically?
13# TODO :: smarter suffix management
14
15require ../includes/ti-paths.inc
16require ../includes/ti-staging.inc
17
18PROVIDES = "ti-syslink-module"
19PROVIDES += "ti-syslink-examples"
20
21# This package builds a kernel module, use kernel PR as base and append a local version
22PR = "${MACHINE_KERNEL_PR}"
23PR_append = "a"
24PVExtra = ""
25
26inherit module pkgconfig
27
28S = "${WORKDIR}/syslink_${PV}${PVExtra}"
29
30SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/syslink/${PV}${PVExtra}/exports/syslink_${PV}${PVExtra}.tar.gz;name=syslinktarball \
31 file://syslink.pc \
32 "
33
34DEPENDS = "ti-sysbios ti-xdctools ti-cgt6x ti-ipc ti-cgt470"
35DEPENDS += "virtual/kernel"
36
37#common frameq gateMP heapBufMP heapMemMP knlNotify listMP messageQ notify ringIO ringIO_gpp sharedRegion slaveLoader tilerDaemon
38SYSLINKHLOSSAMPLES = "knlnotify slaveLoader frameq notify"
39#SYSLINKRTOSSAMPLES = "frameq gateMP heapBufMP heapMemMP listMP messageQ notify ringIO ringIO_gpp sharedRegion"
40
41# SOC_FAMILY configuration
42
43SYSLINKPLATFORM_omap3 = "OMAP3530"
44SYSLINKPLATFORM_omapl137 = "OMAPL1XX"
45SYSLINKPLATFORM_omapl138 = "OMAPL1XX"
46SYSLINKPLATFORM_ti816x = "TI81XX"
47SYSLINKPLATFORM_ti814x = "TI81XX"
48SYSLINKPLATFORM ?= "<UNDEFINED_SYSLINKPLATFORM>"
49
50SYSLINKVARIANT_omap3 = "OMAP3530"
51SYSLINKVARIANT_omapl137 = "OMAPL1XX"
52SYSLINKVARIANT_omapl138 = "OMAPL1XX"
53SYSLINKVARIANT_ti816x = "TI816X"
54SYSLINKVARIANT_ti814x = "TI814X"
55SYSLINKVARIANT ?= "<UNDEFINED_SYSLINKVARIANT>"
56
57# COFF/ELF config - omap3 can be coff/elf, omapl only coff, ti816x and ti814x only elf
58
59# this really needs to be a list... in the case of ELF/COFF (and this could use DSPSUFFIX?)
60SYSLINKSUFFIX_omap3 = "x64P"
61SYSLINKSUFFIX_omapl137 = "x674"
62SYSLINKSUFFIX_omapl138 = "x674"
63SYSLINKSUFFIX_ti816x = "xe674"
64SYSLINKSUFFIX_ti814x = "xe674"
65SYSLINKSUFFIX ?= "<UNDEFINED_SYSLINKSUFFIX>"
66
67SYSLINKLOADER_omap3 = "COFF"
68SYSLINKLOADER_omapl137 = "COFF"
69SYSLINKLOADER_omapl138 = "COFF"
70SYSLINKLOADER_ti816x = "ELF"
71SYSLINKLOADER_ti814x = "ELF"
72SYSLINKLOADER ?= "<UNDEFINED_SYSLINKLOADER>"
73
74# Do we really need to configure this? - configured already in config.bld
75XDCTARGETS_omap3 = "ti.targets.C64P"
76XDCTARGETS_omapl137 = "ti.targets.C674"
77XDCTARGETS_omapl138 = "ti.targets.C674"
78# for ti816x and ti814x, we should later also build for ti.targets.arm.elf.M3
79XDCTARGETS_ti816x = "ti.targets.elf.C674 ti.targets.arm.elf.M3"
80XDCTARGETS_ti814x = "ti.targets.elf.C674 ti.targets.arm.elf.M3"
81XDCTARGETS ?= "<UNDEFINED_XDCTARGETS>"
82export XDCTARGETS
83
84# Exported Variable needed by build
85export SYSLINK_ROOT = "${S}/packages/"
86
87export XDCPATH = "${IPC_INSTALL_DIR}/packages;${SYSBIOS_INSTALL_DIR}/packages"
88
89do_configure() {
90 sed -i -e s:@VERSION@:${PV}:g ${WORKDIR}/syslink.pc
91
92 cp ${WORKDIR}/syslink.pc ${S}
93}
94
95do_prepsources () {
96
97 # Prepare the tree for rebuiling - clean and generate interfaces
98 cd ${SYSLINK_ROOT}/ti/syslink
99 ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} .make -PR .
100 ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} clean -PR .
101 ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} .interfaces -PR .
102}
103
104addtask prepsources after do_configure before do_compile
105
106do_compile() {
107 # TODO :: KERNEL_CC, should use for kernel module build?
108 # TODO :: Check the 'unset's
109
110 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
111
112 do_make_scripts
113
114 # Build the gpp (hlos) kernel space
115 cd ${SYSLINK_ROOT}/ti/syslink/utils/hlos/knl/Linux && make \
116 ARCH="${TARGET_ARCH}" \
117 CROSS_COMPILE="${TARGET_PREFIX}" \
118 SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \
119 SYSLINK_VARIANT="${SYSLINKVARIANT}" \
120 SYSLINK_LOADER="${SYSLINKLOADER}" \
121 SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" \
122 KDIR="${STAGING_KERNEL_DIR}"
123
124# # Build the gpp (hlos) kernel space samples.
125# for sample in ${SYSLINKHLOSSAMPLES}; do
126# cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/$sample/knl/Linux && make \
127# ARCH="${TARGET_ARCH}" \
128# CROSS_COMPILE="${TARGET_PREFIX}" \
129# SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \
130# SYSLINK_VARIANT="${SYSLINKVARIANT}" \
131# SYSLINK_LOADER="${SYSLINKLOADER}" \
132# SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages" \
133# SYSLINK_SDK=EZSDK \
134# KDIR="${STAGING_KERNEL_DIR}"
135# done
136
137 # Build the gpp (hlos) user space
138 cd ${SYSLINK_ROOT}/ti/syslink/utils/hlos/usr/Linux && make \
139 ARCH="${TARGET_ARCH}" \
140 CROSS_COMPILE="${TARGET_PREFIX}" \
141 TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \
142 SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \
143 SYSLINK_VARIANT="${SYSLINKVARIANT}" \
144 SYSLINK_LOADER="${SYSLINKLOADER}" \
145 SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages"
146
147 # Build the gpp (hlos) user space samples
148 # First build the common lib for samples.
149 cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/common/usr/Linux && make \
150 ARCH="${TARGET_ARCH}" \
151 CROSS_COMPILE="${TARGET_PREFIX}" \
152 TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \
153 SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \
154 SYSLINK_VARIANT="${SYSLINKVARIANT}" \
155 SYSLINK_LOADER="${SYSLINKLOADER}" \
156 SYSLINK_SDK=EZSDK \
157 SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages"
158
159 for sample in ${SYSLINKHLOSSAMPLES}; do
160 cd ${SYSLINK_ROOT}/ti/syslink/samples/hlos/$sample/usr/Linux && make \
161 ARCH="${TARGET_ARCH}" \
162 CROSS_COMPILE="${TARGET_PREFIX}" \
163 TOOLCHAIN_PREFIX="${TOOLCHAIN_PATH}/${TARGET_PREFIX}" \
164 SYSLINK_PLATFORM="${SYSLINKPLATFORM}" \
165 SYSLINK_VARIANT="${SYSLINKVARIANT}" \
166 SYSLINK_LOADER="${SYSLINKLOADER}" \
167 SYSLINK_SDK=EZSDK \
168 SYSLINK_PKGPATH="${IPC_INSTALL_DIR}/packages"
169 done
170
171 # Build the dsp/arm (rtos) code (system and samples)
172 # cd ${SYSLINK_ROOT}/ti/syslink && \
173 # ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} -PR .
174 export XDCOPTIONS=v
175 cd ${SYSLINK_ROOT}/ti/syslink && \
176 ${XDC_INSTALL_DIR}/xdc -P \
177 `${XDC_INSTALL_DIR}/bin/xdcpkg ${SYSLINK_ROOT}/ti/syslink | grep -v samples`
178 export XDCARGS="profile=debug"
179 cd ${SYSLINK_ROOT}/ti/syslink && \
180 ${XDC_INSTALL_DIR}/xdc --jobs=${BB_NUMBER_THREADS} -P \
181 `${XDC_INSTALL_DIR}/bin/xdcpkg ${SYSLINK_ROOT}/ti/syslink | grep samples`
182}
183
184KERNEL_VERSION = "${@base_read_file('${STAGING_KERNEL_DIR}/kernel-abiversion')}"
185
186do_install () {
187
188 # Install the hlos kernel module
189 install -d ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp
190 install -m 0755 ${SYSLINK_ROOT}/ti/syslink/bin/${SYSLINKVARIANT}/syslink.ko ${D}/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/
191
192 # Install the hlos example kernel modules and apps
193 install -d ${D}/${installdir}/ti-syslink-examples
194 install -m 0755 ${SYSLINK_ROOT}/ti/syslink/bin/${SYSLINKVARIANT}/samples/* ${D}/${installdir}/ti-syslink-examples/
195
196 # Install the rtos example apps
197 install -d ${D}/${installdir}/ti-syslink-examples/dsp
198 cd ${SYSLINK_ROOT}/ti/syslink/samples/rtos
199 for i in $(find . -name "*.${SYSLINKSUFFIX}" | grep ${SOC_FAMILY}); do
200 install ${i} ${D}/${installdir}/ti-syslink-examples/dsp/
201 done
202
203 # TODO :: Fixup - library/headers installation - this shouldn't go into the examples directory....
204 # Needs proper staging
205 # Install the library in the filesystem
206 # install -d ${D}/${installdir}/ti-syslink-examples
207 # install -m 0755 ${SYSLINK_ROOT}/ti/syslink/lib/syslink.a ${D}/${installdir}/ti-syslink-examples/
208
209 # Install/Stage the Source Tree
210 install -d ${D}${SYSLINK_INSTALL_DIR_RECIPE}
211 cp -pPrf ${S}/* ${D}${SYSLINK_INSTALL_DIR_RECIPE}
212
213 install -d ${D}/${libdir}/pkgconfig
214 install ${S}/syslink.pc ${D}/${libdir}/pkgconfig/
215}
216
217PACKAGES =+ "ti-syslink-module"
218FILES_ti-syslink-module = "/lib/modules/${KERNEL_VERSION}/kernel/drivers/dsp/syslink.ko"
219RDEPENDS_ti-syslink-module += "update-modules"
220
221pkg_postinst_ti-syslink-module () {
222#!/bin/sh
223if [ -n "$D" ]; then
224 exit 1
225fi
226
227depmod -a
228update-modules || true
229}
230
231pkg_postrm_ti-syslink-module () {
232#!/bin/sh
233update-modules || true
234}
235
236PACKAGES =+ "ti-syslink-examples"
237RRECOMMENDS_ti-syslink-examples_append = " ti-syslink-module"
238FILES_ti-syslink-examples = "${installdir}/ti-syslink-examples/*"
239INSANE_SKIP_ti-syslink-examples = True
240
241FILES_ti-syslink-dev = "${libdir}/*"
diff --git a/recipes-ti/syslink/ti-syslink/syslink.pc b/recipes-ti/syslink/ti-syslink/syslink.pc
new file mode 100644
index 00000000..c4d720f1
--- /dev/null
+++ b/recipes-ti/syslink/ti-syslink/syslink.pc
@@ -0,0 +1,10 @@
1prefix=/../..//syslink_@VERSION@
2libdir=${prefix}/ti/syslink/lib
3includedir=${prefix}/ti/syslink
4
5Name: TI Syslink
6Description: Syslink ARM-DSP IPC (Inter Processor Communication)
7Version: @VERSION@
8Requires: ipc
9Libs: ${libdir}/syslink.a_release
10Cflags: -I${includedir} -I${includedir}/inc -I${includedir}/utils
diff --git a/recipes-ti/syslink/ti-syslink_2.00.00.78.bb b/recipes-ti/syslink/ti-syslink_2.00.00.78.bb
new file mode 100644
index 00000000..71e96212
--- /dev/null
+++ b/recipes-ti/syslink/ti-syslink_2.00.00.78.bb
@@ -0,0 +1,8 @@
1require ti-syslink.inc
2
3PV = "2_00_00_78"
4PVwithdots = "2.00.00.78"
5
6SRC_URI[syslinktarball.md5sum] = "df7c92cd2cca38fdb38e59e4175aba61"
7SRC_URI[syslinktarball.sha256sum] = "3409d080b08ec1d0bd24a715dbec783f1d52020e452485c165ad64e121548ebc"
8