From a8480e3b2ab50593b6b8a787430ccb33a0a5a1a0 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 21 Jun 2017 17:49:47 -0300 Subject: [PATCH] imx6q-sabresd: Add a qt5 defconfig variant Introduce imx6q-sabresd_qt5_defconfig that supports the opensource Etnaviv graphical stack. This defconfig provides a way to quickly test some graphical applications, such as kmscube, qt5, glmark2. Currently kernel mainline exhibits issues when running cpufreq as ondemand governor on mx6, so add a linux fragment that disables such option for the time being. Signed-off-by: Fabio Estevam [Arnout: - Add Fabio to DEVELOPERS - Rename linux config fragment to linux_qt5.fragment - Add comment to linux_qt5.fragment why it is needed - Add explicit CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y to it - Reorder defconfig entries to they match imx6q-sabresd_defconfig - Remove strace and host-uboot-tools, neither seems to be needed - Drop BR2_PACKAGE_QT5BASE_LICENSE_APPROVED, it no longer exists - Replace BR2_TARGET_ROOTFS_EXT2_BLOCKS with BR2_TARGET_ROOTFS_EXT2_SIZE - Regenerate .gitlab-ci.yml] Signed-off-by: Arnout Vandecappelle (Essensium/Mind) --- .gitlab-ci.yml | 1 + DEVELOPERS | 1 + .../imx6q-sabresd/linux_qt5.fragment | 4 + board/freescale/imx6q-sabresd/readme.txt | 23 ++++++ .../rootfs_overlay/root/sabresd.json | 15 ++++ configs/imx6q-sabresd_qt5_defconfig | 76 +++++++++++++++++++ 6 files changed, 120 insertions(+) create mode 100644 board/freescale/imx6q-sabresd/linux_qt5.fragment create mode 100644 board/freescale/imx6q-sabresd/rootfs_overlay/root/sabresd.json create mode 100644 configs/imx6q-sabresd_qt5_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 90efd81e50..0ecff99ff3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -119,6 +119,7 @@ grinn_chiliboard_defconfig: *defconfig grinn_liteboard_defconfig: *defconfig imx23evk_defconfig: *defconfig imx6q-sabresd_defconfig: *defconfig +imx6q-sabresd_qt5_defconfig: *defconfig imx6ulpico_defconfig: *defconfig lego_ev3_defconfig: *defconfig linksprite_pcduino_defconfig: *defconfig diff --git a/DEVELOPERS b/DEVELOPERS index f3944e2748..ee2c9a0555 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -543,6 +543,7 @@ F: package/supertuxkart/ N: Fabio Estevam F: board/warp7/ F: configs/freescale_imx* +F: configs/imx6q-sabresd* F: configs/imx6ulpico_defconfig F: configs/mx6cubox_defconfig F: configs/mx6sx_udoo_neo_defconfig diff --git a/board/freescale/imx6q-sabresd/linux_qt5.fragment b/board/freescale/imx6q-sabresd/linux_qt5.fragment new file mode 100644 index 0000000000..5c0505e510 --- /dev/null +++ b/board/freescale/imx6q-sabresd/linux_qt5.fragment @@ -0,0 +1,4 @@ +# Currently kernel mainline exhibits issues when running cpufreq as ondemand +# governor on mx6. +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y diff --git a/board/freescale/imx6q-sabresd/readme.txt b/board/freescale/imx6q-sabresd/readme.txt index 10e973cf9f..b57c4fb0e1 100644 --- a/board/freescale/imx6q-sabresd/readme.txt +++ b/board/freescale/imx6q-sabresd/readme.txt @@ -54,4 +54,27 @@ To boot your newly created system: emulator at 115200 bps, 8n1; - power on the board. +Testing graphics on the i.MX6Q Sabre SD board +============================================= + +The imx6q-sabresd_qt5_defconfig allows to quickly test the graphics +capabilities of i.MX6 using the opensource Etnaviv graphics stack +and kernel mainline. + +In order to build it: + +make imx6q-sabresd_qt5_defconfig +make + +Then flash the SD card as explained above. + +Running kmscube application: + +# kmscube -D /dev/dri/card1 + +Running Qt5 Cinematic Demo: + +# export QT_QPA_EGLFS_KMS_CONFIG=/root/sabresd.json +# /usr/share/Qt5/CinematicExperience/Qt5_CinematicExperience + Enjoy! diff --git a/board/freescale/imx6q-sabresd/rootfs_overlay/root/sabresd.json b/board/freescale/imx6q-sabresd/rootfs_overlay/root/sabresd.json new file mode 100644 index 0000000000..9469dc12a5 --- /dev/null +++ b/board/freescale/imx6q-sabresd/rootfs_overlay/root/sabresd.json @@ -0,0 +1,15 @@ +{ + "device": "/dev/dri/card1", + "hwcursor": false, + "pbuffers": true, + "outputs": [ + { + "name": "HDMI-1", + "mode": "off" + }, + { + "name": "LVDS-1", + "mode": "1024x768" + } + ] +} diff --git a/configs/imx6q-sabresd_qt5_defconfig b/configs/imx6q-sabresd_qt5_defconfig new file mode 100644 index 0000000000..0b4e961080 --- /dev/null +++ b/configs/imx6q-sabresd_qt5_defconfig @@ -0,0 +1,76 @@ +BR2_arm=y +BR2_cortex_a9=y +BR2_ARM_ENABLE_NEON=y +BR2_ARM_ENABLE_VFP=y +BR2_ARM_FPU_VFPV3=y + +# Linux headers same as kernel, a 4.11 series +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_11=y + +# Additional features needed for packages +BR2_TOOLCHAIN_BUILDROOT_WCHAR=y +BR2_TOOLCHAIN_BUILDROOT_CXX=y +BR2_TOOLCHAIN_BUILDROOT_GLIBC=y + +# System +BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0" + +# required tools to create the SD card image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_ROOTFS_EXT2_SIZE="120M" +BR2_ROOTFS_OVERLAY="board/freescale/imx6q-sabresd/rootfs_overlay" + +# Bootloader +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx6qsabresd" +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.05" +BR2_TARGET_UBOOT_FORMAT_IMX=y + +# Kernel +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_VERSION=y +BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.11.6" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v6_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx6q-sabresd" +BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/freescale/imx6q-sabresd/linux_qt5.fragment" + +# GL driver +BR2_PACKAGE_MESA3D=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_ETNAVIV=y +BR2_PACKAGE_MESA3D_GALLIUM_DRIVER_SWRAST=y +BR2_PACKAGE_MESA3D_OPENGL_ES=y + +# Fonts +BR2_PACKAGE_BITSTREAM_VERA=y +BR2_PACKAGE_CANTARELL=y +BR2_PACKAGE_DEJAVU=y +BR2_PACKAGE_FONT_AWESOME=y +BR2_PACKAGE_GHOSTSCRIPT_FONTS=y +BR2_PACKAGE_INCONSOLATA=y +BR2_PACKAGE_LIBERATION=y + +# GL demos +BR2_PACKAGE_GLMARK2=y +BR2_PACKAGE_KMSCUBE=y +BR2_PACKAGE_LIBV4L=y +BR2_PACKAGE_MESA3D_DEMOS=y + +# Qt5 +BR2_PACKAGE_QT5=y +BR2_PACKAGE_QT5BASE_LICENSE_APPROVED=y +BR2_PACKAGE_QT5BASE_OPENGL_LIB=y +BR2_PACKAGE_QT5BASE_LINUXFB=y +BR2_PACKAGE_QT5BASE_FONTCONFIG=y +BR2_PACKAGE_QT5BASE_GIF=y +BR2_PACKAGE_QT5BASE_JPEG=y +BR2_PACKAGE_QT5CINEX=y +BR2_PACKAGE_QT5CINEX_HD=y