Skip to contentSkip to conversation

dspdce-fw: replace mkdir/cp with install

PATCH New Denys Dmytriyenko 1 participant 3 messages Mar 8, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 dspdce-fw: replace mkdir/cp with install

From: Denys Dmytriyenko <[email protected]>

---
 recipes-bsp/dspdce-fw/dspdce-fw_git.bb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
recipes-bsp/dspdce-fw/dspdce-fw_git.bb +2 -2
index 6c6bb2a..3979ce9 100644
@@ -48,8 +48,8 @@ do_compile() {
 TARGET = "dra7-dsp1-fw.xe66"
 
 do_install() {
-        mkdir -p ${D}${base_libdir}/firmware
-        cp ${S}/dra7xx-c66x-dsp.xe66 ${D}${base_libdir}/firmware/${TARGET}.${BPN}
+    install -d ${D}${base_libdir}/firmware
+    install -m 0644 ${S}/dra7xx-c66x-dsp.xe66 ${D}${base_libdir}/firmware/${TARGET}.${BPN}
 }
 
 ALTERNATIVE_${PN} = "dra7-dsp1-fw.xe66"
Signature · 1 line
2.2.0
#1 lore raw

PATCH 2/3 ipumm-fw: use update-alternatives to manage FW symlink

From: Denys Dmytriyenko <[email protected]>

---
 recipes-bsp/ipumm-fw/ipumm-fw_git.bb | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
recipes-bsp/ipumm-fw/ipumm-fw_git.bb +11 -4
index 022d307..f415599 100644
@@ -26,6 +26,8 @@ PV = "3.00.10.00"
 require recipes-ti/includes/ti-paths.inc
 require recipes-ti/includes/ti-staging.inc
 
+inherit update-alternatives
+
 DEPENDS = "ti-xdctools ti-sysbios ti-codec-engine ti-framework-components ti-xdais ti-ccsv6-native ti-ipc-rtos"
 
 export HWVERSION="ES10"
@@ -53,10 +55,15 @@ do_compile() {
 TARGET = "dra7-ipu2-fw.xem4"
 
 do_install() {
-        mkdir -p ${D}${base_libdir}/firmware
-        cp ${S}/${TARGET} ${D}${base_libdir}/firmware/${TARGET}
+    install -d ${D}${base_libdir}/firmware
+    install -m 0644 ${S}/${TARGET} ${D}${base_libdir}/firmware/${TARGET}.${BPN}
 }
 
-FILES_${PN} += "${base_libdir}/firmware/${TARGET}"
+ALTERNATIVE_${PN} = "dra7-ipu2-fw.xem4"
+ALTERNATIVE_LINK_NAME[dra7-ipu2-fw.xem4] = "${base_libdir}/firmware/${TARGET}"
+ALTERNATIVE_TARGET[dra7-ipu2-fw.xem4] = "${base_libdir}/firmware/${TARGET}.${BPN}"
+ALTERNATIVE_PRIORITY = "20"
+
+FILES_${PN} += "${base_libdir}/firmware/*"
 
-PR = "r0"
+PR = "r1"
Signature · 1 line
2.2.0
#2 lore raw

PATCH 3/3 ti-ipc-rtos: preserve FW dir structure, use update-alternatives for test_omx*

In reply to Denys Dmytriyenko

From: Denys Dmytriyenko <[email protected]>

---
 recipes-ti/ipc/ti-ipc-rtos_git.bb | 23 +++++++++++++++++++----
 1 file changed, 19 insertions(+), 4 deletions(-)
recipes-ti/ipc/ti-ipc-rtos_git.bb +19 -4
index eff1001..4c0fc74 100644
@@ -2,7 +2,7 @@ require recipes-ti/includes/ti-paths.inc
 require recipes-ti/includes/ti-staging.inc
 require ti-ipc.inc
 
-PR = "${INC_PR}.3"
+PR = "${INC_PR}.4"
 
 DEPENDS = "ti-xdctools ti-sysbios"
 DEPENDS_append_keystone = " ti-cgt6x-native \
@@ -55,7 +55,22 @@ do_install() {
     install -d ${D}${IPC_INSTALL_DIR_RECIPE}
     cp -pPrf ${S}/* ${D}${IPC_INSTALL_DIR_RECIPE}
 
-    install -d ${D}${base_libdir}/firmware
-    find . -name "*.xe66" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
-    find . -name "*.xem4" -type f | xargs -I {} install -m 0644 {} ${D}${base_libdir}/firmware/
+    install -d ${D}${base_libdir}/firmware/ipc
+    cp -pPrf ${S}/packages/ti/ipc/tests/bin/* ${D}${base_libdir}/firmware/ipc
+}
+
+ALTERNATIVE_PRIORITY = "5"
+
+pkg_postinst_${PN}-fw_omap-a15 () {
+	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}
+	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}
+	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}
+	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}
+}
+
+pkg_postrm_${PN}-fw_omap-a15 () {
+	update-alternatives --remove dra7-dsp1-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp1/test_omx_dsp1_vayu.xe66
+	update-alternatives --remove dra7-dsp2-fw.xe66 ipc/ti_platforms_evmDRA7XX_dsp2/test_omx_dsp2_vayu.xe66
+	update-alternatives --remove dra7-ipu1-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4
+	update-alternatives --remove dra7-ipu2-fw.xem4 ipc/ti_platforms_evmDRA7XX_ipu2/test_omx_ipu2_vayu.xem4
 }
Signature · 1 line
2.2.0