Update Freescale graphics packages
cover Update Freescale graphics packages
Hi all,
Here is the series that updates the graphics for Freescale/NXP platforms.
It has been separated from the other updates since there is no dependency between both series and I expect the new module package to be somehow problematic.
http://lists.busybox.net/pipermail/buildroot/2016-January/150904.html
Indeed, Yocto has a do_configure_append which allows to modify the kernel configuration and remove the built-in Vivante driver option.
https://github.com/Freescale/meta-fsl-arm/blob/master/classes/fsl-vivante-kernel-driver-handler.bbclass#L52
Details of the implementation are described in the patch.
This series has been tested on a SabreLite with the following configuration:
BR2_arm=y
BR2_cortex_a9=y
BR2_TOOLCHAIN_EXTERNAL=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc1" BR2_ROOTFS_POST_BUILD_SCRIPT="board/boundarydevices/nitrogen6x/post-build.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/f4c8395/linux-imx6-f4c8395.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="boundary"
BR2_LINUX_KERNEL_ZIMAGE=y
BR2_LINUX_KERNEL_DTS_SUPPORT=y
BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabrelite"
BR2_LINUX_KERNEL_INSTALL_TARGET=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q=y
BR2_PACKAGE_IMX_GPU_VIV=y
BR2_PACKAGE_IMX_GPU_VIV_APITRACE=y
BR2_PACKAGE_IMX_GPU_VIV_EXAMPLES=y
BR2_PACKAGE_IMX_GPU_VIV_GMEM_INFO=y
BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV=y
Regards,
Gary
Gary Bisson (4):
imx-gpu-viv: bump version to 5.0.11 p7.1 xdriver_xf86-video-imx-viv: bump to version 5.0.11 p7.1
kernel-module-imx-gpu-viv: add new package configs/nitrogen6*: bump kernel version
configs/nitrogen6sx_defconfig | 2 +- configs/nitrogen6x_defconfig | 2 +- package/freescale-imx/Config.in | 1 + package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash | 4 ++-- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 11 +-------- .../kernel-module-imx-gpu-viv/Config.in | 12 ++++++++++ .../kernel-module-imx-gpu-viv.mk | 28 ++++++++++++++++++++++ .../xdriver_xf86-video-imx-viv.hash | 2 +- .../xdriver_xf86-video-imx-viv.mk | 3 ++- 9 files changed, 49 insertions(+), 16 deletions(-) create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/Config.in create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
Signature · 1 line
2.7.0
PATCH 1/4 imx-gpu-viv: bump version to 5.0.11 p7.1
Upgrade to 5.0.11 P7.1 for i.MX6 with GPU
i.MX6QP qualified graphics driver(5.0.11P7.1). Includes many of the bug fixes and stability improvements. For more information refer to release notes from
http://www.freescale.com/imx6qp
libGAL_egl is no longer provided in p7.1.
This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/commit/b3ef125
This package has been tested with both X11 and Framebuffer backends:
# cd /usr/share/examples/viv_samples/vdk/ # apitrace trace --api egl ./tutorial7 # gmem_info ... display memory use per PID ... #?apitrace replay tutorial7.trace #?eglretrace tutorial7.trace
--- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash | 4 ++-- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 11 +---------- 2 files changed, 3 insertions(+), 12 deletions(-)
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.hash +2 -2
@@ -1,3 +1,3 @@ # locally computed -sha256 b5b9c8e216b2bc4281c2443e07eab90547de0abd705614756ed68c7ad2fcf97a imx-gpu-viv-5.0.11.p4.5-sfp.bin -sha256 0591b495cd1c2547ae007d405b90729e2fb90603a5728b39d1a99cb4e1cf1eb4 imx-gpu-viv-5.0.11.p4.5-hfp.bin +sha256 43fea6ebbb1222e0f594fff3b48147f4bb6173b85f2caa9fa6bf04a1c85ee93a imx-gpu-viv-5.0.11.p7.1-sfp.bin +sha256 e49ca1d31ca83bb50f6672325db37ae3754eb9073ad98a37790ab1209ea5cba8 imx-gpu-viv-5.0.11.p7.1-hfp.bin
package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +1 -10
@@ -4,7 +4,7 @@ # ################################################################################ -IMX_GPU_VIV_BASE_VERSION = 5.0.11.p4.5 +IMX_GPU_VIV_BASE_VERSION = 5.0.11.p7.1 ifeq ($(BR2_ARM_EABIHF),y) IMX_GPU_VIV_VERSION = $(IMX_GPU_VIV_BASE_VERSION)-hfp else
@@ -26,13 +26,6 @@ define IMX_GPU_VIV_EXTRACT_CMDS $(call FREESCALE_IMX_EXTRACT_HELPER,$(DL_DIR)/$(IMX_GPU_VIV_SOURCE)) endef -# For some reason libGAL_egl for x11 is called libGAL_egl.dri.so -ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) -define IMX_GPU_VIV_FIXUP_SYMLINKS - ln -sf libGAL_egl.dri.so $(@D)/gpu-core/usr/lib/libGAL_egl.so -endef -endif - # Instead of building, we fix up the inconsistencies that exist # in the upstream archive here. # Make sure these commands are idempotent.
@@ -49,8 +42,6 @@ define IMX_GPU_VIV_BUILD_CMDS ln -sf libGLESv2-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGLESv2.so.2.0.0 ln -sf libVIVANTE-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libVIVANTE.so ln -sf libGAL-$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGAL.so - ln -sf libGAL_egl.$(IMX_GPU_VIV_LIB_TARGET).so $(@D)/gpu-core/usr/lib/libGAL_egl.so - $(IMX_GPU_VIV_FIXUP_SYMLINKS) endef ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb)
Signature · 1 line
2.7.0
PATCH 2/4 xdriver_xf86-video-imx-viv: bump to version 5.0.11 p7.1
In reply to Gary BissonThe license is now provided in the package.
This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/commit/1195b71
The following xorg.conf was used in order to force the use of the vivante module:
https://github.com/Freescale/meta-fsl-arm/blob/master/recipes-graphics
/xorg-xserver/xserver-xf86-config/mx6/xorg.conf
Note that the X server must be started with the "noreset" option to avoid crashes when closing X apps.
# X -noreset
--- .../x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash | 2 +- package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-)
package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.hash +1 -1
@@ -1,2 +1,2 @@ # locally computed -sha256 1a0b25a91b493e99dfa94a802290320ea998ebd45d7aab0f73d7c7bb521b7e84 xserver-xorg-video-imx-viv-5.0.11.p4.5.tar.gz +sha256 ab6a896cafba324105d26f52b7dad2c41d04d75cc9e48b66e8041a95660a04ee xserver-xorg-video-imx-viv-5.0.11.p7.1.tar.gz
package/x11r7/xdriver_xf86-video-imx-viv/xdriver_xf86-video-imx-viv.mk +2 -1
@@ -4,12 +4,13 @@ # ################################################################################ -XDRIVER_XF86_VIDEO_IMX_VIV_VERSION = 5.0.11.p4.5 +XDRIVER_XF86_VIDEO_IMX_VIV_VERSION = 5.0.11.p7.1 XDRIVER_XF86_VIDEO_IMX_VIV_SITE = $(FREESCALE_IMX_SITE) XDRIVER_XF86_VIDEO_IMX_VIV_SOURCE = xserver-xorg-video-imx-viv-$(XDRIVER_XF86_VIDEO_IMX_VIV_VERSION).tar.gz XDRIVER_XF86_VIDEO_IMX_VIV_DEPENDENCIES = imx-gpu-viv xserver_xorg-server \ xproto_xproto xproto_xf86driproto libdrm XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE = GPLv2+ +XDRIVER_XF86_VIDEO_IMX_VIV_LICENSE_FILES = COPYING-GPL-2 XDRIVER_XF86_VIDEO_IMX_VIV_INSTALL_STAGING = YES XDRIVER_XF86_VIDEO_IMX_VIV_MAKE_CMD = $(TARGET_CONFIGURE_OPTS) $(MAKE1) -C $(@D)/EXA/src -f makefile.linux
Signature · 1 line
2.7.0
PATCH 3/4 kernel-module-imx-gpu-viv: add new package
In reply to Gary BissonThis is the Vivante kernel driver split from the kernel source code in order to make it possible to be used in any kernel source since 3.10.53.
The driver source code provided by Freescale needs fixes so the community forked the code to allow faster development and easier integration of fixes from the community.
This patch is based on the Yocto equivalent:
https://github.com/Freescale/meta-fsl-arm/commit/32cf391
https://github.com/Freescale/meta-fsl-arm/commit/4249193
This package has been tested with the following commands:
# modprobe galcore # cd /usr/share/examples/viv_samples/vdk/ # ./tutorial7
---
As explained in the cover letter, Yocto has a do_configure_append which allows to modify the kernel configuration and remove the built-in Vivante driver option.
https://github.com/Freescale/meta-fsl-arm/blob/master/classes/fsl-vivante-kernel-driver-handler.bbclass#L52
In order to have a similar mechanism the kernel module Vivante package includes a LINUX_POST_CONFIGURE_HOOKS which doesn't really feel right.
Indeed, with this hook in place, the kernel and its modules are re-built everytime a 'make' is issued. Not sure why it affects the build this way, any input is appreciated.
Regards,
Gary
--- package/freescale-imx/Config.in | 1 + .../kernel-module-imx-gpu-viv/Config.in | 12 ++++++++++ .../kernel-module-imx-gpu-viv.mk | 28 ++++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/Config.in create mode 100644 package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk
package/freescale-imx/Config.in +1 -0
@@ -52,6 +52,7 @@ source "package/freescale-imx/libz160/Config.in" endif if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q source "package/freescale-imx/imx-gpu-viv/Config.in" +source "package/freescale-imx/kernel-module-imx-gpu-viv/Config.in" endif endif
package/freescale-imx/kernel-module-imx-gpu-viv/Config.in new file +12 -0
@@ -0,0 +1,12 @@ +comment "kernel-module-imx-gpu-viv needs a Linux kernel to be built" + depends on !BR2_LINUX_KERNEL + +config BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV + bool "kernel-module-imx-gpu-viv" + depends on BR2_LINUX_KERNEL + help + Kernel loadable module for Vivante GPU. + + This package uses an exact copy of the GPU kernel driver source code + of the same version as base and include fixes and improvements + developed by FSL Community
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk new file +28 -0
@@ -0,0 +1,28 @@ +################################################################################ +# +# kernel-module-imx-gpu-viv +# +################################################################################ + +KERNEL_MODULE_IMX_GPU_VIV_VERSION = eeeb23c0fb1cee01318088d417025263479c44ac +KERNEL_MODULE_IMX_GPU_VIV_SITE = \ + $(call github,Freescale,kernel-module-imx-gpu-viv,$(KERNEL_MODULE_IMX_GPU_VIV_VERSION)) +KERNEL_MODULE_IMX_GPU_VIV_LICENSE = GPLv2 +KERNEL_MODULE_IMX_GPU_VIV_LICENSE_FILES = COPYING + +KERNEL_MODULE_IMX_GPU_VIV_MODULE_MAKE_OPTS = \ + AQROOT=$(@D)/kernel-module-imx-gpu-viv-src \ + KERNEL_DIR=$(LINUX_DIR) + +KERNEL_MODULE_IMX_GPU_VIV_MODULE_SUBDIRS = kernel-module-imx-gpu-viv-src + +# Modify Linux configuration in case it includes a built-in version of +# the Vivante driver. +define LINUX_CONFIGURATION_FIXUP + sed -i "/CONFIG_MXC_GPU_VIV[ =]/d" $(LINUX_DIR)/.config + echo "# CONFIG_MXC_GPU_VIV is not set" >> $(LINUX_DIR)/.config +endef +LINUX_POST_CONFIGURE_HOOKS += LINUX_CONFIGURATION_FIXUP + +$(eval $(kernel-module)) +$(eval $(generic-package))
Signature · 1 line
2.7.0
PATCH 3/4 kernel-module-imx-gpu-viv: add new package
Dear Gary Bisson,
package/freescale-imx/kernel-module-imx-gpu-viv/Config.in line 12
Quoted 9 lines · Gary Bisson
package/freescale-imx/kernel-module-imx-gpu-viv/Config.in new file +9
-0+config BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV + bool "kernel-module-imx-gpu-viv" + depends on BR2_LINUX_KERNEL + help + Kernel loadable module for Vivante GPU. + + This package uses an exact copy of the GPU kernel driver source code + of the same version as base and include fixes and improvements + developed by FSL Community
Upstream URL missing here. Also please include a hash file.
Quoted 21 lines
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk new file +15
-0@@ -0,0 +1,28 @@ +################################################################################ +# +# kernel-module-imx-gpu-viv +# +################################################################################ + +KERNEL_MODULE_IMX_GPU_VIV_VERSION = eeeb23c0fb1cee01318088d417025263479c44ac +KERNEL_MODULE_IMX_GPU_VIV_SITE = \ + $(call github,Freescale,kernel-module-imx-gpu-viv,$(KERNEL_MODULE_IMX_GPU_VIV_VERSION)) +KERNEL_MODULE_IMX_GPU_VIV_LICENSE = GPLv2 +KERNEL_MODULE_IMX_GPU_VIV_LICENSE_FILES = COPYING + +KERNEL_MODULE_IMX_GPU_VIV_MODULE_MAKE_OPTS = \ + AQROOT=$(@D)/kernel-module-imx-gpu-viv-src \ + KERNEL_DIR=$(LINUX_DIR)
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk line 25
Quoted 10 lines
package/freescale-imx/kernel-module-imx-gpu-viv/kernel-module-imx-gpu-viv.mk new file +10
-0+ +KERNEL_MODULE_IMX_GPU_VIV_MODULE_SUBDIRS = kernel-module-imx-gpu-viv-src + +# Modify Linux configuration in case it includes a built-in version of +# the Vivante driver. +define LINUX_CONFIGURATION_FIXUP + sed -i "/CONFIG_MXC_GPU_VIV[ =]/d" $(LINUX_DIR)/.config + echo "# CONFIG_MXC_GPU_VIV is not set" >> $(LINUX_DIR)/.config +endef +LINUX_POST_CONFIGURE_HOOKS += LINUX_CONFIGURATION_FIXUP
I really don't like spreading hooks for package A in the code of package B. I think here it's better to change linux.mk with:
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV),
$(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))In LINUX_KCONFIG_FIXUP_CMDS.
Peter, Arnout, Yann, what do you think ?
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/4 kernel-module-imx-gpu-viv: add new package
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 9 lines
I really don't like spreading hooks for package A in the code of package B. I think here it's better to change linux.mk with:
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))In
LINUX_KCONFIG_FIXUP_CMDS.Peter, Arnout, Yann, what do you think ?
Yes, that matches what we do for the other package related kernel configs.
Does this theoretically work on a mainline kernel? If so, perhaps it should also disable the recently added DRM_VIVANTE stuff in case it conflicts?
Signature · 2 lines
Venlig hilsen, Peter Korsgaard
PATCH 3/4 kernel-module-imx-gpu-viv: add new package
Gary, All,
On 2016-02-01 22:28 +0100, Peter Korsgaard spake thusly:
Quoted 9 lines
Quoted 7 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
I really don't like spreading hooks for package A in the code of package B. I think here it's better to change linux.mk with:
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))In
LINUX_KCONFIG_FIXUP_CMDS.
Peter, Arnout, Yann, what do you think ?Yes, that matches what we do for the other package related kernel configs.
Agreed.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 3/4 kernel-module-imx-gpu-viv: add new package
In reply to Peter KorsgaardPeter, All,
Quoted 10 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Thomas" == Thomas Petazzoni <[email protected]> writes:
Hi,
Quoted 5 lines
I really don't like spreading hooks for package A in the code of package B. I think here it's better to change linux.mk with:
$(if $(BR2_PACKAGE_KERNEL_MODULE_IMX_GPU_VIV), $(call KCONFIG_DISABLE_OPT,CONFIG_MXC_GPU_VIV,$(@D)/.config))
Quoted 6 lines
Quoted 3 lines
In
LINUX_KCONFIG_FIXUP_CMDS.Peter, Arnout, Yann, what do you think ?
Yes, that matches what we do for the other package related kernel configs.
Ok I'll switch to that.
Quoted 3 lines
Does this theoretically work on a mainline kernel? If so, perhaps it should also disable the recently added
DRM_VIVANTEstuff in case it conflicts?
No unfortunately this doesn't work on a mainline kernel.
Regards,
Gary
PATCH 4/4 configs/nitrogen6*: bump kernel version
In reply to Gary BissonUpdate to latest boundary-imx_3.14.28_1.0.0_ga commit which brings the following additions:
- Fix cache functions export when !MULTI_CACHE
https://github.com/Freescale/linux-fslc/commit/6325d57
- Mandatory for Vivante kernel module
- Add TW686x video decoder support
- Fix OV5642 subdev/capture driver conflict
- Add GSLX680 touchscreen support
--- configs/nitrogen6sx_defconfig | 2 +- configs/nitrogen6x_defconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
configs/nitrogen6sx_defconfig +1 -1
@@ -31,7 +31,7 @@ BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/u-bo BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # Last version of branch boundary-imx_3.14.28_1.0.0_ga -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/d7a412b/linux-imx6-d7a412b.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/f4c8395/linux-imx6-f4c8395.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_ZIMAGE=y BR2_LINUX_KERNEL_INSTALL_TARGET=y
configs/nitrogen6x_defconfig +1 -1
@@ -31,7 +31,7 @@ BR2_TARGET_UBOOT_CUSTOM_TARBALL_LOCATION="http://github.com/boundarydevices/u-bo BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_TARBALL=y # Last version of branch boundary-imx_3.14.28_1.0.0_ga -BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/d7a412b/linux-imx6-d7a412b.tar.gz" +BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/boundarydevices/linux-imx6/tarball/f4c8395/linux-imx6-f4c8395.tar.gz" BR2_LINUX_KERNEL_DEFCONFIG="boundary" BR2_LINUX_KERNEL_ZIMAGE=y BR2_LINUX_KERNEL_INSTALL_TARGET=y
Signature · 1 line
2.7.0
Thomas Petazzoni
Appliedcover Update Freescale graphics packages
In reply to Gary BissonGary,
Quoted 2 lines · Gary Bisson
Gary Bisson (4):
imx-gpu-viv: bump version to 5.0.11 p7.1
Applied.
Quoted 1 line
xdriver_xf86-video-imx-viv: bump to version 5.0.11 p7.1
Applied.
Quoted 1 line
kernel-module-imx-gpu-viv: add new package
I have comments on this one.
Quoted 1 line
configs/nitrogen6*: bump kernel version
Applied.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com