Add support for iMX5 GPU
cover Add support for iMX5 GPU
Hello,
This is continuation of my previous serie called "Add Xorg support for imx6". This time, it add support for iMX5 chipset. As fro iMX6, this work is mainly adapted from Yocto.
J?r?me Pouiller (4):
libz160: new package
gpu-amd-bin-mx51: new package
gpu-amd-bin-mx51: install examples
xdriver_xf86-video-imx: new package
package/freescale-imx/Config.in | 4 + package/freescale-imx/gpu-amd-bin-mx51/Config.in | 59 ++ package/freescale-imx/gpu-amd-bin-mx51/egl.pc | 10 + package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc | 10 + .../gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 74 ++ package/freescale-imx/gpu-amd-bin-mx51/vg.pc | 10 + package/freescale-imx/libz160/Config.in | 6 + package/freescale-imx/libz160/libz160.mk | 40 ++ package/x11r7/Config.in | 1 + package/x11r7/xdriver_xf86-video-imx/Config.in | 35 + ...ideo-imx-0001-Update-to-newer-swap-macros.patch | 65 ++ ...imx-0002-Fix-error-unknown-type-name-uint.patch | 33 + ...er_xf86-video-imx-0003-support-glibc-2.20.patch | 57 ++ ...video-API-forward-and-backward-compatible.patch | 787 +++++++++++++++++++++ ...-xf86-video-imxfb-fix-m4-hardcodded-paths.patch | 53 ++ ...r_xf86-video-imx-0006-xserver-1.14-compat.patch | 34 + .../xdriver_xf86-video-imx.mk | 16 + 17 files changed, 1294 insertions(+) create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/Config.in create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/egl.pc create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/vg.pc create mode 100644 package/freescale-imx/libz160/Config.in create mode 100644 package/freescale-imx/libz160/libz160.mk create mode 100644 package/x11r7/xdriver_xf86-video-imx/Config.in create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0001-Update-to-newer-swap-macros.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0002-Fix-error-unknown-type-name-uint.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0003-support-glibc-2.20.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0004-Make-video-API-forward-and-backward-compatible.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0006-xserver-1.14-compat.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk
Signature · 1 line
1.9.1
PATCH 1/4 libz160: new package
An API for user space programs to perform 2D accelerated graphics operations on AMD GPU
--- package/freescale-imx/Config.in | 3 +++ package/freescale-imx/libz160/Config.in | 6 +++++ package/freescale-imx/libz160/libz160.mk | 40 ++++++++++++++++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 package/freescale-imx/libz160/Config.in create mode 100644 package/freescale-imx/libz160/libz160.mk
package/freescale-imx/Config.in +3 -0
@@ -45,6 +45,9 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM source "package/freescale-imx/imx-lib/Config.in" source "package/freescale-imx/imx-vpu/Config.in" source "package/freescale-imx/firmware-imx/Config.in" +if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) +source "package/freescale-imx/libz160/Config.in" +endif if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in" endif
package/freescale-imx/libz160/Config.in new file +6 -0
@@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBZ160 + bool "libz160" + depends on BR2_arm # Only relevant for i.MX5 + help + An API for user space programs to perform 2D accelerated graphics + operations on AMD GPU (included for examples in iMX5x chipsets)
package/freescale-imx/libz160/libz160.mk new file +40 -0
@@ -0,0 +1,40 @@ +############################################################# +# +# libz160 +# +############################################################# +LIBZ160_VERSION = 11.09.01 +LIBZ160_SOURCE = libz160-bin-$(LIBZ160_VERSION).bin +LIBZ160_SITE = $(FREESCALE_IMX_SITE) +LIBZ160_INSTALL_STAGING = YES +LIBZ160_LICENSE = Freescale Semiconductor Software License Agreement + +# No license file is included in the archive; we could extract it from +# the self-extractor, but that's just too much effort. +# This is a legal minefield: the EULA specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +LIBZ160_REDISTRIBUTE = NO + +# The archive is a shell-self-extractor of a bzipped tar. Output directory +# depends of version of source. +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info. +define LIBZ160_EXTRACT_CMDS + (cd $(@D); \ + sh $(DL_DIR)/$(LIBZ160_SOURCE) --force --auto-accept) + mv $(@D)/libz160-bin-$(LIBZ160_VERSION)/* $(@D) + rmdir $(@D)/libz160-bin-$(LIBZ160_VERSION) +endef + +define LIBZ160_INSTALL_STAGING_CMDS + $(INSTALL) -m 644 $(@D)/usr/lib/libz160.so $(STAGING_DIR)/usr/lib/ + $(INSTALL) -m 644 $(@D)/usr/include/z160.h $(STAGING_DIR)/usr/include/ +endef + +define LIBZ160_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 $(@D)/usr/lib/libz160.so $(TARGET_DIR)/usr/lib/ +endef + +$(eval $(generic-package))
Signature · 1 line
1.9.1
PATCH 1/4 libz160: new package
Dear J?r?me Pouiller,
package/freescale-imx/libz160/Config.in line 3
Quoted 9 lines · J?r?me Pouiller
package/freescale-imx/libz160/Config.in new file +3
-0@@ -0,0 +1,6 @@ +config BR2_PACKAGE_LIBZ160 + bool "libz160" + depends on BR2_arm # Only relevant for i.MX5
This was I believe not needed, since the package can anyway only be selected on i.MX51/i.MX53, as per package/freescale-imx/Config.in.
package/freescale-imx/libz160/libz160.mk line 5
Quoted 11 lines
package/freescale-imx/libz160/libz160.mk new file +5
-0@@ -0,0 +1,40 @@ +############################################################# +# +# libz160 +# +#############################################################
Bad length of comment header + missing empty new line. I didn't notice this initially, so I fixed that up as part of a separate commit.
Quoted 23 lines
package/freescale-imx/libz160/libz160.mk new file +23
-0+LIBZ160_VERSION = 11.09.01 +LIBZ160_SOURCE = libz160-bin-$(LIBZ160_VERSION).bin +LIBZ160_SITE = $(FREESCALE_IMX_SITE) +LIBZ160_INSTALL_STAGING = YES +LIBZ160_LICENSE = Freescale Semiconductor Software License Agreement + +# No license file is included in the archive; we could extract it from +# the self-extractor, but that's just too much effort. +# This is a legal minefield: the EULA specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +LIBZ160_REDISTRIBUTE = NO + +# The archive is a shell-self-extractor of a bzipped tar. Output directory +# depends of version of source. +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info. +define LIBZ160_EXTRACT_CMDS + (cd $(@D); \ + sh $(DL_DIR)/$(LIBZ160_SOURCE) --force --auto-accept) + mv $(@D)/libz160-bin-$(LIBZ160_VERSION)/* $(@D) + rmdir $(@D)/libz160-bin-$(LIBZ160_VERSION)
package/freescale-imx/libz160/libz160.mk line 38
Quoted 10 lines
package/freescale-imx/libz160/libz160.mk new file +10
-0+endef + +define LIBZ160_INSTALL_STAGING_CMDS + $(INSTALL) -m 644 $(@D)/usr/lib/libz160.so $(STAGING_DIR)/usr/lib/ + $(INSTALL) -m 644 $(@D)/usr/include/z160.h $(STAGING_DIR)/usr/include/ +endef + +define LIBZ160_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 $(@D)/usr/lib/libz160.so $(TARGET_DIR)/usr/lib/ +endef
We always want full paths for installations, using $(INSTALL) -D. And libraries are more typically installed 755 rather than 644.
Patch applied to next with those issues fixed, and the patch switching to the common extract helper merged into it.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 2/4 gpu-amd-bin-mx51: new package
In reply to Jérôme PouillerFreescale libraries, headers and executables for the AMD GPU on the i.MX51, containing OpenGL/ES, OpenVG and EGL support.
Tested using:
mx5loco_defconfig:
BR2_TOOLCHAIN_EXTERNAL=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_EGLFS=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="eglfs"
BR2_PACKAGE_QT5BASE_GIF=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_FREESCALE_IMX=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53=y
BR2_PACKAGE_GPU_AMD_BIN_MX51=y--- package/freescale-imx/Config.in | 1 + package/freescale-imx/gpu-amd-bin-mx51/Config.in | 54 ++++++++++++++++++ package/freescale-imx/gpu-amd-bin-mx51/egl.pc | 10 ++++ package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc | 10 ++++ .../gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 66 ++++++++++++++++++++++ package/freescale-imx/gpu-amd-bin-mx51/vg.pc | 10 ++++ 6 files changed, 151 insertions(+) create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/Config.in create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/egl.pc create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk create mode 100644 package/freescale-imx/gpu-amd-bin-mx51/vg.pc
package/freescale-imx/Config.in +1 -0
@@ -47,6 +47,7 @@ source "package/freescale-imx/imx-vpu/Config.in" source "package/freescale-imx/firmware-imx/Config.in" if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) source "package/freescale-imx/libz160/Config.in" +source "package/freescale-imx/gpu-amd-bin-mx51/Config.in" endif if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in"
package/freescale-imx/gpu-amd-bin-mx51/Config.in new file +54 -0
54 lines not on this page · raw message
package/freescale-imx/gpu-amd-bin-mx51/egl.pc new file +10 -0
@@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: egl +Description: Freescale amd-gpu-bin-mx51 implementation of EGL +Version: 7.11.0 +Libs: -L${libdir} -lEGL +Cflags: -I${includedir}
package/freescale-imx/gpu-amd-bin-mx51/glesv2.pc new file +10 -0
@@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: glesv2 +Description: Freescale amd-gpu-bin-mx51 implementation of OpenGL ESv2 +Version: 7.11.0 +Libs: -L${libdir} -lGLESv2 +Cflags: -I${includedir}
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +66 -0
66 lines not on this page · raw message
package/freescale-imx/gpu-amd-bin-mx51/vg.pc new file +10 -0
@@ -0,0 +1,10 @@ +prefix=/usr +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include + +Name: vg +Description: Freescale amd-gpu-bin-mx51 implementation of OpenVG +Version: 1.1 +Libs: -L${libdir} -lOpenVG +Cflags: -I${includedir}/
Signature · 1 line
1.9.1
PATCH 2/4 gpu-amd-bin-mx51: new package
Dear J?r?me Pouiller,
package/freescale-imx/Config.in source "package/freescale-imx/imx-vpu/Config.in" · line 50
Quoted 9 lines · J?r?me Pouiller
package/freescale-imx/Config.in +1
-0@@ -47,6 +47,7 @@ source "package/freescale-imx/imx-vpu/Config.in" source "package/freescale-imx/firmware-imx/Config.in" if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) source "package/freescale-imx/libz160/Config.in" +source "package/freescale-imx/gpu-amd-bin-mx51/Config.in"
So despite the name "mx51", this package also applies to i.MX53 ? If so, then it would be good to mention it somewhere (at least in the commit log).
Quoted 9 lines
package/freescale-imx/Config.in +0
-0endif if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q source "package/freescale-imx/gpu-viv-bin-mx6q/Config.in"package/freescale-imx/gpu-amd-bin-mx51/Config.in new file +0
-0
package/freescale-imx/gpu-amd-bin-mx51/Config.in line 10
Quoted 10 lines
package/freescale-imx/gpu-amd-bin-mx51/Config.in new file +10
-0@@ -0,0 +1,54 @@ +comment "gpu-amd-bin-mx51 needs an (e)glibc toolchain w/ C++" + depends on BR2_arm + depends on (!BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP) + +config BR2_PACKAGE_GPU_AMD_BIN_MX51 + bool "gpu-amd-bin-mx51" + select BR2_PACKAGE_HAS_LIBEGL + select BR2_PACKAGE_HAS_LIBGLES + select BR2_PACKAGE_HAS_LIBOPENVG + depends on BR2_arm # Only relevant for i.MX5
Why do we need an ARM dependency if this can already only be selected on i.MX51 or i.MX53 ?
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk line 5
Quoted 11 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +5
-0@@ -0,0 +1,66 @@ +############################################################# +# +# gpu-amd-bin-mx51 +# +#############################################################
Incorrect length of comment header: we want 80 # signs. And also, you should have an empty new line between the header and the first variable definition.
Quoted 25 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +25
-0+GPU_AMD_BIN_MX51_VERSION = 11.09.01 +GPU_AMD_BIN_MX51_SITE = $(FREESCALE_IMX_SITE) +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_FB),y) +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION).bin +else +GPU_AMD_BIN_MX51_SOURCE = amd-gpu-x11-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION).bin +GPU_AMD_BIN_MX51_DEPENDENCIES = libxcb xlib_libX11 xlib_libXext \ + xlib_libXrender xlib_libXau xlib_libXdmcp +endif +GPU_AMD_BIN_MX51_PROVIDES = libegl libgles libopenvg +GPU_AMD_BIN_MX51_LICENSE = Freescale Semiconductor Software License Agreement +GPU_AMD_BIN_MX51_INSTALL_STAGING = YES + +# No license file is included in the archive; we could extract it from +# the self-extractor, but that's just too much effort. +# This is a legal minefield: the EULA specifies that +# the Board Support Package includes software and hardware (sic!) +# for which a separate license is needed... +GPU_AMD_BIN_MX51_REDISTRIBUTE = NO + +# The archive is a shell-self-extractor of a bzipped tar. Output directory +# depends of version of source. +# The --force makes sure it doesn't fail if the source dir already exists. +# The --auto-accept skips the license check - not needed for us +# because we have legal-info.
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk line 40
Quoted 10 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +10
-0+define GPU_AMD_BIN_MX51_EXTRACT_CMDS + (cd $(@D); \ + sh $(DL_DIR)/$(GPU_AMD_BIN_MX51_SOURCE) --force --auto-accept) + mv $(@D)/amd-gpu*-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION)/* $(@D) + rmdir $(@D)/amd-gpu*-bin-mx51-$(GPU_AMD_BIN_MX51_VERSION) +endef + +define GPU_AMD_BIN_MX51_BUILD_CMDS + $(SED) 's/_LINUX/__linux__/g' $(@D)/usr/include/*/*.h +endef
This should probably be a post-patch hook. And a comment should be added above this to explain why it is needed. Essentially a good rule of thumb is that anything non-obvious should have a comment explaining why we're doing this non-obvious thing.
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk line 43
Quoted 3 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +3
-0+ +# eglplatform_1.4.h contains X11 compatible headers +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_FB),)
So, what about using instead:
ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11),y)
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk line 46
Quoted 3 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +3
-0+define GPU_AMD_BIN_MX51_FIXUP_EGL_HEADERS + rm $(STAGING_DIR)/usr/include/EGL/eglplatform.h + mv $(STAGING_DIR)/usr/include/EGL/eglplatform_1.4.h $(STAGING_DIR)/usr/include/EGL/eglplatform.h
Why rm + mv, and not such mv ?
Quoted 10 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +10
-0+endef +endif + +define GPU_AMD_BIN_MX51_INSTALL_STAGING_CMDS + $(INSTALL) -d $(STAGING_DIR)/usr/lib/pkgconfig + $(INSTALL) -m 644 package/freescale-imx/gpu-amd-bin-mx51/*.pc $(STAGING_DIR)/usr/lib/pkgconfig/ + $(INSTALL) -m 644 $(@D)/usr/lib/lib* $(STAGING_DIR)/usr/lib/ + cp -r $(@D)/usr/include/* $(STAGING_DIR)/usr/include + $(GPU_AMD_BIN_MX51_FIXUP_EGL_HEADERS) +endef
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk line 66
Quoted 10 lines
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk new file +10
-0+ +define GPU_AMD_BIN_MX51_INSTALL_TARGET_CMDS + $(INSTALL) -m 644 $(@D)/usr/lib/lib*so* $(TARGET_DIR)/usr/lib/ +endef + +define GPU_AMD_BIN_MX51_DEVICES + /dev/gsl_kmod c 640 0 0 249 0 1 4 +endef + +$(eval $(generic-package))
The rest looks OK to me, thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 3/4 gpu-amd-bin-mx51: install examples
In reply to Jérôme Pouiller--- package/freescale-imx/gpu-amd-bin-mx51/Config.in | 5 +++++ package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 8 ++++++++ 2 files changed, 13 insertions(+)
package/freescale-imx/gpu-amd-bin-mx51/Config.in +5 -0
@@ -51,4 +51,9 @@ config BR2_PACKAGE_PROVIDES_LIBGLES config BR2_PACKAGE_PROVIDES_LIBOPENVG default "gpu-amd-bin-mx51" +config BR2_PACKAGE_GPU_AMD_BIN_MX51_EXAMPLES + bool "install examples" + help + Copy the examples to the target. + endif
package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk +8 -0
@@ -55,8 +55,16 @@ define GPU_AMD_BIN_MX51_INSTALL_STAGING_CMDS $(GPU_AMD_BIN_MX51_FIXUP_EGL_HEADERS) endef +ifeq ($(BR2_PACKAGE_GPU_AMD_BIN_MX51_EXAMPLES),y) +define GPU_AMD_BIN_MX51_INSTALL_EXAMPLES + $(INSTALL) -d $(TARGET_DIR)/usr/share/examples/gpu_amd_samples + $(INSTALL) -m 755 $(@D)/usr/bin/* $(TARGET_DIR)/usr/share/examples/gpu_amd_samples +endef +endif + define GPU_AMD_BIN_MX51_INSTALL_TARGET_CMDS $(INSTALL) -m 644 $(@D)/usr/lib/lib*so* $(TARGET_DIR)/usr/lib/ + $(GPU_AMD_BIN_MX51_INSTALL_EXAMPLES) endef define GPU_AMD_BIN_MX51_DEVICES
Signature · 1 line
1.9.1
PATCH 3/4 gpu-amd-bin-mx51: install examples
Dear J?r?me Pouiller,
Quoted 5 lines · J?r?me Pouiller
Signed-off-by J?r?me Pouiller <[email protected]>--- package/freescale-imx/gpu-amd-bin-mx51/Config.in | 5 +++++ package/freescale-imx/gpu-amd-bin-mx51/gpu-amd-bin-mx51.mk | 8 ++++++++ 2 files changed, 13 insertions(+)
I am not sure that a separate patch is really needed for this, it could be part of the patch adding the package itself.
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 4/4 xdriver_xf86-video-imx: new package
In reply to Jérôme PouillerX.Org driver for iMX5 GPU. Most of patches come from Yocto project.
Tested using:
mx5loco_defconfig +
BR2_TOOLCHAIN_EXTERNAL=y
BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_EUDEV=y
BR2_PACKAGE_QT5=y
BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y
BR2_PACKAGE_QT5BASE_EXAMPLES=y
BR2_PACKAGE_QT5BASE_OPENGL_LIB=y
BR2_PACKAGE_QT5BASE_XCB=y
BR2_PACKAGE_QT5BASE_DEFAULT_QPA="xcb"
BR2_PACKAGE_QT5BASE_GIF=y
BR2_PACKAGE_QT5BASE_JPEG=y
BR2_PACKAGE_QT5BASE_PNG=y
BR2_PACKAGE_QT5QUICKCONTROLS=y
BR2_PACKAGE_XORG7=y
BR2_PACKAGE_XSERVER_XORG_SERVER=y
BR2_PACKAGE_XSERVER_XORG_SERVER_MODULAR=y
BR2_PACKAGE_XDRIVER_XF86_INPUT_EVDEV=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX=y
BR2_PACKAGE_FREESCALE_IMX=y
BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53=y
BR2_PACKAGE_GPU_AMD_BIN_MX51=y
BR2_PACKAGE_GPU_AMD_BIN_MX51_EXAMPLES=y--- package/x11r7/Config.in | 1 + package/x11r7/xdriver_xf86-video-imx/Config.in | 35 + ...ideo-imx-0001-Update-to-newer-swap-macros.patch | 65 ++ ...imx-0002-Fix-error-unknown-type-name-uint.patch | 33 + ...er_xf86-video-imx-0003-support-glibc-2.20.patch | 57 ++ ...video-API-forward-and-backward-compatible.patch | 787 +++++++++++++++++++++ ...-xf86-video-imxfb-fix-m4-hardcodded-paths.patch | 53 ++ ...r_xf86-video-imx-0006-xserver-1.14-compat.patch | 34 + .../xdriver_xf86-video-imx.mk | 16 + 9 files changed, 1081 insertions(+) create mode 100644 package/x11r7/xdriver_xf86-video-imx/Config.in create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0001-Update-to-newer-swap-macros.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0002-Fix-error-unknown-type-name-uint.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0003-support-glibc-2.20.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0004-Make-video-API-forward-and-backward-compatible.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0006-xserver-1.14-compat.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk
package/x11r7/Config.in +1 -0
@@ -162,6 +162,7 @@ if BR2_PACKAGE_XORG7 source package/x11r7/xdriver_xf86-video-i128/Config.in source package/x11r7/xdriver_xf86-video-imx-viv/Config.in source package/x11r7/xdriver_xf86-video-intel/Config.in + source package/x11r7/xdriver_xf86-video-imx/Config.in source package/x11r7/xdriver_xf86-video-mach64/Config.in source package/x11r7/xdriver_xf86-video-mga/Config.in source package/x11r7/xdriver_xf86-video-neomagic/Config.in
package/x11r7/xdriver_xf86-video-imx/Config.in new file +35 -0
@@ -0,0 +1,35 @@ +if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53) + +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX + bool "xf86-video-imx" + depends on BR2_arm + depends on BR2_TOOLCHAIN_USES_GLIBC # gpu-amd-bin-mx51 + depends on BR2_INSTALL_LIBSTDCPP # gpu-amd-bin-mx51 + depends on BR2_PACKAGE_XORG7 + depends on BR2_LINUX_KERNEL + depends on BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11 + select BR2_PACKAGE_LIBZ160 + select BR2_PACKAGE_XPROTO_FONTSPROTO + select BR2_PACKAGE_XPROTO_RANDRPROTO + select BR2_PACKAGE_XPROTO_RENDERPROTO + select BR2_PACKAGE_XPROTO_VIDEOPROTO + select BR2_PACKAGE_XPROTO_XF86DGAPROTO + select BR2_PACKAGE_XPROTO_XPROTO + help + X.Org driver for iMX5 GPU + + To use this driver, add correct configuration to your + /etc/X11/xorg.conf: + + Section "Device" + [...] + Driver "imx" + Option "fbdev" "/dev/fb0" + EndSection + +comment "xf86-video-imx needs an (e)glibc toolchain w/ C++ gpu-amd-bin-mx51 with X11 output and a Linux kernel to be built" + depends on BR2_arm + depends on (!BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_LINUX_KERNEL || !BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11) + +endif
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0001-Update-to-newer-swap-macros.patch new file +65 -0
65 lines not on this page · raw message
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0002-Fix-error-unknown-type-name-uint.patch new file +33 -0
@@ -0,0 +1,33 @@ +From ccdfce5e75ba707deacdd5808a8f3de8744848d0 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eric=20B=C3=A9nard?= <[email protected]> +Date: Tue, 5 Feb 2013 10:57:47 +0100 +Subject: [PATCH] Fix "error: unknown type name 'uint'" +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +In file included from imx_driver.c:33:0: +.../sysroots/imx53qsb/usr/src/kernel/include/linux/mxcfb.h:107:2: error: unknown type name 'uint' + +Upstream-Status: Pending + +Signed-off-by: Eric B?nard <[email protected]> +--- + src/imx_driver.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/imx_driver.c b/src/imx_driver.c +index f4b3e38..4cf662d 100644 +--- a/src/imx_driver.c ++++ b/src/imx_driver.c +@@ -29,6 +29,7 @@ + #include <errno.h> + #include <fcntl.h> + #include <string.h> ++#include <sys/types.h> + #include <linux/fb.h> + #include <linux/mxcfb.h> + +-- +1.7.10.4 +
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0003-support-glibc-2.20.patch new file +57 -0
57 lines not on this page · raw message
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0004-Make-video-API-forward-and-backward-compatible.patch new file +787 -0
787 lines not on this page · raw message
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch new file +53 -0
53 lines not on this page · raw message
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0006-xserver-1.14-compat.patch new file +34 -0
@@ -0,0 +1,34 @@ +Fix building using new Xorg 1.14 + +mibstore functions are no longer supported. This patch removes them +from this driver, following the pattern in +http://patches.openembedded.org/patch/46133/ + +This checkin shows when/where the changes to the X server were made +that deleted the header mibstore.h and mentions the reasons. +http://lists.x.org/archives/xorg-devel/2012-September/033575.html + +Upstream-Status: Pending + +Signed-off-by: Otavio Salvador <[email protected]> + +Index: xserver-xorg-video-imx-11.09.01/src/imx_driver.c +=================================================================== +--- xserver-xorg-video-imx-11.09.01.orig/src/imx_driver.c ++++ xserver-xorg-video-imx-11.09.01/src/imx_driver.c +@@ -37,7 +37,6 @@ + #include "xf86_OSproc.h" + + #include "mipointer.h" +-#include "mibstore.h" + #include "micmap.h" + #include "colormapst.h" + #include "xf86cmap.h" +@@ -722,7 +721,6 @@ imxScreenInit(SCREEN_INIT_ARGS_DECL) + /* Initialize for X extensions. */ + imxExtInit(); + +- miInitializeBackingStore(pScreen); + xf86SetBackingStore(pScreen); + + /* software cursor */
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file +16 -0
@@ -0,0 +1,16 @@ +################################################################################ +# +# xdriver_xf86-video-imx +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VERSION = 11.09.01 +XDRIVER_XF86_VIDEO_IMX_SOURCE = xserver-xorg-video-imx-$(XDRIVER_XF86_VIDEO_IMX_VERSION).tar.gz +XDRIVER_XF86_VIDEO_IMX_SITE = $(FREESCALE_IMX_SITE) +# Test without libz160 +XDRIVER_XF86_VIDEO_IMX_DEPENDENCIES = linux libz160 xserver_xorg-server xproto_fontsproto \ + xproto_randrproto xproto_renderproto xproto_videoproto \ + xproto_xf86dgaproto xproto_xproto +XDRIVER_XF86_VIDEO_IMX_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -I$(LINUX_DIR)/include" + +$(eval $(autotools-package))
Signature · 1 line
1.9.1
PATCH 4/4 xdriver_xf86-video-imx: new package
On Friday 07 November 2014 16:57:54 J?r?me Pouiller wrote:
[...]
Quoted 7 lines
create mode 100644 package/x11r7/xdriver_xf86-video-imx/Config.in create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0001-Update-to-newer-swap-macros.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0002-Fix-error-unknown-type-name-uint.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0003-support-glibc-2.20.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0004-Make-video-API-forward-and-backward-compatible.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0005-xf86-video-imxfb-fix-m4-hardcodded-paths.patch create mode 100644 package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx-0006-xserver-1.14-compat.patch
Arf, I wrote this patch before patch naming policy changes.
Signature · 1 line
J?r?me Pouiller, Sysmic
PATCH 4/4 xdriver_xf86-video-imx: new package
In reply to Jérôme PouillerDear J?r?me Pouiller,
package/x11r7/xdriver_xf86-video-imx/Config.in line 1
Quoted 7 lines · J?r?me Pouiller
package/x11r7/xdriver_xf86-video-imx/Config.in new file +1
-0@@ -0,0 +1,35 @@ +if (BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53)
Please use 'depends on' in such situations.
package/x11r7/xdriver_xf86-video-imx/Config.in line 8
Quoted 7 lines
package/x11r7/xdriver_xf86-video-imx/Config.in new file +7
-0+ +config BR2_PACKAGE_XDRIVER_XF86_VIDEO_IMX + bool "xf86-video-imx" + depends on BR2_arm + depends on BR2_TOOLCHAIN_USES_GLIBC # gpu-amd-bin-mx51 + depends on BR2_INSTALL_LIBSTDCPP # gpu-amd-bin-mx51 + depends on BR2_PACKAGE_XORG7
Why? This package is anyway only visible if this option is enabled.
package/x11r7/xdriver_xf86-video-imx/Config.in line 9
Quoted 1 line
package/x11r7/xdriver_xf86-video-imx/Config.in new file +1
-0+ depends on BR2_LINUX_KERNEL
Why? This package really needs custom kernel headers?
package/x11r7/xdriver_xf86-video-imx/Config.in line 10
Quoted 1 line
package/x11r7/xdriver_xf86-video-imx/Config.in new file +1
-0+ depends on BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11
Well, since you have added this dependency here, the dependency above on BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX51 || BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX53 is useless.
package/x11r7/xdriver_xf86-video-imx/Config.in line 33
Quoted 4 lines
package/x11r7/xdriver_xf86-video-imx/Config.in new file +4
-0+comment "xf86-video-imx needs an (e)glibc toolchain w/ C++ gpu-amd-bin-mx51 with X11 output and a Linux kernel to be built" + depends on BR2_arm + depends on (!BR2_TOOLCHAIN_USES_GLIBC || !BR2_INSTALL_LIBSTDCPP \ + || !BR2_LINUX_KERNEL || !BR2_PACKAGE_GPU_AMD_BIN_MX51_OUTPUT_X11)
This is a little bit too long, maybe we should split that up a bit. One comment for the (e)glibc toolchain w/ C++. And maybe another comment about Linux and gpu-amd-bin-mx51.
Also, since you need (e)glibc, I assume it's because you have some pre-compiled binaries. If it's the case, then they are either built for EABI *or* from EABIhf. And this is something we should add to the dependencies, to make sure there isn't a mismatch between the ABI used by those pre-built binaries, and the real ABI being used by the rest of the system.
Quoted 6 lines
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file +0
-0
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk line 10
Quoted 10 lines
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file +10
-0@@ -0,0 +1,16 @@ +################################################################################ +# +# xdriver_xf86-video-imx +# +################################################################################ + +XDRIVER_XF86_VIDEO_IMX_VERSION = 11.09.01 +XDRIVER_XF86_VIDEO_IMX_SOURCE = xserver-xorg-video-imx-$(XDRIVER_XF86_VIDEO_IMX_VERSION).tar.gz +XDRIVER_XF86_VIDEO_IMX_SITE = $(FREESCALE_IMX_SITE) +# Test without libz160
Huh? What does this comment means?
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk line 13
Quoted 3 lines
package/x11r7/xdriver_xf86-video-imx/xdriver_xf86-video-imx.mk new file +3
-0+XDRIVER_XF86_VIDEO_IMX_DEPENDENCIES = linux libz160 xserver_xorg-server xproto_fontsproto \ + xproto_randrproto xproto_renderproto xproto_videoproto \ + xproto_xf86dgaproto xproto_xproto
Maybe we want something a bit nicer for such a case, like:
XDRIVER_XF86_VIDEO_IMX_DEPENDENCIES = \ linux \ libz160 \ xserver_xorg-server \ ...
Can you look at these issues and respin the patches?
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
cover Add support for iMX5 GPU
In reply to Jérôme PouillerDear J?r?me Pouiller,
Quoted 3 lines · J?r?me Pouiller
This is continuation of my previous serie called "Add Xorg support for imx6". This time, it add support for iMX5 chipset. As fro iMX6, this work is mainly adapted from Yocto.
Could you respin a new version of all your i.MX related patches, to take into account the new common extract helper you've added, the new patch policy and things like that? Of course, based on the next branch.
Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com