Skip to contentSkip to conversation

libfsl*: fix install path + update conf opts

PATCH New Gary Bisson 1 participant 5 messages Mar 16, 2016

lore
Share & tools
lore
#0 lore raw

v3 cover libfsl*: fix install path + update conf opts

Hi all,

Here is an update of that (not so famous) series. While preparing/testing the next Freescale packages update I realized the way symbolic links were generated wasn't correct since it was pointing to host machine path.

Although I still wait for an answer on that symbolic link approach, I think the two "add missing configure options" patches could be merged first.

This series is the answer to that request:
http://patchwork.ozlabs.org/patch/409684/

Changelog:
v1->v2:
- add staging for libfslparser although not required so far -> suggested by Jerome for consistency between libfsl packages
- use symlinks for both staging and install dir
-> suggested by Jerome for consistency between both folders
v2->v3:
- update symbolic links generation to work on target -> although build was ok with v2, runtime wasn't working since libraries were pointing to host machine path...
- tested with latest Linaro 2015.11 toolchain
- rebased to master

Here is the defconfig that has been used to test those patches:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_ENABLE_NEON=y
BR2_ARM_ENABLE_VFP=y
BR2_ARM_FPU_NEON=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1"
BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/common/post-build.sh" BR2_ROOTFS_POST_IMAGE_SCRIPT="board/boundarydevices/common/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/0d92195d/linux-imx6-0d92195d.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="boundary"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6dl-nit6xlite imx6dl-nitrogen6_vm imx6dl-nitrogen6x imx6q-nitrogen6x imx6q-nitrogen6_max imx6qp-nitrogen6_max imx6q-sabrelite" BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_ALSA_UTILS=y
BR2_PACKAGE_ALSA_UTILS_ALSACONF=y
BR2_PACKAGE_ALSA_UTILS_AMIDI=y
BR2_PACKAGE_ALSA_UTILS_AMIXER=y
BR2_PACKAGE_ALSA_UTILS_APLAY=y
BR2_PACKAGE_ALSA_UTILS_APLAYMIDI=y
BR2_PACKAGE_ALSA_UTILS_SPEAKER_TEST=y
BR2_PACKAGE_GSTREAMER=y
BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC=y
BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC=y
BR2_PACKAGE_GST_PLUGINS_BASE_PLUGIN_ALSA=y
BR2_PACKAGE_GST_PLUGINS_GOOD=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_AUTODETECT=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_DEBUGUTILS=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_FLV=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_ID3DEMUX=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_MATROSKA=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_VIDEOBOX=y
BR2_PACKAGE_GST_PLUGINS_GOOD_PLUGIN_V4L2=y
BR2_PACKAGE_GST_FSL_PLUGINS=y
BR2_PACKAGE_GSTREAMER1=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_APP=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIORATE=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_AUDIOTESTSRC=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ENCODING=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOCONVERT=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_GIO=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_SUBPARSE=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_TCP=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_VIDEOTESTSRC=y
BR2_PACKAGE_GST1_PLUGINS_BASE_PLUGIN_ALSA=y
BR2_PACKAGE_GST1_PLUGINS_GOOD=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUDIOPARSERS=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_AUTODETECT=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_DEBUGUTILS=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_FLV=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_ID3DEMUX=y
BR2_PACKAGE_GST1_PLUGINS_GOOD_PLUGIN_MATROSKA=y
BR2_PACKAGE_GST1_IMX=y
BR2_PACKAGE_STRACE=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
BR2_PACKAGE_IMX_GPU_VIV=y
BR2_PACKAGE_IMX_GPU_VIV_APITRACE=y
BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES=y
BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO=y
BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV=y
BR2_PACKAGE_FONTCONFIG=y
BR2_PACKAGE_IPERF3=y
BR2_PACKAGE_OPENSSH=y
BR2_PACKAGE_RSYNC=y
BR2_PACKAGE_HOST_MKE2IMG=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y

Regards,
Gary

Gary Bisson (4):
libfslcodec: add install hooks to fix libraries path
libfslcodec: add missing configure options
libfslparser: add install hooks to fix libraries path
libfslparser: add missing configure options

 package/libfslcodec/libfslcodec.mk   | 23 +++++++++++++++++++++++
 package/libfslparser/libfslparser.mk | 19 +++++++++++++++++++
 2 files changed, 42 insertions(+)
Signature · 1 line
2.7.0
#1 lore raw

PATCH v3 1/4 libfslcodec: add install hooks to fix libraries path

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/fido/recipes-multimedia/libfslcodec/libfslcodec.inc

---

Here are the dependencies the pipelines above are testing:

$ for i in `find target/usr/lib/gstreamer*/*`; do readelf -d $i | grep NEEDED | grep lib_ && echo "($i)"; done
 0x00000001 (NEEDED)                     Shared library: [lib_nb_amr_dec_arm9_elinux.so.2]
 0x00000001 (NEEDED)                     Shared library: [lib_wb_amr_dec_arm9_elinux.so.2]
(target/usr/lib/gstreamer-0.10/libmfw_gst_amrdec.so)
 0x00000001 (NEEDED)                     Shared library: [lib_peq_arm11_elinux.so.1.fhw]
(target/usr/lib/gstreamer-0.10/libmfw_gst_audio_pp.so)
 0x00000001 (NEEDED)                     Shared library: [lib_mp3_enc_arm12_elinux.so.2]
(target/usr/lib/gstreamer-0.10/libmfw_gst_mp3enc.so)
 0x00000001 (NEEDED)                     Shared library: [lib_mp3_enc_arm12_elinux.so.2]
(target/usr/lib/gstreamer-1.0/libgstimxaudio.so)

Note that I added a staging install hook as well because otherwise the gst1-imx plugin doesn't find lib_mp3_enc_arm12_elinux.so at build time.

Not to copy the same library twice I decided to go with a symlink. Let me know if that's acceptable.

Regards,
Gary

---
 package/libfslcodec/libfslcodec.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/libfslcodec/libfslcodec.mk +15 -0
index e151c66..89d058c 100644
@@ -20,4 +20,19 @@ endef
 # FIXME The Makefile installs both the arm9 and arm11 versions of the
 # libraries, but we only need one of them.
 
+# Use symlinks in staging dir so every application can link against the libs
+# whether they look at imx-mm or not (gst-fsl-plugins vs. gst1-imx).
+define LIBFSLCODEC_FIXUP_STAGING_PATH
+	cd $(STAGING_DIR)/usr/lib; \
+	find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \;
+endef
+LIBFSLCODEC_POST_INSTALL_STAGING_HOOKS += LIBFSLCODEC_FIXUP_STAGING_PATH
+
+# Use symlinks in install dir as well to match staging setup.
+define LIBFSLCODEC_FIXUP_TARGET_PATH
+	cd $(TARGET_DIR)/usr/lib; \
+	find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \;
+endef
+LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.0
#2 lore raw

PATCH v3 2/4 libfslcodec: add missing configure options

In reply to Gary Bisson

Enable VPU and hard float support when the proper configuration is setup. BR2_ARM_EABIHF=y
BR2_PACKAGE_IMX_VPU=y

See Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/blob/fido/recipes-
multimedia/libfslcodec/libfslcodec.inc

Tested with the Linaro ARM 2015.11 toolchain.

---

Thanks to those options:
- lib_jpeg_dec_arm11_elinux_novpu.so isn't copied
- lib_peq_arm11_elinux.so.1.fhw is copied instead of the fsw version

Regards,
Gary

---
 package/libfslcodec/libfslcodec.mk | 8 ++++++++
 1 file changed, 8 insertions(+)
package/libfslcodec/libfslcodec.mk +8 -0
index 89d058c..f702ce6 100644
@@ -13,6 +13,14 @@ LIBFSLCODEC_LICENSE = Freescale Semiconductor Software License Agreement, BSD-3c
 LIBFSLCODEC_LICENSE_FILES = EULA COPYING
 LIBFSLCODEC_REDISTRIBUTE = NO
 
+ifeq ($(BR2_ARM_EABIHF),y)
+LIBFSLCODEC_CONF_OPTS += --enable-fhw
+endif
+
+ifeq ($(BR2_PACKAGE_IMX_VPU),y)
+LIBFSLCODEC_CONF_OPTS += --enable-vpu
+endif
+
 define LIBFSLCODEC_EXTRACT_CMDS
 	$(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLCODEC_SOURCE))
 endef
Signature · 1 line
2.7.0
#3 lore raw

PATCH v3 3/4 libfslparser: add install hooks to fix libraries path

In reply to Gary Bisson

By default, all the libraries are installed under /usr/lib/imx-mm which causes problems at runtime.

---

I'm actually not sure if libfslparser is needed at all. I couldn't find a library depending on any of the one from the package. But Yocto still has depency on the package for gst-fsl-plugins:
https://github.com/Freescale/meta-fsl-arm/blob/fido/recipes-multimedia/gstreamer/gst-fsl-plugin.inc#L9

Anyway, since the libraries are copied to imx-mm, the package needs that patch to be of any use.

Regards,
Gary

---
 package/libfslparser/libfslparser.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
package/libfslparser/libfslparser.mk +15 -0
index c5efc85..62c6053 100644
@@ -20,4 +20,19 @@ endef
 # The Makefile installs several versions of the libraries, but we only
 # need one of them, depending on the platform.
 
+# Use symlinks in staging dir so every application can link against the libs
+# whether they look at imx-mm or not (gst-fsl-plugins vs. gst1-imx).
+define LIBFSLPARSER_FIXUP_STAGING_PATH
+	cd $(STAGING_DIR)/usr/lib; \
+	find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \;
+endef
+LIBFSLPARSER_POST_INSTALL_STAGING_HOOKS += LIBFSLPARSER_FIXUP_STAGING_PATH
+
+# Use symlinks for install dir as well to match staging setup.
+define LIBFSLPARSER_FIXUP_TARGET_PATH
+	cd $(TARGET_DIR)/usr/lib; \
+	find imx-mm -mindepth 2 -maxdepth 2 -not -type d -exec ln -fs {} . \;
+endef
+LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
+
 $(eval $(autotools-package))
Signature · 1 line
2.7.0
#4 lore raw

PATCH v3 4/4 libfslparser: add missing configure options

In reply to Gary Bisson

Enable hard float support when the proper configuration is setup. BR2_ARM_EABIHF=y

See Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/blob/fido/recipes-multimedia/libfslparser/libfslparser.inc

Tested with Linaro ARM 2015.11 toolchain.

---

Thanks to those options:
- libraries are copied from release/lib/yocto/hw instead of release/lib/yocto/sw.

Regards,
Gary

---
 package/libfslparser/libfslparser.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libfslparser/libfslparser.mk +4 -0
index 62c6053..586a956 100644
@@ -13,6 +13,10 @@ LIBFSLPARSER_LICENSE = Freescale Semiconductor Software License Agreement
 LIBFSLPARSER_LICENSE_FILES = EULA COPYING
 LIBFSLPARSER_REDISTRIBUTE = NO
 
+ifeq ($(BR2_ARM_EABIHF),y)
+LIBFSLPARSER_CONF_OPTS += --enable-fhw
+endif
+
 define LIBFSLPARSER_EXTRACT_CMDS
 	$(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLPARSER_SOURCE))
 endef
Signature · 1 line
2.7.0