diff mbox series

[3/3] package/freescale-imx/imx-gpu-viv: add platform specific drivers

Message ID VI1P190MB0493FDD823C21285E5D1D60D9FFF9@VI1P190MB0493.EURP190.PROD.OUTLOOK.COM
State Accepted
Headers show
Series [1/3] package/freescale-imx/imx-gpu-viv: drop X11 output | expand

Commit Message

Lang Daniel Jan. 10, 2023, 9:33 a.m. UTC
Since e8df0f7 (package/freescale-imx/imx-gpu-viv: bump to version 6.4.3.p4.4)
the archive contains platform specific drivers that need to be copied
and included.

Signed-off-by: Daniel Lang <d.lang@abatec.at>
---
 package/freescale-imx/imx-gpu-viv/Config.in      |  8 ++++++++
 package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 11 +++++++++++
 2 files changed, 19 insertions(+)

Comments

Thomas Petazzoni Jan. 14, 2023, 10:10 p.m. UTC | #1
On Tue, 10 Jan 2023 09:33:39 +0000
Lang Daniel via buildroot <buildroot@buildroot.org> wrote:

> Since e8df0f7 (package/freescale-imx/imx-gpu-viv: bump to version 6.4.3.p4.4)
> the archive contains platform specific drivers that need to be copied
> and included.
> 
> Signed-off-by: Daniel Lang <d.lang@abatec.at>
> ---
>  package/freescale-imx/imx-gpu-viv/Config.in      |  8 ++++++++
>  package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 11 +++++++++++
>  2 files changed, 19 insertions(+)

Applied to master, thanks.

Thomas
diff mbox series

Patch

diff --git a/package/freescale-imx/imx-gpu-viv/Config.in b/package/freescale-imx/imx-gpu-viv/Config.in
index a245a1d089..89c5bfd634 100644
--- a/package/freescale-imx/imx-gpu-viv/Config.in
+++ b/package/freescale-imx/imx-gpu-viv/Config.in
@@ -77,6 +77,14 @@  if BR2_aarch64
 config BR2_PACKAGE_PROVIDES_LIBGBM
 	default "imx-gpu-viv"
 
+config BR2_PACKAGE_IMX_GPU_VIV_PLATFORM
+	string
+	default "mx8mn" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MN
+	default "mx8mp" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MP
+	default "mx8mq" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M
+	default "mx8qm" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8
+	default "mx8qxp" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
+
 endif
 
 config BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES
diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
index 35929b0e5c..52ccbf6f59 100644
--- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
+++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk
@@ -51,6 +51,13 @@  endef
 endif
 endif
 
+IMX_GPU_VIV_PLATFORM_DIR = $(call qstrip,$(BR2_PACKAGE_IMX_GPU_VIV_PLATFORM))
+ifneq ($(IMX_GPU_VIV_PLATFORM_DIR),)
+define IMX_GPU_VIV_COPY_PLATFORM
+	cp -dpfr $(@D)/gpu-core/usr/lib/$(IMX_GPU_VIV_PLATFORM_DIR)/* $(@D)/gpu-core/usr/lib/
+endef
+endif
+
 # Instead of building, we fix up the inconsistencies that exist
 # in the upstream archive here. We also remove unused backend files.
 # Make sure these commands are idempotent.
@@ -59,6 +66,10 @@  define IMX_GPU_VIV_BUILD_CMDS
 	$(foreach backend,fb wayland, \
 		$(RM) -r $(@D)/gpu-core/usr/lib/$(backend)
 	)
+	$(IMX_GPU_VIV_COPY_PLATFORM)
+	$(foreach platform,mx8mn mx8mp mx8mq mx8qm mx8qxp mx8ulp, \
+		$(RM) -r $(@D)/gpu-core/usr/lib/$(platform)
+	)
 	$(IMX_GPU_VIV_FIXUP_PKGCONFIG)
 endef