[Buildroot] [git commit] imx-codec: add install hooks to fix libraries path
Peter Korsgaard
peter at korsgaard.com
Wed Aug 3 19:58:39 UTC 2016
commit: https://git.buildroot.net/buildroot/commit/?id=3a1f5d1ebaf39c757f64ec083034f50c16288901
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master
By default, all the libraries are installed under /usr/lib/imx-mm
which causes problems at runtime.
The hooks are inspired from the mechanism used in the Yocto recipe:
https://github.com/Freescale/meta-fsl-arm/blob/krogoth/recipes-multimedia/imx-codec/imx-codec.inc
Tested with the following commands:
# gst-launch-0.10 audiotestsrc ! mfw_mp3encoder ! fakesink
# gst-launch-1.0 audiotestsrc ! imxmp3audioenc ! fakesink
[Peter: drop -mindepth/-maxdepth, add comment explaining why this is done]
Signed-off-by: Gary Bisson <gary.bisson at boundarydevices.com>
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
package/freescale-imx/imx-codec/imx-codec.mk | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/package/freescale-imx/imx-codec/imx-codec.mk b/package/freescale-imx/imx-codec/imx-codec.mk
index 67d3390..2577cf8 100644
--- a/package/freescale-imx/imx-codec/imx-codec.mk
+++ b/package/freescale-imx/imx-codec/imx-codec.mk
@@ -20,4 +20,13 @@ endef
# FIXME The Makefile installs both the arm9 and arm11 versions of the
# libraries, but we only need one of them.
+# Upstream installs libraries into usr/lib/imx-mm, but the dynamic
+# loader only looks in usr/lib, so move the libraries there
+define IMX_CODEC_FIXUP_TARGET_PATH
+ find $(TARGET_DIR)/usr/lib/imx-mm -not -type d \
+ -exec mv {} $(TARGET_DIR)/usr/lib \;
+ rm -rf $(TARGET_DIR)/usr/lib/imx-mm
+endef
+IMX_CODEC_POST_INSTALL_TARGET_HOOKS += IMX_CODEC_FIXUP_TARGET_PATH
+
$(eval $(autotools-package))
More information about the buildroot
mailing list