There were some errors related to ipk postinst.  The issues were fixed
by going to the update-alternatives class instead of trying to create
the steps directly in the recipe.

Signed-off-by: Ryan Eatmon <[email protected]>
---
 .../recipes-ti/ipc/ti-ipc-rtos_git.bb         | 40 +++++++++----------
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb 
b/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
index 7d845d39..853fa117 100644
--- a/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
+++ b/meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb
@@ -3,6 +3,7 @@ require recipes-ti/ipc/ti-ipc-common.inc
 require ti-ipc-rtos.inc
 
 inherit deploy
+inherit update-alternatives
 
 DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native"
 
@@ -80,27 +81,24 @@ KFPLAT = ""
 
 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
-}
-
-pkg_postinst:${PN}-fw:omapl138 () {
-  update-alternatives --install /lib/firmware/rproc-dsp-fw rproc-dsp-fw 
ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674 ${ALTERNATIVE_PRIORITY}
-}
-
-pkg_postrm:${PN}-fw:omapl138 () {
-  update-alternatives --remove rproc-dsp-fw 
ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674
-}
+ALTERNATIVE:${PN}-fw:omapl138 = "rproc-dsp-fw"
+ALTERNATIVE:${PN}-fw:omap-a15 = "dra7-dsp1-fw.xe66 \
+                                 dra7-dsp2-fw.xe66 \
+                                 dra7-ipu1-fw.xem4 \
+                                 dra7-ipu2-fw.xem4 \
+                                "
+
+ALTERNATIVE_LINK_NAME[rproc-dsp-fw] = 
"${nonarch_base_libdir}/firmware/rproc-dsp-fw"
+ALTERNATIVE_LINK_NAME[dra7-dsp1-fw.xe66] = 
"${nonarch_base_libdir}/firmware/dra7-dsp1-fw.xe66"
+ALTERNATIVE_LINK_NAME[dra7-dsp2-fw.xe66] = 
"${nonarch_base_libdir}/firmware/dra7-dsp2-fw.xe66"
+ALTERNATIVE_LINK_NAME[dra7-ipu1-fw.xem4] = 
"${nonarch_base_libdir}/firmware/dra7-ipu1-fw.xem4"
+ALTERNATIVE_LINK_NAME[dra7-ipu2-fw.xem4] = 
"${nonarch_base_libdir}/firmware/dra7-ipu2-fw.xem4"
+
+ALTERNATIVE_TARGET[rproc-dsp-fw] = 
"${nonarch_base_libdir}/firmware/ipc/ti_platforms_evmOMAPL138_DSP/messageq_single.xe674"
+ALTERNATIVE_TARGET[dra7-dsp1-fw.xe66] = 
"${nonarch_base_libdir}/firmware/ipc/ti_platforms_evmDRA7XX_dsp1/test_omx_dsp1_vayu.xe66"
+ALTERNATIVE_TARGET[dra7-dsp2-fw.xe66] = 
"${nonarch_base_libdir}/firmware/ipc/ti_platforms_evmDRA7XX_dsp2/test_omx_dsp2_vayu.xe66"
+ALTERNATIVE_TARGET[dra7-ipu1-fw.xem4] = 
"${nonarch_base_libdir}/firmware/ipc/ti_platforms_evmDRA7XX_ipu1/test_omx_ipu1_vayu.xem4"
+ALTERNATIVE_TARGET[dra7-ipu2-fw.xem4] = 
"${nonarch_base_libdir}/firmware/ipc/ti_platforms_evmDRA7XX_ipu2/test_omx_ipu2_vayu.xem4"
 
 do_deploy() {
   install -d ${DEPLOYDIR}
-- 
2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#18185): 
https://lists.yoctoproject.org/g/meta-ti/message/18185
Mute This Topic: https://lists.yoctoproject.org/mt/110542906/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-ti/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to