* [Buildroot] host ldconfig package @ 2014-11-06 23:42 Jeff Horn 2014-11-07 7:25 ` Thomas Petazzoni 2014-11-07 16:35 ` Jérôme Pouiller 0 siblings, 2 replies; 8+ messages in thread From: Jeff Horn @ 2014-11-06 23:42 UTC (permalink / raw) To: buildroot Hi, I am using buildroot for one of our i.MX6 based boards and I have it mostly working ( I can't get video to work ). While troubleshooting freescales gstreamer plugins I noticed the /etc/ld.so.cache was empty. I found in the buildroot makefile where ldconfig is called so I manually ran /sbin/ldconfig -v -r output/target and I see lots of output like this: /sbin/ldconfig.real: /usr/lib/libGLESv2.so is for unknown machine 40. It seems the ldconfig on my host (Ubuntu 14.04) cannot handle the tartget rootfs. I found a post from a year ago with the same issue but I did not see any resolution. So, I looked at my current Yocto build and I discovered Yocto builds a native hacked version of ldconfig and that is what gets called for the target rootfs. So, I copied that binary over and modified buildroots Makefile to call that instead and the cache is now populated correctly. With that all working I created a buildroot host ldconfig package based on the Yocto code ( I'm using BR2_EXTERNAL) and using that the ld.so.cache gets populated. I still had to modify the buildoort Makfile to look for the newly installed host ldconfig. I guess my question is are others having any issues with image finalization and ldconfig? On another note I see others are working on the fsl-gst-plugins and I can help test that as I REALLY want to get a working image out of buildroot. Thanks in advance, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141106/ba32f38a/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-06 23:42 [Buildroot] host ldconfig package Jeff Horn @ 2014-11-07 7:25 ` Thomas Petazzoni 2014-11-07 16:35 ` Jérôme Pouiller 1 sibling, 0 replies; 8+ messages in thread From: Thomas Petazzoni @ 2014-11-07 7:25 UTC (permalink / raw) To: buildroot Dear Jeff Horn, On Thu, 6 Nov 2014 15:42:30 -0800, Jeff Horn wrote: > I am using buildroot for one of our i.MX6 based boards and I have it mostly > working ( I can't get video to work ). While troubleshooting freescales > gstreamer plugins I noticed the /etc/ld.so.cache was empty. I found in the > buildroot makefile where ldconfig is called so I manually ran > /sbin/ldconfig -v -r output/target and I see lots of output like this: > > /sbin/ldconfig.real: /usr/lib/libGLESv2.so is for unknown machine 40. > > It seems the ldconfig on my host (Ubuntu 14.04) cannot handle the tartget > rootfs. I found a post from a year ago with the same issue but I did not > see any resolution. > > So, I looked at my current Yocto build and I discovered Yocto builds a > native hacked version of ldconfig and that is what gets called for the > target rootfs. So, I copied that binary over and modified buildroots > Makefile to call that instead and the cache is now populated correctly. > > With that all working I created a buildroot host ldconfig package based on > the Yocto code ( I'm using BR2_EXTERNAL) and using that the ld.so.cache > gets populated. I still had to modify the buildoort Makfile to look for the > newly installed host ldconfig. > > I guess my question is are others having any issues with image finalization > and ldconfig? Yes, this is a known issue. I remember we discussed it last month at the Buildroot Developers meeting. At the time, our feeling was that we would completely get rid of the ldconfig handling, and live without a ld.so.cache, since ld.so.cache is not strictly needed for runtime execution. The problem is indeed as you've seen, is that a cross ldconfig is not something that exists upstream in glibc, and only hacked versions are available. So either we decide to package such "hacked" versions, or we give up on having a ld.so.cache entirely. > On another note I see others are working on the fsl-gst-plugins and I can > help test that as I REALLY want to get a working image out of buildroot. I'm adding in Cc some i.MX6 folks from the Buildroot community: Gary, J?r?me and Luca. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-06 23:42 [Buildroot] host ldconfig package Jeff Horn 2014-11-07 7:25 ` Thomas Petazzoni @ 2014-11-07 16:35 ` Jérôme Pouiller 2014-11-07 17:43 ` Jeff Horn 1 sibling, 1 reply; 8+ messages in thread From: Jérôme Pouiller @ 2014-11-07 16:35 UTC (permalink / raw) To: buildroot Hello Jeff, On Thursday 06 November 2014 15:42:30 Jeff Horn wrote: > Hi, > > I am using buildroot for one of our i.MX6 based boards and I have it mostly > working ( I can't get video to work ). As far as I understand, fixing ldconfig issue is not sufficient to make video work? Can you describe issue you are facing? For information, I made iMX6 hardware video decoding and display work. You may encounter a few difficulties: - Xorg support for imx6 is not yet merged (and we are looking for testers :-) ) - /etc/ld.so.conf have to contains these paths: /usr/lib/imx-mm/audio-codec /usr/lib/imx-mm/video-codec /usr/lib/imx-mm/parser (I have to write a patch for this) -- J?r?me Pouiller, Sysmic ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-07 16:35 ` Jérôme Pouiller @ 2014-11-07 17:43 ` Jeff Horn 2014-11-08 21:56 ` Gary Bisson 0 siblings, 1 reply; 8+ messages in thread From: Jeff Horn @ 2014-11-07 17:43 UTC (permalink / raw) To: buildroot Thanks for the info On Fri, Nov 7, 2014 at 8:35 AM, J?r?me Pouiller <jezz@sysmic.org> wrote: > > As far as I understand, fixing ldconfig issue is not sufficient to make > video work? Can you describe issue you are facing? When launching gplay or gst-launch I get missing lib errors. Which makes sense considering the gst-fsl-plugins are in /usr/lib/imx-mm. > > > For information, I made iMX6 hardware video decoding and display work. You > may encounter a few difficulties: > > - Xorg support for imx6 is not yet merged (and we are looking for > testers :-) ) I can help test. I have a couple different i.MX6 boards (Wand, SabreSD). We are not using X11 on our board. We are using just Qt5 with the eglfs platform. > > - /etc/ld.so.conf have to contains these paths: > /usr/lib/imx-mm/audio-codec > /usr/lib/imx-mm/video-codec > /usr/lib/imx-mm/parser > (I have to write a patch for this) Yes, I saw a post about this patch and I added it to my buildroot branch. I will continue to work on this to see what is happening. Cheers, Jeff ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-07 17:43 ` Jeff Horn @ 2014-11-08 21:56 ` Gary Bisson 2014-11-10 9:41 ` Jérôme Pouiller 2014-11-11 0:04 ` Jeff Horn 0 siblings, 2 replies; 8+ messages in thread From: Gary Bisson @ 2014-11-08 21:56 UTC (permalink / raw) To: buildroot Jeff, Jerome, All, On Fri, Nov 7, 2014 at 9:43 AM, Jeff Horn <outforaride@gmail.com> wrote: > [snip] > > For information, I made iMX6 hardware video decoding and display work. > You > > may encounter a few difficulties: > > > > - Xorg support for imx6 is not yet merged (and we are looking for > > testers :-) ) > > I can help test. I have a couple different i.MX6 boards (Wand, > SabreSD). We are not using X11 on our board. We are using just Qt5 > with the eglfs platform. Jerome, could you point us the patchset as well as the configuration you would like people to test? > > > > - /etc/ld.so.conf have to contains these paths: > > /usr/lib/imx-mm/audio-codec > > /usr/lib/imx-mm/video-codec > > /usr/lib/imx-mm/parser > > (I have to write a patch for this) > > Yes, I saw a post about this patch and I added it to my buildroot > branch. I will continue to work on this to see what is happening. > Jeff, could you confirm everything works fine once the library paths have been added to ld.so.conf? Let me know if I can be of any help either writing the fix or testing it. Thanks, Gary -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141108/3bd70436/attachment.html> ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-08 21:56 ` Gary Bisson @ 2014-11-10 9:41 ` Jérôme Pouiller 2014-11-11 0:04 ` Jeff Horn 1 sibling, 0 replies; 8+ messages in thread From: Jérôme Pouiller @ 2014-11-10 9:41 UTC (permalink / raw) To: buildroot Hi Gary, On Saturday 08 November 2014 13:56:27 Gary Bisson wrote: > On Fri, Nov 7, 2014 at 9:43 AM, Jeff Horn <outforaride@gmail.com> wrote: [...] > > > - Xorg support for imx6 is not yet merged (and we are looking for > > > testers :-) ) > > > > I can help test. I have a couple different i.MX6 boards (Wand, > > SabreSD). We are not using X11 on our board. We are using just Qt5 > > with the eglfs platform. > > Jerome, could you point us the patchset as well as the configuration you > would like people to test? The patchset is called "Add Xorg support for imx6"[1]. I have tested it with: BR2_ARM_EABIHF= both tested BR2_ARM_ENABLE_NEON=y BR2_ARM_FPU_NEON=y BR2_TOOLCHAIN_EXTERNAL=y BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://git.congatec.com/arm/qmx6_kernel.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="9bafbcba67f7bb2a48a5e05998cecb1165aa444f" BR2_LINUX_KERNEL_DEFCONFIG="qmx6" BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x10008000" BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-qmx6" BR2_PACKAGE_QT5=y BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y BR2_PACKAGE_QT5BASE_EXAMPLES=y BR2_PACKAGE_QT5BASE_OPENGL_LIB=y BR2_PACKAGE_QT5BASE_XCB=y BR2_PACKAGE_QT5BASE_DEFAULT_QPA="xcb" BR2_PACKAGE_QT5BASE_GIF=y BR2_PACKAGE_QT5BASE_JPEG=y BR2_PACKAGE_QT5BASE_PNG=y BR2_PACKAGE_QT5QUICKCONTROLS=y BR2_PACKAGE_XORG7=y BR2_PACKAGE_XSERVER_XORG_SERVER=y BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR=y BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV=y BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX_VIV=y BR2_PACKAGE_FREESCALE_IMX=y BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y BR2_PACKAGE_GPU_VIV_BIN_MX6Q=y BR2_PACKAGE_GPU_VIV_BIN_MX6Q_EXAMPLES=y You may also interested by series I posted to add Xorg support for iMX5[2]. Finally, you may also have an opinion about series called "Better handling of freescale self-extractible binaries"[3]. For my part, I have planned to test gst1-imx this week. [1] http://marc.info/?l=buildroot&m=141319864817617 [2] http://marc.info/?l=buildroot&m=141537589907416 [3] http://marc.info/?l=buildroot&m=141537622207763 [...] -- J?r?me Pouiller, Sysmic Embedded Linux specialist http://www.sysmic.fr ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-08 21:56 ` Gary Bisson 2014-11-10 9:41 ` Jérôme Pouiller @ 2014-11-11 0:04 ` Jeff Horn 2014-11-11 21:26 ` Jeff Horn 1 sibling, 1 reply; 8+ messages in thread From: Jeff Horn @ 2014-11-11 0:04 UTC (permalink / raw) To: buildroot Gary, All On Sat, Nov 8, 2014 at 1:56 PM, Gary Bisson <bisson.gary@gmail.com> wrote: > Jeff, Jerome, All, > > Jeff, could you confirm everything works fine once the library paths have > been added to ld.so.conf? I managed to get Qt5 video playback working! However, the only way I could make it work was to run my hacked version of ldconfig and I had to edit the /usr/share/*.cf as the path referenced my host build sysroot and not the target sysroot. With those two modifications the Qt5 Qml video element works fine. In addition, Qt 5.3 appears to take advantage of hardware acceleration. Note that adding /usr/lib/imx-mm to ld.so.conf alone did not resolve the missing plugin issue. I'm not sure what I am missing or doing wrong. I might try and modify the gst-fsl-plugins.mk file to move the libs from /usr/lib/imx-mm to /usr/lib and that will eliminate a need for both ldconfig and ld.so.conf. I'll keep working on this but things look promising. I'm very new to buildroot so I'll double check that I am not missing something in the build. Thanks, Jeff > > Let me know if I can be of any help either writing the fix or testing it. > > Thanks, > Gary ^ permalink raw reply [flat|nested] 8+ messages in thread
* [Buildroot] host ldconfig package 2014-11-11 0:04 ` Jeff Horn @ 2014-11-11 21:26 ` Jeff Horn 0 siblings, 0 replies; 8+ messages in thread From: Jeff Horn @ 2014-11-11 21:26 UTC (permalink / raw) To: buildroot Ok, I have the fsl-gst-plugins working without the need for a hacked version of ldconfig. I modified libfslcodec and libfslparser to run a post install and move the libs from /usr/lib/imx-mm to /usr/lib. I also run a post install for the gst-fsl-plugins to fix the /usr/share/*.cf paths. There has to be a way to tell configure the correct path but I am no autotools guru. With this patch my Qt5 video.qml file comes right up. Jeff diff --git a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk index 8d8b8b4..947dfb6 100644 --- a/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk +++ b/package/gstreamer/gst-fsl-plugins/gst-fsl-plugins.mk @@ -26,6 +26,7 @@ GST_FSL_PLUGINS_CONF_ENV = \ GST_FSL_PLUGINS_DEPENDENCIES += linux GST_FSL_PLUGINS_CONF_ENV += CPPFLAGS="$(TARGET_CPPFLAGS) -idirafter $(LINUX_DIR)/include/uapi" + ifeq ($(BR2_PACKAGE_XLIB_LIBX11),y) GST_FSL_PLUGINS_DEPENDENCIES += xlib_libX11 GST_FSL_PLUGINS_CONF_OPTS += --enable-x11 @@ -40,4 +41,12 @@ endef GST_FSL_PLUGINS_POST_PATCH_HOOKS += GST_FSL_PLUGINS_PATCH_M4 +# Fix *.cf paths +define GST_FSL_PLUGINS_CF_FIXUP + find $(TARGET_DIR)/usr/share -maxdepth 1 -type f \ + -name *.cf -exec sed -i 's|$(STAGING_DIR)||g' {} \; +endef + +GST_FSL_PLUGINS_POST_INSTALL_TARGET_HOOKS += GST_FSL_PLUGINS_CF_FIXUP + $(eval $(autotools-package)) diff --git a/package/libfslcodec/libfslcodec.mk b/package/libfslcodec/libfslcodec.mk index 1a364bb..103f1e6 100644 --- a/package/libfslcodec/libfslcodec.mk +++ b/package/libfslcodec/libfslcodec.mk @@ -16,6 +16,9 @@ LIBFSLCODEC_REDISTRIBUTE = NO LIBFSLCODEC_INSTALL_STAGING = YES +# only enable for hard float on the i.mx6q +LIBFSLCODEC_CONF_OPTS = --enable-fhw --enable-vpu + # The archive is a shell-self-extractor of a bzipped tar. It happens # to extract in the correct directory (libfslcodec-x.y.z) # The --force makes sure it doesn't fail if the source dir already exists. @@ -35,5 +38,11 @@ endef # FIXME The Makefile installs both the arm9 and arm11 versions of the # libraries, but we only need one of them. +define LIBFSLCODEC_POST_INSTALL_FIXUP + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \ + -exec cp {} $(TARGET_DIR)/usr/lib \; +endef + +LIBFSLCODEC_POST_INSTALL_TARGET_HOOKS += LIBFSLCODEC_POST_INSTALL_FIXUP $(eval $(autotools-package)) diff --git a/package/libfslparser/libfslparser.mk b/package/libfslparser/libfslparser.mk index d52b151..0882a67 100644 --- a/package/libfslparser/libfslparser.mk +++ b/package/libfslparser/libfslparser.mk @@ -16,6 +16,9 @@ LIBFSLPARSER_REDISTRIBUTE = NO LIBFSLPARSER_INSTALL_STAGING = YES +# only enable for hard float on the i.mx6q +LIBFSLCODEC_CONF_OPTS = --enable-fhw --enable-vpu + # The archive is a shell-self-extractor of a bzipped tar. It happens # to extract in the correct directory (libfslparser-x.y.z) # The --force makes sure it doesn't fail if the source dir already exists. @@ -39,4 +42,13 @@ endef # without AUTORECONF, configure fails to find install-sh. LIBFSLPARSER_AUTORECONF = YES +# FIXME The Makefile installs both the arm9 and arm11 versions of the +# libraries, but we only need one of the +define LIBFSLPARSER_POST_INSTALL_FIXUP + find $(TARGET_DIR)/usr/lib/imx-mm -mindepth 2 -maxdepth 2 -not -type d \ + -exec cp {} $(TARGET_DIR)/usr/lib \; +endef + +LIBFSLPARSER_POST_INSTALL_TARGET_HOOKS += LIBFSLPARSER_POST_INSTALL_FIXUP + $(eval $(autotools-package)) On Mon, Nov 10, 2014 at 4:04 PM, Jeff Horn <outforaride@gmail.com> wrote: > Gary, All > > On Sat, Nov 8, 2014 at 1:56 PM, Gary Bisson <bisson.gary@gmail.com> wrote: >> Jeff, Jerome, All, >> >> Jeff, could you confirm everything works fine once the library paths have >> been added to ld.so.conf? > > I managed to get Qt5 video playback working! However, the only way I > could make it work was to run my hacked version of ldconfig and I had > to edit the /usr/share/*.cf as the path referenced my host build > sysroot and not the target sysroot. With those two modifications the > Qt5 Qml video element works fine. In addition, Qt 5.3 appears to take > advantage of hardware acceleration. > > Note that adding /usr/lib/imx-mm to ld.so.conf alone did not resolve > the missing plugin issue. I'm not sure what I am missing or doing > wrong. I might try and modify the gst-fsl-plugins.mk file to move the > libs from /usr/lib/imx-mm to /usr/lib and that will eliminate a need > for both ldconfig and ld.so.conf. > > I'll keep working on this but things look promising. I'm very new to > buildroot so I'll double check that I am not missing something in the > build. > > Thanks, > Jeff > >> >> Let me know if I can be of any help either writing the fix or testing it. >> >> Thanks, >> Gary ^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2014-11-11 21:26 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-11-06 23:42 [Buildroot] host ldconfig package Jeff Horn 2014-11-07 7:25 ` Thomas Petazzoni 2014-11-07 16:35 ` Jérôme Pouiller 2014-11-07 17:43 ` Jeff Horn 2014-11-08 21:56 ` Gary Bisson 2014-11-10 9:41 ` Jérôme Pouiller 2014-11-11 0:04 ` Jeff Horn 2014-11-11 21:26 ` Jeff Horn
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox