package/freescale-imx/imx-dpu-g2d: new package
PATCH 1/1 package/freescale-imx/imx-dpu-g2d: new package
imx-dpu-g2d package is used by i.MX 8 and i.MX 8X series instead of imx-vpu or imx-vpu-hantro.With this commit, imx-dpu-g2d is added and is enabled for i.MX 8X. imx-vpu and imx-vpu-hantro are disabled for the i.MX series that do not have vpu support.
--- package/freescale-imx/Config.in | 16 +++++++- .../firmware-imx/firmware-imx.mk | 4 ++ package/freescale-imx/imx-dpu-g2d/Config.in | 23 ++++++++++++ .../imx-dpu-g2d/imx-dpu-g2d.hash | 2 + .../freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk | 37 +++++++++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-dpu-g2d/Config.in create mode 100644 package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash create mode 100644 package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk
package/freescale-imx/Config.in +15 -1
@@ -63,6 +63,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M + default "IMX8X" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU bool
@@ -75,13 +76,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M +config BR2_PACKAGE_FREESCALE_IMX_HAS_DPU + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X + config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ - BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in"
@@ -90,9 +96,17 @@ source "package/freescale-imx/imx-lib/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" +if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU source "package/freescale-imx/imx-vpu/Config.in" +source "package/freescale-imx/imx-vpuwrap/Config.in" +endif +if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO source "package/freescale-imx/imx-vpu-hantro/Config.in" source "package/freescale-imx/imx-vpuwrap/Config.in" +endif +if BR2_PACKAGE_FREESCALE_IMX_HAS_DPU +source "package/freescale-imx/imx-dpu-g2d/Config.in" +endif source "package/freescale-imx/firmware-imx/Config.in" source "package/freescale-imx/imx-sc-firmware/Config.in" if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
package/freescale-imx/firmware-imx/firmware-imx.mk +4 -0
@@ -53,6 +53,10 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS cp $(@D)/firmware/seco/mx8qx-ahab-container.img \ $(BINARIES_DIR)/ahab-container.img endef +define FIRMWARE_IMX_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/vpu + cp -r $(@D)/firmware/vpu/vpu_fw_imx8* $(TARGET_DIR)/lib/firmware/vpu +endef else define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware/imx
package/freescale-imx/imx-dpu-g2d/Config.in new file +23 -0
@@ -0,0 +1,23 @@ +comment "imx-dpu-g2d needs a glibc toolchain" + depends on BR2_aarch64 + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_IMX_DPU_G2D + bool "imx-dpu-g2d" + # Library binaries are linked against libc.so.6 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_IMX_GPU_VIV + help + Userspace DPU 2D libraries for Vivante GPU on i.MX platforms. + + This library is provided by NXP as-is and doesn't have an + upstream. + +if BR2_PACKAGE_IMX_DPU_G2D + +config BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES + bool "install examples" + help + Copy the Vivante DPU examples to the target. + +endif
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash new file +2 -0
@@ -0,0 +1,2 @@ +sha256 46c72ce9b98b7116e9f7f53a66aadc8fb66910473477c6553db77ed71e54d7ea imx-dpu-g2d-1.8.2.bin +
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk new file +37 -0
@@ -0,0 +1,37 @@ +################################################################################ +# +# imx-dpu-g2d +# +################################################################################ + +IMX_DPU_G2D_VERSION = 1.8.2 +IMX_DPU_G2D_SITE = $(FREESCALE_IMX_SITE) +IMX_DPU_G2D_SOURCE = imx-dpu-g2d-$(IMX_DPU_G2D_VERSION).bin +IMX_DPU_G2D_DEPENDENCIES = imx-gpu-viv +IMX_DPU_G2D_INSTALL_STAGING = YES + +IMX_DPU_G2D_LICENSE = NXP Semiconductor Software License Agreement +IMX_DPU_G2D_LICENSE_FILES = EULA COPYING +IMX_DPU_G2D_REDISTRIBUTE = NO + +define IMX_DPU_G2D_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_DPU_G2D_DL_DIR)/$(IMX_DPU_G2D_SOURCE)) +endef + +define IMX_DPU_G2D_INSTALL_STAGING_CMDS + cp -a $(@D)/g2d/usr/* $(STAGING_DIR)/usr +endef + +ifeq ($(BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES),y) +define IMX_DPU_G2D_INSTALL_EXAMPLES + mkdir -p $(TARGET_DIR)/usr/share/examples/ + cp -a $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/ +endef +endif + +define IMX_DPU_G2D_INSTALL_TARGET_CMDS + $(IMX_DPU_G2D_INSTALL_EXAMPLES) + cp -a $(@D)/g2d/usr/lib $(TARGET_DIR)/usr +endef + +$(eval $(generic-package))
Signature · 1 line
2.17.1
PATCH 1/1 package/freescale-imx/imx-dpu-g2d: new package
Hello,
Thanks for your contribution!
Quoted 1 line · On Sun, 2 Feb 2020 13:38:01 +0300 Refik Tuzakli <[email protected]>…
imx-dpu-g2d package is used by i.MX 8 and i.MX 8X series instead of imx-vpu or imx-vpu-hantro.With this commit, imx-dpu-g2d is added and is enabled for i.MX 8X. imx-vpu and imx-vpu-hantro are disabled for the i.MX series that do not have vpu support.
The commit log text should be wrapped to 80 columns.
Also, your commit log says your commit does multiple things, and indeed it does, and therefore should be split into several commits. See below.
Quoted 8 lines
Signed-off-by Refik Tuzakli <[email protected]>--- package/freescale-imx/Config.in | 16 +++++++- .../firmware-imx/firmware-imx.mk | 4 ++ package/freescale-imx/imx-dpu-g2d/Config.in | 23 ++++++++++++ .../imx-dpu-g2d/imx-dpu-g2d.hash | 2 + .../freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk | 37 +++++++++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-)
When adding a new package, please update the DEVELOPERS file with an entry for this package.
package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_PLATFORM · line 66
Quoted 9 lines
package/freescale-imx/Config.in +1
-0@@ -63,6 +63,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M + default "IMX8X" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
This should be in a separate commit from the imx-dpu-g2d package.
package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO · line 81
Quoted 10 lines
package/freescale-imx/Config.in +3
-0config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU bool@@ -75,13 +76,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M +config BR2_PACKAGE_FREESCALE_IMX_HAS_DPU + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
This can go in the imx-dpu-g2d package addition I'd say.
package/freescale-imx/Config.in config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO · line 90
Quoted 10 lines
package/freescale-imx/Config.in +3
-1+ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ - BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X
This is not related to imx-dpu-g2d
Quoted 5 lines
package/freescale-imx/Config.in +0
-0source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in"@@ -90,9 +96,17 @@ source "package/freescale-imx/imx-lib/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in"
package/freescale-imx/Config.in source "package/freescale-imx/imx-lib/Config.in" · line 106
Quoted 10 lines
package/freescale-imx/Config.in +5
-0source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" +if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU source "package/freescale-imx/imx-vpu/Config.in" +source "package/freescale-imx/imx-vpuwrap/Config.in" +endif +if BR2_PACKAGE_FREESCALE_IMX_HAS_VPU_HANTRO source "package/freescale-imx/imx-vpu-hantro/Config.in" source "package/freescale-imx/imx-vpuwrap/Config.in" +endif
These changes are not related to imx-dpu-g2d addition, so they should be in a separate commit.
package/freescale-imx/firmware-imx/firmware-imx.mk define FIRMWARE_IMX_INSTALL_IMAGES_CMDS · line 59
Quoted 12 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +4
-0@@ -53,6 +53,10 @@ define FIRMWARE_IMX_INSTALL_IMAGES_CMDS cp $(@D)/firmware/seco/mx8qx-ahab-container.img \ $(BINARIES_DIR)/ahab-container.img endef +define FIRMWARE_IMX_INSTALL_TARGET_CMDS + mkdir -p $(TARGET_DIR)/lib/firmware/vpu + cp -r $(@D)/firmware/vpu/vpu_fw_imx8* $(TARGET_DIR)/lib/firmware/vpu +endef
This should be in a separate commit.
Quoted 38 lines
package/freescale-imx/firmware-imx/firmware-imx.mk +0
-0else define FIRMWARE_IMX_INSTALL_TARGET_CMDS mkdir -p $(TARGET_DIR)/lib/firmware/imxpackage/freescale-imx/imx-dpu-g2d/Config.in new file +23
-0@@ -0,0 +1,23 @@ +comment "imx-dpu-g2d needs a glibc toolchain" + depends on BR2_aarch64 + depends on !BR2_TOOLCHAIN_USES_GLIBC + +config BR2_PACKAGE_IMX_DPU_G2D + bool "imx-dpu-g2d" + # Library binaries are linked against libc.so.6 + depends on BR2_TOOLCHAIN_USES_GLIBC + select BR2_PACKAGE_IMX_GPU_VIV + help + Userspace DPU 2D libraries for Vivante GPU on i.MX platforms. + + This library is provided by NXP as-is and doesn't have an + upstream. + +if BR2_PACKAGE_IMX_DPU_G2D + +config BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES + bool "install examples" + help + Copy the Vivante DPU examples to the target. + +endifpackage/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash new file +0
-0
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash line 2
Quoted 2 lines
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.hash new file +2
-0@@ -0,0 +1,2 @@ +sha256 46c72ce9b98b7116e9f7f53a66aadc8fb66910473477c6553db77ed71e54d7ea imx-dpu-g2d-1.8.2.bin +
We want hash for license files. Also there should be a comment in the hash file that says where the hash comes from. If it has been calculated locally, just add:
# Locally calculated
Quoted 33 lines
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk new file +27
-0@@ -0,0 +1,37 @@ +################################################################################ +# +# imx-dpu-g2d +# +################################################################################ + +IMX_DPU_G2D_VERSION = 1.8.2 +IMX_DPU_G2D_SITE = $(FREESCALE_IMX_SITE) +IMX_DPU_G2D_SOURCE = imx-dpu-g2d-$(IMX_DPU_G2D_VERSION).bin +IMX_DPU_G2D_DEPENDENCIES = imx-gpu-viv +IMX_DPU_G2D_INSTALL_STAGING = YES + +IMX_DPU_G2D_LICENSE = NXP Semiconductor Software License Agreement +IMX_DPU_G2D_LICENSE_FILES = EULA COPYING +IMX_DPU_G2D_REDISTRIBUTE = NO + +define IMX_DPU_G2D_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_DPU_G2D_DL_DIR)/$(IMX_DPU_G2D_SOURCE)) +endef + +define IMX_DPU_G2D_INSTALL_STAGING_CMDS + cp -a $(@D)/g2d/usr/* $(STAGING_DIR)/usr +endef + +ifeq ($(BR2_PACKAGE_IMX_DPU_G2D_EXAMPLES),y) +define IMX_DPU_G2D_INSTALL_EXAMPLES + mkdir -p $(TARGET_DIR)/usr/share/examples/
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk line 37
Quoted 10 lines
package/freescale-imx/imx-dpu-g2d/imx-dpu-g2d.mk new file +10
-0+ cp -a $(@D)/gpu-demos/opt/* $(TARGET_DIR)/usr/share/examples/ +endef +endif + +define IMX_DPU_G2D_INSTALL_TARGET_CMDS + $(IMX_DPU_G2D_INSTALL_EXAMPLES) + cp -a $(@D)/g2d/usr/lib $(TARGET_DIR)/usr +endef + +$(eval $(generic-package))
Could you address the above comments and send an updated version?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com