GIT: [PATCH v2 0/2] package/gcnano-binaries: new package
The package is tested with the following steps:
modprobe galcore
export QT_QPA_EGLFS_ALWAYS_SET_MODE=1
With QT_QPA_EGLFS_ALWAYS_SET_MODE=1 qt performs a video mode set on every application startup.
Changes:
- Add Signed-off-by line
- Add package/gcnano-binaries/Config.in file
- Add DEVELOPERS file
- Remove default extract commands from GCNANO_BINARIES_EXTRACT_HELPER
- factorize INSTALL commands
- keep wayland-egl.pc and libwayland-egl.so files from wayland package
- Add dependency arm
- cleaning check-package warnings
Changes v1 -> v2:
- use the "github" helper macro
- change hash for gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed.tar.gz
PATCH v2 1/2 package/gcnano-binaries: new package
New package which provides the driver and binary blob libraries for the STM32MP157 vivante gcnano gpu.
The precompiled libaries depends on wayland and libdrm.
--- DEVELOPERS | 3 + package/Config.in | 1 + package/gcnano-binaries/Config.in | 24 +++++++ package/gcnano-binaries/gcnano-binaries.hash | 2 + package/gcnano-binaries/gcnano-binaries.mk | 74 ++++++++++++++++++++ 5 files changed, 104 insertions(+) create mode 100644 package/gcnano-binaries/Config.in create mode 100644 package/gcnano-binaries/gcnano-binaries.hash create mode 100644 package/gcnano-binaries/gcnano-binaries.mk
DEVELOPERS +3 -0
@@ -2536,3 +2536,6 @@ F: package/tinc/ N: Aussedat Louis <[email protected]> F: board/friendlyarm/nanopi-neo-plus2/ F: configs/friendlyarm_nanopi_neo_plus2_defconfig + +N: Jens Kleintje <[email protected]> +F: package/gcnano-binaries
package/Config.in +1 -0
@@ -449,6 +449,7 @@ endmenu source "package/freescale-imx/Config.in" source "package/fxload/Config.in" source "package/gadgetfs-test/Config.in" + source "package/gcnano-binaries/Config.in" source "package/gpm/Config.in" source "package/gpsd/Config.in" source "package/gptfdisk/Config.in"
package/gcnano-binaries/Config.in new file +24 -0
@@ -0,0 +1,24 @@ +comment "gcnano binaries needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_GCNANO_BINARIES + bool "gcnano binaries" + depends on BR2_arm + depends on BR2_LINUX_KERNEL + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_LIBDRM + select BR2_PACKAGE_WAYLAND + help + Driver and libaries for stm vivante gcnano gpu. + https://github.com/STMicroelectronics/gcnano-binaries/ + +if BR2_PACKAGE_GCNANO_BINARIES + +config BR2_PACKAGE_PROVIDES_LIBEGL + default "gcnano-binaries" + +config BR2_PACKAGE_PROVIDES_LIBGLES + default "gcnano-binaries" + +endif
package/gcnano-binaries/gcnano-binaries.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 255db9c58627f5f54fd15263647cc97a55927363fec42e7c8d7486170a65d84d gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed.tar.gz +sha256 7d209718473d18f69f75adb7caf9cb5d4b0a31da068756aa011bea617de3dc57 EULA
package/gcnano-binaries/gcnano-binaries.mk new file +74 -0
74 lines not on this page · raw message
--
2.17.1
PATCH v2 2/2 package/qt5/qt5base: add support for gcnano-binaries
In reply to Jens Kleintje--- package/qt5/qt5base/qt5base.mk | 6 ++++++ 1 file changed, 6 insertions(+)
package/qt5/qt5base/qt5base.mk +6 -0
@@ -78,6 +78,9 @@ endif ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) QT5BASE_CONFIGURE_OPTS += -gbm QT5BASE_DEPENDENCIES += mesa3d +else ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y) +QT5BASE_CONFIGURE_OPTS += -gbm +QT5BASE_DEPENDENCIES += gcnano-binaries else QT5BASE_CONFIGURE_OPTS += -no-gbm endif
@@ -289,6 +292,9 @@ QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFSDeviceIntegrat ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL),y) QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFsKmsSupport endif +ifeq ($(BR2_PACKAGE_GCNANO_BINARIES),y) +QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglFsKmsSupport +endif else QT5BASE_INSTALL_LIBS_$(BR2_PACKAGE_QT5BASE_EGLFS) += Qt5EglDeviceIntegration endif
--
2.17.1
PATCH v2 1/2 package/gcnano-binaries: new package
In reply to Jens KleintjeHello Jens,
Quoted 5 lines · On Thu, 14 Nov 2019 09:55:28 +0100 Jens Kleintje <[email protected]> wrote:
New package which provides the driver and binary blob libraries for the STM32MP157 vivante gcnano gpu.
The precompiled libaries depends on wayland and libdrm.Signed-off-by Jens Kleintje <[email protected]>
Thanks for this new version, I have applied it to our next branch, but after doing a number of changes. See below.
DEVELOPERS F: package/tinc/ · line 2541
Quoted 11 lines
DEVELOPERS +3
-0@@ -2536,3 +2536,6 @@ F: package/tinc/ N: Aussedat Louis <[email protected]> F: board/friendlyarm/nanopi-neo-plus2/ F: configs/friendlyarm_nanopi_neo_plus2_defconfig + +N: Jens Kleintje <[email protected]> +F: package/gcnano-binaries
Alphabetic ordering was not good. Yes, the entry of Aussedat Louis was also not at the right place, but it has been fixed in the mean time.
package/gcnano-binaries/Config.in line 1
Quoted 7 lines
package/gcnano-binaries/Config.in new file +1
-0@@ -0,0 +1,24 @@ +comment "gcnano binaries needs a Linux kernel to be built"
gcnano binaries -> gcnano-binaries. And there were two spaces before "needs"
package/gcnano-binaries/Config.in line 5
Quoted 4 lines
package/gcnano-binaries/Config.in new file +4
-0+ depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_GCNANO_BINARIES + bool "gcnano binaries"
bool "gcnano-binaries"
package/gcnano-binaries/Config.in line 7
Quoted 2 lines
package/gcnano-binaries/Config.in new file +2
-0+ depends on BR2_arm + depends on BR2_LINUX_KERNEL
You forgot a number of dependencies here:
- glibc dependency, because the pre-built binary blobs will only work with glibc
- threads, which is a dependency of libdrm and wayland, so we have to replicate it
- dynamic libraries, because wayland has a !BR2_STATIC_LIBS dependency
package/gcnano-binaries/Config.in line 9
Quoted 2 lines
package/gcnano-binaries/Config.in new file +2
-0+ +GCNANO_BINARIES_FILE_VERSION = 6.2.4.p4
I've improved this a bit with:
GCNANO_BINARIES_LIB_VERSION = 6.2.4 GCNANO_BINARIES_DRIVER_VERSION = $(GCNANO_BINARIES_LIB_VERSION).p4 GCNANO_BINARIES_USERLAND_VERSION = $(GCNANO_BINARIES_LIB_VERSION).p4-20190626
which I then use throughout the .mk file.
Quoted 11 lines
package/gcnano-binaries/Config.in new file +11
-0+# The wayland-egl.pc and libwayland-egl.so are provided by the wayland package +define GCNANO_BINARIES_INSTALL + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/pkgconfig/wayland-egl.pc + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/libwayland-egl.so.1 + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/libwayland-egl.so + cp -r $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/* $(1)/usr/lib/ + cd $(1)/usr/lib; \ + ln -sf gbm_viv.6.2.4.multi.release.so gbm_viv.so; \ + ln -sf libEGL.6.2.4.multi.release.so libEGL.so; \ + ln -sf libEGL.so libEGL.so.1; \ + ln -sf libGAL.6.2.4.multi.release.so libGAL.so; \
package/gcnano-binaries/Config.in
Quoted 10 lines
package/gcnano-binaries/Config.in new file +10
-0+ ln -sf libgbm.6.2.4.multi.release.so libgbm.so; \ + ln -sf libgbm.so libgbm.so.1; \ + ln -sf libGLESv1_CM.6.2.4.multi.release.so libGLESv1_CM.so; \ + ln -sf libGLESv2.6.2.4.multi.release.so libGLESv2.so; \ + ln -sf libGLESv2.so libGLESv2.so.2; \ + ln -sf libGLSLC.6.2.4.multi.release.so libGLSLC.so; \ + ln -sf libOpenVG.6.2.4.multi.release.so libOpenVG.so; \ + ln -sf libVSC.6.2.4.multi.release.so libVSC.so; + cp -r $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/include/* $(1)/usr/include/ +endef
This was over-complicated, and had a not great side effect: each library was installed in two copies: a "release" copy, and a "debug" copy. The symlinks point to the "release" copy, but the "debug" copy is just there taking up storage space for no reason. Also, creating the symlinks manually is not needed: they already exist in the package "source code".
So I changed this to:
GCNANO_BINARIES_LIBRARIES = \
gbm_viv libEGL libGAL libgbm libGLESv1_CM \
libGLESv2 libGLSLC libOpenVG libVSC
GCNANO_BINARIES_USERLAND_SUBDIR = gcnano-userland-multi-$(GCNANO_BINARIES_USERLAND_VERSION)
define GCNANO_BINARIES_INSTALL
$(foreach lib,$(GCNANO_BINARIES_LIBRARIES), \
$(INSTALL) -D -m 0755 $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/$(lib).$(GCNANO_BINARIES_LIB_VERSION).multi.release.so \
$(1)/usr/lib/$(lib).$(GCNANO_BINARIES_LIB_VERSION).multi.release.so ; \
cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/$(lib).so* $(1)/usr/lib
)
cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/include/* $(1)/usr/include/endef
which hopefully does the same thing, but in a slightly more compact way, and avoid the library duplication.
Could you test if what I have committed to the next branch continues to work for you ?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
Thomas Petazzoni
AppliedPATCH v2 2/2 package/qt5/qt5base: add support for gcnano-binaries
In reply to Jens KleintjeQuoted 4 lines · On Thu, 14 Nov 2019 09:55:29 +0100 Jens Kleintje <[email protected]> wrote:
Signed-off-by Jens Kleintje <[email protected]>--- package/qt5/qt5base/qt5base.mk | 6 ++++++ 1 file changed, 6 insertions(+)
Applied to next, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
PATCH v2 1/2 package/gcnano-binaries: new package
In reply to Thomas PetazzoniHi Thomas,
I tested the patch.
Qt does not compile, because the package config files are missing.
I fixed it with adding the two lines below.
Should I send a new patch?
Quoted 116 lines
Gesendet: Freitag, 15. November 2019 um 23:26 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Jens Kleintje" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH v2 1/2] package/gcnano-binaries: new packageHello Jens,
Quoted 5 lines · On Thu, 14 Nov 2019 09:55:28 +0100 Jens Kleintje <[email protected]> wrote:
New package which provides the driver and binary blob libraries for the STM32MP157 vivante gcnano gpu.
The precompiled libaries depends on wayland and libdrm.Signed-off-by Jens Kleintje <[email protected]>Thanks for this new version, I have applied it to our next branch, but after doing a number of changes. See below.
DEVELOPERS F: package/tinc/ · line 2541
Quoted 11 lines
DEVELOPERS +3
-0@@ -2536,3 +2536,6 @@ F: package/tinc/ N: Aussedat Louis <[email protected]> F: board/friendlyarm/nanopi-neo-plus2/ F: configs/friendlyarm_nanopi_neo_plus2_defconfig + +N: Jens Kleintje <[email protected]> +F: package/gcnano-binariesAlphabetic ordering was not good. Yes, the entry of Aussedat Louis was also not at the right place, but it has been fixed in the mean time.
package/gcnano-binaries/Config.in line 1
Quoted 7 lines
package/gcnano-binaries/Config.in new file +1
-0@@ -0,0 +1,24 @@ +comment "gcnano binaries needs a Linux kernel to be built"gcnano binaries -> gcnano-binaries. And there were two spaces before "needs"
package/gcnano-binaries/Config.in line 5
Quoted 4 lines
package/gcnano-binaries/Config.in new file +4
-0+ depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_GCNANO_BINARIES + bool "gcnano binaries"bool "gcnano-binaries"
package/gcnano-binaries/Config.in line 7
Quoted 2 lines
package/gcnano-binaries/Config.in new file +2
-0+ depends on BR2_arm + depends on BR2_LINUX_KERNELYou forgot a number of dependencies here:
- glibc dependency, because the pre-built binary blobs will only work with glibc
- threads, which is a dependency of libdrm and wayland, so we have to replicate it
- dynamic libraries, because wayland has a !BR2_STATIC_LIBS dependency
package/gcnano-binaries/Config.in line 9
Quoted 2 lines
package/gcnano-binaries/Config.in new file +2
-0+ +GCNANO_BINARIES_FILE_VERSION = 6.2.4.p4I've improved this a bit with:
GCNANO_BINARIES_LIB_VERSION= 6.2.4GCNANO_BINARIES_DRIVER_VERSION= $(GCNANO_BINARIES_LIB_VERSION).p4GCNANO_BINARIES_USERLAND_VERSION= $(GCNANO_BINARIES_LIB_VERSION).p4-20190626which I then use throughout the .mk file.
Quoted 11 lines
package/gcnano-binaries/Config.in new file +11
-0+# The wayland-egl.pc and libwayland-egl.so are provided by the wayland package +define GCNANO_BINARIES_INSTALL + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/pkgconfig/wayland-egl.pc + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/libwayland-egl.so.1 + rm -f $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/libwayland-egl.so + cp -r $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/lib/* $(1)/usr/lib/ + cd $(1)/usr/lib; \ + ln -sf gbm_viv.6.2.4.multi.release.so gbm_viv.so; \ + ln -sf libEGL.6.2.4.multi.release.so libEGL.so; \ + ln -sf libEGL.so libEGL.so.1; \ + ln -sf libGAL.6.2.4.multi.release.so libGAL.so; \package/gcnano-binaries/Config.in
Quoted 10 lines
package/gcnano-binaries/Config.in new file +10
-0+ ln -sf libgbm.6.2.4.multi.release.so libgbm.so; \ + ln -sf libgbm.so libgbm.so.1; \ + ln -sf libGLESv1_CM.6.2.4.multi.release.so libGLESv1_CM.so; \ + ln -sf libGLESv2.6.2.4.multi.release.so libGLESv2.so; \ + ln -sf libGLESv2.so libGLESv2.so.2; \ + ln -sf libGLSLC.6.2.4.multi.release.so libGLSLC.so; \ + ln -sf libOpenVG.6.2.4.multi.release.so libOpenVG.so; \ + ln -sf libVSC.6.2.4.multi.release.so libVSC.so; + cp -r $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626/usr/include/* $(1)/usr/include/ +endefThis was over-complicated, and had a not great side effect: each library was installed in two copies: a "release" copy, and a "debug" copy. The symlinks point to the "release" copy, but the "debug" copy is just there taking up storage space for no reason. Also, creating the symlinks manually is not needed: they already exist in the package "source code".
So I changed this to:
GCNANO_BINARIES_LIBRARIES= \
gbm_vivlibEGL libGAL libgbmlibGLESv1_CM\
libGLESv2 libGLSLC libOpenVG libVSC
GCNANO_BINARIES_USERLAND_SUBDIR= gcnano-userland-multi-$(GCNANO_BINARIES_USERLAND_VERSION)
Quoted 7 lines
define
GCNANO_BINARIES_INSTALL$(foreach lib,$(GCNANO_BINARIES_LIBRARIES), \ $(INSTALL) -D -m 0755 $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/$(lib).$(GCNANO_BINARIES_LIB_VERSION).multi.release.so \ $(1)/usr/lib/$(lib).$(GCNANO_BINARIES_LIB_VERSION).multi.release.so ; \ cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/$(lib).so* $(1)/usr/lib ) cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/include/* $(1)/usr/include/
Add here:
+ rm -rf $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/pkgconfig/wayland-egl.pc
+ cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
Quoted 10 lines
endef
which hopefully does the same thing, but in a slightly more compact way, and avoid the library duplication.
Could you test if what I have committed to the next branch continues to work for you ?
Thanks!
Quoted 10 lines
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot
Regards
Jens Kleintje