diff --git a/package/freescale-imx/imx-gpu-viv/Config.in b/package/freescale-imx/imx-gpu-viv/Config.in index 9372b6313f..3e095b730c 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 e0e8a31533..f72735e093 100644 --- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -49,6 +49,13 @@ define IMX_GPU_VIV_FIXUP_PKGCONFIG endef 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. @@ -57,6 +64,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