* [Buildroot] [PATCH 1/4] libfslcodec: add install hooks to fix libraries path
2015-10-29 20:06 [Buildroot] [PATCH 0/4] libfsl*: fix install path + update conf opts Gary Bisson
@ 2015-10-29 20:06 ` Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 2/4] libfslcodec: add missing configure options Gary Bisson
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Gary Bisson @ 2015-10-29 20:06 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
This has been tested implicitely by running Gstreamer without any special
setup (no ld.so.conf nor LD_LIBRARY_PATH modification):
# gst-launch-0.10 playbin uri=file:///root/tears_of_steel_1080p.webm
# gst-launch-0.10 audiotestsrc ! mfw_mp3encoder ! fakesink
# gst-launch-1.0 playbin uri=file:///root/tears_of_steel_1080p.webm
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 | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk
index 473d662..4d8fd18 100644
--- a/package/libfslcodec/libfslcodec.mk
+++ b/package/libfslcodec/libfslcodec.mk
@@ -20,4 +20,20 @@ endef
# FIXME The Makefile installs both the arm9 and arm11 versions of the
# libraries, but we only need one of them.
+# do the symlink in staging area as some packages like gst-fsl-plugins is
+# looking for libraries in imx-mm whereas gst1-imx doesn't
+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
+
+# no need to symlink in target image, just move libraries around
+define LIBFSLCODEC_FIXUP_TARGET_PATH
+ find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+ -exec mv {} $(TARGET_DIR)/usr/lib \;
+ rm -fr $(TARGET_DIR)/usr/lib/imx-mm
+endef
+LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_FIXUP_TARGET_PATH
+
$(eval $(autotools-package))
--
2.6.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 2/4] libfslcodec: add missing configure options
2015-10-29 20:06 [Buildroot] [PATCH 0/4] libfsl*: fix install path + update conf opts Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
@ 2015-10-29 20:06 ` Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 4/4] libfslparser: add missing configure options Gary Bisson
3 siblings, 0 replies; 10+ messages in thread
From: Gary Bisson @ 2015-10-29 20:06 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 4d8fd18..ae68bdd 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.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-10-29 20:06 [Buildroot] [PATCH 0/4] libfsl*: fix install path + update conf opts Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 1/4] libfslcodec: add install hooks to fix libraries path Gary Bisson
2015-10-29 20:06 ` [Buildroot] [PATCH 2/4] libfslcodec: add missing configure options Gary Bisson
@ 2015-10-29 20:06 ` Gary Bisson
2015-10-30 10:27 ` Jérôme Pouiller
2015-10-29 20:06 ` [Buildroot] [PATCH 4/4] libfslparser: add missing configure options Gary Bisson
3 siblings, 1 reply; 10+ messages in thread
From: Gary Bisson @ 2015-10-29 20:06 UTC (permalink / raw)
To: buildroot
By default, all the libraries are installed under /usr/lib/imx-mm which
causes problems at runtime.
This has been tested implicitely by running Gstreamer without any special
setup (no ld.so.conf nor LD_LIBRARY_PATH modification):
# gst-launch-0.10 playbin uri=file:///root/tears_of_steel_1080p.webm
# gst-launch-0.10 audiotestsrc ! mfw_mp3encoder ! fakesink
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 | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk
index 2b53d62..aa02f19 100644
--- a/package/libfslparser/libfslparser.mk
+++ b/package/libfslparser/libfslparser.mk
@@ -20,4 +20,12 @@ endef
# The Makefile installs several versions of the libraries, but we only
# need one of them, depending on the platform.
+# no need to symlink in target image, just move libraries around
+define LIBFSLPARSER_FIXUP_TARGET_PATH
+ find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
+ -exec mv {} $(TARGET_DIR)/usr/lib \;
+ rm -fr $(TARGET_DIR)/usr/lib/imx-mm
+endef
+LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
+
$(eval $(autotools-package))
--
2.6.1
^ permalink raw reply related [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-10-29 20:06 ` [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
@ 2015-10-30 10:27 ` Jérôme Pouiller
2015-10-30 10:36 ` Gary Bisson
0 siblings, 1 reply; 10+ messages in thread
From: Jérôme Pouiller @ 2015-10-30 10:27 UTC (permalink / raw)
To: buildroot
Hello Garry,
On Thursday 29 October 2015 21:06:51 Gary Bisson wrote:
[...]
> b/package/libfslparser/libfslparser.mk index 2b53d62..aa02f19 100644
> --- a/package/libfslparser/libfslparser.mk
> +++ b/package/libfslparser/libfslparser.mk
> @@ -20,4 +20,12 @@ endef
> # The Makefile installs several versions of the libraries, but we only
> # need one of them, depending on the platform.
>
> +# no need to symlink in target image, just move libraries around
> +define LIBFSLPARSER_FIXUP_TARGET_PATH
> + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> + -exec mv {} $(TARGET_DIR)/usr/lib \;
> + rm -fr $(TARGET_DIR)/usr/lib/imx-mm
> +endef
> +LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
A POST_INSTALL_STAGING_HOOKS is not necessary for libfslparser?
Regards,
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-10-30 10:27 ` Jérôme Pouiller
@ 2015-10-30 10:36 ` Gary Bisson
2015-10-30 10:43 ` Jérôme Pouiller
0 siblings, 1 reply; 10+ messages in thread
From: Gary Bisson @ 2015-10-30 10:36 UTC (permalink / raw)
To: buildroot
Hi Jerome,
On Fri, Oct 30, 2015 at 11:27 AM, J?r?me Pouiller <jezz@sysmic.org> wrote:
>
> Hello Garry,
>
> On Thursday 29 October 2015 21:06:51 Gary Bisson wrote:
> [...]
> > b/package/libfslparser/libfslparser.mk index 2b53d62..aa02f19 100644
> > --- a/package/libfslparser/libfslparser.mk
> > +++ b/package/libfslparser/libfslparser.mk
> > @@ -20,4 +20,12 @@ endef
> > # The Makefile installs several versions of the libraries, but we only
> > # need one of them, depending on the platform.
> >
> > +# no need to symlink in target image, just move libraries around
> > +define LIBFSLPARSER_FIXUP_TARGET_PATH
> > + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \
> > + -exec mv {} $(TARGET_DIR)/usr/lib \;
> > + rm -fr $(TARGET_DIR)/usr/lib/imx-mm
> > +endef
> > +LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_FIXUP_TARGET_PATH
> A POST_INSTALL_STAGING_HOOKS is not necessary for libfslparser?
No, libfslparser is only needed by gst-fsl-plugins which looks for the
libs at the right location at build time (usr/lib/imx-mm).
The staging hook is needed for libfslcodec since it is used by both
gst-fsl-plugins and gst1-imx (not looking at the imx-mm path at build
time).
Although it might have been more consistent to have the staging hook
in both, I chose to reduce the patch as much as possible. Plus I'm not
sure people will like my symlink approach in the staging directory.
Regards,
Gary
^ permalink raw reply [flat|nested] 10+ messages in thread* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-10-30 10:36 ` Gary Bisson
@ 2015-10-30 10:43 ` Jérôme Pouiller
2015-11-08 16:08 ` Gary Bisson
0 siblings, 1 reply; 10+ messages in thread
From: Jérôme Pouiller @ 2015-10-30 10:43 UTC (permalink / raw)
To: buildroot
On Friday 30 October 2015 11:36:21 Gary Bisson wrote:
> Hi Jerome,
>
> On Fri, Oct 30, 2015 at 11:27 AM, J?r?me Pouiller <jezz@sysmic.org>
wrote:
[...]
> > A POST_INSTALL_STAGING_HOOKS is not necessary for libfslparser?
>
> No, libfslparser is only needed by gst-fsl-plugins which looks for the
> libs at the right location at build time (usr/lib/imx-mm).
>
> The staging hook is needed for libfslcodec since it is used by both
> gst-fsl-plugins and gst1-imx (not looking at the imx-mm path at build
> time).
>
> Although it might have been more consistent to have the staging hook
> in both, I chose to reduce the patch as much as possible. Plus I'm not
> sure people will like my symlink approach in the staging directory.
IMHO, target/ should be a subset of staging/ (even if today, this is far
from the case). So, I would prefer to also create symlinks in staging/.
Regards,
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-10-30 10:43 ` Jérôme Pouiller
@ 2015-11-08 16:08 ` Gary Bisson
2015-11-09 8:43 ` Jérôme Pouiller
0 siblings, 1 reply; 10+ messages in thread
From: Gary Bisson @ 2015-11-08 16:08 UTC (permalink / raw)
To: buildroot
Hi J?r?me,
On Fri, Oct 30, 2015 at 11:43 AM, J?r?me Pouiller <jezz@sysmic.org> wrote:
> On Friday 30 October 2015 11:36:21 Gary Bisson wrote:
>> Hi Jerome,
>>
>> On Fri, Oct 30, 2015 at 11:27 AM, J?r?me Pouiller <jezz@sysmic.org>
> wrote:
> [...]
>> > A POST_INSTALL_STAGING_HOOKS is not necessary for libfslparser?
>>
>> No, libfslparser is only needed by gst-fsl-plugins which looks for the
>> libs at the right location at build time (usr/lib/imx-mm).
>>
>> The staging hook is needed for libfslcodec since it is used by both
>> gst-fsl-plugins and gst1-imx (not looking at the imx-mm path at build
>> time).
>>
>> Although it might have been more consistent to have the staging hook
>> in both, I chose to reduce the patch as much as possible. Plus I'm not
>> sure people will like my symlink approach in the staging directory.
> IMHO, target/ should be a subset of staging/ (even if today, this is far
> from the case). So, I would prefer to also create symlinks in staging/.
So I'm ok with adding the symlinks to the fslparser staging as well.
But if we'd really like to have target as a subset of staging,
shouldn't we use symlinks for the target too?
Regards,
Gary
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path
2015-11-08 16:08 ` Gary Bisson
@ 2015-11-09 8:43 ` Jérôme Pouiller
0 siblings, 0 replies; 10+ messages in thread
From: Jérôme Pouiller @ 2015-11-09 8:43 UTC (permalink / raw)
To: buildroot
On Sunday 08 November 2015 17:08:43 Gary Bisson wrote:
> Hi J?r?me,
>
> On Fri, Oct 30, 2015 at 11:43 AM, J?r?me Pouiller <jezz@sysmic.org>
wrote:
> > On Friday 30 October 2015 11:36:21 Gary Bisson wrote:
[...]
> >> Although it might have been more consistent to have the staging
> >> hook
> >> in both, I chose to reduce the patch as much as possible. Plus I'm
> >> not sure people will like my symlink approach in the staging
> >> directory.>
> > IMHO, target/ should be a subset of staging/ (even if today, this is
> > far from the case). So, I would prefer to also create symlinks in
> > staging/.
> So I'm ok with adding the symlinks to the fslparser staging as well.
> But if we'd really like to have target as a subset of staging,
> shouldn't we use symlinks for the target too?
Sure, I am in favor to use symlinks for target/ also.
BR,
--
J?r?me Pouiller, Sysmic
Embedded Linux specialist
http://www.sysmic.fr
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH 4/4] libfslparser: add missing configure options
2015-10-29 20:06 [Buildroot] [PATCH 0/4] libfsl*: fix install path + update conf opts Gary Bisson
` (2 preceding siblings ...)
2015-10-29 20:06 ` [Buildroot] [PATCH 3/4] libfslparser: add install hooks to fix libraries path Gary Bisson
@ 2015-10-29 20:06 ` Gary Bisson
3 siblings, 0 replies; 10+ messages in thread
From: Gary Bisson @ 2015-10-29 20:06 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 aa02f19..e34e78d 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.1
^ permalink raw reply related [flat|nested] 10+ messages in thread