@@ -2,7 +2,7 @@ require recipes-ti/ipc/ti-ipc.inc
require recipes-ti/ipc/ti-ipc-common.inc
require ti-ipc-rtos.inc
-DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native"
+DEPENDS = "ti-xdctools-native ti-sysbios doxygen-native zip-native perl-native"
PACKAGES =+ "${PN}-fw"
FILES:${PN}-fw = "${nonarch_base_libdir}/firmware/*"
@@ -61,6 +61,10 @@ do_compile() {
fi
}
+# Variables to assist in searching/replacing the WORKDIR in binary files.
+TMPDIR_FIX_SEARCH = "${WORKDIR}"
+TMPDIR_FIX_REPLACE = "${@'_'*(len(d.getVar('WORKDIR'))-7)+"workdir"}"
+
do_install() {
CP_ARGS="-Prf --preserve=mode,timestamps --no-preserve=ownership"
IPC_VERSION=`echo ${PV}${RELEASE_SUFFIX} | sed -e 's|\.|_|g'`
@@ -68,8 +72,14 @@ do_install() {
install -d ${D}${IPC_INSTALL_DIR_RECIPE}
cp ${CP_ARGS} ${IPC_PACKAGE_DIR}/* -d ${D}${IPC_INSTALL_DIR_RECIPE}
+ # Update doxygen generated documentation to remove build host paths
+ find ${D}${IPC_INSTALL_DIR_RECIPE} -type f -exec sed -i -e "s,${WORKDIR},,g" {} \;
+
install -d ${D}${nonarch_base_libdir}/firmware/ipc
cp ${CP_ARGS} ${S}/packages/ti/ipc/tests/bin/* ${D}${nonarch_base_libdir}/firmware/ipc || true
+
+ # Update compiled files to remove build host paths
+ find ${D}${nonarch_base_libdir}/firmware/ipc -type f -exec perl -pi -e 's#${TMPDIR_FIX_SEARCH}#${TMPDIR_FIX_REPLACE}#g' {} \;
}
KFDSPNUM = "0"
The older TI compilers do not have a mechanism for replacing paths in the obj files they create. So replace the string we want to remove with an equally sized replacement string that does not contain the path. Additionally, fix the generated documentation to not contain the paths as well. Signed-off-by: Ryan Eatmon <reatmon@ti.com> --- meta-ti-extras/recipes-ti/ipc/ti-ipc-rtos_git.bb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)