Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts
@ 2015-12-10 13:52 Gary Bisson
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Gary Bisson @ 2015-12-10 13:52 UTC (permalink / raw)
  To: buildroot

Hi all,

I meant to do this series for a long time:
http://patchwork.ozlabs.org/patch/409684/

I tried to split what Jeff offered into separate patches.

Some are taking care of the install path that was causing troubles to
gst-fsl-plugins at runtime since we don't use ldconfig.

The other patches enable some missing configure options (hard float and vpu)
as pointed by Jeff.

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

Here is the defconfig that has been used to test those patches:
BR2_arm=y
BR2_cortex_a9=y
BR2_ARM_EABIHF=y
BR2_ARM_ENABLE_NEON=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/nitrogen6x/post-build.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/d7a412b/linux-imx6-d7a412b.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 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_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

I'll detail on each patch what has been done.

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(+)

-- 
2.6.2

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-10 13:52 [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts Gary Bisson
@ 2015-12-10 13:52 ` Gary Bisson
  2015-12-13 20:31   ` Yann E. MORIN
  2015-12-13 20:36   ` Yann E. MORIN
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options Gary Bisson
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 15+ messages in thread
From: Gary Bisson @ 2015-12-10 13:52 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---

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(+)

diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
index 473d662..f8c6aa8 100644
--- a/package/libfslcodec/libfslcodec.mk
+++ b/package/libfslcodec/libfslcodec.mk
@@ -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
+	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
+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
+	find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+		-exec ln -fs {} $(TARGET_DIR)/usr/lib \;
+endef
+LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH
+
 $(eval $(autotools-package))
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options
  2015-12-10 13:52 [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts Gary Bisson
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
@ 2015-12-10 13:52 ` Gary Bisson
  2015-12-13 20:32   ` Yann E. MORIN
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options Gary Bisson
  3 siblings, 1 reply; 15+ messages in thread
From: Gary Bisson @ 2015-12-10 13:52 UTC (permalink / raw)
  To: buildroot

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 2014.09 toolchain.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---

Thanks to those options, I could see that:
- 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(+)

diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
index f8c6aa8..05e5edb 100644
--- a/package/libfslcodec/libfslcodec.mk
+++ b/package/libfslcodec/libfslcodec.mk
@@ -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
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path
  2015-12-10 13:52 [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts Gary Bisson
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options Gary Bisson
@ 2015-12-10 13:52 ` Gary Bisson
  2015-12-13 20:38   ` Yann E. MORIN
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options Gary Bisson
  3 siblings, 1 reply; 15+ messages in thread
From: Gary Bisson @ 2015-12-10 13:52 UTC (permalink / raw)
  To: buildroot

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

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---

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

Regards,
Gary

---
 package/libfslparser/libfslparser.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk
index 2b53d62..221d5e4 100644
--- a/package/libfslparser/libfslparser.mk
+++ b/package/libfslparser/libfslparser.mk
@@ -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
+	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
+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
+	find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+		-exec ln -fs {} $(TARGET_DIR)/usr/lib \;
+endef
+LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
+
 $(eval $(autotools-package))
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options
  2015-12-10 13:52 [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts Gary Bisson
                   ` (2 preceding siblings ...)
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
@ 2015-12-10 13:52 ` Gary Bisson
  2015-12-13 20:39   ` Yann E. MORIN
  3 siblings, 1 reply; 15+ messages in thread
From: Gary Bisson @ 2015-12-10 13:52 UTC (permalink / raw)
  To: buildroot

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 2014.09 toolchain.

Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
---

Thanks to those options, I could see that libraries from copied from
release/lib/yocto/hw instead of release/lib/yocto/sw.

Regards,
Gary

---
 package/libfslparser/libfslparser.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk
index 221d5e4..c2b63ce 100644
--- a/package/libfslparser/libfslparser.mk
+++ b/package/libfslparser/libfslparser.mk
@@ -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
-- 
2.6.2

^ permalink raw reply related	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
@ 2015-12-13 20:31   ` Yann E. MORIN
  2015-12-14 21:34     ` Gary Bisson
  2015-12-13 20:36   ` Yann E. MORIN
  1 sibling, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-12-13 20:31 UTC (permalink / raw)
  To: buildroot

Gary, All,

On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> 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
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> 
> 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.

The link you pointed to does a move, not a copy. Why do you do a symlink?

1) Where are the libraries searched for at build time? If they are
   only searched for in /usr/lib/ , then do a move. If womething is
   positively looking for them in /usr/lin/imx-mm/ , then do a symlink,
   indeed.

2) Where are libraries searched for at runtime? Same logic as for build
   time.

Regards,
Yann E. MORIN.

> Regards,
> Gary
> 
> ---
>  package/libfslcodec/libfslcodec.mk | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> index 473d662..f8c6aa8 100644
> --- a/package/libfslcodec/libfslcodec.mk
> +++ b/package/libfslcodec/libfslcodec.mk
> @@ -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
> +	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
> +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
> +	find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(TARGET_DIR)/usr/lib \;
> +endef
> +LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH
> +
>  $(eval $(autotools-package))
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options Gary Bisson
@ 2015-12-13 20:32   ` Yann E. MORIN
  2015-12-14 21:28     ` Gary Bisson
  0 siblings, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-12-13 20:32 UTC (permalink / raw)
  To: buildroot

Gary, All,

On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> 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 2014.09 toolchain.
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> 
> Thanks to those options, I could see that:
> - 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(+)
> 
> diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> index f8c6aa8..05e5edb 100644
> --- a/package/libfslcodec/libfslcodec.mk
> +++ b/package/libfslcodec/libfslcodec.mk
> @@ -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

What about adding --disable-fhw when not EABIhf?

> +ifeq ($(BR2_PACKAGE_IMX_VPU),y)
> +LIBFSLCODEC_CONF_OPTS += --enable-vpu
> +endif

Ditto when imx-vpu is not enabled?

Regards,
Yann E. MORIN.

>  define LIBFSLCODEC_EXTRACT_CMDS
>  	$(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLCODEC_SOURCE))
>  endef
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
  2015-12-13 20:31   ` Yann E. MORIN
@ 2015-12-13 20:36   ` Yann E. MORIN
  2015-12-14 21:25     ` Gary Bisson
  1 sibling, 1 reply; 15+ messages in thread
From: Yann E. MORIN @ 2015-12-13 20:36 UTC (permalink / raw)
  To: buildroot

Gary, All,

On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> 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
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> 
> 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(+)
> 
> diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> index 473d662..f8c6aa8 100644
> --- a/package/libfslcodec/libfslcodec.mk
> +++ b/package/libfslcodec/libfslcodec.mk
> @@ -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).

Hmmm.. I may have overlooked that part.

So, gst-fsl-plugins looks for the libraries in /usr/lib/imx-mm/ , while
gst1-imx looks for them in /usr/lib , right?

Is it possible to make gst-fsl-plugins look in /usr/lib, too?

(or the other way around if the lookup is the other way around, of
course...)

Regards,
Yann E. MORIN.

> +define LIBFSLCODEC_FIXUP_STAGING_PATH
> +	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
> +endef
> +LIBFSLCODEC_POST_INSTALL_STAGING_HOOKS += LIBFSLCODEC_FIXUP_STAGING_PATH
> +
> +# Use symlinks in install dir as well to match staging setup.

In complement to my previous reply, with insight from what you said
above: even if gst-fsl-plugins looks for in /usr/lib/imx-mm at build
time, does it still look there at runtime? If not, then just do a move.

Regards,
Yann E. MORIN.

> +define LIBFSLCODEC_FIXUP_TARGET_PATH
> +	find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(TARGET_DIR)/usr/lib \;
> +endef
> +LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH
> +
>  $(eval $(autotools-package))
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
@ 2015-12-13 20:38   ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-12-13 20:38 UTC (permalink / raw)
  To: buildroot

Gary, All,

On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> By default, all the libraries are installed under /usr/lib/imx-mm which
> causes problems at runtime.
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> 
> 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
> 
> Regards,
> Gary
> 
> ---
>  package/libfslparser/libfslparser.mk | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk
> index 2b53d62..221d5e4 100644
> --- a/package/libfslparser/libfslparser.mk
> +++ b/package/libfslparser/libfslparser.mk
> @@ -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).

Same comments as my previous replies to the first patch in this series.

> +define LIBFSLPARSER_FIXUP_STAGING_PATH
> +	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
> +endef
> +LIBFSLPARSER_POST_INSTALL_STAGING_HOOKS += LIBFSLPARSER_FIXUP_STAGING_PATH
> +
> +# Use symlinks for install dir as well to match staging setup.

Ditto.

Regards,
Yann E. MORIN.

> +define LIBFSLPARSER_FIXUP_TARGET_PATH
> +	find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> +		-exec ln -fs {} $(TARGET_DIR)/usr/lib \;
> +endef
> +LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
> +
>  $(eval $(autotools-package))
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options
  2015-12-10 13:52 ` [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options Gary Bisson
@ 2015-12-13 20:39   ` Yann E. MORIN
  0 siblings, 0 replies; 15+ messages in thread
From: Yann E. MORIN @ 2015-12-13 20:39 UTC (permalink / raw)
  To: buildroot

Gary, All,

On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> 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 2014.09 toolchain.
> 
> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> ---
> 
> Thanks to those options, I could see that libraries from copied from
> release/lib/yocto/hw instead of release/lib/yocto/sw.
> 
> Regards,
> Gary
> 
> ---
>  package/libfslparser/libfslparser.mk | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk
> index 221d5e4..c2b63ce 100644
> --- a/package/libfslparser/libfslparser.mk
> +++ b/package/libfslparser/libfslparser.mk
> @@ -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

What about adding --disable-fhw when not EABIhf?

Regards,
Yann E. MORIN.

>  define LIBFSLPARSER_EXTRACT_CMDS
>  	$(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(LIBFSLPARSER_SOURCE))
>  endef
> -- 
> 2.6.2
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-13 20:36   ` Yann E. MORIN
@ 2015-12-14 21:25     ` Gary Bisson
  2016-01-24 20:55       ` Gary Bisson
  0 siblings, 1 reply; 15+ messages in thread
From: Gary Bisson @ 2015-12-14 21:25 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Sun, Dec 13, 2015 at 09:36:42PM +0100, Yann E. MORIN wrote:
> Gary, All,
> 
> On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> > 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
> > 
> > Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> > ---
> > 
> > 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(+)
> > 
> > diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> > index 473d662..f8c6aa8 100644
> > --- a/package/libfslcodec/libfslcodec.mk
> > +++ b/package/libfslcodec/libfslcodec.mk
> > @@ -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).
> 
> Hmmm.. I may have overlooked that part.
> 
> So, gst-fsl-plugins looks for the libraries in /usr/lib/imx-mm/ , while
> gst1-imx looks for them in /usr/lib , right?

That is correct indeed.

> Is it possible to make gst-fsl-plugins look in /usr/lib, too?

Never really looked into it but yep maybe it is just a matter of
modifying a few lines of Makefile.am. It just sounds like more troubles
doing so, maybe having to update the patch every release and so on.

> (or the other way around if the lookup is the other way around, of
> course...)

Gstreamer1-imx is way cleaner that gst-fsl-plugins, I'd like to keep it
that way. What about removing gst-fsl-plugins and gstreamer0.10? ;)

> > +define LIBFSLCODEC_FIXUP_STAGING_PATH
> > +	find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> > +		-exec ln -fs {} $(STAGING_DIR)/usr/lib \;
> > +endef
> > +LIBFSLCODEC_POST_INSTALL_STAGING_HOOKS += LIBFSLCODEC_FIXUP_STAGING_PATH
> > +
> > +# Use symlinks in install dir as well to match staging setup.
> 
> In complement to my previous reply, with insight from what you said
> above: even if gst-fsl-plugins looks for in /usr/lib/imx-mm at build
> time, does it still look there at runtime? If not, then just do a move.

No, that is what people have been complaining about for quite some time
now:
http://patchwork.ozlabs.org/patch/409684/

Regards,
Gary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options
  2015-12-13 20:32   ` Yann E. MORIN
@ 2015-12-14 21:28     ` Gary Bisson
  2016-03-04  9:17       ` Gary Bisson
  0 siblings, 1 reply; 15+ messages in thread
From: Gary Bisson @ 2015-12-14 21:28 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Sun, Dec 13, 2015 at 09:32:24PM +0100, Yann E. MORIN wrote:
> Gary, All,
> 
> On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> > 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 2014.09 toolchain.
> > 
> > Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> > ---
> > 
> > Thanks to those options, I could see that:
> > - 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(+)
> > 
> > diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> > index f8c6aa8..05e5edb 100644
> > --- a/package/libfslcodec/libfslcodec.mk
> > +++ b/package/libfslcodec/libfslcodec.mk
> > @@ -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
> 
> What about adding --disable-fhw when not EABIhf?

The configure only looks for enable-fhw and therefore considers the
features is disabled by default.

> > +ifeq ($(BR2_PACKAGE_IMX_VPU),y)
> > +LIBFSLCODEC_CONF_OPTS += --enable-vpu
> > +endif
> 
> Ditto when imx-vpu is not enabled?

Same here for the vpu option, configure only looks for the enable
option.

Regards,
Gary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-13 20:31   ` Yann E. MORIN
@ 2015-12-14 21:34     ` Gary Bisson
  0 siblings, 0 replies; 15+ messages in thread
From: Gary Bisson @ 2015-12-14 21:34 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Sun, Dec 13, 2015 at 9:31 PM, Yann E. MORIN <yann.morin.1998@free.fr> wrote:
> Gary, All,
>
> On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
>> 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
>>
>> Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
>> ---
>>
>> 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.
>
> The link you pointed to does a move, not a copy. Why do you do a symlink?
>
> 1) Where are the libraries searched for at build time? If they are
>    only searched for in /usr/lib/ , then do a move. If womething is
>    positively looking for them in /usr/lin/imx-mm/ , then do a symlink,
>    indeed.
>
> 2) Where are libraries searched for at runtime? Same logic as for build
>    time.

Just want to add something here, my v1 was doing a symlink in staging
(because of the build time dependencies) and a move at runtime since
everything is looking at the same location in that case. But then
J?r?me said that he would prefer to have the same mechanism (symlink)
in both even though it is not necessary for the target. The reason was
to have some consistency between staging and target. What are thoughts
on that?

Regards,
Gary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path
  2015-12-14 21:25     ` Gary Bisson
@ 2016-01-24 20:55       ` Gary Bisson
  0 siblings, 0 replies; 15+ messages in thread
From: Gary Bisson @ 2016-01-24 20:55 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Mon, Dec 14, 2015 at 10:25 PM, Gary Bisson
<gary.bisson@boundarydevices.com> wrote:
> Yann, All,
>
> On Sun, Dec 13, 2015 at 09:36:42PM +0100, Yann E. MORIN wrote:
>> Gary, All,
>>
>> On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
>> > 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
>> >
>> > Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
>> > ---
>> >
>> > 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(+)
>> >
>> > diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
>> > index 473d662..f8c6aa8 100644
>> > --- a/package/libfslcodec/libfslcodec.mk
>> > +++ b/package/libfslcodec/libfslcodec.mk
>> > @@ -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).
>>
>> Hmmm.. I may have overlooked that part.
>>
>> So, gst-fsl-plugins looks for the libraries in /usr/lib/imx-mm/ , while
>> gst1-imx looks for them in /usr/lib , right?
>
> That is correct indeed.
>
>> Is it possible to make gst-fsl-plugins look in /usr/lib, too?
>
> Never really looked into it but yep maybe it is just a matter of
> modifying a few lines of Makefile.am. It just sounds like more troubles
> doing so, maybe having to update the patch every release and so on.
>
>> (or the other way around if the lookup is the other way around, of
>> course...)
>
> Gstreamer1-imx is way cleaner that gst-fsl-plugins, I'd like to keep it
> that way. What about removing gst-fsl-plugins and gstreamer0.10? ;)
>
>> > +define LIBFSLCODEC_FIXUP_STAGING_PATH
>> > +   find $(STAGING_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
>> > +           -exec ln -fs {} $(STAGING_DIR)/usr/lib \;
>> > +endef
>> > +LIBFSLCODEC_POST_INSTALL_STAGING_HOOKS += LIBFSLCODEC_FIXUP_STAGING_PATH
>> > +
>> > +# Use symlinks in install dir as well to match staging setup.
>>
>> In complement to my previous reply, with insight from what you said
>> above: even if gst-fsl-plugins looks for in /usr/lib/imx-mm at build
>> time, does it still look there at runtime? If not, then just do a move.
>
> No, that is what people have been complaining about for quite some time
> now:
> http://patchwork.ozlabs.org/patch/409684/

Any update on this series? Would using symlink be acceptable?

Regards,
Gary

^ permalink raw reply	[flat|nested] 15+ messages in thread

* [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options
  2015-12-14 21:28     ` Gary Bisson
@ 2016-03-04  9:17       ` Gary Bisson
  0 siblings, 0 replies; 15+ messages in thread
From: Gary Bisson @ 2016-03-04  9:17 UTC (permalink / raw)
  To: buildroot

Yann, All,

On Mon, Dec 14, 2015 at 10:28:54PM +0100, Gary Bisson wrote:
> Yann, All,
> 
> On Sun, Dec 13, 2015 at 09:32:24PM +0100, Yann E. MORIN wrote:
> > Gary, All,
> > 
> > On 2015-12-10 14:52 +0100, Gary Bisson spake thusly:
> > > 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 2014.09 toolchain.
> > > 
> > > Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
> > > ---
> > > 
> > > Thanks to those options, I could see that:
> > > - 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(+)
> > > 
> > > diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
> > > index f8c6aa8..05e5edb 100644
> > > --- a/package/libfslcodec/libfslcodec.mk
> > > +++ b/package/libfslcodec/libfslcodec.mk
> > > @@ -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
> > 
> > What about adding --disable-fhw when not EABIhf?
> 
> The configure only looks for enable-fhw and therefore considers the
> features is disabled by default.
> 
> > > +ifeq ($(BR2_PACKAGE_IMX_VPU),y)
> > > +LIBFSLCODEC_CONF_OPTS += --enable-vpu
> > > +endif
> > 
> > Ditto when imx-vpu is not enabled?
> 
> Same here for the vpu option, configure only looks for the enable
> option.

Sorry for reviving this thread (again), but I was thinking that maybe we
could merge the two "missing configure options" patches from the series
since they do not depend on the libraries location fix.

Then I could offer another version of the series with only the path fix.
I'm still unclear on which option would get those patches approved. I
understand the symbolic links aren't great. I'm considering removing
gst-fsl-plugins for GStreamer0.10 since Yocto did it:
https://github.com/Freescale/meta-fsl-arm/commit/83b240e7

Let me know your thoughts.

Thanks,
Gary

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2016-03-04  9:17 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-10 13:52 [Buildroot] [PATCH v2 0/4] libfsl*: fix install path + update conf opts Gary Bisson
2015-12-10 13:52 ` [Buildroot] [PATCH v2 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
2015-12-13 20:31   ` Yann E. MORIN
2015-12-14 21:34     ` Gary Bisson
2015-12-13 20:36   ` Yann E. MORIN
2015-12-14 21:25     ` Gary Bisson
2016-01-24 20:55       ` Gary Bisson
2015-12-10 13:52 ` [Buildroot] [PATCH v2 2/4] libfslcodec: add missing configure options Gary Bisson
2015-12-13 20:32   ` Yann E. MORIN
2015-12-14 21:28     ` Gary Bisson
2016-03-04  9:17       ` Gary Bisson
2015-12-10 13:52 ` [Buildroot] [PATCH v2 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
2015-12-13 20:38   ` Yann E. MORIN
2015-12-10 13:52 ` [Buildroot] [PATCH v2 4/4] libfslparser: add missing configure options Gary Bisson
2015-12-13 20:39   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox