diff options
Diffstat (limited to 'meta-ti-bsp/recipes-ti/ipc/ti-ipc-rtos_git.bb')
-rw-r--r-- | meta-ti-bsp/recipes-ti/ipc/ti-ipc-rtos_git.bb | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/meta-ti-bsp/recipes-ti/ipc/ti-ipc-rtos_git.bb b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-rtos_git.bb new file mode 100644 index 00000000..abef3195 --- /dev/null +++ b/meta-ti-bsp/recipes-ti/ipc/ti-ipc-rtos_git.bb | |||
@@ -0,0 +1,101 @@ | |||
1 | require ti-ipc.inc | ||
2 | require ti-ipc-common.inc | ||
3 | require ti-ipc-rtos.inc | ||
4 | |||
5 | DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native" | ||
6 | |||
7 | PACKAGES =+ "${PN}-fw" | ||
8 | FILES:${PN}-fw = "${base_libdir}/firmware/*" | ||
9 | FILES:${PN}-dev += "${IPC_INSTALL_DIR_RECIPE}" | ||
10 | |||
11 | INSANE_SKIP:${PN}-fw += "arch" | ||
12 | INSANE_SKIP:${PN}-dev += "arch" | ||
13 | |||
14 | ALLOW_EMPTY:${PN} = "1" | ||
15 | |||
16 | IPC_PACKAGE_DIR = "${S}/ipc-package" | ||
17 | |||
18 | do_compile() { | ||
19 | oe_runmake -f ipc-bios.mak clean | ||
20 | oe_runmake -f ipc-bios.mak release | ||
21 | |||
22 | cd ${S_ipc-metadata} | ||
23 | oe_runmake .all-files IPC_INSTALL_DIR="${S}" \ | ||
24 | BUILD_HOST_OS="linux" \ | ||
25 | RELEASE_TYPE="${RELEASE_TYPE}" | ||
26 | |||
27 | cd ${S_ipc-examples}/src | ||
28 | oe_runmake .examples \ | ||
29 | IPCTOOLS="${S_ipc-metadata}/src/etc" | ||
30 | for alt_platform in ${ALT_PLATFORM}; do | ||
31 | oe_runmake .examples \ | ||
32 | IPCTOOLS="${S_ipc-metadata}/src/etc" \ | ||
33 | PLATFORM=${alt_platform} | ||
34 | done | ||
35 | |||
36 | if [ "${PLATFORM}" != "UNKNOWN" ]; then | ||
37 | oe_runmake extract HOSTOS="bios" IPC_INSTALL_DIR="${S}" | ||
38 | oe_runmake extract HOSTOS="linux" IPC_INSTALL_DIR="${S}" | ||
39 | |||
40 | for alt_platform in ${ALT_PLATFORM}; do | ||
41 | oe_runmake extract PLATFORM=${alt_platform} HOSTOS="bios" IPC_INSTALL_DIR="${S}" | ||
42 | oe_runmake extract PLATFORM=${alt_platform} HOSTOS="linux" IPC_INSTALL_DIR="${S}" | ||
43 | done | ||
44 | fi | ||
45 | |||
46 | IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'` | ||
47 | install -d ${IPC_PACKAGE_DIR} | ||
48 | # Copy docs and other meta files | ||
49 | cp -pPrf ${S_ipc-metadata}/exports/ipc_${IPC_VERSION}/* -d ${IPC_PACKAGE_DIR} | ||
50 | |||
51 | # Copy example folders corresponding to the platforms | ||
52 | if [ "${PLATFORM}" != "UNKNOWN" ]; then | ||
53 | install -d ${IPC_PACKAGE_DIR}/examples | ||
54 | cp -pPf ${S_ipc-examples}/src/examples/*.* ${IPC_PACKAGE_DIR}/examples/ | ||
55 | cp -pPf ${S_ipc-examples}/src/examples/makefile ${IPC_PACKAGE_DIR}/examples/ | ||
56 | cp -pPrf ${S_ipc-examples}/src/examples/${PLATFORM}* ${IPC_PACKAGE_DIR}/examples/ | ||
57 | for alt_platform in ${ALT_PLATFORM}; do | ||
58 | cp -pPrf ${S_ipc-examples}/src/examples/${alt_platform}* ${IPC_PACKAGE_DIR}/examples/ | ||
59 | done | ||
60 | find ${IPC_PACKAGE_DIR}/examples/ -name "*zip" -type f | xargs -I {} rm {} | ||
61 | fi | ||
62 | } | ||
63 | |||
64 | do_install() { | ||
65 | CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership" | ||
66 | IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'` | ||
67 | # Copy docs and other meta files | ||
68 | install -d ${D}${IPC_INSTALL_DIR_RECIPE} | ||
69 | cp ${CP_ARGS} ${IPC_PACKAGE_DIR}/* -d ${D}${IPC_INSTALL_DIR_RECIPE} | ||
70 | |||
71 | install -d ${D}${base_libdir}/firmware/ipc | ||
72 | cp ${CP_ARGS} ${S}/packages/ti/ipc/tests/bin/* ${D}${base_libdir}/firmware/ipc || true | ||
73 | } | ||
74 | |||
75 | KFDSPNUM = "0" | ||
76 | |||
77 | KFPLAT = "" | ||
78 | |||
79 | ALTERNATIVE_PRIORITY = "5" | ||
80 | |||
81 | pkg_postinst:${PN}-fw:omap-a15 () { | ||
82 | update-alternatives --install /lib/firmware/dra7-dsp1-fw.xe66 dra7-dsp1-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp1/test_omx_dsp1_vayu.xe66 ${ALTERNATIVE_PRIORITY} | ||
83 | update-alternatives --install /lib/firmware/dra7-dsp2-fw.xe66 dra7-dsp2-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp2/test_omx_dsp2_vayu.xe66 ${ALTERNATIVE_PRIORITY} | ||
84 | update-alternatives --install /lib/firmware/dra7-ipu1-fw.xem4 dra7-ipu1-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4 ${ALTERNATIVE_PRIORITY} | ||
85 | update-alternatives --install /lib/firmware/dra7-ipu2-fw.xem4 dra7-ipu2-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu2/test_omx_ipu2_vayu.xem4 ${ALTERNATIVE_PRIORITY} | ||
86 | } | ||
87 | |||
88 | pkg_postrm:${PN}-fw:omap-a15 () { | ||
89 | update-alternatives --remove dra7-dsp1-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp1/test_omx_dsp1_vayu.xe66 | ||
90 | update-alternatives --remove dra7-dsp2-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp2/test_omx_dsp2_vayu.xe66 | ||
91 | update-alternatives --remove dra7-ipu1-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4 | ||
92 | update-alternatives --remove dra7-ipu2-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu2/test_omx_ipu2_vayu.xem4 | ||
93 | } | ||
94 | |||
95 | pkg_postinst:${PN}-fw:omapl138 () { | ||
96 | update-alternatives --install /lib/firmware/rproc-dsp-fw rproc-dsp-fw ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674 ${ALTERNATIVE_PRIORITY} | ||
97 | } | ||
98 | |||
99 | pkg_postrm:${PN}-fw:omapl138 () { | ||
100 | update-alternatives --remove rproc-dsp-fw ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674 | ||
101 | } | ||