new file mode 100755
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+export mode=`cat /proc/cmdline | sed -rn 's/.+(hdmimode=)(\S+)\s.+/\2/p'`
+export bpp=`cat /proc/cmdline | sed -rn 's/.+(m_bpp=)(\S+)\s.+/\2/p'`
+
+common_display_setup() {
+ M="0 0 $(($X - 1)) $(($Y - 1))"
+ Y_VIRT=$(($Y * 2))
+ fbset -fb /dev/fb0 -g $X $Y $X $Y_VIRT $bpp
+ fbset -fb /dev/fb1 -g 32 32 32 32 32
+ echo $mode > /sys/class/display/mode
+ echo 0 > /sys/class/graphics/fb0/free_scale
+ echo 1 > /sys/class/graphics/fb0/freescale_mode
+ echo $M > /sys/class/graphics/fb0/free_scale_axis
+ echo $M > /sys/class/graphics/fb0/window_axis
+ echo 0 > /sys/class/graphics/fb1/free_scale
+}
+
+case $mode in
+ 480*)
+ export X=720
+ export Y=480
+ ;;
+ 576*)
+ export X=720
+ export Y=576
+ ;;
+ 720p*)
+ export X=1280
+ export Y=720
+ ;;
+ 1080*)
+ export X=1920
+ export Y=1080
+ ;;
+ 2160p*)
+ export X=3840
+ export Y=2160
+ ;;
+ smpte24hz*)
+ export X=3840
+ export Y=2160
+ ;;
+ 640x480p60hz*)
+ export X=640
+ export Y=480
+ ;;
+ 800x480p60hz*)
+ export X=800
+ export Y=480
+ ;;
+ 800x600p60hz*)
+ export X=800
+ export Y=600
+ ;;
+ 1024x600p60hz*)
+ export X=1024
+ export Y=600
+ ;;
+ 1024x768p60hz*)
+ export X=1024
+ export Y=768
+ ;;
+ 1280x800p60hz*)
+ export X=1280
+ export Y=800
+ ;;
+ 1280x1024p60hz*)
+ export X=1280
+ export Y=1024
+ ;;
+ 1360x768p60hz*)
+ export X=1360
+ export Y=768
+ ;;
+ 1366x768p60hz*)
+ export X=1366
+ export Y=768
+ ;;
+ 1440x900p60hz*)
+ export X=1440
+ export Y=900
+ ;;
+ 1600x900p60hz*)
+ export X=1600
+ export Y=900
+ ;;
+ 1680x1050p60hz*)
+ export X=1680
+ export Y=1050
+ ;;
+ 1920x1200p60hz*)
+ export X=1920
+ export Y=1200
+ ;;
+esac
+
+common_display_setup
+
+echo 0 > /sys/class/graphics/fb0/blank
+echo 0 > /sys/class/graphics/fb1/blank
+
+exit $?
@@ -6,6 +6,7 @@ BR2_TARGET_GENERIC_HOSTNAME="odroidc2"
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/hardkernel/odroidc2/post-image.sh"
+BR2_ROOTFS_OVERLAY="board/hardkernel/odroidc2/fs-overlay"
# Kernel
BR2_KERNEL_HEADERS_VERSION=y
@@ -418,6 +418,7 @@ endif
source "package/nvidia-driver/Config.in"
source "package/nvidia-tegra23/Config.in"
source "package/nvme/Config.in"
+ source "package/odroid-mali/Config.in"
source "package/ofono/Config.in"
source "package/ola/Config.in"
source "package/on2-8170-modules/Config.in"
@@ -1,6 +1,6 @@
config BR2_PACKAGE_KODI_ARCH_SUPPORTS
bool
- default y if (BR2_arm || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \
+ default y if (BR2_arm || BR2_aarch64 || (BR2_mipsel && BR2_TOOLCHAIN_USES_GLIBC) || BR2_i386 || BR2_x86_64) \
&& BR2_PACKAGE_BOOST_ARCH_SUPPORTS \
&& BR2_TOOLCHAIN_HAS_SYNC_8
@@ -24,7 +24,7 @@ config BR2_PACKAGE_KODI_GL
bool
default y
depends on BR2_PACKAGE_HAS_LIBGL
- depends on !BR2_arm # kodi needs egl/gles on arm
+ depends on !BR2_arm || !BR2_aarch64 # kodi needs egl/gles on arm
comment "kodi needs an OpenGL or an openGL ES and EGL backend"
depends on BR2_i386 || BR2_x86_64
new file mode 100644
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_ODROID_MALI
+ bool "odroid-mali"
+ select BR2_PACKAGE_HAS_LIBEGL
+ select BR2_PACKAGE_HAS_LIBGLES
+ select BR2_PACKAGE_FBSET
+ depends on BR2_TOOLCHAIN_USES_GLIBC
+ depends on BR2_aarch64
+ help
+ Install the ARM Mali drivers for odroid based systems.
+
+ http://github.com/linux-odroid/odroid-mali
+
+if BR2_PACKAGE_ODROID_MALI
+config BR2_PACKAGE_PROVIDES_LIBEGL
+ default "odroid-mali"
+
+config BR2_PACKAGE_PROVIDES_LIBGLES
+ default "odroid-mali"
+endif
new file mode 100644
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: egl
+Description: Amlogic implementation of EGL
+Version: 0.99
+Libs: -L${libdir} -lEGL -lGLESv2
+Cflags: -I${includedir}/
new file mode 100644
@@ -0,0 +1,10 @@
+prefix=/usr
+exec_prefix=/usr
+libdir=${exec_prefix}/lib
+includedir=${prefix}/include
+
+Name: glesv2
+Description: Amlogic implementation of OpenGL ESv2
+Version: 0.99
+Libs: -L${libdir} -lGLESv2
+Cflags: -I${includedir}/
new file mode 100644
@@ -0,0 +1 @@
+sha256 1cddeb6990a9446339abde79ca1d01a8480b98cf107019f0847390b9549d90cc opengl-meson-gxbb-r5p1-01rel0.tar.xz
new file mode 100644
@@ -0,0 +1,53 @@
+################################################################################
+#
+# odroid-mali
+#
+################################################################################
+
+ODROID_MALI_VERSION = $(ODROID_DRIVER_VERSION)
+ODROID_MALI_TARBALL = opengl-meson-gxbb-r5p1-01rel0.tar.xz
+ODROID_MALI_SITE = http://sources.openelec.tv/devel
+ODROID_MALI_SOURCE = opengl-meson-gxbb-r5p1-01rel0.tar.xz
+
+ODROID_MALI_INSTALL_STAGING = YES
+ODROID_MALI_PROVIDES = libegl libgles
+
+define INSTALL_LIBS
+ $(INSTALL) -D -m 0644 $(@D)/usr/lib/libMali.so $(1)/lib
+
+ cd $(1)/lib
+ ln -s libMali.so $(1)/lib/libEGL.so
+ ln -s libMali.so $(1)/lib/libGLESv1_CM.so
+ ln -s libMali.so $(1)/lib/libGLESv2.so
+
+ ln -s libEGL.so $(1)/lib/libEGL.so.1
+ ln -s libEGL.so $(1)/lib/libEGL.so.1.4
+ ln -s libGLESv1_CM.so $(1)/lib/libGLESv1_CM.so.1
+ ln -s libGLESv1_CM.so $(1)/lib/libGLESv1_CM.so.1.1
+ ln -s libGLESv2.so $(1)/lib/libGLESv2.so.2
+ ln -s libGLESv2.so $(1)/lib/libGLESv2.so.2.0
+endef
+
+define INSTALL_HDRS
+ mkdir -p $(@D)/usr/include
+ cp -R $(@D)/usr/include/* $(1)/usr/include
+endef
+
+define INSTALL_PCS
+ $(INSTALL) -D -m 0644 package/odroid-mali/egl.pc $(1)/usr/lib/pkgconfig/egl.pc
+ $(INSTALL) -D -m 0644 package/odroid-mali/glesv2.pc $(1)/usr/lib/pkgconfig/glesv2.pc
+endef
+
+define ODROID_MALI_INSTALL_STAGING_CMDS
+ $(call INSTALL_LIBS,$(STAGING_DIR))
+ $(call INSTALL_HDRS,$(STAGING_DIR))
+ $(call INSTALL_PCS,$(STAGING_DIR))
+endef
+
+define ODROID_MALI_INSTALL_CMDS
+ $(call INSTALL_LIBS,$(TARGET_DIR))
+ $(call INSTALL_HDRS,$(TARGET_DIR))
+ $(call INSTALL_PCS,$(TARGET_DIR))
+endef
+
+$(eval $(generic-package))
Greetings, the following patch adds GLES/EGL support for odroidc2 broads. this means that programs like kodi which needs ui can be run. Signed-off-by: Dagg <daggs@gmx.com>