Skip to contentSkip to conversation

package/gcnano-binaries: new package

PATCH New Jens Kleintje 2 participants 10 messages Nov 6, 2019 – Nov 11, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

cover 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.

#1 lore raw

PATCH 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.
Since the github repo has no releases/tags we use the standard git method with explicit SHA.

---
 package/Config.in                            |  1 +
 package/gcnano-binaries/gcnano-binaries.hash |  2 +
 package/gcnano-binaries/gcnano-binaries.mk   | 87 ++++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 package/gcnano-binaries/gcnano-binaries.hash
 create mode 100644 package/gcnano-binaries/gcnano-binaries.mk
package/Config.in +1 -0
index dc5ec56d6b..1a88da547d 100644
@@ -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/gcnano-binaries.hash new file +2 -0
new file mode 100644
index 0000000000..fae7e56deb
@@ -0,0 +1,2 @@
+sha256 19f3fe4e83ec95fd2ecb70d5cb03c7b00a13357966a9b6e56b59e5788c550c88  gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed.tar.gz
+sha256 7d209718473d18f69f75adb7caf9cb5d4b0a31da068756aa011bea617de3dc57  EULA
package/gcnano-binaries/gcnano-binaries.mk new file +87 -0

87 lines not on this page · raw message

--
2.17.1

#2 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Hello Jens,

Thanks for your contribution! I suppose you're the person I met last week during the Embedded Linux Conference Europe in Lyon, who asked me about submitting this gcnano-binaries package ?

In any case, glad to see this package being contributed.

Quoted 5 lines · On Wed, 6 Nov 2019 16:56:10 +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.
Since the github repo has no releases/tags we use the standard git method with explicit SHA.

We need your Signed-off-by line here.

Quoted 4 lines
---
 package/Config.in                            |  1 +
 package/gcnano-binaries/gcnano-binaries.hash |  2 +
 package/gcnano-binaries/gcnano-binaries.mk   | 87 ++++++++++++++++++++

You forgot to include the package/gcnano-binaries/Config.in file in your patch, so we cannot review the full package.

Also, please add an entry in the DEVELOPERS file for this new package.

Quoted 15 lines
package/gcnano-binaries/gcnano-binaries.hash new file +2 -0
new file mode 100644
index 0000000000..fae7e56deb
@@ -0,0 +1,2 @@
+sha256 19f3fe4e83ec95fd2ecb70d5cb03c7b00a13357966a9b6e56b59e5788c550c88  gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed.tar.gz
+sha256 7d209718473d18f69f75adb7caf9cb5d4b0a31da068756aa011bea617de3dc57  EULA
package/gcnano-binaries/gcnano-binaries.mk new file +1 -0
new file mode 100644
index 0000000000..806abd7840
@@ -0,0 +1,87 @@
+################################################################################

package/gcnano-binaries/gcnano-binaries.mk line 11

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+#
+# VIVANTE GCNANO BINARIES
+#
+################################################################################
+
+
+GCNANO_BINARIES_FILE_VERSION = 6.2.4.p4
+GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed
+GCNANO_BINARIES_SITE = https://github.com/STMicroelectronics/gcnano-binaries.git
+GCNANO_BINARIES_SITE_METHOD = git

Please use the "github" helper macro:

GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed GCNANO_BINARIES_SITE = $(call github,STMicroelectronics,gcnano-binaries,$(GCNANO_BINARIES_VERSION))

and remove the _SITE_METHOD variable.

Quoted 16 lines
package/gcnano-binaries/gcnano-binaries.mk new file +16 -0
+
+GCNANO_BINARIES_LICENSE = MIT, Vivante End User Software License Terms
+GCNANO_BINARIES_LICENSE_FILES = EULA
+GCNANO_BINARIES_REDISTRIBUTE = NO
+
+GCNANO_BINARIES_DEPENDENCIES = linux wayland libdrm
+
+GCNANO_BINARIES_INSTALL_STAGING = YES
+
+GCNANO_BINARIES_PROVIDES = libegl libgles
+
+define GCNANO_BINARIES_EXTRACT_HELPER
+        awk 'BEGIN      { start = 0; } \
+             /^EOEULA/  { start = 0; } \
+                        { if (start) print; } \
+             /<<EOEULA/ { start = 1; }' \

package/gcnano-binaries/gcnano-binaries.mk line 37

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+            $(1) > $(@D)/EULA
+        cd $(@D) && sh $(1) --auto-accept
+        find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \;
+        rmdir $(@D)/$(basename $(notdir $(1)))
+endef
+
+
+define GCNANO_BINARIES_EXTRACT_CMDS
+gzip -d -c $(GCNANO_BINARIES_DL_DIR)/gcnano-binaries-$(GCNANO_BINARIES_VERSION).tar.gz | tar --strip-components=1 -C $(@D) -xf -
+tar --strip-components=1 -xJf $(@D)/gcnano-driver-$(GCNANO_BINARIES_FILE_VERSION).tar.xz -C $(@D)

These two lines look like the default extract commands, so why are you doing this ? Just because you need to call the GCNANO_BINARIES_EXTRACT_HELPER ?

If so, then you don't need that, simply do:

GCNANO_BINARIES_POST_EXTRACT_HOOKS += GCNANO_BINARIES_EXTRACT_HELPER

and in GCNANO_BINARIES_EXTRACT_HELPER, instead of using $(1), just use $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626.bin directly.

Also, could you add a comment on top of GCNANO_BINARIES_EXTRACT_HELPER to explain what it does, because it is not obvious.

package/gcnano-binaries/gcnano-binaries.mk line 43

Quoted 6 lines
package/gcnano-binaries/gcnano-binaries.mk new file +6 -0
+$(call GCNANO_BINARIES_EXTRACT_HELPER,$(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626.bin)
+endef
+
+GCNANO_BINARIES_MODULE_MAKE_OPTS = \
+	KERNEL_DIR=$(LINUX_DIR) \
+	SOC_PLATFORM=st-st\

Space before \

package/gcnano-binaries/gcnano-binaries.mk line 44

Quoted 1 line
package/gcnano-binaries/gcnano-binaries.mk new file +1 -0
+	AQROOT=$(@D)\

Ditto.

Quoted 9 lines
package/gcnano-binaries/gcnano-binaries.mk new file +9 -0
+	DEBUG=0
+
+define GCNANO_BINARIES_INSTALL_STAGING_CMDS
+	cp $(@D)/usr/lib/pkgconfig/* $(STAGING_DIR)/usr/lib/pkgconfig/
+	cp -r $(@D)/usr/lib/* $(STAGING_DIR)/usr/lib/
+	cd $(STAGING_DIR)/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; \

package/gcnano-binaries/gcnano-binaries.mk line 63

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+	ln -sf libGAL.6.2.4.multi.release.so libGAL.so; \
+	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
+	rm -f $(STAGING_DIR)/usr/lib/pkgconfig/wayland-egl.pc

Why are you removing this .pc file ?

package/gcnano-binaries/gcnano-binaries.mk line 67

Quoted 4 lines
package/gcnano-binaries/gcnano-binaries.mk new file +4 -0
+	cp -r $(@D)/usr/include/* $(STAGING_DIR)/usr/include/
+endef
+
+GCNANO_BINARIES_POST_INSTALL_TARGET_HOOKS += GCNANO_BINARIES_COPY_LIBS

I am not sure why you are using a GCNANO_BINARIES_POST_INSTALL_TARGET_HOOKS. Why not simply rename GCNANO_BINARIES_COPY_LIBS to GCNANO_BINARIES_INSTALL_TARGET_CMDS.

Quoted 6 lines
package/gcnano-binaries/gcnano-binaries.mk new file +6 -0
+define GCNANO_BINARIES_COPY_LIBS
+	cp -r $(@D)/usr/lib/* $(TARGET_DIR)/usr/lib/
+	cd $(TARGET_DIR)/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; \

package/gcnano-binaries/gcnano-binaries.mk line 84

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+	ln -sf libGAL.6.2.4.multi.release.so libGAL.so; \
+	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;
+endef

The long list of symlinks to be created is not nice, but I don't really see a nicer solution to achieve the same. Perhaps one thing that could be done is to factorize stuff a bit:

define GCNANO_BINARIES_INSTALL

	cp $(@D)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/
	cp -r $(@D)/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; \
	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
	rm -f $(1)/usr/lib/pkgconfig/wayland-egl.pc
	cp -r $(@D)/usr/include/* $(1)/usr/include/

endef

And then:

define GCNANO_BINARIES_INSTALL_STAGING_CMDS

	$(call GCNANO_BINARIES_INSTALL,$(STAGING_DIR))

endef

define GCNANO_BINARIES_INSTALL_TARGET_CMDS

	$(call GCNANO_BINARIES_INSTALL,$(TARGET_DIR))

endef

Note: it is perfectly fine to install header files and .pc files to $(TARGET_DIR), they anyway get cleaned up later in the build.

Could you rework your patch to take into account those comments ?

Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

A message that is not in the archive (sent off-list or not yet received): trinity-e5303488-a97e-46bb-8738-520846b1c6db-1573110060239@3c-app-webde-bap18

#4 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Quoted 10 lines

Gesendet:?Mittwoch, 06. November 2019 um 23:08 Uhr Von:?"Thomas Petazzoni" <[email protected]> An:?"Jens Kleintje" <[email protected]>
Cc:?buildroot at busybox.net
Betreff:?Re: [Buildroot] [PATCH 1/2] package/gcnano-binaries: new package Hello Jens,

Thanks for your contribution! I suppose you're the person I met last week during the Embedded Linux Conference Europe in Lyon, who asked me about submitting this gcnano-binaries package ?

You are right.

Quoted 5 lines
Quoted 4 lines

In any case, glad to see this package being contributed.

On Wed, 6 Nov 2019 16:56:10 +0100
Jens Kleintje <[email protected]> wrote:

Quoted 7 lines
Quoted 5 lines

New package which provides the driver and binary blob libraries for the STM32MP157 vivante gcnano gpu.
The precompiled libaries depends on wayland and libdrm.
Since the github repo has no releases/tags we use the standard git method with explicit SHA.

We need your Signed-off-by line here.

OK

Quoted 7 lines
Quoted 4 lines

---
package/Config.in | 1 + package/gcnano-binaries/gcnano-binaries.hash | 2 + package/gcnano-binaries/gcnano-binaries.mk | 87 ++++++++++++++++++++

You forgot to include the package/gcnano-binaries/Config.in file in your patch, so we cannot review the full package.

Sorry

Quoted 1 line

Also, please add an entry in the DEVELOPERS file for this new package.

OK

Quoted 28 lines
Quoted 15 lines
package/gcnano-binaries/gcnano-binaries.hash new file +2 -0
new file mode 100644
index 0000000000..fae7e56deb
@@ -0,0 +1,2 @@
+sha256 19f3fe4e83ec95fd2ecb70d5cb03c7b00a13357966a9b6e56b59e5788c550c88 gcnano-binaries-c01642ed5e18cf09ecd905af193e935cb3be95ed.tar.gz
+sha256 7d209718473d18f69f75adb7caf9cb5d4b0a31da068756aa011bea617de3dc57 EULA
package/gcnano-binaries/gcnano-binaries.mk new file +1 -0
new file mode 100644
index 0000000000..806abd7840
@@ -0,0 +1,87 @@
+################################################################################

package/gcnano-binaries/gcnano-binaries.mk line 11

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+#
+# VIVANTE GCNANO BINARIES
+#
+################################################################################
+
+
+GCNANO_BINARIES_FILE_VERSION = 6.2.4.p4
+GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed
+GCNANO_BINARIES_SITE = https://github.com/STMicroelectronics/gcnano-binaries.git
+GCNANO_BINARIES_SITE_METHOD = git

Please use the "github" helper macro:

Quoted 4 lines

GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed GCNANO_BINARIES_SITE = $(call github,STMicroelectronics,gcnano-binaries,$(GCNANO_BINARIES_VERSION))

and remove the _SITE_METHOD variable.

The page (https://github.com/STMicroelectronics/gcnano-binaries)
has no release and no tag. So I think there is no archive directory.

Quoted 33 lines
Quoted 16 lines
package/gcnano-binaries/gcnano-binaries.mk new file +16 -0
+
+GCNANO_BINARIES_LICENSE = MIT, Vivante End User Software License Terms
+GCNANO_BINARIES_LICENSE_FILES = EULA
+GCNANO_BINARIES_REDISTRIBUTE = NO
+
+GCNANO_BINARIES_DEPENDENCIES = linux wayland libdrm
+
+GCNANO_BINARIES_INSTALL_STAGING = YES
+
+GCNANO_BINARIES_PROVIDES = libegl libgles
+
+define GCNANO_BINARIES_EXTRACT_HELPER
+ awk 'BEGIN { start = 0; } \
+ /^EOEULA/ { start = 0; } \
+ { if (start) print; } \
+ /<<EOEULA/ { start = 1; }' \

package/gcnano-binaries/gcnano-binaries.mk line 37

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+ $(1) > $(@D)/EULA
+ cd $(@D) && sh $(1) --auto-accept
+ find $(@D)/$(basename $(notdir $(1))) -mindepth 1 -maxdepth 1 -exec mv {} $(@D) \;
+ rmdir $(@D)/$(basename $(notdir $(1)))
+endef
+
+
+define GCNANO_BINARIES_EXTRACT_CMDS
+gzip -d -c $(GCNANO_BINARIES_DL_DIR)/gcnano-binaries-$(GCNANO_BINARIES_VERSION).tar.gz | tar --strip-components=1 -C $(@D) -xf -
+tar --strip-components=1 -xJf $(@D)/gcnano-driver-$(GCNANO_BINARIES_FILE_VERSION).tar.xz -C $(@D)

These two lines look like the default extract commands, so why are you doing this ? Just because you need to call the GCNANO_BINARIES_EXTRACT_HELPER ?

If so, then you don't need that, simply do:

Quoted 8 lines

GCNANO_BINARIES_POST_EXTRACT_HOOKS += GCNANO_BINARIES_EXTRACT_HELPER

and in GCNANO_BINARIES_EXTRACT_HELPER, instead of using $(1), just use $(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626.bin directly.

Also, could you add a comment on top of GCNANO_BINARIES_EXTRACT_HELPER to explain what it does, because it is not obvious.

OK

Quoted 26 lines

package/gcnano-binaries/gcnano-binaries.mk line 43

Quoted 6 lines
package/gcnano-binaries/gcnano-binaries.mk new file +6 -0
+$(call GCNANO_BINARIES_EXTRACT_HELPER,$(@D)/gcnano-userland-multi-$(GCNANO_BINARIES_FILE_VERSION)-20190626.bin)
+endef
+
+GCNANO_BINARIES_MODULE_MAKE_OPTS = \
+ KERNEL_DIR=$(LINUX_DIR) \
+ SOC_PLATFORM=st-st\

Space before \

package/gcnano-binaries/gcnano-binaries.mk line 44

Quoted 1 line
package/gcnano-binaries/gcnano-binaries.mk new file +1 -0
+ AQROOT=$(@D)\

Ditto.

Quoted 13 lines
package/gcnano-binaries/gcnano-binaries.mk new file +13 -0
+ DEBUG=0
+
+define GCNANO_BINARIES_INSTALL_STAGING_CMDS
+ cp $(@D)/usr/lib/pkgconfig/* $(STAGING_DIR)/usr/lib/pkgconfig/
+ cp -r $(@D)/usr/lib/* $(STAGING_DIR)/usr/lib/
+ cd $(STAGING_DIR)/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; \
+ 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; \
Quoted 8 lines

package/gcnano-binaries/gcnano-binaries.mk line 63

Quoted 6 lines
package/gcnano-binaries/gcnano-binaries.mk new file +6 -0
+ 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
+ rm -f $(STAGING_DIR)/usr/lib/pkgconfig/wayland-egl.pc

Why are you removing this .pc file ?

The file is already provided by wayland package.
I saw it from in the yocto package
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-graphics/gcnano-userland/gcnano-userland-binary.inc

Quoted 8 lines

package/gcnano-binaries/gcnano-binaries.mk line 67

Quoted 4 lines
package/gcnano-binaries/gcnano-binaries.mk new file +4 -0
+ cp -r $(@D)/usr/include/* $(STAGING_DIR)/usr/include/
+endef
+
+GCNANO_BINARIES_POST_INSTALL_TARGET_HOOKS += GCNANO_BINARIES_COPY_LIBS

I am not sure why you are using a GCNANO_BINARIES_POST_INSTALL_TARGET_HOOKS. Why not simply rename GCNANO_BINARIES_COPY_LIBS to GCNANO_BINARIES_INSTALL_TARGET_CMDS.

I need to accept the EULA. But some parts I will move.

Quoted 47 lines
Quoted 6 lines
package/gcnano-binaries/gcnano-binaries.mk new file +6 -0
+define GCNANO_BINARIES_COPY_LIBS
+ cp -r $(@D)/usr/lib/* $(TARGET_DIR)/usr/lib/
+ cd $(TARGET_DIR)/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; \

package/gcnano-binaries/gcnano-binaries.mk line 84

Quoted 10 lines
package/gcnano-binaries/gcnano-binaries.mk new file +10 -0
+ ln -sf libGAL.6.2.4.multi.release.so libGAL.so; \
+ 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;
+endef

The long list of symlinks to be created is not nice, but I don't really see a nicer solution to achieve the same. Perhaps one thing that could be done is to factorize stuff a bit:

define GCNANO_BINARIES_INSTALL
cp $(@D)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig/ cp -r $(@D)/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; \
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
rm -f $(1)/usr/lib/pkgconfig/wayland-egl.pc
cp -r $(@D)/usr/include/* $(1)/usr/include/
endef

And then:

define GCNANO_BINARIES_INSTALL_STAGING_CMDS
$(call GCNANO_BINARIES_INSTALL,$(STAGING_DIR))
endef

Quoted 6 lines

define GCNANO_BINARIES_INSTALL_TARGET_CMDS
$(call GCNANO_BINARIES_INSTALL,$(TARGET_DIR))
endef

Note: it is perfectly fine to install header files and .pc files to $(TARGET_DIR), they anyway get cleaned up later in the build.

OK

Quoted 1 line

Could you rework your patch to take into account those comments ?

Will come soon.

Quoted 11 lines

Thanks!

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com[https://bootlin.com]
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot[http://lists.busybox.net/mailman/listinfo/buildroot]

Regards

Jens Kleintje

#5 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Hello Jens,

Quoted 8 lines · On Mon, 11 Nov 2019 11:19:31 +0100 "Jens Kleintje" <[email protected]> wrote:
Quoted 6 lines

Please use the "github" helper macro:

GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed GCNANO_BINARIES_SITE = $(call github,STMicroelectronics,gcnano-binaries,$(GCNANO_BINARIES_VERSION))

and remove the _SITE_METHOD variable.

The page (https://github.com/STMicroelectronics/gcnano-binaries)
has no release and no tag. So I think there is no archive directory.

Not a problem, the github macro works with any arbitrary commit.

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

+ rm -f $(STAGING_DIR)/usr/lib/pkgconfig/wayland-egl.pc

Why are you removing this .pc file ?

The file is already provided by wayland package.
I saw it from in the yocto package
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-graphics/gcnano-userland/gcnano-userland-binary.inc

Then, if you could add a comment in the .mk file about this, it would be good.

Quoted 2 lines
Quoted 1 line

Could you rework your patch to take into account those comments ?

Will come soon.

Great, thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Quoted 15 lines

Gesendet: Montag, 11. November 2019 um 14:16 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Jens Kleintje" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH 1/2] package/gcnano-binaries: new package

Hello Jens,

Quoted 2 lines · On Mon, 11 Nov 2019 11:19:31 +0100 "Jens Kleintje" <[email protected]> wrote:
Quoted 1 line

Please use the "github" helper macro:

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines

GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed GCNANO_BINARIES_SITE = $(call github,STMicroelectronics,gcnano-binaries,$(GCNANO_BINARIES_VERSION))

and remove the _SITE_METHOD variable.

The page (https://github.com/STMicroelectronics/gcnano-binaries)
has no release and no tag. So I think there is no archive directory.

Not a problem, the github macro works with any arbitrary commit.

The problem is, that I get everytime the HEAD and not the commit with SHA c01642ed5e18cf09ecd905af193e935cb3be95ed. Today I got the commit with SHA 271f87d816a957bf196f6328c34110cab1224d4d.
Did I miss something?

Quoted 26 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines

+ rm -f $(STAGING_DIR)/usr/lib/pkgconfig/wayland-egl.pc

Why are you removing this .pc file ?

The file is already provided by wayland package.
I saw it from in the yocto package
https://github.com/STMicroelectronics/meta-st-stm32mp/blob/thud/recipes-graphics/gcnano-userland/gcnano-userland-binary.inc

Then, if you could add a comment in the .mk file about this, it would be good.

Quoted 2 lines
Quoted 1 line

Could you rework your patch to take into account those comments ?

Will come soon.

Great, thanks!

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

#7 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Quoted 4 lines · On Mon, 11 Nov 2019 14:48:08 +0100 "Jens Kleintje" <[email protected]> wrote:
Quoted 1 line

Not a problem, the github macro works with any arbitrary commit.

The problem is, that I get everytime the HEAD and not the commit with SHA c01642ed5e18cf09ecd905af193e935cb3be95ed. Today I got the commit with SHA 271f87d816a957bf196f6328c34110cab1224d4d.
Did I miss something?

Depends on how you did it I guess. Did you do it like this:

V4L2GRAB_VERSION = f8d8844d52387b3db7b8736f5e86156d9374f781 V4L2GRAB_SITE = $(call github,twam,v4l2grab,$(V4L2GRAB_VERSION))

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#8 lore raw

PATCH 1/2 package/gcnano-binaries: new package

Quoted 12 lines

Gesendet: Montag, 11. November 2019 um 14:55 Uhr
Von: "Thomas Petazzoni" <[email protected]>
An: "Jens Kleintje" <[email protected]>
Cc: buildroot at busybox.net
Betreff: Re: [Buildroot] [PATCH 1/2] package/gcnano-binaries: new package

Quoted 1 line · On Mon, 11 Nov 2019 14:48:08 +0100 "Jens Kleintje" <[email protected]> wrote:
Quoted 1 line

Not a problem, the github macro works with any arbitrary commit.

Quoted 9 lines
Quoted 3 lines

The problem is, that I get everytime the HEAD and not the commit with SHA c01642ed5e18cf09ecd905af193e935cb3be95ed. Today I got the commit with SHA 271f87d816a957bf196f6328c34110cab1224d4d.
Did I miss something?

Depends on how you did it I guess. Did you do it like this:

V4L2GRAB_VERSION = f8d8844d52387b3db7b8736f5e86156d9374f781 V4L2GRAB_SITE = $(call github,twam,v4l2grab,$(V4L2GRAB_VERSION))

GCNANO_BINARIES_FILE_VERSION = 6.2.4.p4
GCNANO_BINARIES_VERSION = c01642ed5e18cf09ecd905af193e935cb3be95ed GCNANO_BINARIES_SITE = $(call github,STMicroelectronics,gcnano-binaries,$(GCNANO_BINARIES_VERSION))

Quoted 6 lines

Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

#9 lore raw

PATCH 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
index 15c9650391..1a152be94b 100644
@@ -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

#10 lore raw

PATCH 2/2 package/qt5/qt5base: add support for gcnano-binaries

Hello Jens,

On Wed, 6 Nov 2019 16:56:11 +0100
Jens Kleintje <[email protected]> wrote:

We need your Signed-off-by line in the commit log.

Quoted 9 lines
---
 package/qt5/qt5base/qt5base.mk | 6 ++++++
 1 file changed, 6 insertions(+)
package/qt5/qt5base/qt5base.mk +0 -0
index 15c9650391..1a152be94b 100644

package/qt5/qt5base/qt5base.mk endif · line 83

Quoted 6 lines
package/qt5/qt5base/qt5base.mk +3 -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

I think at some point, we will have to get rid of this, using a libgbm virtual package. I tried at
https://github.com/tpetazzoni/buildroot/commits/gbm, but it was not very convincing as the existing gbm implementation we have were not really compatible with each other. But perhaps this will make more sense now.

Anyway, don't worry about this: we won't make this a requirement to merge the gcnano-binaries support. We can for now do it like you're proposing.

But we do need your Signed-off-by line in the commit log.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com