diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S02overclock b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S02overclock new file mode 100755 index 00000000000..bdcd7d7e575 --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S02overclock @@ -0,0 +1,42 @@ +#!/bin/bash + +do_overclock() { + echo "$1" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq +} + + +if test "${1}" = "start" +then + OVALUE=$(grep -E '^[ ]*overclocking[ ]*=[ ]*.*[ ]*$' /boot/batocera-boot.conf | sed -e s+"^[ ]*overclocking[ ]*=[ ]*\(.*\)[ ]*$"+"\1"+) + + # ULTRALOW LOW MEDIUM HIGH TURBO EXTREME + # 408000 600000 816000 1008000 1200000 1416000 1608000 1800000 2000000 + case "${OVALUE}" in + "extreme") + do_overclock 2000000 + ;; + "turbo") + do_overclock 1800000 + ;; + "high") + do_overclock 1608000 + ;; + "none") + do_overclock 1416000 + ;; + "low") + do_overclock 816000 + ;; + "powersave") + do_overclock 408000 + ;; + *) + # default + do_overclock 1416000 + ;; + esac +fi + diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S11pvrsrvkm b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S11pvrsrvkm deleted file mode 100755 index 13d45f25ddb..00000000000 --- a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/S11pvrsrvkm +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/sh - -cd /lib/modules/4.9.191 -pvrsrvctl --start - - diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcK b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcK new file mode 100755 index 00000000000..e7465b4a6af --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcK @@ -0,0 +1,24 @@ +#!/bin/sh + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + $i stop + ;; + esac +done diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcS b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcS new file mode 100755 index 00000000000..4a95c3f56a3 --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/etc/init.d/rcS @@ -0,0 +1,36 @@ +#!/bin/sh + +# We need the graphics module in order to use SDL since we are +# using the sdl-compat/SDL2 for rendering +cd /lib/modules/4.9.191 +pvrsrvctl --start + +# Start the progress bar +/usr/bin/progressbar & + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + echo "$i" > /tmp/status.txt + # No sh extension, so fork subprocess. + $i start + ;; + esac + + echo $(date +"%F %T,%3N")": ${i} - started" >> /var/run/boot.log +done diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad.config b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad.config new file mode 100644 index 00000000000..74b21b279ae --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad.config @@ -0,0 +1,6 @@ +x_min=1054 +x_max=3309 +y_min=976 +y_max=3373 +x_zero=2106 +y_zero=2191 diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad_right.config b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad_right.config new file mode 100644 index 00000000000..c0328474eb5 --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/mnt/UDISK/joypad_right.config @@ -0,0 +1,6 @@ +x_min=951 +x_max=2954 +y_min=970 +y_max=3314 +x_zero=1975 +y_zero=2140 diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/batocera-overclock b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/batocera-overclock new file mode 100755 index 00000000000..1da02dc13d9 --- /dev/null +++ b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/batocera-overclock @@ -0,0 +1,392 @@ +#!/bin/sh + +f_usage() { + echo "$0 list" >&2 + echo "$0 set " >&2 +} + +ARCH="$(cat /usr/share/batocera/batocera.arch)" +GRPICONFFILE="/boot/config.txt" +GODROIDCONFFILE="/boot/batocera-boot.conf" + +if test "${ARCH}" = "bcm2836" || test "${ARCH}" = "bcm2837" +then + RPIMODEL="/proc/device-tree/model" + + if grep -q "^Raspberry Pi 2" ${RPIMODEL} + then + ARCH="bcm2836" + elif grep -q "^Raspberry Pi 3 Model [A-Z] Plus" ${RPIMODEL} + then + ARCH="rpi3+" + elif grep -q "^Raspberry Pi 3" ${RPIMODEL} + then + ARCH="rpi3" + elif grep -q "^Raspberry Pi Zero 2" ${RPIMODEL} + then + ARCH="rpizero2" + fi +fi + +preBootRWConfig() { + mount -o remount,rw /boot +} + +postBootRWConfig() { + mount -o remount,ro /boot +} + +doList() { + case "${ARCH}" in + "bcm2835") + echo "none NONE" + echo "high HIGH (950Mhz)" + echo "turbo TURBO (1000Mhz)" + echo "extreme EXTREME (1100Mhz)" + ;; + "bcm2836") + echo "none NONE (900Mhz)" + echo "high HIGH (1050Mhz)" + ;; + "rpi3") + echo "none NONE (1200Mhz)" + echo "high HIGH (1300Mhz)" + echo "turbo TURBO (1325Mhz)" + echo "extreme EXTREME (1350Mhz)" + ;; + "rpi3+") + echo "none NONE (1400Mhz)" + echo "high HIGH (1425Mhz)" + echo "turbo TURBO (1450Mhz)" + echo "extreme EXTREME (1500Mhz)" + ;; + "bcm2711") + echo "none NONE (B0 - 1500Mhz or C0 - 1800MHz)" + echo "high HIGH (B0 HEATSINK - 1700Mhz)" + echo "turbo TURBO (B0 HEATSINK - 1800Mhz)" + echo "extreme EXTREME (HEATSINK & FAN 1950Mhz)" + echo "ruinsane INSANE (HEATSINK & FAN 2100Mhz)" + echo "cm4 CAUTION (C0 stepping only - HEATSINK & FAN 2275Mhz)" + ;; + "rpizero2") + echo "none NONE (1000Mhz)" + ;; + "s922x") + MODEL=$(cat /sys/firmware/devicetree/base/model) + if test "${MODEL}" = "Hardkernel ODROID-N2Plus" -o "${MODEL}" = "Khadas VIM3" -o "${MODEL}" = "Beelink GT-King Pro" + then + echo "none NONE (2200Mhz)" + echo "high HIGH (2300Mhz)" + echo "extreme EXTREME (2400Mhz)" + fi + ;; + "rg35xx") + # 240000 504000 720000 840000 1008000 1104000 1200000 1296000 1392000 1488000 + + echo "powersave POWERSAVE (240 MHz)" + echo "low LOW (720 MHz)" + echo "medium MEDIUM (1008 MHz)" + echo "high HIGH (1200 MHz)" + echo "turbo TURBO (1392 MHz)" + echo "extreme EXTREME (1488 MHz)" + ;; + "h700") + # 480000 720000 1032000 1104000 1200000 1296000 1416000 1512000 + echo "powersave POWERSAVE (480 MHz)" + echo "low LOW (720 MHz)" + echo "none NONE (1200 MHz)" + echo "medium MEDIUM (1032 MHz)" + echo "high HIGH (1296 MHz)" + echo "turbo TURBO (1416 MHz)" + echo "extreme EXTREME (1512 MHz)" + ;; + "a133") + # 408000 600000 816000 1008000 1200000 1416000 1608000 1800000 2000000 + echo "powersave POWERSAVE (480 MHz)" + echo "low LOW (816 MHz)" + echo "none NONE (1200 MHz)" + echo "medium MEDIUM (1416 MHz)" + echo "high HIGH (1608 MHz)" + echo "turbo TURBO (1800 MHz)" + echo "extreme EXTREME (2000 MHz)" + ;; + *) + echo "none NONE" + esac +} + +setValue_rpiNone() { + preBootRWConfig || return 1 + for entry in arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + do + sed -i "/^${entry}/d" "${GRPICONFFILE}" + done + postBootRWConfig || return 1 +} + +setValue_rpi4None() { + preBootRWConfig || return 1 + for entry in over_voltage arm_freq gpu_freq + do + sed -i "/^${entry}/d" "${GRPICONFFILE}" + done + postBootRWConfig || return 1 +} + +setValue_rpiPutVars() { + arm_freq=$1 + core_freq=$2 + sdram_freq=$3 + force_turbo=$4 + over_voltage=$5 + over_voltage_sdram=$6 + gpu_freq=$7 + + preBootRWConfig || return 1 + + # put variable lines if not existing + if ! grep -q "Overclock" "${GRPICONFFILE}" + then + echo >> "${GRPICONFFILE}" + echo "[Overclock]" >> "${GRPICONFFILE}" + fi + for entry in arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + do + if ! grep -q "${entry}" "${GRPICONFFILE}" + then + if ! echo "${entry}=" >> "${GRPICONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?arm_freq=.*/arm_freq=${arm_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?core_freq=.*/core_freq=${core_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?sdram_freq=.*/sdram_freq=${sdram_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?force_turbo=.*/force_turbo=${force_turbo}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?over_voltage=.*/over_voltage=${over_voltage}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?over_voltage_sdram=.*/over_voltage_sdram=${over_voltage_sdram}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?gpu_freq=.*/gpu_freq=${gpu_freq}/g" "${GRPICONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_rpi4PutVars() { + over_voltage=$1 + arm_freq=$2 + gpu_freq=$3 + + preBootRWConfig || return 1 + + # put variable lines if not existing + if ! grep -q "Overclock" "${GRPICONFFILE}" + then + echo >> "${GRPICONFFILE}" + echo "[Overclock]" >> "${GRPICONFFILE}" + fi + for entry in over_voltage arm_freq gpu_freq + do + if ! grep -q "${entry}" "${GRPICONFFILE}" + then + if ! echo "${entry}=" >> "${GRPICONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?over_voltage=.*/over_voltage=${over_voltage}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?arm_freq=.*/arm_freq=${arm_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?gpu_freq=.*/gpu_freq=${gpu_freq}/g" "${GRPICONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_odroidn2() { + VALUE=$1 + + preBootRWConfig || return 1 + + # put variable lines if not existing + for entry in overclocking + do + if ! grep -q "${entry}" "${GODROIDCONFFILE}" + then + if ! echo "${entry}=" >> "${GODROIDCONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?overclocking=.*/overclocking=${VALUE}/g" "${GODROIDCONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_rg35xx() { + VALUE=$1 + preBootRWConfig || return 1 + + # put variable lines if not existing + for entry in overclocking + do + if ! grep -q "${entry}" "${GODROIDCONFFILE}" + then + if ! echo "${entry}=" >> "${GODROIDCONFFILE}" + then + return 1 + fi + fi + + done + # put values + sed -i "s/#\?overclocking=.*/overclocking=${VALUE}/g" "${GODROIDCONFFILE}" || return 1 + + /etc/init.d/S02overclock start + postBootRWConfig || return 1 +} + +setValue() { + VALUE=$1 + + case "${ARCH}" in + "bcm2835") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + # arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + setValue_rpiPutVars 950 250 450 0 6 0 250 + ;; + "turbo") + setValue_rpiPutVars 1000 500 600 0 6 0 250 + ;; + "extreme") + setValue_rpiPutVars 1100 550 600 1 8 6 250 + ;; + esac + ;; + "bcm2836") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1050 525 450 0 4 2 350 + ;; + esac + ;; + "rpi3") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1300 525 500 0 4 4 500 + ;; + "turbo") + setValue_rpiPutVars 1325 525 520 0 4 4 500 + ;; + "extreme") + setValue_rpiPutVars 1350 550 550 1 4 5 525 + ;; + esac + ;; + "rpi3+") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1425 525 500 0 4 4 500 + ;; + "turbo") + setValue_rpiPutVars 1450 525 520 0 4 4 500 + ;; + "extreme") + setValue_rpiPutVars 1500 550 550 1 4 5 525 + ;; + esac + ;; + "bcm2711") + case "${VALUE}" in + "none") + setValue_rpi4None + ;; + "high") + setValue_rpi4PutVars 2 1700 500 + ;; + "turbo") + setValue_rpi4PutVars 3 1800 600 + ;; + "extreme") + setValue_rpi4PutVars 5 1950 700 + ;; + "ruinsane") + setValue_rpi4PutVars 6 2100 750 + ;; + "cm4") + setValue_rpi4PutVars 8 2275 750 + esac + ;; + "rpizero2") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + esac + ;; + "s922x") + MODEL=$(cat /sys/firmware/devicetree/base/model) + if test "${MODEL}" = "Hardkernel ODROID-N2Plus" -o "${MODEL}" = "Khadas VIM3" -o "${MODEL}" = "Beelink GT-King Pro" + then + setValue_odroidn2 "${VALUE}" + fi + ;; + "rg35xx") + setValue_rg35xx "${VALUE}" + ;; + "h700") + setValue_rg35xx "${VALUE}" + ;; + "a133") + setValue_rg35xx "${VALUE}" + ;; + esac +} + +if [ $# -eq 0 ]; then + f_usage + exit 1 +fi + +ACTION=$1 +shift + +case "${ACTION}" in + "list") + if ! doList + then + exit 1 + fi + ;; + "set") + VALUE=$1 + if ! setValue "${VALUE}" + then + exit 1 + fi + ;; + *) + f_usage + >&2 echo "error: invalid command ${ACTION}" + exit 1 +esac + +exit 0 diff --git a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/progressbar b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/progressbar index eea0c7e0243..c04823fe8ca 100755 Binary files a/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/progressbar and b/board/batocera/allwinner/a133/trimui-smart-pro/fsoverlay/usr/bin/progressbar differ diff --git a/board/batocera/allwinner/h700/patches/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch b/board/batocera/allwinner/h700/patches/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch new file mode 100644 index 00000000000..262ac5912a2 --- /dev/null +++ b/board/batocera/allwinner/h700/patches/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch @@ -0,0 +1,1769 @@ +From cff95e49a3d6ef5365ce248a3bbfacffe8e88735 Mon Sep 17 00:00:00 2001 +From: JohnnyonFlame +Date: Sat, 27 Apr 2024 03:53:43 -0300 +Subject: [PATCH] mali-fbdev: Implemented MALI Zero-Copy fbdev rotation/scaler. + +--- + src/video/SDL_egl.c | 2 + + src/video/SDL_egl_c.h | 9 +- + src/video/mali-fbdev/SDL_maliblitter.c | 586 ++++++++++++++++++ + src/video/mali-fbdev/SDL_maliblitter.h | 55 ++ + .../mali-fbdev/SDL_maliblitter_egl_funcs.h | 30 + + .../mali-fbdev/SDL_maliblitter_gles_funcs.h | 60 ++ + src/video/mali-fbdev/SDL_maliopengles.c | 52 +- + src/video/mali-fbdev/SDL_maliopengles.h | 3 +- + src/video/mali-fbdev/SDL_malivideo.c | 304 ++++++++- + src/video/mali-fbdev/SDL_malivideo.h | 40 +- + src/video/mali-fbdev/ion.h | 247 ++++++++ + src/video/mali-fbdev/mali.h | 59 ++ + 12 files changed, 1407 insertions(+), 40 deletions(-) + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.c + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h + create mode 100644 src/video/mali-fbdev/ion.h + create mode 100644 src/video/mali-fbdev/mali.h + +diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c +index 47f5e6ee7..9913be03f 100644 +--- a/src/video/SDL_egl.c ++++ b/src/video/SDL_egl.c +@@ -432,8 +432,10 @@ static int SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) + LOAD_FUNC(eglGetConfigAttrib); + LOAD_FUNC(eglCreateContext); + LOAD_FUNC(eglDestroyContext); ++ LOAD_FUNC(eglCreatePixmapSurface); + LOAD_FUNC(eglCreatePbufferSurface); + LOAD_FUNC(eglCreateWindowSurface); ++ LOAD_FUNC(eglGetCurrentSurface); + LOAD_FUNC(eglDestroySurface); + LOAD_FUNC(eglMakeCurrent); + LOAD_FUNC(eglSwapBuffers); +diff --git a/src/video/SDL_egl_c.h b/src/video/SDL_egl_c.h +index feb889a1c..f1f8052b5 100644 +--- a/src/video/SDL_egl_c.h ++++ b/src/video/SDL_egl_c.h +@@ -67,7 +67,12 @@ typedef struct SDL_EGL_VideoData + const EGLint * attrib_list); + + EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); +- ++ ++ EGLSurface(EGLAPIENTRY *eglCreatePixmapSurface) (EGLDisplay dpy, ++ EGLConfig config, ++ NativePixmapType pixmap, ++ const EGLint * attrib_list); ++ + EGLSurface(EGLAPIENTRY *eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, + EGLint const* attrib_list); + +@@ -76,6 +81,8 @@ typedef struct SDL_EGL_VideoData + NativeWindowType window, + const EGLint * attrib_list); + EGLBoolean(EGLAPIENTRY *eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); ++ ++ EGLSurface(EGLAPIENTRY *eglGetCurrentSurface) (EGLint readdraw); + + EGLBoolean(EGLAPIENTRY *eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); +diff --git a/src/video/mali-fbdev/SDL_maliblitter.c b/src/video/mali-fbdev/SDL_maliblitter.c +new file mode 100644 +index 000000000..e335938a1 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter.c +@@ -0,0 +1,586 @@ ++#include "../../SDL_internal.h" ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "SDL.h" ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" ++ ++#define MAX_CONFIGS 128 ++ ++/* used to simplify code */ ++typedef struct mat4 { ++ GLfloat v[16]; ++} mat4; ++ ++static GLchar* blit_vert_fmt = ++"#version 100\n" ++"varying vec2 vTexCoord;\n" ++"attribute vec2 aVertCoord;\n" ++"attribute vec2 aTexCoord;\n" ++"uniform mat4 uProj;\n" ++"uniform vec2 uTexSize;\n" ++"void main() {\n" ++" %s\n" ++" %s\n" ++" gl_Position = uProj * vec4(aVertCoord, 0.0, 1.0);\n" ++"}"; ++ ++static GLchar* blit_frag_standard = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" gl_FragColor = texture2D(uFBOTex, vTexCoord);\n" ++"}\n"; ++ ++// Ported from TheMaister's sharp-bilinear-simple.slang ++static GLchar* blit_frag_bilinear_simple = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 texel_floored = floor(vTexCoord);\n" ++" vec2 s = fract(vTexCoord);\n" ++" vec2 region_range = 0.5 - 0.5 / uScale;\n" ++" vec2 center_dist = s - 0.5;\n" ++" vec2 f = (center_dist - clamp(center_dist, -region_range, region_range)) * uScale + 0.5;\n" ++" vec2 mod_texel = texel_floored + f;\n" ++" gl_FragColor = texture2D(uFBOTex, mod_texel / uTexSize);\n" ++"}\n"; ++ ++// Ported from Iquilez ++static GLchar* blit_frag_quilez = ++"#version 100\n" ++"precision highp float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 p = vTexCoord + 0.5;\n" ++" vec2 i = floor(p);\n" ++" vec2 f = p - i;\n" ++" f = f*f*f*(f*(f*6.0-15.0)+10.0);\n" ++" p = i + f;\n" ++" p = (p - 0.5)/uTexSize;\n" ++" gl_FragColor = texture2D( uFBOTex, p );\n" ++"}\n"; ++ ++int MALI_Blitter_CreateContext(_THIS, MALI_Blitter *blitter, NativeWindowType nw) ++{ ++ /* max 14 values plus terminator. */ ++ EGLint screen_attribs[] = { ++ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, ++ EGL_SURFACE_TYPE, EGL_WINDOW_BIT, ++ EGL_RED_SIZE, 8, ++ EGL_GREEN_SIZE, 8, ++ EGL_BLUE_SIZE, 8, ++ EGL_ALPHA_SIZE, 8, ++ EGL_DEPTH_SIZE, 0, ++ EGL_STENCIL_SIZE, 0, ++ EGL_NONE ++ }; ++ ++ EGLint window_attribs[] = { ++ EGL_NONE, ++ }; ++ ++ EGLint context_attribs[] = { ++ EGL_CONTEXT_CLIENT_VERSION, 2, ++ EGL_NONE ++ }; ++ ++ EGLConfig configs[MAX_CONFIGS]; ++ EGLint config_chosen, config_count; ++ ++ if (!_this->egl_data) { ++ SDL_SetError("EGL not initialized"); ++ return 0; ++ } ++ ++ blitter->egl_display = _this->egl_data->egl_display; ++ if (blitter->eglGetConfigs(blitter->egl_display, configs, MAX_CONFIGS, &config_count) == EGL_FALSE) { ++ SDL_EGL_SetError("mali-fbdev: No compatible EGL configs", "eglGetConfigs"); ++ return 0; ++ } ++ ++ if (!blitter->eglChooseConfig(blitter->egl_display, screen_attribs, configs, MAX_CONFIGS, &config_chosen)) ++ { ++ SDL_EGL_SetError("mali-fbdev: Failed to choose an EGL config", "eglChooseConfig"); ++ return 0; ++ } ++ ++ blitter->gl_context = blitter->eglCreateContext(blitter->egl_display, ++ configs[0], ++ EGL_NO_CONTEXT, context_attribs); ++ if (blitter->gl_context == EGL_NO_CONTEXT) { ++ SDL_EGL_SetError("mali-fbdev: Could not create EGL context", "eglCreateContext"); ++ return 0; ++ } ++ ++ blitter->egl_surface = blitter->eglCreateWindowSurface(blitter->egl_display, configs[0], nw, window_attribs); ++ if (blitter->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: failed to create window surface", "eglCreateContext"); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static void ++get_aspect_correct_coords(int viewport[2], int plane[2], int rotation, GLfloat vert[4][4], GLfloat scale[2]) ++{ ++ /* FIXME: Sorry for the spaghetti! */ ++ float aspect_plane, aspect_viewport, ratio_x, ratio_y; ++ int shift_x, shift_y, temp; ++ ++ // when sideways, invert plane coords ++ if (rotation & 1) { ++ temp = plane[0]; ++ plane[0] = plane[1]; ++ plane[1] = temp; ++ } ++ ++ // Choose which edge to touch ++ aspect_plane = (float)plane[0] / plane[1]; ++ aspect_viewport = (float)viewport[0] / viewport[1]; ++ ++ if (aspect_viewport > aspect_plane) { ++ // viewport wider than plane ++ ratio_x = plane[0] * (float)((float)viewport[1] / plane[1]); ++ ratio_y = viewport[1]; ++ shift_x = (viewport[0] - ratio_x) / 2.0f; ++ shift_y = 0; ++ } else { ++ // plane wider than viewport ++ ratio_x = viewport[0]; ++ ratio_y = plane[1] * (float)((float)viewport[0] / plane[0]); ++ shift_x = 0; ++ shift_y = (viewport[1] - ratio_y) / 2.0f; ++ } ++ ++ // Instead of normalized UVs, use full texture size. ++ vert[0][2] = (int)(0.0f * plane[0]); vert[0][3] = (int)(0.0f * plane[1]); ++ vert[1][2] = (int)(0.0f * plane[0]); vert[1][3] = (int)(1.0f * plane[1]); ++ vert[2][2] = (int)(1.0f * plane[0]); vert[2][3] = (int)(0.0f * plane[1]); ++ vert[3][2] = (int)(1.0f * plane[0]); vert[3][3] = (int)(1.0f * plane[1]); ++ ++ // Get aspect corrected sizes within pixel boundaries ++ vert[0][0] = (int)(0.0f * ratio_x) + shift_x; vert[0][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[1][0] = (int)(0.0f * ratio_x) + shift_x; vert[1][1] = (int)(1.0f * ratio_y) + shift_y; ++ vert[2][0] = (int)(1.0f * ratio_x) + shift_x; vert[2][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[3][0] = (int)(1.0f * ratio_x) + shift_x; vert[3][1] = (int)(1.0f * ratio_y) + shift_y; ++ ++ // Get scale, for filtering. ++ scale[0] = ratio_x / plane[0]; ++ scale[1] = ratio_y / plane[1]; ++} ++ ++static ++void mat_ortho(float left, float right, float bottom, float top, float Result[4][4]) ++{ ++ *(mat4*)Result = (mat4){{[0 ... 15] = 0}}; ++ Result[0][0] = 2.0f / (right - left); ++ Result[1][1] = 2.0f / (top - bottom); ++ Result[2][2] = -1.0f; ++ Result[3][0] = - (right + left) / (right - left); ++ Result[3][1] = - (top + bottom) / (top - bottom); ++ Result[3][3] = 1.0f; ++} ++ ++static void ++MALI_Blitter_GetTexture(_THIS, MALI_Blitter *blitter, MALI_EGL_Surface *surf) ++{ ++ /* Define attributes of the EGLImage that will import our dmabuf file descriptor */ ++ EGLint attribute_list[] = { ++ EGL_WIDTH, blitter->plane_width, ++ EGL_HEIGHT, blitter->plane_height, ++ EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_XRGB8888, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, blitter->plane_pitch, ++ EGL_DMA_BUF_PLANE0_FD_EXT, surf->dmabuf_fd, ++ EGL_NONE ++ }; ++ ++ /* Now create the EGLImage object. */ ++ surf->egl_image = blitter->eglCreateImageKHR(blitter->egl_display, ++ EGL_NO_CONTEXT, ++ EGL_LINUX_DMA_BUF_EXT, ++ (EGLClientBuffer)NULL, ++ attribute_list); ++ if (surf->egl_image == EGL_NO_IMAGE_KHR) { ++ SDL_EGL_SetError("Failed to create Blitter EGL Image", "eglCreateImageKHR"); ++ return; ++ } ++ ++ /* Create a texture to host our image */ ++ blitter->glGenTextures(1, &surf->texture); ++ blitter->glActiveTexture(GL_TEXTURE0); ++ blitter->glBindTexture(GL_TEXTURE_2D, surf->texture); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ ++ /* And populate our texture with the EGLImage */ ++ blitter->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, surf->egl_image); ++} ++ ++int ++MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation) ++{ ++ char *use_hq_scaler; ++ GLchar msg[2048] = {}, blit_vert[2048] = {}; ++ const GLchar *sources[2] = { blit_vert, blit_frag_standard }; ++ float scale[2]; ++ ++ /* ++ * SDL_HQ_SCALER: Selects one of the available scalers: ++ * - 0: Linear filtering ++ * - 1: Sharp Bilinear Simple ++ * - 2: Quilez ++ */ ++ if ((use_hq_scaler = SDL_getenv("SDL_HQ_SCALER")) != NULL && *use_hq_scaler != '0') { ++ switch (*use_hq_scaler) { ++ case '1': sources[1] = blit_frag_bilinear_simple; break; ++ case '2': sources[1] = blit_frag_quilez; break; ++ default: use_hq_scaler = NULL; break; ++ } ++ } else { ++ use_hq_scaler = NULL; ++ } ++ ++ /* Bail out early if we're already initialized. */ ++ if (blitter->initted) { ++ return 1; ++ } ++ ++ /* The blitter thread needs to have an OpenGL ES 2.0 context available! */ ++ if (!MALI_Blitter_CreateContext(_this, blitter, nw)) { ++ return 0; ++ } ++ ++ if (!blitter->eglMakeCurrent(blitter->egl_display, ++ blitter->egl_surface, ++ blitter->egl_surface, ++ blitter->gl_context)) ++ { ++ SDL_EGL_SetError("Unable to make blitter EGL context current", "eglMakeCurrent"); ++ return 0; ++ } ++ ++ /* Setup vertex shader coord orientation */ ++ SDL_snprintf(blit_vert, sizeof(blit_vert), blit_vert_fmt, ++ /* rotation */ ++ (rotation == 0) ? "vTexCoord = aTexCoord;" : ++ (rotation == 1) ? "vTexCoord = vec2(aTexCoord.y, -aTexCoord.x);" : ++ (rotation == 2) ? "vTexCoord = vec2(-aTexCoord.x, -aTexCoord.y);" : ++ (rotation == 3) ? "vTexCoord = vec2(-aTexCoord.y, aTexCoord.x);" : ++ "#error Orientation out of scope", ++ /* scalers */ ++ (use_hq_scaler) ? "vTexCoord = vTexCoord;" ++ : "vTexCoord = vTexCoord / uTexSize;"); ++ ++ /* Compile vertex shader */ ++ blitter->vert = blitter->glCreateShader(GL_VERTEX_SHADER); ++ blitter->glShaderSource(blitter->vert, 1, &sources[0], NULL); ++ blitter->glCompileShader(blitter->vert); ++ blitter->glGetShaderInfoLog(blitter->vert, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Vertex Shader Info: %s\n", msg); ++ ++ /* Compile the fragment shader */ ++ blitter->frag = blitter->glCreateShader(GL_FRAGMENT_SHADER); ++ blitter->glShaderSource(blitter->frag, 1, &sources[1], NULL); ++ blitter->glCompileShader(blitter->frag); ++ blitter->glGetShaderInfoLog(blitter->frag, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Fragment Shader Info: %s\n", msg); ++ ++ blitter->prog = blitter->glCreateProgram(); ++ blitter->glAttachShader(blitter->prog, blitter->vert); ++ blitter->glAttachShader(blitter->prog, blitter->frag); ++ ++ blitter->glLinkProgram(blitter->prog); ++ blitter->loc_aVertCoord = blitter->glGetAttribLocation(blitter->prog, "aVertCoord"); ++ blitter->loc_aTexCoord = blitter->glGetAttribLocation(blitter->prog, "aTexCoord"); ++ blitter->loc_uFBOtex = blitter->glGetUniformLocation(blitter->prog, "uFBOTex"); ++ blitter->loc_uProj = blitter->glGetUniformLocation(blitter->prog, "uProj"); ++ blitter->loc_uTexSize = blitter->glGetUniformLocation(blitter->prog, "uTexSize"); ++ blitter->loc_uScale = blitter->glGetUniformLocation(blitter->prog, "uScale"); ++ ++ blitter->glGetProgramInfoLog(blitter->prog, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Program Info: %s\n", msg); ++ ++ /* Setup programs */ ++ blitter->glUseProgram(blitter->prog); ++ blitter->glUniform1i(blitter->loc_uFBOtex, 0); ++ ++ /* Prepare projection and aspect corrected bounds */ ++ mat_ortho(0, blitter->viewport_width, 0, blitter->viewport_height, blitter->mat_projection); ++ get_aspect_correct_coords( ++ (int [2]){blitter->viewport_width, blitter->viewport_height}, ++ (int [2]){blitter->plane_width, blitter->plane_height}, ++ rotation, ++ blitter->vert_buffer_data, ++ scale ++ ); ++ ++ /* Setup viewport, projection, scale, texture size */ ++ blitter->glViewport(0, 0, blitter->viewport_width, blitter->viewport_height); ++ blitter->glUniformMatrix4fv(blitter->loc_uProj, 1, 0, (GLfloat*)blitter->mat_projection); ++ blitter->glUniform2f(blitter->loc_uScale, scale[0], scale[1]); ++ blitter->glUniform2f(blitter->loc_uTexSize, blitter->plane_width, blitter->plane_height); ++ ++ /* Generate buffers */ ++ blitter->glGenBuffers(1, &blitter->vbo); ++ blitter->glGenVertexArraysOES(1, &blitter->vao); ++ ++ /* Populate buffers */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindBuffer(GL_ARRAY_BUFFER, blitter->vbo); ++ blitter->glEnableVertexAttribArray(blitter->loc_aVertCoord); ++ blitter->glEnableVertexAttribArray(blitter->loc_aTexCoord); ++ blitter->glVertexAttribPointer(blitter->loc_aVertCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(0 * sizeof(float))); ++ blitter->glVertexAttribPointer(blitter->loc_aTexCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(2 * sizeof(float))); ++ blitter->glBufferData(GL_ARRAY_BUFFER, sizeof(blitter->vert_buffer_data), blitter->vert_buffer_data, GL_STATIC_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(windata->surface); i++) { ++ MALI_Blitter_GetTexture(_this, blitter, &windata->surface[i]); ++ } ++ ++ blitter->initted = 1; ++ return 1; ++} ++ ++void ++MALI_DeinitBlitterContext(_THIS, MALI_Blitter *blitter) ++{ ++ int i; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ ++ /* Delete all texture and related egl objects */ ++ if (blitter->window) { ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ ++ blitter->glBindTexture(GL_TEXTURE_2D, 0); ++ for (i = 0; i < SDL_arraysize(windata->surface); i++) { ++ blitter->glDeleteTextures(1, &windata->surface[i].texture); ++ blitter->eglDestroyImageKHR(blitter->egl_display, windata->surface[i].egl_image); ++ } ++ } ++ ++ /* Tear down egl */ ++ blitter->eglMakeCurrent(blitter->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ++ blitter->eglDestroySurface(blitter->egl_display, blitter->egl_surface); ++ blitter->eglDestroyContext(blitter->egl_display, blitter->gl_context); ++ blitter->eglReleaseThread(); ++ ++ blitter->window = NULL; ++ blitter->initted = 0; ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_BlitterThread: Released thread.\n"); ++} ++ ++void ++MALI_Blitter_Blit(_THIS, MALI_Blitter *blitter, GLuint texture) ++{ ++ /* Simple quad rendering. */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindTexture(GL_TEXTURE_2D, texture); ++ blitter->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); ++} ++ ++static void MALI_Blitter_LoadFuncs(MALI_Blitter *blitter) ++{ ++ int fail = 0; ++ blitter->egl_obj = SDL_LoadObject("libEGL.so"); ++ blitter->gles2_obj = SDL_LoadObject("libGLESv2.so"); ++ if (!blitter->egl_obj || !blitter->gles2_obj) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading one or more dynamic libraries (%p %p).", blitter->gles2_obj, blitter->egl_obj); ++ SDL_Quit(); ++ } ++ ++ if ((blitter->eglGetProcAddress = SDL_LoadFunction(blitter->egl_obj, "eglGetProcAddress")) == NULL) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not locate eglGetProcAddress."); ++ SDL_Quit(); ++ } ++ ++ /* Attempt to initialize necessary functions */ ++ #define SDL_PROC(ret,func,params) \ ++ blitter->func = blitter->eglGetProcAddress(#func); \ ++ if (blitter->func == NULL) \ ++ blitter->func = SDL_LoadFunction(blitter->egl_obj, #func); \ ++ if (blitter->func == NULL) \ ++ { \ ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading \"%s\".", #func); \ ++ fail = 1; \ ++ } ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++ ++ if (fail) { ++ SDL_Quit(); ++ } ++} ++ ++int MALI_BlitterThread(void *data) ++{ ++ int prevSwapInterval = -1; ++ MALI_Blitter *blitter = (MALI_Blitter*)data; ++ _THIS = blitter->_this; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ SDL_VideoDisplay *display; ++ SDL_DisplayData *dispdata = SDL_GetDisplayDriverData(0); ++ unsigned int page; ++ MALI_EGL_Surface *current_surface; ++ ++ MALI_Blitter_LoadFuncs(blitter); ++ ++ /* Signal triplebuf available */ ++ SDL_LockMutex(blitter->mutex); ++ SDL_CondSignal(blitter->cond); ++ ++ for (;;) { ++ SDL_CondWait(blitter->cond, blitter->mutex); ++ ++ // A thread stop can be either due to reconfigure requested, or due to ++ // SDL teardown, in both cases, we will destroy some resources. ++ if (blitter->thread_stop != 0) { ++ if (blitter->initted) { ++ MALI_DeinitBlitterContext(_this, blitter); ++ } ++ ++ // Signal 2 means we want to quit. ++ if (blitter->thread_stop == 2) { ++ break; ++ } ++ ++ blitter->thread_stop = 0; ++ continue; ++ } ++ ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ display = SDL_GetDisplayForWindow(window); ++ dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ /* Initialize blitter on the first out frame we have */ ++ if (!MALI_InitBlitterContext(_this, blitter, windata, (NativeWindowType)&dispdata->native_display, blitter->rotation)) ++ { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed to initialize blitter thread"); ++ SDL_Quit(); ++ } ++ ++ if (prevSwapInterval != _this->egl_data->egl_swapinterval) { ++ blitter->eglSwapInterval(blitter->egl_display, _this->egl_data->egl_swapinterval); ++ prevSwapInterval = _this->egl_data->egl_swapinterval; ++ } ++ ++ /* Flip the most recent back buffer with the front buffer */ ++ page = windata->queued_buffer; ++ windata->queued_buffer = windata->front_buffer; ++ windata->front_buffer = page; ++ ++ /* select surface to wait and blit */ ++ current_surface = &windata->surface[windata->queued_buffer]; ++ ++ /* wait for fence and flip display */ ++ if (blitter->eglClientWaitSyncKHR( ++ blitter->egl_display, ++ current_surface->egl_fence, ++ EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, ++ EGL_FOREVER_NV)) ++ { ++ /* Discarding previous data... */ ++ blitter->glClear(GL_COLOR_BUFFER_BIT); ++ blitter->glClearColor(0.0, 0.0, 0.0, 1.0); ++ ++ /* Perform blitting */ ++ MALI_Blitter_Blit(_this, blitter, current_surface->texture); ++ ++ /* Perform the final buffer swap. */ ++ if (!(blitter->eglSwapBuffers(blitter->egl_display, blitter->egl_surface))) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "eglSwapBuffers failed"); ++ return 0; ++ } ++ } ++ else ++ { ++ SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Sync %p failed.", current_surface->egl_fence); ++ } ++ } ++ ++ /* Signal thread done */ ++ SDL_UnlockMutex(blitter->mutex); ++ return 0; ++} ++ ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter) ++{ ++ if (!blitter) ++ return; ++ ++ blitter->thread_stop = 1; ++ blitter->mutex = SDL_CreateMutex(); ++ blitter->cond = SDL_CreateCond(); ++ blitter->thread = SDL_CreateThread(MALI_BlitterThread, "MALI_BlitterThread", blitter); ++} ++ ++void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter) ++{ ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); ++ SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ if (!blitter) ++ return; ++ ++ /* Flag a reconfigure request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->window = window; ++ blitter->egl_display = _this->egl_data->egl_display; ++ blitter->viewport_width = dispdata->native_display.width, ++ blitter->viewport_height = dispdata->native_display.height, ++ blitter->plane_width = window->w; ++ blitter->plane_height = window->h; ++ blitter->plane_pitch = dispdata->stride; ++ blitter->rotation = dispdata->rotation; ++ blitter->thread_stop = 1; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++} ++ ++void MALI_BlitterQuit(MALI_Blitter *blitter) ++{ ++ if (blitter == NULL) ++ return; ++ ++ /* Flag a stop request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->thread_stop = 2; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ /* Wait and perform teardown */ ++ SDL_WaitThread(blitter->thread, NULL); ++ blitter->thread = NULL; ++ SDL_DestroyMutex(blitter->mutex); ++ SDL_DestroyCond(blitter->cond); ++} ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ +\ No newline at end of file +diff --git a/src/video/mali-fbdev/SDL_maliblitter.h b/src/video/mali-fbdev/SDL_maliblitter.h +new file mode 100644 +index 000000000..ef6b4ffb6 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter.h +@@ -0,0 +1,55 @@ ++#include "../../SDL_internal.h" ++ ++#ifndef _SDL_maliblitter_h ++#define _SDL_maliblitter_h ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "../SDL_sysvideo.h" ++#include "../SDL_egl_c.h" ++ ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++typedef struct MALI_Blitter { ++ /* OpenGL Surface and Context */ ++ _THIS; ++ void *gles2_obj, *egl_obj; ++ EGLSurface *egl_surface; ++ EGLDisplay *egl_display; ++ SDL_GLContext *gl_context; ++ SDL_Window *window; ++ EGLConfig config; ++ GLuint frag, vert, prog, vbo, vao; ++ GLint loc_aVertCoord, loc_aTexCoord, loc_uFBOtex, loc_uProj, loc_uTexSize, loc_uScale; ++ GLsizei viewport_width, viewport_height; ++ GLint plane_width, plane_height, plane_pitch; ++ float mat_projection[4][4]; ++ float vert_buffer_data[4][4]; ++ ++ // Triple buffering thread ++ SDL_mutex *mutex; ++ SDL_cond *cond; ++ SDL_Thread *thread; ++ int thread_stop; ++ int rotation; ++ int next; ++ int initted; ++ ++ void *user_data; ++ ++ #define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++} MALI_Blitter; ++ ++extern int MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation); ++extern int MALI_BlitterThread(void *data); ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter); ++extern void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter); ++extern void MALI_BlitterQuit(MALI_Blitter *blitter); ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ ++ ++#endif /* _SDL_maliblitter_h */ +diff --git a/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h b/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h +new file mode 100644 +index 000000000..f18c66161 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h +@@ -0,0 +1,30 @@ ++SDL_PROC(EGLDisplay, eglGetDisplay, (NativeDisplayType display)); ++SDL_PROC(EGLDisplay, eglGetPlatformDisplayEXT, (EGLenum platform, void *native_display, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint * major, EGLint * minor)); ++SDL_PROC(EGLBoolean, eglTerminate, (EGLDisplay dpy)); ++SDL_PROC(void *, eglGetProcAddress, (const char * procName)); ++SDL_PROC(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLBoolean, eglChooseConfig, (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyContext, (EGLDisplay dpy, EGLContext ctx)); ++SDL_PROC(EGLImageKHR, eglCreateImageKHR, (EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy, EGLImageKHR image)); ++SDL_PROC(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint * attrib_list)); ++SDL_PROC(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy, EGLConfig config, EGLint const* attrib_list)); ++SDL_PROC(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySurface, (EGLDisplay dpy, EGLSurface surface)); ++SDL_PROC(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)); ++SDL_PROC(EGLBoolean, eglSwapBuffers, (EGLDisplay dpy, EGLSurface draw)); ++SDL_PROC(EGLBoolean, eglSwapInterval, (EGLDisplay dpy, EGLint interval)); ++SDL_PROC(const char *, eglQueryString, (EGLDisplay dpy, EGLint name)); ++SDL_PROC(EGLenum, eglQueryAPI, (void)); ++SDL_PROC(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value)); ++SDL_PROC(EGLBoolean, eglWaitNative, (EGLint engine)); ++SDL_PROC(EGLBoolean, eglWaitGL, (void)); ++SDL_PROC(EGLBoolean, eglReleaseThread, (void)); ++SDL_PROC(EGLBoolean, eglBindAPI, (EGLenum)); ++SDL_PROC(EGLint, eglGetError, (void)); ++SDL_PROC(EGLSyncKHR, eglCreateSyncKHR, (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySyncKHR, (EGLDisplay dpy, EGLSyncKHR sync)); ++//SDL_PROC(EGLint, eglWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)); ++SDL_PROC(EGLint, eglClientWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)); +diff --git a/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h b/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h +new file mode 100644 +index 000000000..3f0e20689 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h +@@ -0,0 +1,60 @@ ++SDL_PROC(void, glActiveTexture, (GLenum)) ++SDL_PROC(void, glAttachShader, (GLuint, GLuint)) ++// SDL_PROC(void, glBindAttribLocation, (GLuint, GLuint, const char *)) ++SDL_PROC(void, glBindTexture, (GLenum, GLuint)) ++// SDL_PROC(void, glBlendEquationSeparate, (GLenum, GLenum)) ++// SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum)) ++SDL_PROC(void, glClear, (GLbitfield)) ++SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf)) ++SDL_PROC(void, glCompileShader, (GLuint)) ++SDL_PROC(GLuint, glCreateProgram, (void)) ++SDL_PROC(GLuint, glCreateShader, (GLenum)) ++SDL_PROC(void, glDeleteProgram, (GLuint)) ++SDL_PROC(void, glDeleteShader, (GLuint)) ++SDL_PROC(void, glDeleteTextures, (GLsizei, const GLuint *)) ++SDL_PROC(void, glDisable, (GLenum)) ++SDL_PROC(void, glDisableVertexAttribArray, (GLuint)) ++SDL_PROC(void, glDrawArrays, (GLenum, GLint, GLsizei)) ++SDL_PROC(void, glEnable, (GLenum)) ++SDL_PROC(void, glEnableVertexAttribArray, (GLuint)) ++// SDL_PROC(void, glFinish, (void)) ++// SDL_PROC(void, glGenFramebuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glGenTextures, (GLsizei, GLuint *)) ++// SDL_PROC(const GLubyte *, glGetString, (GLenum)) ++SDL_PROC(GLenum, glGetError, (void)) ++// SDL_PROC(void, glGetIntegerv, (GLenum, GLint *)) ++// SDL_PROC(void, glGetProgramiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(void, glGetShaderInfoLog, (GLuint, GLsizei, GLsizei *, char *)) ++// SDL_PROC(void, glGetShaderiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(GLint, glGetUniformLocation, (GLuint, const char *)) ++SDL_PROC(void, glLinkProgram, (GLuint)) ++// SDL_PROC(void, glPixelStorei, (GLenum, GLint)) ++// SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) ++// SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei)) ++SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *)) ++// SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)) ++SDL_PROC(void, glTexParameteri, (GLenum, GLenum, GLint)) ++// SDL_PROC(void, glTexSubImage2D, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) ++SDL_PROC(void, glUniform1i, (GLint, GLint)) ++// SDL_PROC(void, glUniform4f, (GLint, GLfloat, GLfloat, GLfloat, GLfloat)) ++SDL_PROC(void, glUniform2f, (GLint, GLfloat, GLfloat)) ++SDL_PROC(void, glUniformMatrix4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) ++SDL_PROC(void, glUseProgram, (GLuint)) ++SDL_PROC(void, glVertexAttribPointer, (GLuint, GLint, GLenum, GLboolean, GLsizei, const void *)) ++SDL_PROC(void, glViewport, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glBindFramebuffer, (GLenum, GLuint)) ++// SDL_PROC(void, glFramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) ++// SDL_PROC(GLenum, glCheckFramebufferStatus, (GLenum)) ++// SDL_PROC(void, glDeleteFramebuffers, (GLsizei, const GLuint *)) ++SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *)) ++SDL_PROC(void, glGetProgramInfoLog, (GLuint, GLsizei, GLsizei*, GLchar*)) ++SDL_PROC(void, glGenBuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glDeleteBuffers, (GLsizei, const GLuint *)) ++SDL_PROC(void, glBindBuffer, (GLenum, GLuint)) ++SDL_PROC(void, glBufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum)) ++// SDL_PROC(void, glBufferSubData, (GLenum, GLintptr, GLsizeiptr, const GLvoid *)) ++SDL_PROC(void, glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image)) ++SDL_PROC(void, glBindVertexArrayOES, (GLuint array)) ++SDL_PROC(void, glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays)) ++SDL_PROC(void, glGenVertexArraysOES, (GLsizei n, GLuint *arrays)) +diff --git a/src/video/mali-fbdev/SDL_maliopengles.c b/src/video/mali-fbdev/SDL_maliopengles.c +index 0e4836d2e..f16a2f76f 100644 +--- a/src/video/mali-fbdev/SDL_maliopengles.c ++++ b/src/video/mali-fbdev/SDL_maliopengles.c +@@ -22,20 +22,64 @@ + + #if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL + +-#include "SDL_maliopengles.h" + #include "SDL_malivideo.h" ++#include "SDL_maliopengles.h" ++#include "SDL_maliblitter.h" + + /* EGL implementation of SDL OpenGL support */ ++void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) ++{ ++ /* if SDL was _also_ built with the Raspberry Pi driver (so we're ++ definitely a Pi device), default to GLES2. */ ++ *mask = SDL_GL_CONTEXT_PROFILE_ES; ++ *major = 2; ++ *minor = 0; ++} + + int + MALI_GLES_LoadLibrary(_THIS, const char *path) + { +- return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0); ++ /* Delay loading this until the very end. */ ++ return 0; ++} ++ ++int MALI_GLES_SwapWindow(_THIS, SDL_Window * window) ++{ ++ int r; ++ unsigned int prev; ++ EGLSurface surf; ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0); ++ MALI_Blitter *blitter = displaydata->blitter; ++ ++ if (blitter == NULL) ++ return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); ++ ++ windowdata = (SDL_WindowData*)_this->windows->driverdata; ++ ++ SDL_LockMutex(blitter->mutex); ++ ++ // First create the necessary fence ++ windowdata->surface[windowdata->back_buffer].egl_fence = _this->egl_data->eglCreateSyncKHR(_this->egl_data->egl_display, EGL_SYNC_FENCE_KHR, NULL); ++ ++ // Flip back and front buffers ++ prev = windowdata->front_buffer; ++ windowdata->front_buffer = windowdata->back_buffer; ++ windowdata->back_buffer = prev; ++ ++ // Done, update back buffer surfaces ++ surf = windowdata->surface[windowdata->back_buffer].egl_surface; ++ windowdata->egl_surface = surf; ++ r = _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, surf, surf, _this->current_glctx); ++ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ return (r == EGL_TRUE) ? 0 : SDL_EGL_SetError("Failed to set current surface.", "eglMakeCurrent"); + } + +-SDL_EGL_CreateContext_impl(MALI) +-SDL_EGL_SwapWindow_impl(MALI) + SDL_EGL_MakeCurrent_impl(MALI) ++SDL_EGL_CreateContext_impl(MALI) + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +diff --git a/src/video/mali-fbdev/SDL_maliopengles.h b/src/video/mali-fbdev/SDL_maliopengles.h +index 121af74f9..3741b88d5 100644 +--- a/src/video/mali-fbdev/SDL_maliopengles.h ++++ b/src/video/mali-fbdev/SDL_maliopengles.h +@@ -32,14 +32,13 @@ + #define MALI_GLES_GetAttribute SDL_EGL_GetAttribute + #define MALI_GLES_GetProcAddress SDL_EGL_GetProcAddress + #define MALI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary +-#define MALI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval +-#define MALI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval + #define MALI_GLES_DeleteContext SDL_EGL_DeleteContext + + extern int MALI_GLES_LoadLibrary(_THIS, const char *path); + extern SDL_GLContext MALI_GLES_CreateContext(_THIS, SDL_Window * window); + extern int MALI_GLES_SwapWindow(_THIS, SDL_Window * window); + extern int MALI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); ++extern void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor); + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +diff --git a/src/video/mali-fbdev/SDL_malivideo.c b/src/video/mali-fbdev/SDL_malivideo.c +index f70ae6431..0024457f1 100644 +--- a/src/video/mali-fbdev/SDL_malivideo.c ++++ b/src/video/mali-fbdev/SDL_malivideo.c +@@ -23,19 +23,21 @@ + #if SDL_VIDEO_DRIVER_MALI + + /* SDL internals */ ++#include "../../events/SDL_events_c.h" + #include "../SDL_sysvideo.h" +-#include "SDL_version.h" +-#include "SDL_syswm.h" +-#include "SDL_loadso.h" + #include "SDL_events.h" +-#include "../../events/SDL_events_c.h" ++#include "SDL_loadso.h" ++#include "SDL_syswm.h" ++#include "SDL_hints.h" ++#include "SDL_version.h" + + #ifdef SDL_INPUT_LINUXEV + #include "../../core/linux/SDL_evdev.h" + #endif + +-#include "SDL_malivideo.h" + #include "SDL_maliopengles.h" ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" + + + //static int +@@ -59,7 +61,7 @@ MALI_Create() + SDL_VideoDevice *device; + + /* Initialize SDL_VideoDevice structure */ +- device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); ++ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { + SDL_OutOfMemory(); + return NULL; +@@ -82,6 +84,7 @@ MALI_Create() + device->SetWindowTitle = MALI_SetWindowTitle; + device->SetWindowPosition = MALI_SetWindowPosition; + device->SetWindowSize = MALI_SetWindowSize; ++ device->SetWindowFullscreen = MALI_SetWindowFullscreen; + device->ShowWindow = MALI_ShowWindow; + device->HideWindow = MALI_HideWindow; + device->DestroyWindow = MALI_DestroyWindow; +@@ -96,6 +99,7 @@ MALI_Create() + device->GL_GetSwapInterval = MALI_GLES_GetSwapInterval; + device->GL_SwapWindow = MALI_GLES_SwapWindow; + device->GL_DeleteContext = MALI_GLES_DeleteContext; ++ device->GL_DefaultProfileConfig = MALI_GLES_DefaultProfileConfig; + + device->PumpEvents = MALI_PumpEvents; + +@@ -105,7 +109,7 @@ MALI_Create() + VideoBootStrap MALI_bootstrap = { + "mali", + "Mali EGL Video Driver", +-// MALI_Available, ++ // MALI_Available, + MALI_Create + }; + +@@ -116,6 +120,7 @@ VideoBootStrap MALI_bootstrap = { + int + MALI_VideoInit(_THIS) + { ++ const char *blitter_status = NULL, *rotation = NULL; + SDL_VideoDisplay display; + SDL_DisplayMode current_mode; + SDL_DisplayData *data; +@@ -132,6 +137,11 @@ MALI_VideoInit(_THIS) + return SDL_SetError("mali-fbdev: Could not open framebuffer device"); + } + ++ data->ion_fd = open("/dev/ion", O_RDWR, 0); ++ if (data->ion_fd < 0) { ++ return SDL_SetError("mali-fbdev: Could not open ion device"); ++ } ++ + if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) { + MALI_VideoQuit(_this); + return SDL_SetError("mali-fbdev: Could not get framebuffer information"); +@@ -140,18 +150,41 @@ MALI_VideoInit(_THIS) + /* + vinfo.yres_virtual = vinfo.yres * 3; + if (ioctl(fd, FBIOPUT_VSCREENINFO, vinfo) == -1) { +- printf("mali-fbdev: Error setting VSCREENINFO\n"); ++ printf("mali-fbdev: Error setting VSCREENINFO\n"); + } + */ + close(fd); +-// system("setterm -cursor off"); ++ // system("setterm -cursor off"); + + data->native_display.width = vinfo.xres; + data->native_display.height = vinfo.yres; + ++ /* If the device seems to be portrait mode, set default as rotated. */ ++ data->rotation = (vinfo.xres < vinfo.yres) ? 1 : 0; ++ ++ rotation = SDL_GetHint("SDL_ROTATION"); ++ blitter_status = SDL_GetHint("SDL_BLITTER_DISABLED"); ++ if (rotation != NULL) ++ data->rotation = SDL_atoi(rotation); ++ ++ if (!blitter_status || blitter_status[0] != '1') { ++ data->blitter = SDL_calloc(1, sizeof(MALI_Blitter)); ++ data->blitter->_this = _this; ++ MALI_BlitterInit(_this, data->blitter); ++ } else { ++ data->blitter = NULL; ++ data->rotation = 0; // no rotation when the blitter is off! ++ } ++ + SDL_zero(current_mode); +- current_mode.w = vinfo.xres; +- current_mode.h = vinfo.yres; ++ /* Flip the reported dimensions when rotated. */ ++ if ((data->rotation & 1) == 0) { ++ current_mode.w = vinfo.xres; ++ current_mode.h = vinfo.yres; ++ } else { ++ current_mode.w = vinfo.yres; ++ current_mode.h = vinfo.xres; ++ } + /* FIXME: Is there a way to tell the actual refresh rate? */ + current_mode.refresh_rate = 60; + /* 32 bpp for default */ +@@ -166,7 +199,6 @@ MALI_VideoInit(_THIS) + display.driverdata = data; + + SDL_AddVideoDisplay(&display, SDL_FALSE); +- + #ifdef SDL_INPUT_LINUXEV + if (SDL_EVDEV_Init() < 0) { + return -1; +@@ -180,11 +212,11 @@ void + MALI_VideoQuit(_THIS) + { + /* Clear the framebuffer and ser cursor on again */ +-// int fd = open("/dev/tty", O_RDWR); +-// ioctl(fd, VT_ACTIVATE, 5); +-// ioctl(fd, VT_ACTIVATE, 1); +-// close(fd); +-// system("setterm -cursor on"); ++ // int fd = open("/dev/tty", O_RDWR); ++ // ioctl(fd, VT_ACTIVATE, 5); ++ // ioctl(fd, VT_ACTIVATE, 1); ++ // close(fd); ++ // system("setterm -cursor on"); + + #ifdef SDL_INPUT_LINUXEV + SDL_EVDEV_Quit(); +@@ -205,33 +237,200 @@ MALI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) + return 0; + } + ++static EGLSurface * ++MALI_EGL_InitPixmapSurfaces(_THIS, int width, int height, SDL_WindowData *windowdata, SDL_DisplayData *displaydata) ++{ ++ struct ion_fd_data ion_data; ++ struct ion_allocation_data allocation_data; ++ int i, io; ++ ++ _this->egl_data->egl_surfacetype = EGL_PIXMAP_BIT; ++ if (SDL_EGL_ChooseConfig(_this) != 0) { ++ SDL_SetError("mali-fbdev: Unable to find a suitable EGL config"); ++ return EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Creating Pixmap (%dx%d) buffers", width, height); ++ if (_this->gl_config.framebuffer_srgb_capable) { ++ { ++ SDL_SetError("mali-fbdev: EGL implementation does not support sRGB system framebuffers"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ windowdata->back_buffer = 0; ++ windowdata->queued_buffer = 1; ++ windowdata->front_buffer = 2; ++ ++ // Populate pixmap definitions ++ displaydata->stride = MALI_ALIGN(width * 4, 64); ++ for (i = 0; i < 3; i++) { ++ MALI_EGL_Surface *surf = &windowdata->surface[i]; ++ surf->pixmap = (mali_pixmap){ ++ .width = width, ++ .height = height, ++ .planes[0] = (mali_plane){ ++ .stride = displaydata->stride, ++ .size = displaydata->stride * height, ++ .offset = 0 }, ++ .planes[1] = (mali_plane){}, ++ .planes[2] = (mali_plane){}, ++ .format = 0, ++ .handles = { -1, -1, -1 }, ++ .drm_fourcc = { ++ .dataspace = 0, ++ .format = DRM_FORMAT_ARGB8888, ++ .modifier = 0 ++ } ++ }; ++ ++ /* Allocate framebuffer data */ ++ allocation_data = (struct ion_allocation_data){ ++ .len = surf->pixmap.planes[0].size, ++ .heap_id_mask = (1 << ION_HEAP_TYPE_DMA), ++ .flags = 1 << ION_FLAG_CACHED ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_ALLOC, &allocation_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Unable to create backing ION buffers"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Export DMA_BUF handle for the framebuffer */ ++ ion_data = (struct ion_fd_data){ ++ .handle = allocation_data.handle ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_SHARE, &ion_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Failure exporting ION buffer handle"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Recall fd and handle for teardown later */ ++ surf->dmabuf_handle = allocation_data.handle; ++ surf->dmabuf_fd = ion_data.fd; ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created ION buffer %d (fd: %d)\n", surf->dmabuf_handle, surf->dmabuf_fd); ++ ++ /* Create Pixmap Surface using DMA_BUF framebuffer fd */ ++ surf->pixmap.handles[0] = ion_data.fd; ++ ++ surf->pixmap_handle = displaydata->egl_create_pixmap_ID_mapping(&surf->pixmap); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created pixmap handle %p\n", (void *)surf->pixmap_handle); ++ if ((int)surf->pixmap_handle < 0) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "egl_create_pixmap_ID_mapping"); ++ return EGL_NO_SURFACE; ++ } ++ ++ surf->egl_surface = _this->egl_data->eglCreatePixmapSurface( ++ _this->egl_data->egl_display, ++ _this->egl_data->egl_config, ++ surf->pixmap_handle, NULL); ++ if (surf->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "eglCreatePixmapSurface"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ return windowdata->surface[windowdata->back_buffer].egl_surface; ++} ++ ++static void ++MALI_EGL_DeinitPixmapSurfaces(_THIS, SDL_Window *window) ++{ ++ SDL_WindowData *data; ++ SDL_DisplayData *displaydata; ++ EGLSurface current_surface; ++ EGLContext current_context; ++ ++ data = window->driverdata; ++ displaydata = SDL_GetDisplayDriverData(0); ++ if (!displaydata->blitter) ++ return; ++ ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ ++ // Disable current surface ++ current_context = (EGLContext)SDL_GL_GetCurrentContext(); ++ current_surface = _this->egl_data->eglGetCurrentSurface(EGL_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(data->surface); i++) { ++ struct ion_handle_data handle_data; ++ if (data->surface[i].dmabuf_fd < 0) ++ continue; ++ ++ if ((current_surface != EGL_NO_SURFACE) && (data->surface[i].egl_surface == current_surface)) { ++ SDL_EGL_MakeCurrent(_this, EGL_NO_SURFACE, current_context); ++ current_surface = EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_DestroyWindow: Destroying surface %d.", i); ++ _this->egl_data->eglDestroySurface(_this->egl_data->egl_display, data->surface[i].egl_surface); ++ displaydata->egl_destroy_pixmap_ID_mapping(data->surface[i].pixmap_handle); ++ close(data->surface[i].dmabuf_fd); ++ ++ handle_data = (struct ion_handle_data){ ++ .handle = data->surface[i].dmabuf_handle ++ }; ++ ++ ioctl(displaydata->ion_fd, ION_IOC_FREE, &handle_data); ++ data->surface[i].dmabuf_fd = -1; ++ } ++} ++ + int + MALI_CreateWindow(_THIS, SDL_Window * window) + { + SDL_WindowData *windowdata; ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_DisplayData *displaydata; + + displaydata = SDL_GetDisplayDriverData(0); + + /* Allocate window internal data */ +- windowdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); ++ windowdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); + if (windowdata == NULL) { + return SDL_OutOfMemory(); + } + +- /* Windows have one size for now */ +- window->w = displaydata->native_display.width; +- window->h = displaydata->native_display.height; ++ /* Use the entire screen when the blitter isn't enabled */ ++ if (displaydata->blitter) { ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ } + + /* OpenGL ES is the law here */ + window->flags |= SDL_WINDOW_OPENGL; +- + if (!_this->egl_data) { +- if (SDL_GL_LoadLibrary(NULL) < 0) { +- return -1; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ /* Try again with OpenGL ES 2.0 */ ++ _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; ++ _this->gl_config.major_version = 2; ++ _this->gl_config.minor_version = 0; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ return SDL_SetError("Can't load EGL/GL library on window creation."); ++ } + } ++ ++ _this->gl_config.driver_loaded = 1; ++ } ++ ++ /* If the blitter is required, we will manually create the EGL Surface resources using the ION allocator ++ and some reverse engineered mali internals */ ++ if (displaydata->blitter) { ++ displaydata->egl_create_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_create_pixmap_ID_mapping"); ++ displaydata->egl_destroy_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_destroy_pixmap_ID_mapping"); ++ if (!displaydata->egl_create_pixmap_ID_mapping || !displaydata->egl_destroy_pixmap_ID_mapping) { ++ MALI_VideoQuit(_this); ++ return SDL_SetError("mali-fbdev: Can't find mali pixmap entrypoints"); ++ } ++ ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } else { ++ windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + } +- windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + + if (windowdata->egl_surface == EGL_NO_SURFACE) { + MALI_VideoQuit(_this); +@@ -249,13 +448,13 @@ MALI_CreateWindow(_THIS, SDL_Window * window) + return 0; + } + +-void +-MALI_DestroyWindow(_THIS, SDL_Window * window) ++void MALI_DestroyWindow(_THIS, SDL_Window *window) + { + SDL_WindowData *data; +- + data = window->driverdata; ++ + if (data) { ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); + if (data->egl_surface != EGL_NO_SURFACE) { + SDL_EGL_DestroySurface(_this, data->egl_surface); + data->egl_surface = EGL_NO_SURFACE; +@@ -278,6 +477,34 @@ MALI_SetWindowPosition(_THIS, SDL_Window * window) + void + MALI_SetWindowSize(_THIS, SDL_Window * window) + { ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata; ++ ++ windowdata = window->driverdata; ++ displaydata = SDL_GetDisplayDriverData(0); ++ ++ // If we're using the blitter, we need to warn it about the surface reconfiguration! ++ if (displaydata->blitter) { ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } ++} ++ ++void ++MALI_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) ++{ ++ if (fullscreen) { ++ // Remember that SDL_SendWindowEvent sets the window width and height for you, so let's ++ // recall the width and height first. ++ int prev_w = window->w, prev_h = window->h; ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ ++ // If size has changed, let's reconfigure it. ++ if (display->current_mode.w != prev_w || display->current_mode.h != prev_h) ++ MALI_SetWindowSize(_this, window); ++ } + } + + void +@@ -290,6 +517,25 @@ MALI_HideWindow(_THIS, SDL_Window * window) + { + } + ++int ++MALI_GLES_SetSwapInterval(_THIS, int interval) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ _this->egl_data->egl_swapinterval = interval != 0; ++ return 0; ++} ++ ++int ++MALI_GLES_GetSwapInterval(_THIS) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ return _this->egl_data->egl_swapinterval; ++} ++ + /*****************************************************************************/ + /* SDL Window Manager function */ + /*****************************************************************************/ +@@ -300,7 +546,7 @@ MALI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) + return SDL_TRUE; + } else { + SDL_SetError("application not compiled with SDL %d.%d\n", +- SDL_MAJOR_VERSION, SDL_MINOR_VERSION); ++ SDL_MAJOR_VERSION, SDL_MINOR_VERSION); + } + + /* Failed to get window manager information */ +diff --git a/src/video/mali-fbdev/SDL_malivideo.h b/src/video/mali-fbdev/SDL_malivideo.h +index 175483a88..3fad6e795 100644 +--- a/src/video/mali-fbdev/SDL_malivideo.h ++++ b/src/video/mali-fbdev/SDL_malivideo.h +@@ -26,27 +26,56 @@ + #include "../SDL_sysvideo.h" + + #include "SDL_egl.h" ++#include "SDL_opengl.h" ++#include "mali.h" + + #include + #include + #include + #include + #include ++#include + #include + #include + #include + ++#include "mali.h" ++#include "ion.h" ++ + typedef struct SDL_DisplayData + { +- struct { +- unsigned short width; +- unsigned short height; +- } native_display; ++ int ion_fd; ++ struct MALI_Blitter *blitter; ++ fbdev_window_s native_display; ++ int rotation; ++ unsigned long stride; ++ unsigned long w_align; ++ unsigned long h_align; ++ NativePixmapType (*egl_create_pixmap_ID_mapping)(mali_pixmap *); ++ NativePixmapType (*egl_destroy_pixmap_ID_mapping)(int id); + } SDL_DisplayData; + ++typedef struct MALI_EGL_Surface ++{ ++ // A pixmap is backed by multiple ION allocated backbuffers, EGL fences, etc. ++ EGLImageKHR egl_image; ++ GLuint texture; ++ EGLSyncKHR egl_fence; ++ EGLSurface egl_surface; ++ NativePixmapType pixmap_handle; ++ mali_pixmap pixmap; ++ int dmabuf_fd; ++ int dmabuf_handle; ++} MALI_EGL_Surface; ++ + typedef struct SDL_WindowData + { + EGLSurface egl_surface; ++ int back_buffer; ++ int queued_buffer; ++ int front_buffer; ++ ++ MALI_EGL_Surface surface[3]; + } SDL_WindowData; + + /****************************************************************************/ +@@ -62,9 +91,12 @@ int MALI_CreateWindow(_THIS, SDL_Window * window); + void MALI_SetWindowTitle(_THIS, SDL_Window * window); + void MALI_SetWindowPosition(_THIS, SDL_Window * window); + void MALI_SetWindowSize(_THIS, SDL_Window * window); ++void MALI_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen); + void MALI_ShowWindow(_THIS, SDL_Window * window); + void MALI_HideWindow(_THIS, SDL_Window * window); + void MALI_DestroyWindow(_THIS, SDL_Window * window); ++int MALI_GLES_SetSwapInterval(_THIS, int interval); ++int MALI_GLES_GetSwapInterval(_THIS); + + /* Window manager function */ + SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window * window, +diff --git a/src/video/mali-fbdev/ion.h b/src/video/mali-fbdev/ion.h +new file mode 100644 +index 000000000..83397080f +--- /dev/null ++++ b/src/video/mali-fbdev/ion.h +@@ -0,0 +1,247 @@ ++/* ++ * drivers/staging/android/uapi/ion.h ++ * ++ * Copyright (C) 2011 Google, Inc. ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#ifndef _UAPI_LINUX_ION_H ++#define _UAPI_LINUX_ION_H ++ ++#define CONFIG_AMLOGIC_MODIFY ++ ++#include ++#include ++ ++typedef int ion_user_handle_t; ++ ++/** ++ * enum ion_heap_types - list of all possible types of heaps ++ * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc ++ * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc ++ * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved ++ * carveout heap, allocations are physically ++ * contiguous ++ * @ION_HEAP_TYPE_DMA: memory allocated via DMA API ++ * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask ++ * is used to identify the heaps, so only 32 ++ * total heap types are supported ++ */ ++enum ion_heap_type { ++ ION_HEAP_TYPE_SYSTEM, ++ ION_HEAP_TYPE_SYSTEM_CONTIG, ++ ION_HEAP_TYPE_CARVEOUT, ++ ION_HEAP_TYPE_CHUNK, ++ ION_HEAP_TYPE_DMA, ++ ION_HEAP_TYPE_CUSTOM, /* ++ * must be last so device specific heaps always ++ * are at the end of this enum ++ */ ++}; ++ ++#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) ++ ++/** ++ * allocation flags - the lower 16 bits are used by core ion, the upper 16 ++ * bits are reserved for use by the heaps themselves. ++ */ ++ ++/* ++ * mappings of this buffer should be cached, ion will do cache maintenance ++ * when the buffer is mapped for dma ++ */ ++#define ION_FLAG_CACHED 1 ++ ++/* ++ * mappings of this buffer will created at mmap time, if this is set ++ * caches must be managed manually ++ */ ++#define ION_FLAG_CACHED_NEEDS_SYNC 2 ++ ++/** ++ * DOC: Ion Userspace API ++ * ++ * create a client by opening /dev/ion ++ * most operations handled via following ioctls ++ * ++ */ ++ ++/** ++ * struct ion_allocation_data - metadata passed from userspace for allocations ++ * @len: size of the allocation ++ * @align: required alignment of the allocation ++ * @heap_id_mask: mask of heap ids to allocate from ++ * @flags: flags passed to heap ++ * @handle: pointer that will be populated with a cookie to use to ++ * refer to this allocation ++ * ++ * Provided by userspace as an argument to the ioctl ++ */ ++struct ion_allocation_data { ++ size_t len; ++ size_t align; ++ unsigned int heap_id_mask; ++ unsigned int flags; ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair ++ * @handle: a handle ++ * @fd: a file descriptor representing that handle ++ * ++ * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with ++ * the handle returned from ion alloc, and the kernel returns the file ++ * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace ++ * provides the file descriptor and the kernel returns the handle. ++ */ ++struct ion_fd_data { ++ ion_user_handle_t handle; ++ int fd; ++}; ++ ++/** ++ * struct ion_handle_data - a handle passed to/from the kernel ++ * @handle: a handle ++ */ ++struct ion_handle_data { ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl ++ * @cmd: the custom ioctl function to call ++ * @arg: additional data to pass to the custom ioctl, typically a user ++ * pointer to a predefined structure ++ * ++ * This works just like the regular cmd and arg fields of an ioctl. ++ */ ++struct ion_custom_data { ++ unsigned int cmd; ++ unsigned long arg; ++}; ++ ++#define MAX_HEAP_NAME 32 ++ ++/** ++ * struct ion_heap_data - data about a heap ++ * @name - first 32 characters of the heap name ++ * @type - heap type ++ * @heap_id - heap id for the heap ++ */ ++struct ion_heap_data { ++ char name[MAX_HEAP_NAME]; ++ __u32 type; ++ __u32 heap_id; ++ __u32 reserved0; ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++/** ++ * struct ion_heap_query - collection of data about all heaps ++ * @cnt - total number of heaps to be copied ++ * @heaps - buffer to copy heap data ++ */ ++struct ion_heap_query { ++ __u32 cnt; /* Total number of heaps to be copied */ ++ __u32 reserved0; /* align to 64bits */ ++ __u64 heaps; /* buffer to be populated */ ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++#define ION_IOC_MAGIC 'I' ++ ++/** ++ * DOC: ION_IOC_ALLOC - allocate memory ++ * ++ * Takes an ion_allocation_data struct and returns it with the handle field ++ * populated with the opaque handle for the allocation. ++ */ ++#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \ ++ struct ion_allocation_data) ++ ++/** ++ * DOC: ION_IOC_FREE - free memory ++ * ++ * Takes an ion_handle_data struct and frees the handle. ++ */ ++#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) ++ ++/** ++ * DOC: ION_IOC_MAP - get a file descriptor to mmap ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be used as an argument to mmap. ++ */ ++#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be passed to another process. The corresponding opaque handle can ++ * be retrieved via ION_IOC_IMPORT. ++ */ ++#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_IMPORT - imports a shared file descriptor ++ * ++ * Takes an ion_fd_data struct with the fd field populated with a valid file ++ * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle ++ * filed set to the corresponding opaque handle. ++ */ ++#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory ++ * ++ * Deprecated in favor of using the dma_buf api's correctly (syncing ++ * will happen automatically when the buffer is mapped to a device). ++ * If necessary should be used after touching a cached buffer from the cpu, ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl ++ * ++ * Takes the argument of the architecture specific ioctl to call and ++ * passes appropriate userdata for that ioctl ++ */ ++#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) ++ ++/** ++ * DOC: ION_IOC_HEAP_QUERY - information about available heaps ++ * ++ * Takes an ion_heap_query structure and populates information about ++ * available Ion heaps. ++ */ ++#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, \ ++ struct ion_heap_query) ++ ++#ifdef CONFIG_AMLOGIC_MODIFY ++/** ++ * DOC: ION_IOC_INVALID_CACHE - invalid cache before ++ * cpu read the memory and after device write the memory. ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_INVALID_CACHE _IOWR(ION_IOC_MAGIC, 9, struct ion_fd_data) ++#endif ++ ++#endif /* _UAPI_LINUX_ION_H */ +diff --git a/src/video/mali-fbdev/mali.h b/src/video/mali-fbdev/mali.h +new file mode 100644 +index 000000000..c7df119d1 +--- /dev/null ++++ b/src/video/mali-fbdev/mali.h +@@ -0,0 +1,59 @@ ++/* ++ * Copyright (C) 2017 João H. All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ */ ++ ++#ifndef __MALI_H__ ++#define __MALI_H__ ++ ++#include ++ ++#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ ++ ((__u32)(c) << 16) | ((__u32)(d) << 24)) ++ ++#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') ++#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') ++ ++ ++#define MALI_ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) ++#define MALI_FORMAT_ARGB8888 (0x10bb60a) ++ ++typedef struct fbdev_window_s ++{ ++ unsigned short width; ++ unsigned short height; ++} fbdev_window_s; ++ ++typedef struct mali_plane { ++ unsigned long stride; ++ unsigned long size; ++ unsigned long offset; ++} mali_plane; ++ ++typedef struct mali_pixmap { ++ int width, height; ++ ++ mali_plane planes[3]; ++ ++ uint64_t format; //see 0x004e3c28... ++ int handles[3]; //seems to just be fds, see 0x004ec14c... ++ struct ++ { ++ uint32_t format; // drm_fourcc ++ uint64_t modifier; // afbc etc ++ uint32_t dataspace; // colorspace definitions e.g. bt709, srgb, etc ++ } drm_fourcc; // apparently an alternative to setting the format field? ++ // set .format = 0 and fill this if available on your blob. ++} mali_pixmap; ++ ++#endif /* __MALI_H__ */ +\ No newline at end of file +-- +2.20.1 + diff --git a/board/batocera/allwinner/h700/patches/sdl2/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch.disabled b/board/batocera/allwinner/h700/patches/sdl2/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch.disabled new file mode 100644 index 00000000000..944fc5c6e97 --- /dev/null +++ b/board/batocera/allwinner/h700/patches/sdl2/0001-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch.disabled @@ -0,0 +1,1757 @@ +From cff95e49a3d6ef5365ce248a3bbfacffe8e88735 Mon Sep 17 00:00:00 2001 +From: JohnnyonFlame +Date: Sat, 27 Apr 2024 03:53:43 -0300 +Subject: [PATCH] mali-fbdev: Implemented MALI Zero-Copy fbdev rotation/scaler. + +--- + src/video/SDL_egl.c | 2 + + src/video/SDL_egl_c.h | 9 +- + src/video/mali-fbdev/SDL_maliblitter.c | 586 ++++++++++++++++++ + src/video/mali-fbdev/SDL_maliblitter.h | 55 ++ + .../mali-fbdev/SDL_maliblitter_egl_funcs.h | 30 + + .../mali-fbdev/SDL_maliblitter_gles_funcs.h | 60 ++ + src/video/mali-fbdev/SDL_maliopengles.c | 52 +- + src/video/mali-fbdev/SDL_maliopengles.h | 3 +- + src/video/mali-fbdev/SDL_malivideo.c | 304 ++++++++- + src/video/mali-fbdev/SDL_malivideo.h | 40 +- + src/video/mali-fbdev/ion.h | 247 ++++++++ + src/video/mali-fbdev/mali.h | 59 ++ + 12 files changed, 1407 insertions(+), 40 deletions(-) + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.c + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h + create mode 100644 src/video/mali-fbdev/ion.h + create mode 100644 src/video/mali-fbdev/mali.h + + +--- a/src/video/mali-fbdev/ion.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/ion.h 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,247 @@ ++/* ++ * drivers/staging/android/uapi/ion.h ++ * ++ * Copyright (C) 2011 Google, Inc. ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#ifndef _UAPI_LINUX_ION_H ++#define _UAPI_LINUX_ION_H ++ ++#define CONFIG_AMLOGIC_MODIFY ++ ++#include ++#include ++ ++typedef int ion_user_handle_t; ++ ++/** ++ * enum ion_heap_types - list of all possible types of heaps ++ * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc ++ * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc ++ * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved ++ * carveout heap, allocations are physically ++ * contiguous ++ * @ION_HEAP_TYPE_DMA: memory allocated via DMA API ++ * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask ++ * is used to identify the heaps, so only 32 ++ * total heap types are supported ++ */ ++enum ion_heap_type { ++ ION_HEAP_TYPE_SYSTEM, ++ ION_HEAP_TYPE_SYSTEM_CONTIG, ++ ION_HEAP_TYPE_CARVEOUT, ++ ION_HEAP_TYPE_CHUNK, ++ ION_HEAP_TYPE_DMA, ++ ION_HEAP_TYPE_CUSTOM, /* ++ * must be last so device specific heaps always ++ * are at the end of this enum ++ */ ++}; ++ ++#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) ++ ++/** ++ * allocation flags - the lower 16 bits are used by core ion, the upper 16 ++ * bits are reserved for use by the heaps themselves. ++ */ ++ ++/* ++ * mappings of this buffer should be cached, ion will do cache maintenance ++ * when the buffer is mapped for dma ++ */ ++#define ION_FLAG_CACHED 1 ++ ++/* ++ * mappings of this buffer will created at mmap time, if this is set ++ * caches must be managed manually ++ */ ++#define ION_FLAG_CACHED_NEEDS_SYNC 2 ++ ++/** ++ * DOC: Ion Userspace API ++ * ++ * create a client by opening /dev/ion ++ * most operations handled via following ioctls ++ * ++ */ ++ ++/** ++ * struct ion_allocation_data - metadata passed from userspace for allocations ++ * @len: size of the allocation ++ * @align: required alignment of the allocation ++ * @heap_id_mask: mask of heap ids to allocate from ++ * @flags: flags passed to heap ++ * @handle: pointer that will be populated with a cookie to use to ++ * refer to this allocation ++ * ++ * Provided by userspace as an argument to the ioctl ++ */ ++struct ion_allocation_data { ++ size_t len; ++ size_t align; ++ unsigned int heap_id_mask; ++ unsigned int flags; ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair ++ * @handle: a handle ++ * @fd: a file descriptor representing that handle ++ * ++ * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with ++ * the handle returned from ion alloc, and the kernel returns the file ++ * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace ++ * provides the file descriptor and the kernel returns the handle. ++ */ ++struct ion_fd_data { ++ ion_user_handle_t handle; ++ int fd; ++}; ++ ++/** ++ * struct ion_handle_data - a handle passed to/from the kernel ++ * @handle: a handle ++ */ ++struct ion_handle_data { ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl ++ * @cmd: the custom ioctl function to call ++ * @arg: additional data to pass to the custom ioctl, typically a user ++ * pointer to a predefined structure ++ * ++ * This works just like the regular cmd and arg fields of an ioctl. ++ */ ++struct ion_custom_data { ++ unsigned int cmd; ++ unsigned long arg; ++}; ++ ++#define MAX_HEAP_NAME 32 ++ ++/** ++ * struct ion_heap_data - data about a heap ++ * @name - first 32 characters of the heap name ++ * @type - heap type ++ * @heap_id - heap id for the heap ++ */ ++struct ion_heap_data { ++ char name[MAX_HEAP_NAME]; ++ __u32 type; ++ __u32 heap_id; ++ __u32 reserved0; ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++/** ++ * struct ion_heap_query - collection of data about all heaps ++ * @cnt - total number of heaps to be copied ++ * @heaps - buffer to copy heap data ++ */ ++struct ion_heap_query { ++ __u32 cnt; /* Total number of heaps to be copied */ ++ __u32 reserved0; /* align to 64bits */ ++ __u64 heaps; /* buffer to be populated */ ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++#define ION_IOC_MAGIC 'I' ++ ++/** ++ * DOC: ION_IOC_ALLOC - allocate memory ++ * ++ * Takes an ion_allocation_data struct and returns it with the handle field ++ * populated with the opaque handle for the allocation. ++ */ ++#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \ ++ struct ion_allocation_data) ++ ++/** ++ * DOC: ION_IOC_FREE - free memory ++ * ++ * Takes an ion_handle_data struct and frees the handle. ++ */ ++#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) ++ ++/** ++ * DOC: ION_IOC_MAP - get a file descriptor to mmap ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be used as an argument to mmap. ++ */ ++#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be passed to another process. The corresponding opaque handle can ++ * be retrieved via ION_IOC_IMPORT. ++ */ ++#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_IMPORT - imports a shared file descriptor ++ * ++ * Takes an ion_fd_data struct with the fd field populated with a valid file ++ * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle ++ * filed set to the corresponding opaque handle. ++ */ ++#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory ++ * ++ * Deprecated in favor of using the dma_buf api's correctly (syncing ++ * will happen automatically when the buffer is mapped to a device). ++ * If necessary should be used after touching a cached buffer from the cpu, ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl ++ * ++ * Takes the argument of the architecture specific ioctl to call and ++ * passes appropriate userdata for that ioctl ++ */ ++#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) ++ ++/** ++ * DOC: ION_IOC_HEAP_QUERY - information about available heaps ++ * ++ * Takes an ion_heap_query structure and populates information about ++ * available Ion heaps. ++ */ ++#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, \ ++ struct ion_heap_query) ++ ++#ifdef CONFIG_AMLOGIC_MODIFY ++/** ++ * DOC: ION_IOC_INVALID_CACHE - invalid cache before ++ * cpu read the memory and after device write the memory. ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_INVALID_CACHE _IOWR(ION_IOC_MAGIC, 9, struct ion_fd_data) ++#endif ++ ++#endif /* _UAPI_LINUX_ION_H */ +--- a/src/video/mali-fbdev/mali.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/mali.h 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,59 @@ ++/* ++ * Copyright (C) 2017 João H. All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ */ ++ ++#ifndef __MALI_H__ ++#define __MALI_H__ ++ ++#include ++ ++#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ ++ ((__u32)(c) << 16) | ((__u32)(d) << 24)) ++ ++#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') ++#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') ++ ++ ++#define MALI_ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) ++#define MALI_FORMAT_ARGB8888 (0x10bb60a) ++ ++typedef struct fbdev_window_s ++{ ++ unsigned short width; ++ unsigned short height; ++} fbdev_window_s; ++ ++typedef struct mali_plane { ++ unsigned long stride; ++ unsigned long size; ++ unsigned long offset; ++} mali_plane; ++ ++typedef struct mali_pixmap { ++ int width, height; ++ ++ mali_plane planes[3]; ++ ++ uint64_t format; //see 0x004e3c28... ++ int handles[3]; //seems to just be fds, see 0x004ec14c... ++ struct ++ { ++ uint32_t format; // drm_fourcc ++ uint64_t modifier; // afbc etc ++ uint32_t dataspace; // colorspace definitions e.g. bt709, srgb, etc ++ } drm_fourcc; // apparently an alternative to setting the format field? ++ // set .format = 0 and fill this if available on your blob. ++} mali_pixmap; ++ ++#endif /* __MALI_H__ */ +\ No newline at end of file +--- a/src/video/mali-fbdev/SDL_maliblitter.c 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliblitter.c 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,592 @@ ++#include "../../SDL_internal.h" ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "SDL.h" ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" ++ ++#define MAX_CONFIGS 128 ++ ++/* used to simplify code */ ++typedef struct mat4 { ++ GLfloat v[16]; ++} mat4; ++ ++static GLchar* blit_vert_fmt = ++"#version 100\n" ++"varying vec2 vTexCoord;\n" ++"attribute vec2 aVertCoord;\n" ++"attribute vec2 aTexCoord;\n" ++"uniform mat4 uProj;\n" ++"uniform vec2 uTexSize;\n" ++"void main() {\n" ++" %s\n" ++" %s\n" ++" gl_Position = uProj * vec4(aVertCoord, 0.0, 1.0);\n" ++"}"; ++ ++static GLchar* blit_frag_standard = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" gl_FragColor = texture2D(uFBOTex, vTexCoord);\n" ++"}\n"; ++ ++// Ported from TheMaister's sharp-bilinear-simple.slang ++static GLchar* blit_frag_bilinear_simple = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 texel_floored = floor(vTexCoord);\n" ++" vec2 s = fract(vTexCoord);\n" ++" vec2 region_range = 0.5 - 0.5 / uScale;\n" ++" vec2 center_dist = s - 0.5;\n" ++" vec2 f = (center_dist - clamp(center_dist, -region_range, region_range)) * uScale + 0.5;\n" ++" vec2 mod_texel = texel_floored + f;\n" ++" gl_FragColor = texture2D(uFBOTex, mod_texel / uTexSize);\n" ++"}\n"; ++ ++// Ported from Iquilez ++static GLchar* blit_frag_quilez = ++"#version 100\n" ++"precision highp float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 p = vTexCoord + 0.5;\n" ++" vec2 i = floor(p);\n" ++" vec2 f = p - i;\n" ++" f = f*f*f*(f*(f*6.0-15.0)+10.0);\n" ++" p = i + f;\n" ++" p = (p - 0.5)/uTexSize;\n" ++" gl_FragColor = texture2D( uFBOTex, p );\n" ++"}\n"; ++ ++int MALI_Blitter_CreateContext(_THIS, MALI_Blitter *blitter, NativeWindowType nw) ++{ ++ /* max 14 values plus terminator. */ ++ EGLint screen_attribs[] = { ++ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, ++ EGL_SURFACE_TYPE, EGL_WINDOW_BIT, ++ EGL_RED_SIZE, 8, ++ EGL_GREEN_SIZE, 8, ++ EGL_BLUE_SIZE, 8, ++ EGL_ALPHA_SIZE, 8, ++ EGL_DEPTH_SIZE, 0, ++ EGL_STENCIL_SIZE, 0, ++ EGL_NONE ++ }; ++ ++ EGLint window_attribs[] = { ++ EGL_NONE, ++ }; ++ ++ EGLint context_attribs[] = { ++ EGL_CONTEXT_CLIENT_VERSION, 2, ++ EGL_NONE ++ }; ++ ++ EGLConfig configs[MAX_CONFIGS]; ++ EGLint config_chosen, config_count; ++ ++ if (!_this->egl_data) { ++ SDL_SetError("EGL not initialized"); ++ return 0; ++ } ++ ++ blitter->egl_display = _this->egl_data->egl_display; ++ if (blitter->eglGetConfigs(blitter->egl_display, configs, MAX_CONFIGS, &config_count) == EGL_FALSE) { ++ SDL_EGL_SetError("mali-fbdev: No compatible EGL configs", "eglGetConfigs"); ++ return 0; ++ } ++ ++ if (!blitter->eglChooseConfig(blitter->egl_display, screen_attribs, configs, MAX_CONFIGS, &config_chosen)) ++ { ++ SDL_EGL_SetError("mali-fbdev: Failed to choose an EGL config", "eglChooseConfig"); ++ return 0; ++ } ++ ++ blitter->gl_context = blitter->eglCreateContext(blitter->egl_display, ++ configs[0], ++ EGL_NO_CONTEXT, context_attribs); ++ if (blitter->gl_context == EGL_NO_CONTEXT) { ++ SDL_EGL_SetError("mali-fbdev: Could not create EGL context", "eglCreateContext"); ++ return 0; ++ } ++ ++ blitter->egl_surface = blitter->eglCreateWindowSurface(blitter->egl_display, configs[0], nw, window_attribs); ++ if (blitter->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: failed to create window surface", "eglCreateContext"); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static void ++get_aspect_correct_coords(int viewport[2], int plane[2], int rotation, GLfloat vert[4][4], GLfloat scale[2]) ++{ ++ /* FIXME: Sorry for the spaghetti! */ ++ float aspect_plane, aspect_viewport, ratio_x, ratio_y; ++ int shift_x, shift_y, temp; ++ ++ // when sideways, invert plane coords ++ if (rotation & 1) { ++ temp = plane[0]; ++ plane[0] = plane[1]; ++ plane[1] = temp; ++ } ++ ++ // Choose which edge to touch ++ aspect_plane = (float)plane[0] / plane[1]; ++ aspect_viewport = (float)viewport[0] / viewport[1]; ++ ++ if (aspect_viewport > aspect_plane) { ++ // viewport wider than plane ++ ratio_x = plane[0] * (float)((float)viewport[1] / plane[1]); ++ ratio_y = viewport[1]; ++ shift_x = (viewport[0] - ratio_x) / 2.0f; ++ shift_y = 0; ++ } else { ++ // plane wider than viewport ++ ratio_x = viewport[0]; ++ ratio_y = plane[1] * (float)((float)viewport[0] / plane[0]); ++ shift_x = 0; ++ shift_y = (viewport[1] - ratio_y) / 2.0f; ++ } ++ ++ // Instead of normalized UVs, use full texture size. ++ vert[0][2] = (int)(0.0f * plane[0]); vert[0][3] = (int)(0.0f * plane[1]); ++ vert[1][2] = (int)(0.0f * plane[0]); vert[1][3] = (int)(1.0f * plane[1]); ++ vert[2][2] = (int)(1.0f * plane[0]); vert[2][3] = (int)(0.0f * plane[1]); ++ vert[3][2] = (int)(1.0f * plane[0]); vert[3][3] = (int)(1.0f * plane[1]); ++ ++ // Get aspect corrected sizes within pixel boundaries ++ vert[0][0] = (int)(0.0f * ratio_x) + shift_x; vert[0][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[1][0] = (int)(0.0f * ratio_x) + shift_x; vert[1][1] = (int)(1.0f * ratio_y) + shift_y; ++ vert[2][0] = (int)(1.0f * ratio_x) + shift_x; vert[2][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[3][0] = (int)(1.0f * ratio_x) + shift_x; vert[3][1] = (int)(1.0f * ratio_y) + shift_y; ++ ++ // Get scale, for filtering. ++ scale[0] = ratio_x / plane[0]; ++ scale[1] = ratio_y / plane[1]; ++} ++ ++static ++void mat_ortho(float left, float right, float bottom, float top, float Result[4][4]) ++{ ++ *(mat4*)Result = (mat4){{[0 ... 15] = 0}}; ++ Result[0][0] = 2.0f / (right - left); ++ Result[1][1] = 2.0f / (top - bottom); ++ Result[2][2] = -1.0f; ++ Result[3][0] = - (right + left) / (right - left); ++ Result[3][1] = - (top + bottom) / (top - bottom); ++ Result[3][3] = 1.0f; ++} ++ ++static void ++MALI_Blitter_GetTexture(_THIS, MALI_Blitter *blitter, MALI_EGL_Surface *surf) ++{ ++ /* Define attributes of the EGLImage that will import our dmabuf file descriptor */ ++ EGLint attribute_list[] = { ++ EGL_WIDTH, blitter->plane_width, ++ EGL_HEIGHT, blitter->plane_height, ++ EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_XRGB8888, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, blitter->plane_pitch, ++ EGL_DMA_BUF_PLANE0_FD_EXT, surf->dmabuf_fd, ++ EGL_NONE ++ }; ++ ++ /* Now create the EGLImage object. */ ++ surf->egl_image = blitter->eglCreateImageKHR(blitter->egl_display, ++ EGL_NO_CONTEXT, ++ EGL_LINUX_DMA_BUF_EXT, ++ (EGLClientBuffer)NULL, ++ attribute_list); ++ if (surf->egl_image == EGL_NO_IMAGE_KHR) { ++ SDL_EGL_SetError("Failed to create Blitter EGL Image", "eglCreateImageKHR"); ++ return; ++ } ++ ++ /* Create a texture to host our image */ ++ blitter->glGenTextures(1, &surf->texture); ++ blitter->glActiveTexture(GL_TEXTURE0); ++ blitter->glBindTexture(GL_TEXTURE_2D, surf->texture); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); ++ if (blitter->scaler > 0) { ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ } else { ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); ++ } ++ ++ /* And populate our texture with the EGLImage */ ++ blitter->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, surf->egl_image); ++} ++ ++int ++MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation) ++{ ++ char *use_hq_scaler; ++ GLchar msg[2048] = {}, blit_vert[2048] = {}; ++ const GLchar *sources[2] = { blit_vert, blit_frag_standard }; ++ float scale[2]; ++ ++ /* ++ * SDL_HQ_SCALER: Selects one of the available scalers: ++ * - 0: Nearest filtering ++ * - 1: Linear filtering ++ * - 2: Sharp Bilinear Simple ++ * - 3: Quilez ++ */ ++ blitter->scaler = 0; ++ if ((use_hq_scaler = SDL_getenv("SDL_HQ_SCALER")) != NULL && *use_hq_scaler != '0') { ++ switch (*use_hq_scaler) { ++ case '0': blitter->scaler = 0; sources[1] = blit_frag_standard; break; ++ case '1': blitter->scaler = 1; sources[1] = blit_frag_standard; break; ++ case '2': blitter->scaler = 2; sources[1] = blit_frag_bilinear_simple; break; ++ case '3': blitter->scaler = 3; sources[1] = blit_frag_quilez; break; ++ } ++ } ++ ++ /* Bail out early if we're already initialized. */ ++ if (blitter->initted) { ++ return 1; ++ } ++ ++ /* The blitter thread needs to have an OpenGL ES 2.0 context available! */ ++ if (!MALI_Blitter_CreateContext(_this, blitter, nw)) { ++ return 0; ++ } ++ ++ if (!blitter->eglMakeCurrent(blitter->egl_display, ++ blitter->egl_surface, ++ blitter->egl_surface, ++ blitter->gl_context)) ++ { ++ SDL_EGL_SetError("Unable to make blitter EGL context current", "eglMakeCurrent"); ++ return 0; ++ } ++ ++ /* Setup vertex shader coord orientation */ ++ SDL_snprintf(blit_vert, sizeof(blit_vert), blit_vert_fmt, ++ /* rotation */ ++ (rotation == 0) ? "vTexCoord = aTexCoord;" : ++ (rotation == 1) ? "vTexCoord = vec2(aTexCoord.y, -aTexCoord.x);" : ++ (rotation == 2) ? "vTexCoord = vec2(-aTexCoord.x, -aTexCoord.y);" : ++ (rotation == 3) ? "vTexCoord = vec2(-aTexCoord.y, aTexCoord.x);" : ++ "#error Orientation out of scope", ++ /* scalers */ ++ (blitter->scaler >= 2) ? "vTexCoord = vTexCoord;" ++ : "vTexCoord = vTexCoord / uTexSize;"); ++ ++ /* Compile vertex shader */ ++ blitter->vert = blitter->glCreateShader(GL_VERTEX_SHADER); ++ blitter->glShaderSource(blitter->vert, 1, &sources[0], NULL); ++ blitter->glCompileShader(blitter->vert); ++ blitter->glGetShaderInfoLog(blitter->vert, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Vertex Shader Info: %s\n", msg); ++ ++ /* Compile the fragment shader */ ++ blitter->frag = blitter->glCreateShader(GL_FRAGMENT_SHADER); ++ blitter->glShaderSource(blitter->frag, 1, &sources[1], NULL); ++ blitter->glCompileShader(blitter->frag); ++ blitter->glGetShaderInfoLog(blitter->frag, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Fragment Shader Info: %s\n", msg); ++ ++ blitter->prog = blitter->glCreateProgram(); ++ blitter->glAttachShader(blitter->prog, blitter->vert); ++ blitter->glAttachShader(blitter->prog, blitter->frag); ++ ++ blitter->glLinkProgram(blitter->prog); ++ blitter->loc_aVertCoord = blitter->glGetAttribLocation(blitter->prog, "aVertCoord"); ++ blitter->loc_aTexCoord = blitter->glGetAttribLocation(blitter->prog, "aTexCoord"); ++ blitter->loc_uFBOtex = blitter->glGetUniformLocation(blitter->prog, "uFBOTex"); ++ blitter->loc_uProj = blitter->glGetUniformLocation(blitter->prog, "uProj"); ++ blitter->loc_uTexSize = blitter->glGetUniformLocation(blitter->prog, "uTexSize"); ++ blitter->loc_uScale = blitter->glGetUniformLocation(blitter->prog, "uScale"); ++ ++ blitter->glGetProgramInfoLog(blitter->prog, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Program Info: %s\n", msg); ++ ++ /* Setup programs */ ++ blitter->glUseProgram(blitter->prog); ++ blitter->glUniform1i(blitter->loc_uFBOtex, 0); ++ ++ /* Prepare projection and aspect corrected bounds */ ++ mat_ortho(0, blitter->viewport_width, 0, blitter->viewport_height, blitter->mat_projection); ++ get_aspect_correct_coords( ++ (int [2]){blitter->viewport_width, blitter->viewport_height}, ++ (int [2]){blitter->plane_width, blitter->plane_height}, ++ rotation, ++ blitter->vert_buffer_data, ++ scale ++ ); ++ ++ /* Setup viewport, projection, scale, texture size */ ++ blitter->glViewport(0, 0, blitter->viewport_width, blitter->viewport_height); ++ blitter->glUniformMatrix4fv(blitter->loc_uProj, 1, 0, (GLfloat*)blitter->mat_projection); ++ blitter->glUniform2f(blitter->loc_uScale, scale[0], scale[1]); ++ blitter->glUniform2f(blitter->loc_uTexSize, blitter->plane_width, blitter->plane_height); ++ ++ /* Generate buffers */ ++ blitter->glGenBuffers(1, &blitter->vbo); ++ blitter->glGenVertexArraysOES(1, &blitter->vao); ++ ++ /* Populate buffers */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindBuffer(GL_ARRAY_BUFFER, blitter->vbo); ++ blitter->glEnableVertexAttribArray(blitter->loc_aVertCoord); ++ blitter->glEnableVertexAttribArray(blitter->loc_aTexCoord); ++ blitter->glVertexAttribPointer(blitter->loc_aVertCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(0 * sizeof(float))); ++ blitter->glVertexAttribPointer(blitter->loc_aTexCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(2 * sizeof(float))); ++ blitter->glBufferData(GL_ARRAY_BUFFER, sizeof(blitter->vert_buffer_data), blitter->vert_buffer_data, GL_STATIC_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(windata->surface); i++) { ++ MALI_Blitter_GetTexture(_this, blitter, &windata->surface[i]); ++ } ++ ++ blitter->initted = 1; ++ return 1; ++} ++ ++void ++MALI_DeinitBlitterContext(_THIS, MALI_Blitter *blitter) ++{ ++ int i; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ ++ /* Delete all texture and related egl objects */ ++ if (blitter->window) { ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ ++ blitter->glBindTexture(GL_TEXTURE_2D, 0); ++ for (i = 0; i < SDL_arraysize(windata->surface); i++) { ++ blitter->glDeleteTextures(1, &windata->surface[i].texture); ++ blitter->eglDestroyImageKHR(blitter->egl_display, windata->surface[i].egl_image); ++ } ++ } ++ ++ /* Tear down egl */ ++ blitter->eglMakeCurrent(blitter->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ++ blitter->eglDestroySurface(blitter->egl_display, blitter->egl_surface); ++ blitter->eglDestroyContext(blitter->egl_display, blitter->gl_context); ++ blitter->eglReleaseThread(); ++ ++ blitter->window = NULL; ++ blitter->initted = 0; ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_BlitterThread: Released thread.\n"); ++} ++ ++void ++MALI_Blitter_Blit(_THIS, MALI_Blitter *blitter, GLuint texture) ++{ ++ /* Simple quad rendering. */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindTexture(GL_TEXTURE_2D, texture); ++ blitter->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); ++} ++ ++static void MALI_Blitter_LoadFuncs(MALI_Blitter *blitter) ++{ ++ int fail = 0; ++ blitter->egl_obj = SDL_LoadObject("libEGL.so"); ++ blitter->gles2_obj = SDL_LoadObject("libGLESv2.so"); ++ if (!blitter->egl_obj || !blitter->gles2_obj) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading one or more dynamic libraries (%p %p).", blitter->gles2_obj, blitter->egl_obj); ++ SDL_Quit(); ++ } ++ ++ if ((blitter->eglGetProcAddress = SDL_LoadFunction(blitter->egl_obj, "eglGetProcAddress")) == NULL) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not locate eglGetProcAddress."); ++ SDL_Quit(); ++ } ++ ++ /* Attempt to initialize necessary functions */ ++ #define SDL_PROC(ret,func,params) \ ++ blitter->func = blitter->eglGetProcAddress(#func); \ ++ if (blitter->func == NULL) \ ++ blitter->func = SDL_LoadFunction(blitter->egl_obj, #func); \ ++ if (blitter->func == NULL) \ ++ { \ ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading \"%s\".", #func); \ ++ fail = 1; \ ++ } ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++ ++ if (fail) { ++ SDL_Quit(); ++ } ++} ++ ++int MALI_BlitterThread(void *data) ++{ ++ int prevSwapInterval = -1; ++ MALI_Blitter *blitter = (MALI_Blitter*)data; ++ _THIS = blitter->_this; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ SDL_VideoDisplay *display; ++ SDL_DisplayData *dispdata = SDL_GetDisplayDriverData(0); ++ unsigned int page; ++ MALI_EGL_Surface *current_surface; ++ ++ MALI_Blitter_LoadFuncs(blitter); ++ ++ /* Signal triplebuf available */ ++ SDL_LockMutex(blitter->mutex); ++ SDL_CondSignal(blitter->cond); ++ ++ for (;;) { ++ SDL_CondWait(blitter->cond, blitter->mutex); ++ ++ // A thread stop can be either due to reconfigure requested, or due to ++ // SDL teardown, in both cases, we will destroy some resources. ++ if (blitter->thread_stop != 0) { ++ if (blitter->initted) { ++ MALI_DeinitBlitterContext(_this, blitter); ++ } ++ ++ // Signal 2 means we want to quit. ++ if (blitter->thread_stop == 2) { ++ break; ++ } ++ ++ blitter->thread_stop = 0; ++ continue; ++ } ++ ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ display = SDL_GetDisplayForWindow(window); ++ dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ /* Initialize blitter on the first out frame we have */ ++ if (!MALI_InitBlitterContext(_this, blitter, windata, (NativeWindowType)&dispdata->native_display, blitter->rotation)) ++ { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed to initialize blitter thread"); ++ SDL_Quit(); ++ } ++ ++ if (prevSwapInterval != _this->egl_data->egl_swapinterval) { ++ blitter->eglSwapInterval(blitter->egl_display, _this->egl_data->egl_swapinterval); ++ prevSwapInterval = _this->egl_data->egl_swapinterval; ++ } ++ ++ /* Flip the most recent back buffer with the front buffer */ ++ page = windata->queued_buffer; ++ windata->queued_buffer = windata->front_buffer; ++ windata->front_buffer = page; ++ ++ /* select surface to wait and blit */ ++ current_surface = &windata->surface[windata->queued_buffer]; ++ ++ /* wait for fence and flip display */ ++ if (blitter->eglClientWaitSyncKHR( ++ blitter->egl_display, ++ current_surface->egl_fence, ++ EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, ++ EGL_FOREVER_NV)) ++ { ++ /* Discarding previous data... */ ++ blitter->glClear(GL_COLOR_BUFFER_BIT); ++ blitter->glClearColor(0.0, 0.0, 0.0, 1.0); ++ ++ /* Perform blitting */ ++ MALI_Blitter_Blit(_this, blitter, current_surface->texture); ++ ++ /* Perform the final buffer swap. */ ++ if (!(blitter->eglSwapBuffers(blitter->egl_display, blitter->egl_surface))) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "eglSwapBuffers failed"); ++ return 0; ++ } ++ } ++ else ++ { ++ SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Sync %p failed.", current_surface->egl_fence); ++ } ++ } ++ ++ /* Signal thread done */ ++ SDL_UnlockMutex(blitter->mutex); ++ return 0; ++} ++ ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter) ++{ ++ if (!blitter) ++ return; ++ ++ blitter->thread_stop = 1; ++ blitter->mutex = SDL_CreateMutex(); ++ blitter->cond = SDL_CreateCond(); ++ blitter->thread = SDL_CreateThread(MALI_BlitterThread, "MALI_BlitterThread", blitter); ++} ++ ++void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter) ++{ ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); ++ SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ if (!blitter) ++ return; ++ ++ /* Flag a reconfigure request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->window = window; ++ blitter->egl_display = _this->egl_data->egl_display; ++ blitter->viewport_width = dispdata->native_display.width, ++ blitter->viewport_height = dispdata->native_display.height, ++ blitter->plane_width = window->w; ++ blitter->plane_height = window->h; ++ blitter->plane_pitch = dispdata->stride; ++ blitter->rotation = dispdata->rotation; ++ blitter->thread_stop = 1; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++} ++ ++void MALI_BlitterQuit(MALI_Blitter *blitter) ++{ ++ if (blitter == NULL) ++ return; ++ ++ /* Flag a stop request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->thread_stop = 2; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ /* Wait and perform teardown */ ++ SDL_WaitThread(blitter->thread, NULL); ++ blitter->thread = NULL; ++ SDL_DestroyMutex(blitter->mutex); ++ SDL_DestroyCond(blitter->cond); ++} ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ +\ No newline at end of file +--- a/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,30 @@ ++SDL_PROC(EGLDisplay, eglGetDisplay, (NativeDisplayType display)); ++SDL_PROC(EGLDisplay, eglGetPlatformDisplayEXT, (EGLenum platform, void *native_display, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint * major, EGLint * minor)); ++SDL_PROC(EGLBoolean, eglTerminate, (EGLDisplay dpy)); ++SDL_PROC(void *, eglGetProcAddress, (const char * procName)); ++SDL_PROC(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLBoolean, eglChooseConfig, (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyContext, (EGLDisplay dpy, EGLContext ctx)); ++SDL_PROC(EGLImageKHR, eglCreateImageKHR, (EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy, EGLImageKHR image)); ++SDL_PROC(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint * attrib_list)); ++SDL_PROC(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy, EGLConfig config, EGLint const* attrib_list)); ++SDL_PROC(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySurface, (EGLDisplay dpy, EGLSurface surface)); ++SDL_PROC(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)); ++SDL_PROC(EGLBoolean, eglSwapBuffers, (EGLDisplay dpy, EGLSurface draw)); ++SDL_PROC(EGLBoolean, eglSwapInterval, (EGLDisplay dpy, EGLint interval)); ++SDL_PROC(const char *, eglQueryString, (EGLDisplay dpy, EGLint name)); ++SDL_PROC(EGLenum, eglQueryAPI, (void)); ++SDL_PROC(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value)); ++SDL_PROC(EGLBoolean, eglWaitNative, (EGLint engine)); ++SDL_PROC(EGLBoolean, eglWaitGL, (void)); ++SDL_PROC(EGLBoolean, eglReleaseThread, (void)); ++SDL_PROC(EGLBoolean, eglBindAPI, (EGLenum)); ++SDL_PROC(EGLint, eglGetError, (void)); ++SDL_PROC(EGLSyncKHR, eglCreateSyncKHR, (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySyncKHR, (EGLDisplay dpy, EGLSyncKHR sync)); ++//SDL_PROC(EGLint, eglWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)); ++SDL_PROC(EGLint, eglClientWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)); +--- a/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,60 @@ ++SDL_PROC(void, glActiveTexture, (GLenum)) ++SDL_PROC(void, glAttachShader, (GLuint, GLuint)) ++// SDL_PROC(void, glBindAttribLocation, (GLuint, GLuint, const char *)) ++SDL_PROC(void, glBindTexture, (GLenum, GLuint)) ++// SDL_PROC(void, glBlendEquationSeparate, (GLenum, GLenum)) ++// SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum)) ++SDL_PROC(void, glClear, (GLbitfield)) ++SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf)) ++SDL_PROC(void, glCompileShader, (GLuint)) ++SDL_PROC(GLuint, glCreateProgram, (void)) ++SDL_PROC(GLuint, glCreateShader, (GLenum)) ++SDL_PROC(void, glDeleteProgram, (GLuint)) ++SDL_PROC(void, glDeleteShader, (GLuint)) ++SDL_PROC(void, glDeleteTextures, (GLsizei, const GLuint *)) ++SDL_PROC(void, glDisable, (GLenum)) ++SDL_PROC(void, glDisableVertexAttribArray, (GLuint)) ++SDL_PROC(void, glDrawArrays, (GLenum, GLint, GLsizei)) ++SDL_PROC(void, glEnable, (GLenum)) ++SDL_PROC(void, glEnableVertexAttribArray, (GLuint)) ++// SDL_PROC(void, glFinish, (void)) ++// SDL_PROC(void, glGenFramebuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glGenTextures, (GLsizei, GLuint *)) ++// SDL_PROC(const GLubyte *, glGetString, (GLenum)) ++SDL_PROC(GLenum, glGetError, (void)) ++// SDL_PROC(void, glGetIntegerv, (GLenum, GLint *)) ++// SDL_PROC(void, glGetProgramiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(void, glGetShaderInfoLog, (GLuint, GLsizei, GLsizei *, char *)) ++// SDL_PROC(void, glGetShaderiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(GLint, glGetUniformLocation, (GLuint, const char *)) ++SDL_PROC(void, glLinkProgram, (GLuint)) ++// SDL_PROC(void, glPixelStorei, (GLenum, GLint)) ++// SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) ++// SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei)) ++SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *)) ++// SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)) ++SDL_PROC(void, glTexParameteri, (GLenum, GLenum, GLint)) ++// SDL_PROC(void, glTexSubImage2D, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) ++SDL_PROC(void, glUniform1i, (GLint, GLint)) ++// SDL_PROC(void, glUniform4f, (GLint, GLfloat, GLfloat, GLfloat, GLfloat)) ++SDL_PROC(void, glUniform2f, (GLint, GLfloat, GLfloat)) ++SDL_PROC(void, glUniformMatrix4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) ++SDL_PROC(void, glUseProgram, (GLuint)) ++SDL_PROC(void, glVertexAttribPointer, (GLuint, GLint, GLenum, GLboolean, GLsizei, const void *)) ++SDL_PROC(void, glViewport, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glBindFramebuffer, (GLenum, GLuint)) ++// SDL_PROC(void, glFramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) ++// SDL_PROC(GLenum, glCheckFramebufferStatus, (GLenum)) ++// SDL_PROC(void, glDeleteFramebuffers, (GLsizei, const GLuint *)) ++SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *)) ++SDL_PROC(void, glGetProgramInfoLog, (GLuint, GLsizei, GLsizei*, GLchar*)) ++SDL_PROC(void, glGenBuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glDeleteBuffers, (GLsizei, const GLuint *)) ++SDL_PROC(void, glBindBuffer, (GLenum, GLuint)) ++SDL_PROC(void, glBufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum)) ++// SDL_PROC(void, glBufferSubData, (GLenum, GLintptr, GLsizeiptr, const GLvoid *)) ++SDL_PROC(void, glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image)) ++SDL_PROC(void, glBindVertexArrayOES, (GLuint array)) ++SDL_PROC(void, glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays)) ++SDL_PROC(void, glGenVertexArraysOES, (GLsizei n, GLuint *arrays)) +--- a/src/video/mali-fbdev/SDL_maliblitter.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliblitter.h 2024-04-28 18:56:15.482396285 +0000 +@@ -0,0 +1,56 @@ ++#include "../../SDL_internal.h" ++ ++#ifndef _SDL_maliblitter_h ++#define _SDL_maliblitter_h ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "../SDL_sysvideo.h" ++#include "../SDL_egl_c.h" ++ ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++typedef struct MALI_Blitter { ++ /* OpenGL Surface and Context */ ++ _THIS; ++ void *gles2_obj, *egl_obj; ++ EGLSurface *egl_surface; ++ EGLDisplay *egl_display; ++ SDL_GLContext *gl_context; ++ SDL_Window *window; ++ EGLConfig config; ++ GLuint frag, vert, prog, vbo, vao; ++ GLint loc_aVertCoord, loc_aTexCoord, loc_uFBOtex, loc_uProj, loc_uTexSize, loc_uScale; ++ GLsizei viewport_width, viewport_height; ++ GLint plane_width, plane_height, plane_pitch; ++ float mat_projection[4][4]; ++ float vert_buffer_data[4][4]; ++ ++ // Triple buffering thread ++ SDL_mutex *mutex; ++ SDL_cond *cond; ++ SDL_Thread *thread; ++ int thread_stop; ++ int rotation; ++ int next; ++ int scaler; ++ int initted; ++ ++ void *user_data; ++ ++ #define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++} MALI_Blitter; ++ ++extern int MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation); ++extern int MALI_BlitterThread(void *data); ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter); ++extern void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter); ++extern void MALI_BlitterQuit(MALI_Blitter *blitter); ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ ++ ++#endif /* _SDL_maliblitter_h */ +--- a/src/video/mali-fbdev/SDL_maliopengles.c 2024-04-28 18:59:25.829964201 +0000 ++++ b/src/video/mali-fbdev/SDL_maliopengles.c 2024-04-28 18:58:04.502153061 +0000 +@@ -22,20 +22,64 @@ + + #if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL + +-#include "SDL_maliopengles.h" + #include "SDL_malivideo.h" ++#include "SDL_maliopengles.h" ++#include "SDL_maliblitter.h" + + /* EGL implementation of SDL OpenGL support */ ++void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) ++{ ++ /* if SDL was _also_ built with the Raspberry Pi driver (so we're ++ definitely a Pi device), default to GLES2. */ ++ *mask = SDL_GL_CONTEXT_PROFILE_ES; ++ *major = 2; ++ *minor = 0; ++} + + int + MALI_GLES_LoadLibrary(_THIS, const char *path) + { +- return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0); ++ /* Delay loading this until the very end. */ ++ return 0; ++} ++ ++int MALI_GLES_SwapWindow(_THIS, SDL_Window * window) ++{ ++ int r; ++ unsigned int prev; ++ EGLSurface surf; ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0); ++ MALI_Blitter *blitter = displaydata->blitter; ++ ++ if (blitter == NULL) ++ return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); ++ ++ windowdata = (SDL_WindowData*)_this->windows->driverdata; ++ ++ SDL_LockMutex(blitter->mutex); ++ ++ // First create the necessary fence ++ windowdata->surface[windowdata->back_buffer].egl_fence = _this->egl_data->eglCreateSyncKHR(_this->egl_data->egl_display, EGL_SYNC_FENCE_KHR, NULL); ++ ++ // Flip back and front buffers ++ prev = windowdata->front_buffer; ++ windowdata->front_buffer = windowdata->back_buffer; ++ windowdata->back_buffer = prev; ++ ++ // Done, update back buffer surfaces ++ surf = windowdata->surface[windowdata->back_buffer].egl_surface; ++ windowdata->egl_surface = surf; ++ r = _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, surf, surf, _this->current_glctx); ++ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ return (r == EGL_TRUE) ? 0 : SDL_EGL_SetError("Failed to set current surface.", "eglMakeCurrent"); + } + +-SDL_EGL_CreateContext_impl(MALI) +-SDL_EGL_SwapWindow_impl(MALI) + SDL_EGL_MakeCurrent_impl(MALI) ++SDL_EGL_CreateContext_impl(MALI) + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +--- a/src/video/mali-fbdev/SDL_maliopengles.h 2024-04-28 18:59:25.829964201 +0000 ++++ b/src/video/mali-fbdev/SDL_maliopengles.h 2024-04-28 18:58:14.542130069 +0000 +@@ -32,14 +32,13 @@ + #define MALI_GLES_GetAttribute SDL_EGL_GetAttribute + #define MALI_GLES_GetProcAddress SDL_EGL_GetProcAddress + #define MALI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary +-#define MALI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval +-#define MALI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval + #define MALI_GLES_DeleteContext SDL_EGL_DeleteContext + + extern int MALI_GLES_LoadLibrary(_THIS, const char *path); + extern SDL_GLContext MALI_GLES_CreateContext(_THIS, SDL_Window * window); + extern int MALI_GLES_SwapWindow(_THIS, SDL_Window * window); + extern int MALI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); ++extern void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor); + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +--- a/src/video/mali-fbdev/SDL_malivideo.c 2024-04-28 18:59:25.829964201 +0000 ++++ b/src/video/mali-fbdev/SDL_malivideo.c 2024-04-28 18:56:15.482396285 +0000 +@@ -23,19 +23,21 @@ + #if SDL_VIDEO_DRIVER_MALI + + /* SDL internals */ ++#include "../../events/SDL_events_c.h" + #include "../SDL_sysvideo.h" +-#include "SDL_version.h" +-#include "SDL_syswm.h" +-#include "SDL_loadso.h" + #include "SDL_events.h" +-#include "../../events/SDL_events_c.h" ++#include "SDL_loadso.h" ++#include "SDL_syswm.h" ++#include "SDL_hints.h" ++#include "SDL_version.h" + + #ifdef SDL_INPUT_LINUXEV + #include "../../core/linux/SDL_evdev.h" + #endif + +-#include "SDL_malivideo.h" + #include "SDL_maliopengles.h" ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" + + + //static int +@@ -59,7 +61,7 @@ + SDL_VideoDevice *device; + + /* Initialize SDL_VideoDevice structure */ +- device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); ++ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { + SDL_OutOfMemory(); + return NULL; +@@ -82,6 +84,7 @@ + device->SetWindowTitle = MALI_SetWindowTitle; + device->SetWindowPosition = MALI_SetWindowPosition; + device->SetWindowSize = MALI_SetWindowSize; ++ device->SetWindowFullscreen = MALI_SetWindowFullscreen; + device->ShowWindow = MALI_ShowWindow; + device->HideWindow = MALI_HideWindow; + device->DestroyWindow = MALI_DestroyWindow; +@@ -96,6 +99,7 @@ + device->GL_GetSwapInterval = MALI_GLES_GetSwapInterval; + device->GL_SwapWindow = MALI_GLES_SwapWindow; + device->GL_DeleteContext = MALI_GLES_DeleteContext; ++ device->GL_DefaultProfileConfig = MALI_GLES_DefaultProfileConfig; + + device->PumpEvents = MALI_PumpEvents; + +@@ -105,7 +109,7 @@ + VideoBootStrap MALI_bootstrap = { + "mali", + "Mali EGL Video Driver", +-// MALI_Available, ++ // MALI_Available, + MALI_Create + }; + +@@ -116,6 +120,7 @@ + int + MALI_VideoInit(_THIS) + { ++ const char *blitter_status = NULL, *rotation = NULL; + SDL_VideoDisplay display; + SDL_DisplayMode current_mode; + SDL_DisplayData *data; +@@ -132,6 +137,11 @@ + return SDL_SetError("mali-fbdev: Could not open framebuffer device"); + } + ++ data->ion_fd = open("/dev/ion", O_RDWR, 0); ++ if (data->ion_fd < 0) { ++ return SDL_SetError("mali-fbdev: Could not open ion device"); ++ } ++ + if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) { + MALI_VideoQuit(_this); + return SDL_SetError("mali-fbdev: Could not get framebuffer information"); +@@ -140,18 +150,41 @@ + /* + vinfo.yres_virtual = vinfo.yres * 3; + if (ioctl(fd, FBIOPUT_VSCREENINFO, vinfo) == -1) { +- printf("mali-fbdev: Error setting VSCREENINFO\n"); ++ printf("mali-fbdev: Error setting VSCREENINFO\n"); + } + */ + close(fd); +-// system("setterm -cursor off"); ++ // system("setterm -cursor off"); + + data->native_display.width = vinfo.xres; + data->native_display.height = vinfo.yres; + ++ /* If the device seems to be portrait mode, set default as rotated. */ ++ data->rotation = (vinfo.xres < vinfo.yres) ? 1 : 0; ++ ++ rotation = SDL_GetHint("SDL_ROTATION"); ++ blitter_status = SDL_GetHint("SDL_BLITTER_DISABLED"); ++ if (rotation != NULL) ++ data->rotation = SDL_atoi(rotation); ++ ++ if (!blitter_status || blitter_status[0] != '1') { ++ data->blitter = SDL_calloc(1, sizeof(MALI_Blitter)); ++ data->blitter->_this = _this; ++ MALI_BlitterInit(_this, data->blitter); ++ } else { ++ data->blitter = NULL; ++ data->rotation = 0; // no rotation when the blitter is off! ++ } ++ + SDL_zero(current_mode); +- current_mode.w = vinfo.xres; +- current_mode.h = vinfo.yres; ++ /* Flip the reported dimensions when rotated. */ ++ if ((data->rotation & 1) == 0) { ++ current_mode.w = vinfo.xres; ++ current_mode.h = vinfo.yres; ++ } else { ++ current_mode.w = vinfo.yres; ++ current_mode.h = vinfo.xres; ++ } + /* FIXME: Is there a way to tell the actual refresh rate? */ + current_mode.refresh_rate = 60; + /* 32 bpp for default */ +@@ -166,7 +199,6 @@ + display.driverdata = data; + + SDL_AddVideoDisplay(&display, SDL_FALSE); +- + #ifdef SDL_INPUT_LINUXEV + if (SDL_EVDEV_Init() < 0) { + return -1; +@@ -180,11 +212,11 @@ + MALI_VideoQuit(_THIS) + { + /* Clear the framebuffer and ser cursor on again */ +-// int fd = open("/dev/tty", O_RDWR); +-// ioctl(fd, VT_ACTIVATE, 5); +-// ioctl(fd, VT_ACTIVATE, 1); +-// close(fd); +-// system("setterm -cursor on"); ++ // int fd = open("/dev/tty", O_RDWR); ++ // ioctl(fd, VT_ACTIVATE, 5); ++ // ioctl(fd, VT_ACTIVATE, 1); ++ // close(fd); ++ // system("setterm -cursor on"); + + #ifdef SDL_INPUT_LINUXEV + SDL_EVDEV_Quit(); +@@ -205,33 +237,201 @@ + return 0; + } + ++static EGLSurface * ++MALI_EGL_InitPixmapSurfaces(_THIS, int width, int height, SDL_WindowData *windowdata, SDL_DisplayData *displaydata) ++{ ++ struct ion_fd_data ion_data; ++ struct ion_allocation_data allocation_data; ++ int i, io; ++ ++ _this->egl_data->egl_surfacetype = EGL_PIXMAP_BIT; ++ if (SDL_EGL_ChooseConfig(_this) != 0) { ++ SDL_SetError("mali-fbdev: Unable to find a suitable EGL config"); ++ return EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Creating Pixmap (%dx%d) buffers", width, height); ++ if (_this->gl_config.framebuffer_srgb_capable) { ++ { ++ SDL_SetError("mali-fbdev: EGL implementation does not support sRGB system framebuffers"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ windowdata->back_buffer = 0; ++ windowdata->queued_buffer = 1; ++ windowdata->front_buffer = 2; ++ ++ // Populate pixmap definitions ++ displaydata->stride = MALI_ALIGN(width * 4, 64); ++ for (i = 0; i < 3; i++) { ++ MALI_EGL_Surface *surf = &windowdata->surface[i]; ++ surf->pixmap = (mali_pixmap){ ++ .width = width, ++ .height = height, ++ .planes[0] = (mali_plane){ ++ .stride = displaydata->stride, ++ .size = displaydata->stride * height, ++ .offset = 0 }, ++ .planes[1] = (mali_plane){}, ++ .planes[2] = (mali_plane){}, ++ .format = 0, ++ .handles = { -1, -1, -1 }, ++ .drm_fourcc = { ++ .dataspace = 0, ++ .format = DRM_FORMAT_ARGB8888, ++ .modifier = 0 ++ } ++ }; ++ ++ /* Allocate framebuffer data */ ++ allocation_data = (struct ion_allocation_data){ ++ .len = surf->pixmap.planes[0].size, ++ .heap_id_mask = (1 << ION_HEAP_TYPE_DMA), ++ .flags = 1 << ION_FLAG_CACHED ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_ALLOC, &allocation_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Unable to create backing ION buffers"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Export DMA_BUF handle for the framebuffer */ ++ ion_data = (struct ion_fd_data){ ++ .handle = allocation_data.handle ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_SHARE, &ion_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Failure exporting ION buffer handle"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Recall fd and handle for teardown later */ ++ surf->dmabuf_handle = allocation_data.handle; ++ surf->dmabuf_fd = ion_data.fd; ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created ION buffer %d (fd: %d)\n", surf->dmabuf_handle, surf->dmabuf_fd); ++ ++ /* Create Pixmap Surface using DMA_BUF framebuffer fd */ ++ surf->pixmap.handles[0] = ion_data.fd; ++ ++ surf->pixmap_handle = displaydata->egl_create_pixmap_ID_mapping(&surf->pixmap); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created pixmap handle %p\n", (void *)surf->pixmap_handle); ++ if ((int)surf->pixmap_handle < 0) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "egl_create_pixmap_ID_mapping"); ++ return EGL_NO_SURFACE; ++ } ++ ++ surf->egl_surface = _this->egl_data->eglCreatePixmapSurface( ++ _this->egl_data->egl_display, ++ _this->egl_data->egl_config, ++ surf->pixmap_handle, NULL); ++ if (surf->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "eglCreatePixmapSurface"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ return windowdata->surface[windowdata->back_buffer].egl_surface; ++} ++ ++static void ++MALI_EGL_DeinitPixmapSurfaces(_THIS, SDL_Window *window) ++{ ++ SDL_WindowData *data; ++ SDL_DisplayData *displaydata; ++ EGLSurface current_surface; ++ EGLContext current_context; ++ ++ data = window->driverdata; ++ displaydata = SDL_GetDisplayDriverData(0); ++ if (!displaydata->blitter) ++ return; ++ ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ ++ // Disable current surface ++ current_context = (EGLContext)SDL_GL_GetCurrentContext(); ++ current_surface = _this->egl_data->eglGetCurrentSurface(EGL_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(data->surface); i++) { ++ struct ion_handle_data handle_data; ++ if (data->surface[i].dmabuf_fd < 0) ++ continue; ++ ++ if ((current_surface != EGL_NO_SURFACE) && (data->surface[i].egl_surface == current_surface)) { ++ SDL_EGL_MakeCurrent(_this, EGL_NO_SURFACE, current_context); ++ current_surface = EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_DestroyWindow: Destroying surface %d.", i); ++ _this->egl_data->eglDestroySurface(_this->egl_data->egl_display, data->surface[i].egl_surface); ++ displaydata->egl_destroy_pixmap_ID_mapping(data->surface[i].pixmap_handle); ++ close(data->surface[i].dmabuf_fd); ++ ++ handle_data = (struct ion_handle_data){ ++ .handle = data->surface[i].dmabuf_handle ++ }; ++ ++ ioctl(displaydata->ion_fd, ION_IOC_FREE, &handle_data); ++ data->surface[i].dmabuf_fd = -1; ++ } ++} ++ + int + MALI_CreateWindow(_THIS, SDL_Window * window) + { + SDL_WindowData *windowdata; ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_DisplayData *displaydata; + + displaydata = SDL_GetDisplayDriverData(0); + + /* Allocate window internal data */ +- windowdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); ++ windowdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); + if (windowdata == NULL) { + return SDL_OutOfMemory(); + } + +- /* Windows have one size for now */ +- window->w = displaydata->native_display.width; +- window->h = displaydata->native_display.height; ++ /* Use the entire screen when the blitter isn't enabled or the selected ++ resolution doesn't make any sense. */ ++ if ((displaydata->blitter == NULL) || (window->w < 32 || window->h < 32)) { ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ } + + /* OpenGL ES is the law here */ + window->flags |= SDL_WINDOW_OPENGL; +- + if (!_this->egl_data) { +- if (SDL_GL_LoadLibrary(NULL) < 0) { +- return -1; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ /* Try again with OpenGL ES 2.0 */ ++ _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; ++ _this->gl_config.major_version = 2; ++ _this->gl_config.minor_version = 0; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ return SDL_SetError("Can't load EGL/GL library on window creation."); ++ } + } ++ ++ _this->gl_config.driver_loaded = 1; ++ } ++ ++ /* If the blitter is required, we will manually create the EGL Surface resources using the ION allocator ++ and some reverse engineered mali internals */ ++ if (displaydata->blitter) { ++ displaydata->egl_create_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_create_pixmap_ID_mapping"); ++ displaydata->egl_destroy_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_destroy_pixmap_ID_mapping"); ++ if (!displaydata->egl_create_pixmap_ID_mapping || !displaydata->egl_destroy_pixmap_ID_mapping) { ++ MALI_VideoQuit(_this); ++ return SDL_SetError("mali-fbdev: Can't find mali pixmap entrypoints"); ++ } ++ ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } else { ++ windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + } +- windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + + if (windowdata->egl_surface == EGL_NO_SURFACE) { + MALI_VideoQuit(_this); +@@ -249,13 +449,13 @@ + return 0; + } + +-void +-MALI_DestroyWindow(_THIS, SDL_Window * window) ++void MALI_DestroyWindow(_THIS, SDL_Window *window) + { + SDL_WindowData *data; +- + data = window->driverdata; ++ + if (data) { ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); + if (data->egl_surface != EGL_NO_SURFACE) { + SDL_EGL_DestroySurface(_this, data->egl_surface); + data->egl_surface = EGL_NO_SURFACE; +@@ -278,6 +478,46 @@ + void + MALI_SetWindowSize(_THIS, SDL_Window * window) + { ++ SDL_WindowData *windowdata; ++ SDL_VideoDisplay *display; ++ SDL_DisplayData *displaydata; ++ ++ windowdata = window->driverdata; ++ display = SDL_GetDisplayForWindow(window); ++ displaydata = display->driverdata; ++ ++ /* ++ * Switch to a fullscreen resolution whenever: ++ * - We are not using the blitter ++ * - A fullscreen was requested ++ * - The window resolution requested doesn't make any sense ++ */ ++ if ((displaydata->blitter == NULL) ++ || (window->w < 32 || window->h < 32) ++ || ((window->flags & SDL_WINDOW_FULLSCREEN) == SDL_WINDOW_FULLSCREEN)) { ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ } ++ ++ /* ++ * If we're using the blitter, we might need to signal for a surface reconfiguration ++ * if the dimensions of our surface changed. ++ */ ++ if (displaydata->blitter) { ++ if ((displaydata->blitter->plane_width == window->w) ++ && (displaydata->blitter->plane_height == window->h)) ++ return; ++ ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } ++} ++ ++void ++MALI_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) ++{ ++ MALI_SetWindowSize(_this, window); + } + + void +@@ -290,6 +530,25 @@ + { + } + ++int ++MALI_GLES_SetSwapInterval(_THIS, int interval) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ _this->egl_data->egl_swapinterval = interval != 0; ++ return 0; ++} ++ ++int ++MALI_GLES_GetSwapInterval(_THIS) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ return _this->egl_data->egl_swapinterval; ++} ++ + /*****************************************************************************/ + /* SDL Window Manager function */ + /*****************************************************************************/ +@@ -300,7 +559,7 @@ + return SDL_TRUE; + } else { + SDL_SetError("application not compiled with SDL %d.%d\n", +- SDL_MAJOR_VERSION, SDL_MINOR_VERSION); ++ SDL_MAJOR_VERSION, SDL_MINOR_VERSION); + } + + /* Failed to get window manager information */ +--- a/src/video/mali-fbdev/SDL_malivideo.h 2024-04-28 18:59:25.829964201 +0000 ++++ b/src/video/mali-fbdev/SDL_malivideo.h 2024-04-28 18:56:15.482396285 +0000 +@@ -26,27 +26,56 @@ + #include "../SDL_sysvideo.h" + + #include "SDL_egl.h" ++#include "SDL_opengl.h" ++#include "mali.h" + + #include + #include + #include + #include + #include ++#include + #include + #include + #include + ++#include "mali.h" ++#include "ion.h" ++ + typedef struct SDL_DisplayData + { +- struct { +- unsigned short width; +- unsigned short height; +- } native_display; ++ int ion_fd; ++ struct MALI_Blitter *blitter; ++ fbdev_window_s native_display; ++ int rotation; ++ unsigned long stride; ++ unsigned long w_align; ++ unsigned long h_align; ++ NativePixmapType (*egl_create_pixmap_ID_mapping)(mali_pixmap *); ++ NativePixmapType (*egl_destroy_pixmap_ID_mapping)(int id); + } SDL_DisplayData; + ++typedef struct MALI_EGL_Surface ++{ ++ // A pixmap is backed by multiple ION allocated backbuffers, EGL fences, etc. ++ EGLImageKHR egl_image; ++ GLuint texture; ++ EGLSyncKHR egl_fence; ++ EGLSurface egl_surface; ++ NativePixmapType pixmap_handle; ++ mali_pixmap pixmap; ++ int dmabuf_fd; ++ int dmabuf_handle; ++} MALI_EGL_Surface; ++ + typedef struct SDL_WindowData + { + EGLSurface egl_surface; ++ int back_buffer; ++ int queued_buffer; ++ int front_buffer; ++ ++ MALI_EGL_Surface surface[3]; + } SDL_WindowData; + + /****************************************************************************/ +@@ -62,9 +91,12 @@ + void MALI_SetWindowTitle(_THIS, SDL_Window * window); + void MALI_SetWindowPosition(_THIS, SDL_Window * window); + void MALI_SetWindowSize(_THIS, SDL_Window * window); ++void MALI_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen); + void MALI_ShowWindow(_THIS, SDL_Window * window); + void MALI_HideWindow(_THIS, SDL_Window * window); + void MALI_DestroyWindow(_THIS, SDL_Window * window); ++int MALI_GLES_SetSwapInterval(_THIS, int interval); ++int MALI_GLES_GetSwapInterval(_THIS); + + /* Window manager function */ + SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window * window, +--- a/src/video/SDL_egl.c 2024-04-28 18:59:25.829964201 +0000 ++++ b/src/video/SDL_egl.c 2024-04-28 18:58:41.138068711 +0000 +@@ -432,8 +432,10 @@ + LOAD_FUNC(eglGetConfigAttrib); + LOAD_FUNC(eglCreateContext); + LOAD_FUNC(eglDestroyContext); ++ LOAD_FUNC(eglCreatePixmapSurface); + LOAD_FUNC(eglCreatePbufferSurface); + LOAD_FUNC(eglCreateWindowSurface); ++ LOAD_FUNC(eglGetCurrentSurface); + LOAD_FUNC(eglDestroySurface); + LOAD_FUNC(eglMakeCurrent); + LOAD_FUNC(eglSwapBuffers); +--- a/src/video/SDL_egl_c.h 2023-11-02 17:03:38.000000000 +0000 ++++ b/src/video/SDL_egl_c.h 2024-04-28 18:58:49.090050243 +0000 +@@ -67,7 +67,12 @@ + const EGLint * attrib_list); + + EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); +- ++ ++ EGLSurface(EGLAPIENTRY *eglCreatePixmapSurface) (EGLDisplay dpy, ++ EGLConfig config, ++ NativePixmapType pixmap, ++ const EGLint * attrib_list); ++ + EGLSurface(EGLAPIENTRY *eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, + EGLint const* attrib_list); + +@@ -76,6 +81,8 @@ + NativeWindowType window, + const EGLint * attrib_list); + EGLBoolean(EGLAPIENTRY *eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); ++ ++ EGLSurface(EGLAPIENTRY *eglGetCurrentSurface) (EGLint readdraw); + + EGLBoolean(EGLAPIENTRY *eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); diff --git a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/S02resize b/board/batocera/allwinner/h700/rg28xx/S02resize similarity index 100% rename from board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/S02resize rename to board/batocera/allwinner/h700/rg28xx/S02resize diff --git a/board/batocera/allwinner/h700/rg28xx/batocera-boot.conf b/board/batocera/allwinner/h700/rg28xx/batocera-boot.conf new file mode 100755 index 00000000000..cc4a5f9870d --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/batocera-boot.conf @@ -0,0 +1,43 @@ +## Lines prefixed by double hashes (##) are comments. +## Lines prefixed by a single hash (#) are commented settings; remove the single hash to activate the setting. + +## The device used to store the share data a.k.a. userdata. +## INTERNAL -> Use the same drive Batocera has been flashed to. See https://wiki.batocera.org/add_games_bios on how to add files to the internal storage. +## ANYEXTERNAL -> Use the first external storage detected. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive +## Putting the name here of the drive instead will use that specific external storage. Use the menu in Batocera to see the available options. +## DEVICES -> Use external storage for individual folders. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#manual_configuration_with_batocera-bootconf_advanced +## DEV -> Manually define the GUID of the storage device requested. See https://wiki.batocera.org/store_games_on_a_second_usb_sata_drive#dev_mode +## NETWORK -> Use the network share, requires configuration first. See https://wiki.batocera.org/store_games_on_a_nas +sharedevice=INTERNAL + +## Add a wait time (in case the share device takes a while to come "online") in seconds. +#sharewait=15 + +## Automatically resize the userdata partition if unallocated space is present on the drive. Disables itself once completed successfully. +autoresize=true + +## Manually override Nvidia driver selected. Leave this setting commented to have Batocera automatically select the correct driver. +## See https://wiki.batocera.org/supported_pc_hardware +## true -> Use the current production driver. +## legacy -> Use the "legacy" 470 driver (could be subject to change, though unlikely). +## legacy390 -> Use the older 390 driver. +## false -> Use the open-source Nouveau drivers. +#nvidia-driver=true + +## Enable the Nvidia prime switcher. Helps with modern laptops (post-2018) with hybrid graphics that default to using integrated graphics. +#nvidia-prime=true + +## Enable Radeon prime switcher. Helps with modern laptops with amd hybrid graphics that default to using integrated graphics +#radeon-prime=true + +## Disable the splash screen. +#splash.screen.enabled=0 + +## Maximum or specific machine resolution (get the full list for your display with "batocera-resolution listModes") +## See https://wiki.batocera.org/display_issues#force_any_specific_supported_resolution_in_es_instead_of_the_default_maximum_one +#es.resolution=max-1920x1080 + +### Below are copied values from batocera.conf to make them available in an early boot stage. ### +### Change them in batocera.conf or the menu, not here. ### +wifi.enabled=1 +system.timezone=Europe/Paris diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat0.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat0.bmp new file mode 100755 index 00000000000..bc1c83706b3 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat0.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat1.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat1.bmp new file mode 100755 index 00000000000..216c489bc1e Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat1.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat10.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat10.bmp new file mode 100755 index 00000000000..417efdf1fcd Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat10.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat2.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat2.bmp new file mode 100755 index 00000000000..33642c17053 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat2.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat3.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat3.bmp new file mode 100755 index 00000000000..542e4b336a2 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat3.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat4.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat4.bmp new file mode 100755 index 00000000000..b3b87c279ae Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat4.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat5.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat5.bmp new file mode 100755 index 00000000000..9b7379a95f2 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat5.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat6.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat6.bmp new file mode 100755 index 00000000000..83a10e10890 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat6.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat7.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat7.bmp new file mode 100755 index 00000000000..561584008b1 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat7.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat8.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat8.bmp new file mode 100755 index 00000000000..a13d6d6f317 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat8.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat9.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat9.bmp new file mode 100755 index 00000000000..8e90e206822 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat9.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_blank.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_blank.bmp new file mode 100755 index 00000000000..9075011c053 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_blank.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_htmp.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_htmp.bmp new file mode 100755 index 00000000000..7706d59a564 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_htmp.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_ltmp.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_ltmp.bmp new file mode 100755 index 00000000000..db1a4102135 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bat_ltmp.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/battery.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/battery.bmp new file mode 100755 index 00000000000..ed17fbac953 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/battery.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/battery_charge.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/battery_charge.bmp new file mode 100755 index 00000000000..a550d413ec3 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/battery_charge.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bempty.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bempty.bmp new file mode 100755 index 00000000000..91dd947cd0b Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bempty.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/bootlogo.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/bootlogo.bmp new file mode 100755 index 00000000000..524345b51b7 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/bootlogo.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bat/low_pwr.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bat/low_pwr.bmp new file mode 100755 index 00000000000..7c2ea42fc9c Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bat/low_pwr.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/boot.cmd b/board/batocera/allwinner/h700/rg28xx/boot/boot.cmd new file mode 100644 index 00000000000..1f757632b39 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/boot/boot.cmd @@ -0,0 +1,13 @@ +# +# To prepare u-boot script, run: +# mkimage -A arm64 -T script -O linux -d boot.cmd boot.scr +# + +setenv bootargs initrd=/boot/initrd.lz4 label=BATOCERA rootwait earlycon loglevel=9 console=ttyS0,115200 console=tty3 + +load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/linux +load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/sun50i-h616-x96-mate.dtb +fdt addr ${fdt_addr_r} +fdt resize +load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initrd.lz4 +booti ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r} diff --git a/board/batocera/allwinner/h700/rg28xx/boot/boot.scr b/board/batocera/allwinner/h700/rg28xx/boot/boot.scr new file mode 100644 index 00000000000..057b037c92a Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/boot.scr differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/bootlogo.bmp b/board/batocera/allwinner/h700/rg28xx/boot/bootlogo.bmp new file mode 100644 index 00000000000..f16e744b5f5 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/bootlogo.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/extlinux.conf b/board/batocera/allwinner/h700/rg28xx/boot/extlinux.conf new file mode 100755 index 00000000000..bdf95089b44 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/boot/extlinux.conf @@ -0,0 +1,4 @@ +LABEL batocera.linux + LINUX /boot/linux + FDT /boot/sun50i-h616-x96-mate.dtb + APPEND initrd=/boot/initrd.lz4 label=BATOCERA rootwait quiet loglevel=0 console=ttyS0,115200 console=tty3 diff --git a/board/batocera/allwinner/h700/rg28xx/boot/font24.sft b/board/batocera/allwinner/h700/rg28xx/boot/font24.sft new file mode 100755 index 00000000000..bf1ba18c116 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/font24.sft differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/font32.sft b/board/batocera/allwinner/h700/rg28xx/boot/font32.sft new file mode 100755 index 00000000000..c19f1f93fe3 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/boot/font32.sft differ diff --git a/board/batocera/allwinner/h700/rg28xx/boot/magic.bin b/board/batocera/allwinner/h700/rg28xx/boot/magic.bin new file mode 100755 index 00000000000..3f8b8af828d --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/boot/magic.bin @@ -0,0 +1 @@ +a1sp9maKde37ee6c-6dc4-4d74-86f0-db32116efb53e0e40ccf-7a66-406b-88c3-415b4a62a8f7777622ab-6bd0-464f-9da5-4cc203e855ea8ce5671f-e8b5-442e-9300-2ee6836c538aabf5f481-c961-4895-8245-631f74851d0c2bbb4229-55a8-4929-a165-3f406f0ee441ab5d09a9-c4dc-44bb-a175-cfb7c978a062329ea51e-1ddc-44ff-ac09-9ef7b64e0c52a712e47d-13f7-4490-9fea-bdcd587b8a4a5ed4d4e6-0ba3-45c5-a778-3232a42d4d960a9b7466-d7b3-4087-b8ff-c51763b852a50cd78bb6-a6d5-43a8-8661-fb91abd346433e8a86ee-711e-49c1-ad54-b59dd01fe513e22b0d8b-647f-4417-a115-9806c5d64eec \ No newline at end of file diff --git a/board/batocera/allwinner/h700/rg28xx/bootlogo.bmp b/board/batocera/allwinner/h700/rg28xx/bootlogo.bmp new file mode 100644 index 00000000000..7bf97904d93 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/bootlogo.bmp differ diff --git a/board/batocera/allwinner/h700/rg28xx/create-boot-script.sh b/board/batocera/allwinner/h700/rg28xx/create-boot-script.sh new file mode 100755 index 00000000000..092c6cc617c --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/create-boot-script.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# HOST_DIR = host dir +# BOARD_DIR = board specific dir +# BUILD_DIR = base dir/build +# BINARIES_DIR = images dir +# TARGET_DIR = target dir +# BATOCERA_BINARIES_DIR = batocera binaries sub directory + +HOST_DIR=$1 +BOARD_DIR=$2 +BUILD_DIR=$3 +BINARIES_DIR=$4 +TARGET_DIR=$5 +BATOCERA_BINARIES_DIR=$6 + +mkdir -p "${BATOCERA_BINARIES_DIR}/boot/boot" || exit 1 + +cp "${BOARD_DIR}/uImage" "${BATOCERA_BINARIES_DIR}/boot/uImage" || exit 1 +cp "${BOARD_DIR}/uInitrd" "${BATOCERA_BINARIES_DIR}/boot/uInitrd" || exit 1 +cp "${BINARIES_DIR}/rootfs.squashfs" "${BATOCERA_BINARIES_DIR}/boot/boot/batocera.update" || exit 1 +cp "${BOARD_DIR}/batocera-boot.conf" "${BATOCERA_BINARIES_DIR}/boot/batocera-boot.conf" || exit 1 +cp "${BOARD_DIR}/bootlogo.bmp" "${BATOCERA_BINARIES_DIR}/boot/bootlogo.bmp" || exit 1 + +cp -r "${BOARD_DIR}/partitions" "${BATOCERA_BINARIES_DIR}" || exit 1 + +touch "${BATOCERA_BINARIES_DIR}/boot/boot/autoresize" + +exit 0 diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S03modules b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S03modules new file mode 100755 index 00000000000..0749be7bddd --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S03modules @@ -0,0 +1,6 @@ +#!/bin/sh + +insmod /lib/modules/mali_kbase.ko +insmod /lib/modules/4.9.170/kernel/drivers/net/wireless/rtl8821cs/8821cs.ko +#insmod /lib/modules/4.9.170/kernel/drivers/bluetooth/bcm_btlpm.ko +insmod /lib/modules/4.9.170/kernel/drivers/bluetooth/rtl_btlpm.ko diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S05udev b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S05udev new file mode 100755 index 00000000000..562f7b8172f --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S05udev @@ -0,0 +1,46 @@ +#!/bin/sh +# +# udev This is a minimal non-LSB version of a UDEV startup script. It +# was derived by stripping down the udev-058 LSB version for use +# with buildroot on embedded hardware using Linux 2.6.34+ kernels. +# +# You may need to customize this for your system's resource limits +# (including startup time!) and administration. For example, if +# your early userspace has a custom initramfs or initrd you might +# need /dev much earlier; or without hotpluggable busses (like USB, +# PCMCIA, MMC/SD, and so on) your /dev might be static after boot. +# +# This script assumes your system boots right into the eventual root +# filesystem, and that init runs this udev script before any programs +# needing more device nodes than the bare-bones set -- /dev/console, +# /dev/zero, /dev/null -- that's needed to boot and run this script. +# + +# Check for config file and read it +UDEV_CONFIG=/etc/udev/udev.conf +test -r $UDEV_CONFIG || exit 6 +. $UDEV_CONFIG + +case "$1" in + start) + printf "Populating %s using udev: " "${udev_root:-/dev}" + [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug + /sbin/udevd -d || { echo "FAIL"; exit 1; } + udevadm trigger --type=subsystems --action=add + udevadm trigger --type=devices --action=add +# udevadm settle --timeout=30 || echo "udevadm settle failed" + echo "done" + ;; + stop) + # Stop execution of events + udevadm control --stop-exec-queue + killall udevd + ;; + *) + echo "Usage: $0 {start|stop}" + exit 1 + ;; +esac + + +exit 0 diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S06audio b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S06audio new file mode 100755 index 00000000000..c3599d700b2 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S06audio @@ -0,0 +1,51 @@ +#!/bin/sh +# +# Starts audio services +# + +. /etc/profile.d/xdg.sh +. /etc/profile.d/dbus.sh + +BOARD=$(cat /boot/boot/batocera.board) + +start_pipewire() { + printf "Starting pipewire: " + start-stop-daemon -S -b -q -m -p /var/run/pipewire.pid --exec /usr/bin/pipewire + msg=OK + + #Wait till sinks are listed, this means PW is working + until pactl list sinks-raw | grep -qo sink= + do + sleep 0.1 + N=$((N+1)) + test $N -gt 50 && { msg=KO; break; } + done + + echo "$msg" +} + +stop_pipewire() { + printf "Stopping pipewire: " + start-stop-daemon -K -q -p /var/run/pipewire.pid + killall pipewire + echo "OK" +} + +case "$1" in + start) + alsactl init # init cards with alsa files + start_pipewire + ;; + stop) + stop_pipewire + ;; + restart|reload) + stop_pipewire + start_pipewire + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S11share b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S11share new file mode 100755 index 00000000000..c133d238646 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S11share @@ -0,0 +1,375 @@ +#!/bin/sh + +if [ "$1" = "stop" ] +then + # umount all network configs + # don't just remount the one of the config in case the config changed + umount -l -a -t nfs,nfs2,nfs4 + umount -l -a -t cifs + exit 0 +fi + +if [ "$1" != "start" ] +then + exit 0 +fi + +printf "Starting share: " + +### +# SHARECONFFILE +# can contain : +# INTERNAL => /dev/mmcblk0p2 +# RAM => tmpfs +# ANYEXTERNAL => any device found not starting by /dev/mmcblk0p (use it when you've several usb keys, but plug only one at a time) +# NETWORK => use the NAS specified by sharenetwork_[smb-or-nfs][0-9] options +# DEV [FSUUID] => a device having the FSUID uuid +# DEVICES => use local storage devices specified by sharedevice_part[1-9] +### + +SHARECONFFILE="/boot/batocera-boot.conf" +INTERNALDEVICE=$(batocera-part "share_internal") +INTERNALDEVICETYPE=$(blkid "${INTERNALDEVICE}" | sed -e s+'^.* TYPE="\([^"]*\)\".*'+'\1'+) + +SHAREDEVICE=$(cat "${SHARECONFFILE}" | grep -E '^[ ]*sharedevice=' | head -n1 | cut -d'=' -f2) +[ "$?" -ne "0" -o "$SHAREDEVICE" = "" ] && SHAREDEVICE=INTERNAL + +getMaxTryConfig() { + SHARECONFFILE=${1} + + X=$(grep -E '^[ \t]*sharewait[ \t]*=' "${SHARECONFFILE}" | sed -e s+'^[ \t]*sharewait[ \t]*='+''+) + if echo "${X}" | grep -qE '^[0-9][0-9]*$' + then + echo "${X}" + return + fi + echo 15 # default value +} + +MAXTRY=$(getMaxTryConfig "${SHARECONFFILE}") +NTRY=0 + +mountRAMDisk() { + mount -t tmpfs -o size=256M tmpfs /userdata +} + +mountDeviceOrFallback() { + DEVICE=$1 + TDEVICE=$2 + BATOCERAFULLFS="/var/batocerafs" + FALLBACK=1 + + if [ -n "${DEVICE}" ] + then + if mkdir -p "${BATOCERAFULLFS}" + then + if batocera-mount "${TDEVICE}" 1 "${DEVICE}" "${BATOCERAFULLFS}" + then + if mkdir -p "${BATOCERAFULLFS}/batocera" + then + if mount --bind "${BATOCERAFULLFS}/batocera" "/userdata" -o "noatime" + then + FALLBACK=0 + fi + fi + fi + fi + fi + + if [ "${FALLBACK}" = "1" ] + then + if ! batocera-mount "${INTERNALDEVICETYPE}" 1 "${INTERNALDEVICE}" /userdata + then + mountRAMDisk + fi + fi +} + +mountPartByTag() { + TAG=$1 + DIR=$2 + + FSTYPE="$(blkid -l -t "${TAG}" -s TYPE -o value)" || return 1 + + case "${FSTYPE}" in + "ntfs") + # Force use of the FUSE ntfs-3g driver + FSTYPE=ntfs-3g + ;; + esac + + mount -t "${FSTYPE}" "${TAG}" "${DIR}" +} + +mountPartSubdir() { + CMD_KEYPART=$1 + CMD_PART=$2 + CMD_SUBDIR=$3 + CMD_TDIR=$4 + mkdir -p "/var/batocera_subdir_${CMD_KEYPART}" || return 1 + mountPartByTag "UUID=${CMD_PART}" "/var/batocera_subdir_${CMD_KEYPART}" || return 1 + mkdir -p "/var/batocera_subdir_${CMD_KEYPART}/${CMD_SUBDIR}" || return 1 + mount --bind "/var/batocera_subdir_${CMD_KEYPART}/${CMD_SUBDIR}" "${CMD_TDIR}" || return 1 + return 0 +} + +mountDevicesOrNetwork() { + # /boot/batocera-boot.conf examples : + # sharedevice=NETWORK + # + # Basic commands : sharenetwork_<[0-9]>=@:: + # Where can be one of SHARE|ROMS|SAVES|BIOS|MUSIC|DECORATIONS|SCREENSHOTS|THEMES|CHEATS|SOUNDS|LIBRARY|SPLASH|CONFIGS + # + # sharenetwork_nfs1=SHARE@192.168.0.1:/Documents/batocera + # or + # sharenetwork_nfs1=ROMS@192.168.0.1:/Documents/batocera/roms + # sharenetwork_nfs2=SAVES@192.168.0.1:/Documents/batocera/saves + # or + # sharenetwork_smb1=SHARE@192.168.0.1:Documents/batocera:guest + # + # Advanced commands : sharenetwork_cmd<[0-9]>= + # sharenetwork_cmd1=mount -o port=2049,nolock,proto=tcp 192.168.0.1:/Documents/batocera /userdata + # or + # sharenetwork_cmd1=mount -o port=2049,nolock,proto=tcp 192.168.0.1:/Documents/batocera/roms /userdata/roms + # sharenetwork_cmd2=mount -o port=2049,nolock,proto=tcp 192.168.0.1:/Documents/batocera/saves /userdata/saves + # or + # sharenetwork_cmd1=mount.cifs //192.168.0.1/batocera /userdata -o guest + # + # mounting full partitions or sub folders of partitions on top of the internal partition + # sharedevice=DEVICES + # sharedevice_part1=SHARE@abcdefg-1234-5678-hijk-lmnopq0000 + # sharedevice_part2=ROMS@68dc61b8-5008-4659-bde9-5938a547680a:/Documents/roms + + # execute all commands in /boot/batocera-boot.conf which are like : sharenetwork_cmd1=my command + if ! grep -E '^[ ]*share(network|device)_[a-z]*[0-9][ ]*=' "${SHARECONFFILE}" | + sed -e s+'^[ ]*share\(network\|device\)_\([a-z]*\)[0-9][ ]*='+'\2 '+ | + while read -r CTYPE CMD + do + XWAIT=4 # N seconds between each try + XTRY=$((MAXTRY / XWAIT)) # X tries and give up + + while [ "${XTRY}" -gt 0 ] + do + XTRY=$((XTRY-1)) + CMD_EXEC=echo + if [ "${CTYPE}" = "cmd" ] + then + CMD_EXEC="${CMD}" + else + CMD_TARGET=$(echo "${CMD}" | sed -e s+'^\([^@]*\)@.*$'+'\1'+) + case "${CTYPE}" in + "nfs"|"smb") + CMD_HOST=$(echo "${CMD}" | sed -e s+'^[^@]*@\([^:]*\):.*$'+'\1'+) + CMD_RDIR=$(echo "${CMD}" | sed -e s+'^[^@]*@[^:]*:\([^:]*\).*$'+'\1'+) + CMD_OPT=$(echo "${CMD}" | sed -e s+'^[^@]*@[^:]*:[^:]*'+''+ -e s+'^:'++) + ;; + "part") + CMD_PART=$(echo "${CMD}" | sed -e s+'^[^@]*@\(.*\)$'+'\1'+) + CMD_SUBDIR="/" + CMD_KEYPART=$(echo "${CMD_PART}" | md5sum | cut -c 1-10) + if echo "${CMD_PART}" | grep -qE ':' + then + CMD_SUBDIR=$(echo "${CMD_PART}" | sed -e s+"^[^:]*:"++) + CMD_PART=$(echo "${CMD_PART}" | sed -e s+":.*$"++) + fi + ;; + *) + echo "unknown type" >&2 + return 1 + esac + + # MAP to the batocera directory + CMD_TDIR="/userdata" + case "${CMD_TARGET}" in + "SHARE") + CMD_TDIR="/userdata" + ;; + "ROMS") + CMD_TDIR="/userdata/roms" + ;; + "SAVES") + CMD_TDIR="/userdata/saves" + ;; + "BIOS") + CMD_TDIR="/userdata/bios" + ;; + "MUSIC") + CMD_TDIR="/userdata/music" + ;; + "DECORATIONS") + CMD_TDIR="/userdata/decorations" + ;; + "SCREENSHOTS") + CMD_TDIR="/userdata/screenshots" + ;; + "THEMES") + CMD_TDIR="/userdata/themes" + ;; + "CHEATS") + CMD_TDIR="/userdata/cheats" + ;; + "SOUNDS") + CMD_TDIR="/userdata/sounds" + ;; + "LIBRARY") + CMD_TDIR="/userdata/library" + ;; + "SPLASH") + CMD_TDIR="/userdata/splash" + ;; + "CONFIGS") + CMD_TDIR="/userdata/system/configs" + ;; + esac + + mkdir -p "${CMD_TDIR}" || return 1 + + case "${CTYPE}" in + "nfs") + CMD_ADDOPT= + [ -n "${CMD_OPT}" ] && CMD_ADDOPT=",${CMD_OPT}" + CMD_EXEC="mount -o port=2049,nolock,proto=tcp${CMD_ADDOPT} ${CMD_HOST}:${CMD_RDIR} ${CMD_TDIR}" + ;; + "smb") + CMD_ADDOPT= + [ -n "${CMD_OPT}" ] && CMD_ADDOPT="-o ${CMD_OPT}" + CMD_EXEC="mount.cifs //${CMD_HOST}/${CMD_RDIR} ${CMD_TDIR} ${CMD_ADDOPT}" + ;; + "part") + if test "${CMD_SUBDIR}" = "/" + then + CMD_EXEC="mountPartByTag UUID=${CMD_PART} ${CMD_TDIR}" + else + CMD_EXEC="mountPartSubdir ${CMD_KEYPART} ${CMD_PART} ${CMD_SUBDIR} ${CMD_TDIR}" + fi + ;; + esac + fi + + echo "${CMD_EXEC}" + if ${CMD_EXEC} + then + echo "success" + XTRY=0 + else + echo "fail (${XTRY} : ${CMD_EXEC})" + # give up + if [ ${XTRY} -eq 0 ] + then + echo "giving up" + return 1 + fi + sleep ${XWAIT} # wait n seconds between each try + fi + done + done + then + return 1 + fi + return 0 +} + +RMODE="$SHAREDEVICE" + +if echo "${RMODE}" | grep -qE '^DEV ' +then + MODE="DEV" + UUID=$(echo "${RMODE}" | sed -e s+'^DEV '++) +else + MODE=${RMODE} +fi + +VGSCAN=/usr/sbin/vgscan +VGCHANGE=/usr/sbin/vgchange + +if [ -x ${VGSCAN} -a -x ${VGCHANGE} ] +then + ${VGSCAN} + ${VGCHANGE} -ay +fi + +case "${MODE}" in + "DEV") + LDEVICE=$(blkid | grep " UUID=\"${UUID}\"" | head -1) + while [ -z "${LDEVICE}" -a "${NTRY}" -lt "${MAXTRY}" ] # wait the device that can take some seconds after udev started + do + NTRY=$((NTRY+1)) + sleep 1 + LDEVICE=$(blkid | grep " UUID=\"${UUID}\"" | head -1) + done + DEVICE=$(echo "${LDEVICE}" | sed -e s+'^\([^:]*\):.*$'+'\1'+) + TDEVICE=$(echo "${LDEVICE}" | sed -e s+'^.* TYPE="\([^"]*\)".*$'+'\1'+) + mountDeviceOrFallback "${DEVICE}" "${TDEVICE}" + ;; + "ANYEXTERNAL") + PARTPREFIX=$(batocera-part prefix "${INTERNALDEVICE}") + LDEVICE=$(blkid | grep -F TYPE= | grep -F UUID= | grep -vE "^${PARTPREFIX}" | sort | head -1) + while [ -z "${LDEVICE}" ] && [ "${NTRY}" -lt "${MAXTRY}" ] # wait the device that can take some seconds after udev started + do + NTRY=$((NTRY+1)) + sleep 1 + LDEVICE=$(blkid | grep -vE "^${PARTPREFIX}" | head -1) + done + DEVICE=$(echo "${LDEVICE}" | sed -e s+'^\([^:]*\):.*$'+'\1'+) + TDEVICE=$(echo "${LDEVICE}" | sed -e s+'^.* TYPE="\([^"]*\)".*$'+'\1'+) + mountDeviceOrFallback "${DEVICE}" "${TDEVICE}" + ;; + "RAM") + mountRAMDisk + ;; + "NETWORK"|"DEVICES") + # first, INTERNAL mount, then, network mount over the NETWORK mounts + # to allow to mount over /userdata, but only over /userdata/roms if wanted + # mounting network mounts over usb key have not really sense + if ! batocera-mount "${INTERNALDEVICETYPE}" 1 "${INTERNALDEVICE}" /userdata + then + # fallback + mountRAMDisk + fi + + # Network mounts + # no fallback required, mounted on the share + mountDevicesOrNetwork > /tmp/mountDevicesOrNetwork.log 2> /tmp/mountDevicesOrNetwork.err # could be usefull to debug + ;; + "INTERNAL"|*) + if ! batocera-mount "${INTERNALDEVICETYPE}" 1 "${INTERNALDEVICE}" /userdata + then + # fallback + # the internal partition is no more required in fact + mountRAMDisk + fi + ;; +esac + +# filesystem compression +compressenabled="$(/usr/bin/batocera-settings-get system.fscompression.enabled)" +if [ "$compressenabled" = "1" ] +then + if grep -qE "^/dev/[^ ]* /userdata btrfs.*$" /proc/mounts + then + # compress-force used here to have the zstd-compressor check the total file size instead of btrfs before committing to compressing + # btrfs's algorithm can be innaccurate when compared with zstd-compressor + mount -o remount,compress-force=zstd,autodefrag /userdata || exit 1 + fi +fi + +# some custom files, like extension_strace.tar.gz or gdb. +find /userdata/system -maxdepth 1 -name "extension_*.tar.gz" | + while read FILE + do + (cd / && gunzip -c "${FILE}" | tar xf -) + done + +# now, let mount delayed usbmount devices +ls /var/run/usbmount.delay | + while read -r RULE + do + RTYPE=$(echo "${RULE}" | sed -e s+'^[0-9]*\.'++) + # source the udev context and apply the usbmount + (. "/var/run/usbmount.delay/${RULE}" + /usr/share/usbmount/usbmount "${RTYPE}" + rm "/var/run/usbmount.delay/${RULE}") + done +touch /var/run/batocera.share.mounted # reenable standard usbmount + +echo "done." diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S27audioconfig b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S27audioconfig new file mode 100755 index 00000000000..c2b3da4a929 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S27audioconfig @@ -0,0 +1,127 @@ +#!/bin/bash +# +# Starts audio services +# + +. /etc/profile.d/xdg.sh +. /etc/profile.d/dbus.sh + +apply_audioconfig() { + DEVICE=$1 + PROFILE=$2 + VOLUME=$3 + + EXITCODE=0 + + # profile do card+profile + if test -n "${PROFILE}" + then + # set card profile + if batocera-audio set-profile "${PROFILE}" + then + if test -n "${DEVICE}" + then + # then set the default sink + if ! batocera-audio set "${DEVICE}" + then + EXITCODE=1 + fi + fi + else + EXITCODE=1 + fi + else + if test -n "${DEVICE}" + then + if ! batocera-audio set "${DEVICE}" + then + EXITCODE=1 + fi + fi + fi + + # always apply audio volume at last on the selected output + # but in case set ou set-profile fails, always set volume + # because in case the audio card doesn't exist, + # it is nice to have the volume applied on the default output + batocera-audio setSystemVolume "${VOLUME}" || return 1 + return ${EXITCODE} +} + +try_apply_audioconfig() { + DEVICE=$1 + PROFILE=$2 + VOLUME=$3 + + N=10 + while test "${N}" -gt 0 + do + echo "retry applying audio (${N})" >&2 + if apply_audioconfig "${DEVICE}" "${PROFILE}" "${VOLUME}" + then + return 0 + fi + sleep 2 + let N-- + done + return 1 +} + +start_audioconfig() { + # this script must be started after pipewire and udev, but before es + # and thus, we let splash before config here while udev is the services taking the most time + + # set default device and volume + DEVICE=$(/usr/bin/batocera-settings-get-master audio.device) + PROFILE=$(/usr/bin/batocera-settings-get-master audio.profile) + VOLUME=$(/usr/bin/batocera-settings-get-master audio.volume) + test -z "${DEVICE}" && DEVICE=auto + test -z "${PROFILE}" && PROFILE=auto + test -z "${VOLUME}" && VOLUME=80 + + if ! apply_audioconfig "${DEVICE}" "${PROFILE}" "${VOLUME}" + then + # in case it didn't work, we call in backgroud a function + # that will do more test in the time + # because some tv or audio card takes longer to initialize + try_apply_audioconfig "${DEVICE}" "${PROFILE}" "${VOLUME}" & + fi + + echo "OK" +} + +stop_audioconfig() { + VOLUME=$(batocera-audio getSystemVolume) + /usr/bin/batocera-settings-set audio.volume "${VOLUME}" + echo "OK" +} + +restart() { + stop_audioconfig + start_audioconfig +} + +case "$1" in + start) + start_audioconfig + alsactl restore 0 -f /userdata/system/.asound.state + amixer -c 0 sset LINEOUT on + amixer -c 0 sset "OutputL Mixer DACL" on + amixer -c 0 sset "OutputL Mixer DACR" on + amixer -c 0 sset "OutputR Mixer DACL" on + amixer -c 0 sset "OutputR Mixer DACR" on + # FIXME: set audio by default to internal speaker + batocera-audio set alsa_output._sys_devices_platform_soc_soc_03000000_codec_mach_sound_card0.stereo-fallback + ;; + stop) + stop_audioconfig + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S32bluetooth b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S32bluetooth new file mode 100755 index 00000000000..1796ec1e6fc --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S32bluetooth @@ -0,0 +1,104 @@ +#!/bin/sh +# +# Auto connect bluetooth controllers +# + +BOARD=$(cat /boot/boot/batocera.board) + +case "$1" in + start) + # Restores old settings saved in userdata + batocera-bluetooth restore + # soft unblock bluetooth + rfkill unblock bluetooth + + #Start hciattach for applicable boards + bluetoothstack="rtk115" + for i in $bluetoothstack + do + case $i in + rfkreset) + echo 0 > /sys/class/rfkill/rfkill0/state + sleep 1 + echo 1 > /sys/class/rfkill/rfkill0/state + sleep 1 + ;; + bcm150) + # Bluetooth on the OrangePi 4-LTS board is handled by a Spreadtrum (sprd) chip + # and requires a custom hciattach_opi binary + if test "${BOARD}" = "orangepi4-lts" + then + /usr/bin/hciattach_opi -n -s 1500000 /dev/ttyBT0 sprd & + else + /usr/bin/hciattach /dev/ttyS0 bcm43xx 1500000 flow nosleep & + fi + sleep 2 # Give hciattach a few seconds to finish attaching firmware + ;; + rtk115) + /usr/bin/rtk_hciattach -n -s 115200 ttyS1 rtk_h5 & + sleep 2 # Give hciattach a few seconds to finish attaching firmware + ;; + bcm921) + /usr/bin/hciattach /dev/ttyAMA0 bcm43xx 921600 # specific rpi0, rpi3 + ;; + piscan) + /usr/bin/hciconfig hci0 up piscan # specific rpi + sleep 2 # without the sleep, on rpi4, the agent fails on startup complaining the device is not here + ;; + sprd) + /usr/bin/hciattach_opi -s 1500000 /dev/ttyBT0 sprd & # specific for certain orangepi boards + sleep 2 + ;; + esac + done + + btaddr="$(/usr/bin/batocera-settings-get bluetooth.adapter)" + settings_version="$(/usr/bin/batocera-settings-get controllers.ps3.driver)" + if [ "$settings_version" != "bluez" ] + then + BLUETOOTHD_ARGS="--noplugin=sixaxis" + else + BLUETOOTHD_ARGS="--noplugin=sixaxispair" + fi + + debug="$(/usr/bin/batocera-settings-get controllers.bluetooth.debug)" + if test "${debug}" = 1 + then + start-stop-daemon -S -q -m -p /var/run/bluetoothd.pid --exec /usr/libexec/bluetooth/bluetoothd -- -n -d $BLUETOOTHD_ARGS 2>/var/log/bluetooth-daemon.log & + else + start-stop-daemon -S -q -m -p /var/run/bluetoothd.pid --exec /usr/libexec/bluetooth/bluetoothd -- $BLUETOOTHD_ARGS & + fi + + if [ -n "${btaddr}" ] + then + start-stop-daemon -S -q -m -p /var/run/bluetooth-agent.pid --exec /usr/bin/batocera-bluetooth-agent -- --device "${btaddr}" & + else + start-stop-daemon -S -q -m -p /var/run/bluetooth-agent.pid --exec /usr/bin/batocera-bluetooth-agent & + fi + # for OrangePi LTS devices we need to power on the controller & put in pairable mode + if [ ${BOARD} = "orangepi4-lts" ] || [ ${BOARD} = "orangepi-3-lts" ] || [ ${BOARD} = "orangepi-zero2" ] + then + bluetoothctl power on + bluetoothctl pairable on + fi + ;; + + stop) + start-stop-daemon -K -q -p /var/run/bluetooth-agent.pid + start-stop-daemon -K -q -p /var/run/bluetoothd.pid + killall hciattach >/dev/null 2>&1 + killall hciattach_opi >/dev/null 2>&1 + batocera-bluetooth save + ;; + + restart|reload) + "$0" stop + "$0" start + ;; + + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S50adb b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S50adb new file mode 100755 index 00000000000..e78d1d4cb40 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/S50adb @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Start ADB... +# + +case "$1" in + start) + printf "Starting adb daemon: " + + mount -t configfs none /sys/kernel/config + mkdir -p /sys/kernel/config/usb_gadget/g1 + #USB 2.0 + echo 0x0200 > /sys/kernel/config/usb_gadget/g1/bcdUSB + #Instantiate English strings + mkdir -p /sys/kernel/config/usb_gadget/g1/strings/0x409 + echo 1 > /sys/kernel/config/usb_gadget/g1/os_desc/use 1 + + #Configure VID/PID/ProductName/Serial (replace with your vid/pid) + echo "0x1d6b" > /sys/kernel/config/usb_gadget/g1/idVendor + echo "0x0104" > /sys/kernel/config/usb_gadget/g1/idProduct + echo "0123456789" > /sys/kernel/config/usb_gadget/g1/strings/0x409/serialnumber + echo "Foo Inc" > /sys/kernel/config/usb_gadget/g1/strings/0x409/manufacturer + echo "Bar Prod" > /sys/kernel/config/usb_gadget/g1/strings/0x409/product + + #Create Function(s) Instance(s) + mkdir -p /sys/kernel/config/usb_gadget/g1/functions/ffs.adb + mkdir -p /sys/kernel/config/usb_gadget/g1/configs/b.1 + mkdir -p /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409 + echo "ffs.adb" > /sys/kernel/config/usb_gadget/g1/configs/b.1/strings/0x409/configuration + + #Bind functions + ln -s /sys/kernel/config/usb_gadget/g1/functions/ffs.adb /sys/kernel/config/usb_gadget/g1/configs/b.1 + + mkdir -p /dev/usb-ffs + mkdir -p /dev/usb-ffs/adb + mount -t functionfs adb /dev/usb-ffs/adb + + #Start adbd daemon + start-stop-daemon --start --background --oknodo --quiet --exec /usr/bin/adbd + + echo 0x1 > /sys/kernel/config/usb_gadget/g1/os_desc/b_vendor_code + + #Attach created gadget device to the UDC driver + #UDC driver name obtained from "ls /sys/class/udc/" + sleep 2 + echo 5100000.udc-controller > /sys/kernel/config/usb_gadget/g1/UDC + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + stop) + printf "Stopping adb-daemon: " + killall -9 adbd + [ $? = 0 ] && echo "OK" || echo "FAIL" + ;; + restart|reload) + "$0" stop + "$0" start + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcK b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcK new file mode 100755 index 00000000000..e7465b4a6af --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcK @@ -0,0 +1,24 @@ +#!/bin/sh + +# Stop all init scripts in /etc/init.d +# executing them in reversed numerical order. +# +for i in $(ls -r /etc/init.d/S??*) ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set stop + . $i + ) + ;; + *) + $i stop + ;; + esac +done diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcS b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcS new file mode 100755 index 00000000000..5a5e8b96318 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/init.d/rcS @@ -0,0 +1,41 @@ +#!/bin/sh + +# We need the graphics module in order to use SDL since we are +# using the sdl-compat/SDL2 for rendering +insmod /lib/modules/mali_kbase.ko + +# Rotate screen for the rg28xx +fbset -g 480 640 480 1280 32 + +# Call the charger process +/usr/bin/charger + +# Start the progress bar +/usr/bin/progressbar & + +# Start all init scripts in /etc/init.d +# executing them in numerical order. +# +for i in /etc/init.d/S??* ;do + + # Ignore dangling symlinks (if any). + [ ! -f "$i" ] && continue + + case "$i" in + *.sh) + # Source shell script for speed. + ( + trap - INT QUIT TSTP + set start + . $i + ) + ;; + *) + echo "$i" > /tmp/status.txt + # No sh extension, so fork subprocess. + $i start + ;; + esac + + echo $(date +"%F %T,%3N")": ${i} - started" >> /var/run/boot.log +done diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/triggerhappy/triggers.d/multimedia_keys.conf b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/triggerhappy/triggers.d/multimedia_keys.conf new file mode 100644 index 00000000000..16f9485a844 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/triggerhappy/triggers.d/multimedia_keys.conf @@ -0,0 +1,7 @@ +KEY_VOLUMEUP 1 batocera-audio setSystemVolume +5 +KEY_VOLUMEDOWN 1 batocera-audio setSystemVolume -5 +KEY_POWER+BTN_TL2 1 /usr/bin/poweroff.sh +KEY_POWER 1 pm-suspend +KEY_VOLUMEUP+BTN_TL2 1 batocera-brightness + 5 && store-brightness +KEY_VOLUMEDOWN+BTN_TL2 1 batocera-brightness - 5 && store-brightness +BTN_START+BTN_SELECT 1 batocera-screenshot diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/60-hdmi.rules b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/60-hdmi.rules new file mode 100755 index 00000000000..cd99a307588 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/60-hdmi.rules @@ -0,0 +1,3 @@ +ACTION=="add|change",SUBSYSTEM=="extcon",ENV{DEVPATH}=="/devices/platform/soc/6000000.hdmi/extcon/hdmi",RUN+="/usr/bin/hdmi_audio_switch.sh" + + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/80-headset.rules b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/80-headset.rules new file mode 100755 index 00000000000..8554a6271eb --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/etc/udev/rules.d/80-headset.rules @@ -0,0 +1 @@ +SUBSYSTEM=="switch", ACTION=="add|change", ENV{SWITCH_NAME}=="audio_jack", RUN+="/usr/bin/headset-hotplug.sh" diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/README.md b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/README.md new file mode 100644 index 00000000000..88414388450 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/README.md @@ -0,0 +1,2 @@ +# firmware +Armbian specific firmware diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db new file mode 100644 index 00000000000..270d11a6b5f Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db.p7s b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db.p7s new file mode 100644 index 00000000000..4484987ce9e Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/regulatory.db.p7s differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_config.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_config.bin new file mode 100644 index 00000000000..ad2bc264d72 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_config.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_fw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_fw.bin new file mode 100644 index 00000000000..d29f1640337 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtl8723b_fw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_config b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_config new file mode 100644 index 00000000000..05f5901a67e Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_config differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw new file mode 100644 index 00000000000..b2e2513762b Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw_new b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw_new new file mode 100644 index 00000000000..034f0527843 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtl_bt/rtlbt_fw_new differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_config b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_config new file mode 100644 index 00000000000..c11102563d0 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_config differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_fw b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_fw new file mode 100644 index 00000000000..f0a4140fef2 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlbt/rtl8821c_fw differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188efw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188efw.bin new file mode 100644 index 00000000000..ac9a430a835 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188efw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188eufw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188eufw.bin new file mode 100644 index 00000000000..4ae7e1c5deb Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8188eufw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfw.bin new file mode 100644 index 00000000000..77eb1ebef58 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU.bin new file mode 100644 index 00000000000..b231e1d642d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU_B.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU_B.bin new file mode 100644 index 00000000000..3a3e38675c6 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cfwU_B.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw.bin new file mode 100644 index 00000000000..3aa75065747 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_A.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_A.bin new file mode 100644 index 00000000000..9569d0a236a Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_A.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_B.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_B.bin new file mode 100644 index 00000000000..96089c4c9e6 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_B.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_TMSC.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_TMSC.bin new file mode 100644 index 00000000000..d1b84d4886d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192cufw_TMSC.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192defw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192defw.bin new file mode 100644 index 00000000000..cbb4b887c4d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192defw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eefw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eefw.bin new file mode 100644 index 00000000000..4a034d3ae89 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eefw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_ap_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_ap_wowlan.bin new file mode 100644 index 00000000000..f68d10c67e3 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_ap_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_nic.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_nic.bin new file mode 100644 index 00000000000..4a034d3ae89 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_nic.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_wowlan.bin new file mode 100644 index 00000000000..aebcffc3aad Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192eu_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192sefw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192sefw.bin new file mode 100644 index 00000000000..ed4afe8598c Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8192sefw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8712u.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8712u.bin new file mode 100644 index 00000000000..3f965a652d1 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8712u.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_A.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_A.bin new file mode 100644 index 00000000000..7accded754a Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_A.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B.bin new file mode 100644 index 00000000000..5c374000252 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B_NoBT.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B_NoBT.bin new file mode 100644 index 00000000000..8e9952cbe58 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723aufw_B_NoBT.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723befw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723befw.bin new file mode 100644 index 00000000000..25e183cb15a Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723befw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_ap_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_ap_wowlan.bin new file mode 100644 index 00000000000..944bc16c3d5 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_ap_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_nic.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_nic.bin new file mode 100644 index 00000000000..8d534053823 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_nic.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin new file mode 100644 index 00000000000..473e29c3217 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bs_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_ap_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_ap_wowlan.bin new file mode 100644 index 00000000000..944bc16c3d5 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_ap_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_nic.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_nic.bin new file mode 100644 index 00000000000..8d534053823 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_nic.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_wowlan.bin new file mode 100644 index 00000000000..473e29c3217 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723bu_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw.bin new file mode 100644 index 00000000000..725f2138e1c Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw_B.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw_B.bin new file mode 100644 index 00000000000..993c7f6ecea Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8723fw_B.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw.bin new file mode 100644 index 00000000000..4f84cf94a16 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw_wowlan.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw_wowlan.bin new file mode 100644 index 00000000000..115d49f157d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/firmware/rtlwifi/rtl8821aefw_wowlan.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/build b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/build new file mode 120000 index 00000000000..4bb882e89da --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/build @@ -0,0 +1 @@ +/home/cc/cc_share/h700/release/rg35xxplus/kernel/linux-4.9 \ No newline at end of file diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/bcm_btlpm.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/bcm_btlpm.ko new file mode 100644 index 00000000000..b68c8eebb91 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/bcm_btlpm.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/rtl_btlpm.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/rtl_btlpm.ko new file mode 100644 index 00000000000..b7dfe75cfe0 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/bluetooth/rtl_btlpm.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc030a_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc030a_mipi.ko new file mode 100644 index 00000000000..b8a3c9cf401 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc030a_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc0310_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc0310_mipi.ko new file mode 100644 index 00000000000..6170fc55ddd Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc0310_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2355_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2355_mipi.ko new file mode 100644 index 00000000000..e771a7ef2af Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2355_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2385_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2385_mipi.ko new file mode 100644 index 00000000000..3a4f168aefa Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2385_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc5024_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc5024_mipi.ko new file mode 100644 index 00000000000..00c649ee796 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc5024_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.ko new file mode 100644 index 00000000000..d41ae711313 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/ov5640.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/ov5640.ko new file mode 100644 index 00000000000..e4c5943aa3c Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/platform/sunxi-vin/modules/sensor/ov5640.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/gspca/gspca_main.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/gspca/gspca_main.ko new file mode 100644 index 00000000000..5aa76721c64 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/gspca/gspca_main.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/uvc/uvcvideo.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/uvc/uvcvideo.ko new file mode 100644 index 00000000000..31d11dabbc1 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/usb/uvc/uvcvideo.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko new file mode 100644 index 00000000000..8b6cbb72021 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/net/wireless/rtl8821cs/8821cs.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/net/wireless/rtl8821cs/8821cs.ko new file mode 100644 index 00000000000..69409295106 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/net/wireless/rtl8821cs/8821cs.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/backlight.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/backlight.ko new file mode 100644 index 00000000000..e5d59b9b02d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/backlight.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/generic_bl.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/generic_bl.ko new file mode 100644 index 00000000000..6d8e3fbcfe2 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/generic_bl.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/lcd.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/lcd.ko new file mode 100644 index 00000000000..1a81d4ae7d0 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/kernel/drivers/video/backlight/lcd.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias new file mode 100644 index 00000000000..1a24da4d8ab --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias @@ -0,0 +1,64 @@ +# Aliases extracted from modules themselves. +alias sdio:c*v024CdC821* 8821cs +alias sdio:c*v024CdB821* 8821cs +alias i2c:ov5640 ov5640 +alias i2c:gc0310_mipi gc0310_mipi +alias i2c:gc2355_mipi gc2355_mipi +alias i2c:gc030a_mipi gc030a_mipi +alias i2c:gc2385_mipi gc2385_mipi +alias i2c:gc5024_mipi gc5024_mipi +alias i2c:imx317_mipi imx317_mipi +alias i2c:imx317_mipi_2 imx317_mipi +alias usb:v*p*d*dc*dsc*dp*ic0Eisc01ip01in* uvcvideo +alias usb:v*p*d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v2833p0201d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v1C4Fp3000d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v1B3Bp2951d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v19ABp1000d00*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v19ABp1000d01[0-1]*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v19ABp1000d012[0-6]dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v199Ep8102d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v18ECp3290d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v18ECp3288d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v18ECp3188d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v18CDpCAFEd*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v1871p0516d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v1871p0306d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v17EFp480Bd*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v17DCp0202d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp8A34d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp8A33d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp8A31d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp8A12d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp5931d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v174Fp5212d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v152Dp0310d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v13D3p5103d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0E8Dp0004d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0BD3p0555d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0AC8p3420d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0AC8p3410d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0AC8p332Dd*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v06F8p300Cd*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05E3p0505d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05C8p0403d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05ACp8501d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05A9p7670d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05A9p264Ad*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05A9p2643d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05A9p2641d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v05A9p2640d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v058Fp3820d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v04F2pB071d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v046Dp082Dd*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v046Dp08C7d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v046Dp08C6d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v046Dp08C5d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v046Dp08C3d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v046Dp08C2d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v046Dp08C1d*dc*dsc*dp*icFFisc01ip00in* uvcvideo +alias usb:v045Ep0723d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v045Ep0721d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v045Ep00F8d*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0458p706Ed*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo +alias usb:v0416pA91Ad*dc*dsc*dp*ic0Eisc01ip00in* uvcvideo diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias.bin new file mode 100644 index 00000000000..382f7c734f0 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.alias.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin new file mode 100644 index 00000000000..58dc633136c --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin @@ -0,0 +1,531 @@ +kernel/arch/arm64/crypto/aes-ce-cipher.ko +kernel/arch/arm64/crypto/aes-ce-blk.ko +kernel/kernel/configs.ko +kernel/mm/zsmalloc.ko +kernel/fs/binfmt_script.ko +kernel/fs/mbcache.ko +kernel/fs/configfs/configfs.ko +kernel/fs/crypto/fscrypto.ko +kernel/fs/exfat/exfat.ko +kernel/fs/exportfs/exportfs.ko +kernel/fs/ext2/ext2.ko +kernel/fs/ext4/ext4.ko +kernel/fs/f2fs/f2fs.ko +kernel/fs/fat/fat.ko +kernel/fs/fat/vfat.ko +kernel/fs/fat/msdos.ko +kernel/fs/fuse/fuse.ko +kernel/fs/fuse/cuse.ko +kernel/fs/isofs/isofs.ko +kernel/fs/jbd2/jbd2.ko +kernel/fs/nls/nls_base.ko +kernel/fs/nls/nls_cp437.ko +kernel/fs/nls/nls_cp936.ko +kernel/fs/nls/nls_ascii.ko +kernel/fs/nls/nls_iso8859-1.ko +kernel/fs/nls/nls_utf8.ko +kernel/fs/ntfs/ntfs.ko +kernel/fs/overlayfs/overlay.ko +kernel/fs/pstore/pstore.ko +kernel/fs/pstore/ramoops.ko +kernel/fs/quota/quota_v2.ko +kernel/fs/quota/quota_tree.ko +kernel/fs/sdcardfs/sdcardfs.ko +kernel/fs/udf/udf.ko +kernel/crypto/crypto.ko +kernel/crypto/crypto_wq.ko +kernel/crypto/crypto_algapi.ko +kernel/crypto/aead.ko +kernel/crypto/crypto_blkcipher.ko +kernel/crypto/seqiv.ko +kernel/crypto/echainiv.ko +kernel/crypto/crypto_hash.ko +kernel/crypto/akcipher.ko +kernel/crypto/kpp.ko +kernel/crypto/cryptomgr.ko +kernel/crypto/cmac.ko +kernel/crypto/hmac.ko +kernel/crypto/crypto_null.ko +kernel/crypto/md4.ko +kernel/crypto/md5.ko +kernel/crypto/sha1_generic.ko +kernel/crypto/sha256_generic.ko +kernel/crypto/sha512_generic.ko +kernel/crypto/gf128mul.ko +kernel/crypto/ecb.ko +kernel/crypto/cbc.ko +kernel/crypto/cts.ko +kernel/crypto/xts.ko +kernel/crypto/ctr.ko +kernel/crypto/adiantum.ko +kernel/crypto/nhpoly1305.ko +kernel/crypto/gcm.ko +kernel/crypto/ccm.ko +kernel/crypto/cryptd.ko +kernel/crypto/des_generic.ko +kernel/crypto/aes_generic.ko +kernel/crypto/arc4.ko +kernel/crypto/chacha_generic.ko +kernel/crypto/poly1305_generic.ko +kernel/crypto/deflate.ko +kernel/crypto/crc32c_generic.ko +kernel/crypto/crc32_generic.ko +kernel/crypto/authenc.ko +kernel/crypto/authencesn.ko +kernel/crypto/lzo.ko +kernel/crypto/lz4.ko +kernel/crypto/rng.ko +kernel/crypto/drbg.ko +kernel/crypto/jitterentropy_rng.ko +kernel/crypto/ghash-generic.ko +kernel/crypto/ablk_helper.ko +kernel/block/deadline-iosched.ko +kernel/block/cfq-iosched.ko +kernel/drivers/base/firmware_class.ko +kernel/drivers/base/regmap/regmap-i2c.ko +kernel/drivers/base/regmap/regmap-mmio.ko +kernel/drivers/block/brd.ko +kernel/drivers/block/loop.ko +kernel/drivers/block/../../modules/nand/sun50iw9p1/nand.ko +kernel/drivers/block/../../modules/nand/sun50iw9p1/nftl_v8.ko +kernel/drivers/bluetooth/hci_uart.ko +kernel/drivers/char/dump_reg/dump_reg.ko +kernel/drivers/char/sunxi-di/deinterlace.ko +kernel/drivers/char/sunxi-sysinfo/sysinfo.ko +kernel/drivers/cpufreq/cpufreq_performance.ko +kernel/drivers/cpufreq/cpufreq_powersave.ko +kernel/drivers/cpufreq/cpufreq_userspace.ko +kernel/drivers/cpufreq/cpufreq_ondemand.ko +kernel/drivers/cpufreq/cpufreq_conservative.ko +kernel/drivers/cpufreq/cpufreq_interactive.ko +kernel/drivers/cpufreq/cpufreq-dt.ko +kernel/drivers/cpufreq/sun50i-cpufreq-nvmem.ko +kernel/drivers/devfreq/governor_simpleondemand.ko +kernel/drivers/dma/virt-dma.ko +kernel/drivers/dma/sunxi-dma.ko +kernel/drivers/extcon/extcon-core.ko +kernel/drivers/gpio/gpio-generic.ko +kernel/drivers/gpio/gpio-sunxi.ko +kernel/drivers/hid/hid.ko +kernel/drivers/hid/uhid.ko +kernel/drivers/hid/hid-generic.ko +kernel/drivers/hid/hid-a4tech.ko +kernel/drivers/hid/hid-axff.ko +kernel/drivers/hid/hid-apple.ko +kernel/drivers/hid/hid-belkin.ko +kernel/drivers/hid/hid-betopff.ko +kernel/drivers/hid/hid-cherry.ko +kernel/drivers/hid/hid-chicony.ko +kernel/drivers/hid/hid-cypress.ko +kernel/drivers/hid/hid-dr.ko +kernel/drivers/hid/hid-emsff.ko +kernel/drivers/hid/hid-elecom.ko +kernel/drivers/hid/hid-ezkey.ko +kernel/drivers/hid/hid-gyration.ko +kernel/drivers/hid/hid-holtek-kbd.ko +kernel/drivers/hid/hid-holtek-mouse.ko +kernel/drivers/hid/hid-holtekff.ko +kernel/drivers/hid/hid-kensington.ko +kernel/drivers/hid/hid-keytouch.ko +kernel/drivers/hid/hid-kye.ko +kernel/drivers/hid/hid-lcpower.ko +kernel/drivers/hid/hid-logitech.ko +kernel/drivers/hid/hid-logitech-dj.ko +kernel/drivers/hid/hid-logitech-hidpp.ko +kernel/drivers/hid/hid-magicmouse.ko +kernel/drivers/hid/hid-microsoft.ko +kernel/drivers/hid/hid-monterey.ko +kernel/drivers/hid/hid-multitouch.ko +kernel/drivers/hid/hid-ntrig.ko +kernel/drivers/hid/hid-ortek.ko +kernel/drivers/hid/hid-prodikeys.ko +kernel/drivers/hid/hid-pl.ko +kernel/drivers/hid/hid-petalynx.ko +kernel/drivers/hid/hid-picolcd.ko +kernel/drivers/hid/hid-primax.ko +kernel/drivers/hid/hid-roccat.ko +kernel/drivers/hid/hid-roccat-common.ko +kernel/drivers/hid/hid-roccat-arvo.ko +kernel/drivers/hid/hid-roccat-isku.ko +kernel/drivers/hid/hid-roccat-kone.ko +kernel/drivers/hid/hid-roccat-koneplus.ko +kernel/drivers/hid/hid-roccat-konepure.ko +kernel/drivers/hid/hid-roccat-kovaplus.ko +kernel/drivers/hid/hid-roccat-lua.ko +kernel/drivers/hid/hid-roccat-pyra.ko +kernel/drivers/hid/hid-roccat-ryos.ko +kernel/drivers/hid/hid-roccat-savu.ko +kernel/drivers/hid/hid-saitek.ko +kernel/drivers/hid/hid-samsung.ko +kernel/drivers/hid/hid-sjoy.ko +kernel/drivers/hid/hid-sony.ko +kernel/drivers/hid/hid-speedlink.ko +kernel/drivers/hid/hid-sunplus.ko +kernel/drivers/hid/hid-gaff.ko +kernel/drivers/hid/hid-tmff.ko +kernel/drivers/hid/hid-tivo.ko +kernel/drivers/hid/hid-topseed.ko +kernel/drivers/hid/hid-twinhan.ko +kernel/drivers/hid/hid-uclogic.ko +kernel/drivers/hid/hid-zpff.ko +kernel/drivers/hid/hid-zydacron.ko +kernel/drivers/hid/wacom.ko +kernel/drivers/hid/hid-waltop.ko +kernel/drivers/hid/hid-wiimote.ko +kernel/drivers/hid/usbhid/usbhid.ko +kernel/drivers/hwmon/hwmon.ko +kernel/drivers/i2c/i2c-core.ko +kernel/drivers/i2c/i2c-smbus.ko +kernel/drivers/i2c/i2c-dev.ko +kernel/drivers/i2c/i2c-mux.ko +kernel/drivers/i2c/busses/i2c-sunxi.ko +kernel/drivers/input/input-core.ko +kernel/drivers/input/ff-memless.ko +kernel/drivers/input/input-polldev.ko +kernel/drivers/input/input-leds.ko +kernel/drivers/input/joydev.ko +kernel/drivers/input/evdev.ko +kernel/drivers/input/init-input.ko +kernel/drivers/input/joystick/analog.ko +kernel/drivers/input/joystick/sidewinder.ko +kernel/drivers/input/joystick/xpad.ko +kernel/drivers/input/keyboard/atkbd.ko +kernel/drivers/input/keyboard/gpio_keys_polled.ko +kernel/drivers/input/misc/gpio_event.ko +kernel/drivers/input/misc/gpio_matrix.ko +kernel/drivers/input/misc/gpio_input.ko +kernel/drivers/input/misc/gpio_output.ko +kernel/drivers/input/misc/gpio_axis.ko +kernel/drivers/input/misc/axp2101-pek.ko +kernel/drivers/input/misc/uinput.ko +kernel/drivers/input/gameport/gameport.ko +kernel/drivers/input/serio/serio.ko +kernel/drivers/input/serio/libps2.ko +kernel/drivers/iommu/iova.ko +kernel/drivers/leds/led-class.ko +kernel/drivers/md/dm-mod.ko +kernel/drivers/md/dm-bufio.ko +kernel/drivers/md/dm-crypt.ko +kernel/drivers/md/dm-verity.ko +kernel/drivers/media/media.ko +kernel/drivers/media/cedar-ve/cedar_ve.ko +kernel/drivers/media/i2c/ir-kbd-i2c.ko +kernel/drivers/media/platform/sunxi-vin/vin_io.ko +kernel/drivers/media/platform/sunxi-vin/vin_v4l2.ko +kernel/drivers/media/platform/sunxi-vin/modules/actuator/actuator.ko +kernel/drivers/media/platform/sunxi_car_reverse/sunxi_car_reverse.ko +kernel/drivers/media/rc/rc-core.ko +kernel/drivers/media/v4l2-core/videodev.ko +kernel/drivers/media/v4l2-core/v4l2-common.ko +kernel/drivers/media/v4l2-core/v4l2-dv-timings.ko +kernel/drivers/media/v4l2-core/videobuf2-core.ko +kernel/drivers/media/v4l2-core/videobuf2-v4l2.ko +kernel/drivers/media/v4l2-core/videobuf2-memops.ko +kernel/drivers/media/v4l2-core/videobuf2-dma-contig.ko +kernel/drivers/mfd/mfd-core.ko +kernel/drivers/mfd/axp2101.ko +kernel/drivers/mfd/axp2101-i2c.ko +kernel/drivers/misc/memory_state_time.ko +kernel/drivers/misc/sst_storage/sst_storage.ko +kernel/drivers/mmc/card/mmc_block.ko +kernel/drivers/mmc/core/mmc_core.ko +kernel/drivers/mmc/core/pwrseq_simple.ko +kernel/drivers/mmc/core/pwrseq_emmc.ko +kernel/drivers/mmc/host/sunxi_mmc_host.ko +kernel/drivers/net/mii.ko +kernel/drivers/net/tun.ko +kernel/drivers/net/phy/libphy.ko +kernel/drivers/net/phy/fixed_phy.ko +kernel/drivers/net/ppp/ppp_generic.ko +kernel/drivers/net/ppp/ppp_async.ko +kernel/drivers/net/ppp/bsd_comp.ko +kernel/drivers/net/ppp/ppp_deflate.ko +kernel/drivers/net/ppp/ppp_mppe.ko +kernel/drivers/net/ppp/ppp_synctty.ko +kernel/drivers/net/ppp/pppox.ko +kernel/drivers/net/ppp/pppoe.ko +kernel/drivers/net/ppp/pptp.ko +kernel/drivers/net/ppp/pppolac.ko +kernel/drivers/net/ppp/pppopns.ko +kernel/drivers/net/slip/slhc.ko +kernel/drivers/net/usb/r8152.ko +kernel/drivers/net/usb/asix.ko +kernel/drivers/net/usb/ax88179_178a.ko +kernel/drivers/net/usb/cdc_ether.ko +kernel/drivers/net/usb/net1080.ko +kernel/drivers/net/usb/cdc_subset.ko +kernel/drivers/net/usb/zaurus.ko +kernel/drivers/net/usb/usbnet.ko +kernel/drivers/net/usb/cdc_ncm.ko +kernel/drivers/nvmem/nvmem_core.ko +kernel/drivers/nvmem/nvmem_sun50i_sid.ko +kernel/drivers/nvmem/nvmem_axp.ko +kernel/drivers/of/of_mdio.ko +kernel/drivers/power/supply/axp2202_usb_power.ko +kernel/drivers/power/supply/axp2202_battery.ko +kernel/drivers/pwm/pwm-sunxi-new.ko +kernel/drivers/regulator/fixed.ko +kernel/drivers/regulator/virtual.ko +kernel/drivers/regulator/userspace-consumer.ko +kernel/drivers/regulator/axp2101-regulator.ko +kernel/drivers/rtc/rtc-sunxi.ko +kernel/drivers/scsi/scsi_mod.ko +kernel/drivers/scsi/sd_mod.ko +kernel/drivers/staging/android/ion/sunxi/sunxi_ion.ko +kernel/drivers/tee/tee.ko +kernel/drivers/tee/optee/optee.ko +kernel/drivers/thermal/thermal_sys.ko +kernel/drivers/thermal/sunxi_thermal-ng.ko +kernel/drivers/tty/serial/serial_core.ko +kernel/drivers/tty/serial/sunxi-uart.ko +kernel/drivers/usb/common/usb-common.ko +kernel/drivers/usb/core/usbcore.ko +kernel/drivers/usb/gadget/libcomposite.ko +kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko +kernel/drivers/usb/gadget/function/usb_f_fs.ko +kernel/drivers/usb/gadget/function/usb_f_midi.ko +kernel/drivers/usb/gadget/function/usb_f_mtp.ko +kernel/drivers/usb/gadget/function/usb_f_audio_source.ko +kernel/drivers/usb/gadget/function/usb_f_accessory.ko +kernel/drivers/usb/gadget/udc/udc-core.ko +kernel/drivers/usb/host/ehci-hcd.ko +kernel/drivers/usb/host/ohci-hcd.ko +kernel/drivers/usb/host/sunxi_hci.ko +kernel/drivers/usb/storage/uas.ko +kernel/drivers/usb/storage/usb-storage.ko +kernel/drivers/usb/storage/ums-alauda.ko +kernel/drivers/usb/storage/ums-cypress.ko +kernel/drivers/usb/storage/ums-datafab.ko +kernel/drivers/usb/storage/ums-eneub6250.ko +kernel/drivers/usb/storage/ums-freecom.ko +kernel/drivers/usb/storage/ums-isd200.ko +kernel/drivers/usb/storage/ums-jumpshot.ko +kernel/drivers/usb/storage/ums-karma.ko +kernel/drivers/usb/storage/ums-onetouch.ko +kernel/drivers/usb/storage/ums-realtek.ko +kernel/drivers/usb/storage/ums-sddr09.ko +kernel/drivers/usb/storage/ums-sddr55.ko +kernel/drivers/usb/storage/ums-usbat.ko +kernel/drivers/usb/sunxi_usb/sunxi_usbc.ko +kernel/drivers/usb/sunxi_usb/sunxi_usb_udc.ko +kernel/drivers/video/fbdev/core/fb.ko +kernel/drivers/video/fbdev/core/cfbfillrect.ko +kernel/drivers/video/fbdev/core/cfbcopyarea.ko +kernel/drivers/video/fbdev/core/cfbimgblt.ko +kernel/drivers/video/fbdev/sunxi/disp2/disp/disp.ko +kernel/drivers/video/fbdev/sunxi/disp2/hdmi2/hdmi20.ko +kernel/sound/soundcore.ko +kernel/sound/core/snd.ko +kernel/sound/core/snd-timer.ko +kernel/sound/core/snd-hrtimer.ko +kernel/sound/core/snd-pcm.ko +kernel/sound/core/snd-pcm-dmaengine.ko +kernel/sound/core/snd-rawmidi.ko +kernel/sound/core/seq/snd-seq.ko +kernel/sound/core/seq/snd-seq-device.ko +kernel/sound/core/seq/snd-seq-dummy.ko +kernel/sound/core/seq/snd-seq-midi.ko +kernel/sound/core/seq/snd-seq-midi-event.ko +kernel/sound/soc/snd-soc-core.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_component_jack.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_pcm.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_pcm_hdmi.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_common.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_internal_codec.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_codec_hdmi.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_aaudio.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_ahub_dam.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_ahub.ko +kernel/sound/soc/sunxi_v2/snd_soc_sunxi_machine.ko +kernel/net/bluetooth/bluetooth.ko +kernel/net/bluetooth/hidp/hidp.ko +kernel/net/bluetooth/rfcomm/rfcomm.ko +kernel/net/core/pktgen.ko +kernel/net/ipv4/ip_tunnel.ko +kernel/net/ipv4/ipip.ko +kernel/net/ipv4/fou.ko +kernel/net/ipv4/gre.ko +kernel/net/ipv4/ip_gre.ko +kernel/net/ipv4/udp_tunnel.ko +kernel/net/ipv4/ip_vti.ko +kernel/net/ipv4/ah4.ko +kernel/net/ipv4/esp4.ko +kernel/net/ipv4/ipcomp.ko +kernel/net/ipv4/xfrm4_tunnel.ko +kernel/net/ipv4/xfrm4_mode_beet.ko +kernel/net/ipv4/tunnel4.ko +kernel/net/ipv4/xfrm4_mode_transport.ko +kernel/net/ipv4/xfrm4_mode_tunnel.ko +kernel/net/ipv4/inet_diag.ko +kernel/net/ipv4/tcp_diag.ko +kernel/net/ipv4/udp_diag.ko +kernel/net/ipv4/tcp_bic.ko +kernel/net/ipv4/tcp_cubic.ko +kernel/net/ipv4/tcp_westwood.ko +kernel/net/ipv4/tcp_htcp.ko +kernel/net/ipv4/netfilter/nf_conntrack_ipv4.ko +kernel/net/ipv4/netfilter/nf_nat_ipv4.ko +kernel/net/ipv4/netfilter/nf_defrag_ipv4.ko +kernel/net/ipv4/netfilter/nf_reject_ipv4.ko +kernel/net/ipv4/netfilter/nf_nat_h323.ko +kernel/net/ipv4/netfilter/nf_nat_pptp.ko +kernel/net/ipv4/netfilter/nf_nat_masquerade_ipv4.ko +kernel/net/ipv4/netfilter/nf_nat_proto_gre.ko +kernel/net/ipv4/netfilter/ip_tables.ko +kernel/net/ipv4/netfilter/iptable_filter.ko +kernel/net/ipv4/netfilter/iptable_mangle.ko +kernel/net/ipv4/netfilter/iptable_nat.ko +kernel/net/ipv4/netfilter/iptable_raw.ko +kernel/net/ipv4/netfilter/iptable_security.ko +kernel/net/ipv4/netfilter/ipt_ah.ko +kernel/net/ipv4/netfilter/ipt_ECN.ko +kernel/net/ipv4/netfilter/ipt_MASQUERADE.ko +kernel/net/ipv4/netfilter/ipt_REJECT.ko +kernel/net/ipv4/netfilter/arp_tables.ko +kernel/net/ipv4/netfilter/arpt_mangle.ko +kernel/net/ipv4/netfilter/arptable_filter.ko +kernel/net/ipv4/netfilter/nf_dup_ipv4.ko +kernel/net/ipv6/ipv6.ko +kernel/net/ipv6/ah6.ko +kernel/net/ipv6/esp6.ko +kernel/net/ipv6/ipcomp6.ko +kernel/net/ipv6/xfrm6_tunnel.ko +kernel/net/ipv6/tunnel6.ko +kernel/net/ipv6/xfrm6_mode_transport.ko +kernel/net/ipv6/xfrm6_mode_tunnel.ko +kernel/net/ipv6/xfrm6_mode_beet.ko +kernel/net/ipv6/mip6.ko +kernel/net/ipv6/ip6_vti.ko +kernel/net/ipv6/sit.ko +kernel/net/ipv6/ip6_tunnel.ko +kernel/net/ipv6/fou6.ko +kernel/net/ipv6/inet6_hashtables.ko +kernel/net/ipv6/ip6_udp_tunnel.ko +kernel/net/ipv6/netfilter/ip6_tables.ko +kernel/net/ipv6/netfilter/ip6table_filter.ko +kernel/net/ipv6/netfilter/ip6table_mangle.ko +kernel/net/ipv6/netfilter/ip6table_raw.ko +kernel/net/ipv6/netfilter/ip6table_security.ko +kernel/net/ipv6/netfilter/ip6table_nat.ko +kernel/net/ipv6/netfilter/nf_conntrack_ipv6.ko +kernel/net/ipv6/netfilter/nf_nat_ipv6.ko +kernel/net/ipv6/netfilter/nf_defrag_ipv6.ko +kernel/net/ipv6/netfilter/nf_reject_ipv6.ko +kernel/net/ipv6/netfilter/ip6t_ah.ko +kernel/net/ipv6/netfilter/ip6t_eui64.ko +kernel/net/ipv6/netfilter/ip6t_frag.ko +kernel/net/ipv6/netfilter/ip6t_ipv6header.ko +kernel/net/ipv6/netfilter/ip6t_mh.ko +kernel/net/ipv6/netfilter/ip6t_hbh.ko +kernel/net/ipv6/netfilter/ip6t_rpfilter.ko +kernel/net/ipv6/netfilter/ip6t_rt.ko +kernel/net/ipv6/netfilter/ip6t_REJECT.ko +kernel/net/key/af_key.ko +kernel/net/l2tp/l2tp_core.ko +kernel/net/l2tp/l2tp_ppp.ko +kernel/net/mac80211/mac80211.ko +kernel/net/netfilter/nfnetlink.ko +kernel/net/netfilter/nfnetlink_acct.ko +kernel/net/netfilter/nfnetlink_queue.ko +kernel/net/netfilter/nfnetlink_log.ko +kernel/net/netfilter/nf_conntrack.ko +kernel/net/netfilter/nf_conntrack_proto_dccp.ko +kernel/net/netfilter/nf_conntrack_proto_gre.ko +kernel/net/netfilter/nf_conntrack_proto_sctp.ko +kernel/net/netfilter/nf_conntrack_proto_udplite.ko +kernel/net/netfilter/nf_conntrack_netlink.ko +kernel/net/netfilter/nfnetlink_cttimeout.ko +kernel/net/netfilter/nfnetlink_cthelper.ko +kernel/net/netfilter/nf_conntrack_amanda.ko +kernel/net/netfilter/nf_conntrack_ftp.ko +kernel/net/netfilter/nf_conntrack_h323.ko +kernel/net/netfilter/nf_conntrack_irc.ko +kernel/net/netfilter/nf_conntrack_broadcast.ko +kernel/net/netfilter/nf_conntrack_netbios_ns.ko +kernel/net/netfilter/nf_conntrack_pptp.ko +kernel/net/netfilter/nf_conntrack_sane.ko +kernel/net/netfilter/nf_conntrack_tftp.ko +kernel/net/netfilter/nf_nat.ko +kernel/net/netfilter/nf_nat_redirect.ko +kernel/net/netfilter/nf_nat_proto_dccp.ko +kernel/net/netfilter/nf_nat_proto_udplite.ko +kernel/net/netfilter/nf_nat_proto_sctp.ko +kernel/net/netfilter/nf_nat_amanda.ko +kernel/net/netfilter/nf_nat_ftp.ko +kernel/net/netfilter/nf_nat_irc.ko +kernel/net/netfilter/nf_nat_tftp.ko +kernel/net/netfilter/x_tables.ko +kernel/net/netfilter/xt_tcpudp.ko +kernel/net/netfilter/xt_mark.ko +kernel/net/netfilter/xt_connmark.ko +kernel/net/netfilter/xt_nat.ko +kernel/net/netfilter/xt_AUDIT.ko +kernel/net/netfilter/xt_CLASSIFY.ko +kernel/net/netfilter/xt_CONNSECMARK.ko +kernel/net/netfilter/xt_CT.ko +kernel/net/netfilter/xt_HL.ko +kernel/net/netfilter/xt_NETMAP.ko +kernel/net/netfilter/xt_NFLOG.ko +kernel/net/netfilter/xt_NFQUEUE.ko +kernel/net/netfilter/xt_RATEEST.ko +kernel/net/netfilter/xt_REDIRECT.ko +kernel/net/netfilter/xt_SECMARK.ko +kernel/net/netfilter/xt_TPROXY.ko +kernel/net/netfilter/xt_TCPMSS.ko +kernel/net/netfilter/xt_TRACE.ko +kernel/net/netfilter/xt_IDLETIMER.ko +kernel/net/netfilter/xt_bpf.ko +kernel/net/netfilter/xt_comment.ko +kernel/net/netfilter/xt_connlimit.ko +kernel/net/netfilter/xt_conntrack.ko +kernel/net/netfilter/xt_ecn.ko +kernel/net/netfilter/xt_hashlimit.ko +kernel/net/netfilter/xt_helper.ko +kernel/net/netfilter/xt_hl.ko +kernel/net/netfilter/xt_iprange.ko +kernel/net/netfilter/xt_length.ko +kernel/net/netfilter/xt_limit.ko +kernel/net/netfilter/xt_mac.ko +kernel/net/netfilter/xt_owner.ko +kernel/net/netfilter/xt_pkttype.ko +kernel/net/netfilter/xt_policy.ko +kernel/net/netfilter/xt_quota.ko +kernel/net/netfilter/xt_quota2.ko +kernel/net/netfilter/xt_socket.ko +kernel/net/netfilter/xt_state.ko +kernel/net/netfilter/xt_statistic.ko +kernel/net/netfilter/xt_string.ko +kernel/net/netfilter/xt_time.ko +kernel/net/netfilter/xt_u32.ko +kernel/net/packet/af_packet.ko +kernel/net/rfkill/rfkill.ko +kernel/net/sched/sch_htb.ko +kernel/net/sched/sch_ingress.ko +kernel/net/sched/sch_qfq.ko +kernel/net/sched/cls_u32.ko +kernel/net/sched/cls_bpf.ko +kernel/net/sched/em_u32.ko +kernel/net/unix/unix.ko +kernel/net/unix/unix_diag.ko +kernel/net/wireless/cfg80211.ko +kernel/net/xfrm/xfrm_algo.ko +kernel/net/xfrm/xfrm_user.ko +kernel/net/xfrm/xfrm_ipcomp.ko +kernel/net/xfrm/xfrm_interface.ko +kernel/lib/bitrev.ko +kernel/lib/crc-ccitt.ko +kernel/lib/crc16.ko +kernel/lib/crc-itu-t.ko +kernel/lib/crc32.ko +kernel/lib/libcrc32c.ko +kernel/lib/ts_kmp.ko +kernel/lib/ts_bm.ko +kernel/lib/ts_fsm.ko +kernel/lib/lz4/lz4_compress.ko +kernel/lib/lz4/lz4_decompress.ko +kernel/lib/lzo/lzo_compress.ko +kernel/lib/lzo/lzo_decompress.ko +kernel/lib/reed_solomon/reed_solomon.ko +kernel/lib/xz/xz_dec.ko +kernel/lib/zlib_deflate/zlib_deflate.ko +kernel/lib/zlib_inflate/zlib_inflate.ko diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin.bin new file mode 100644 index 00000000000..7ec98f0fd6b Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.builtin.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep new file mode 100644 index 00000000000..6206f024f0e --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep @@ -0,0 +1,16 @@ +kernel/drivers/video/backlight/lcd.ko: +kernel/drivers/video/backlight/backlight.ko: +kernel/drivers/video/backlight/generic_bl.ko: kernel/drivers/video/backlight/backlight.ko +kernel/drivers/net/wireless/rtl8821cs/8821cs.ko: +kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/ov5640.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc0310_mipi.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2355_mipi.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc030a_mipi.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2385_mipi.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc5024_mipi.ko: +kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.ko: +kernel/drivers/media/usb/uvc/uvcvideo.ko: kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko +kernel/drivers/media/usb/gspca/gspca_main.ko: +kernel/drivers/bluetooth/bcm_btlpm.ko: +kernel/drivers/bluetooth/rtl_btlpm.ko: diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep.bin new file mode 100644 index 00000000000..5f250312f5f Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.dep.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.devname b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.devname new file mode 100644 index 00000000000..e69de29bb2d diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.order b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.order new file mode 100644 index 00000000000..55e2fecb153 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.order @@ -0,0 +1,16 @@ +kernel/drivers/video/backlight/lcd.ko +kernel/drivers/video/backlight/backlight.ko +kernel/drivers/video/backlight/generic_bl.ko +kernel/drivers/net/wireless/rtl8821cs/8821cs.ko +kernel/drivers/media/v4l2-core/videobuf2-vmalloc.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/ov5640.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc0310_mipi.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2355_mipi.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc030a_mipi.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc2385_mipi.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/gc5024_mipi.ko +kernel/drivers/media/platform/sunxi-vin/modules/sensor/imx317_mipi.ko +kernel/drivers/media/usb/uvc/uvcvideo.ko +kernel/drivers/media/usb/gspca/gspca_main.ko +kernel/drivers/bluetooth/bcm_btlpm.ko +kernel/drivers/bluetooth/rtl_btlpm.ko diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.softdep b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.softdep new file mode 100644 index 00000000000..5554ccca7f9 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.softdep @@ -0,0 +1 @@ +# Soft dependencies extracted from modules themselves. diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols new file mode 100644 index 00000000000..0541569b128 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols @@ -0,0 +1,25 @@ +# Aliases for symbols, used by symbol_request(). +alias symbol:vb2_vmalloc_memops videobuf2_vmalloc +alias symbol:gspca_disconnect gspca_main +alias symbol:gspca_dev_probe gspca_main +alias symbol:backlight_device_get_by_type backlight +alias symbol:gspca_expo_autogain gspca_main +alias symbol:gspca_resume gspca_main +alias symbol:backlight_device_register backlight +alias symbol:backlight_unregister_notifier backlight +alias symbol:backlight_device_unregister backlight +alias symbol:backlight_register_notifier backlight +alias symbol:lcd_device_register lcd +alias symbol:backlight_force_update backlight +alias symbol:gspca_coarse_grained_expo_autogain gspca_main +alias symbol:gspca_suspend gspca_main +alias symbol:devm_backlight_device_unregister backlight +alias symbol:gspca_debug gspca_main +alias symbol:gspca_dev_probe2 gspca_main +alias symbol:backlight_device_set_brightness backlight +alias symbol:gspca_frame_add gspca_main +alias symbol:lcd_device_unregister lcd +alias symbol:devm_lcd_device_register lcd +alias symbol:devm_lcd_device_unregister lcd +alias symbol:devm_backlight_device_register backlight +alias symbol:of_find_backlight_by_node backlight diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols.bin b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols.bin new file mode 100644 index 00000000000..48e07ace8ff Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/modules.symbols.bin differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/source b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/source new file mode 120000 index 00000000000..4bb882e89da --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/4.9.170/source @@ -0,0 +1 @@ +/home/cc/cc_share/h700/release/rg35xxplus/kernel/linux-4.9 \ No newline at end of file diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/mali_kbase.ko b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/mali_kbase.ko new file mode 100644 index 00000000000..501dfe61949 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/lib/modules/mali_kbase.ko differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-brightness b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-brightness new file mode 100755 index 00000000000..ca7bbe2acc1 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-brightness @@ -0,0 +1,67 @@ +#!/bin/sh + +CYCLESTEP=20 # % additional brightbess at each step + +B="${D}"/brightness +XMAX=255 + +setValue() { + NEWVAL=$1 + XMAX=$2 + + test "${NEWVAL}" -lt 0 && NEWVAL=0 + test "${NEWVAL}" -gt "${XMAX}" && NEWVAL="${XMAX}" + + brightness set "${NEWVAL}" +} + +cycle() { + X=$(cat "${B}") + FVALUE=$(echo "scale=3;${X}" "*" "100" / "${XMAX}" | bc) + LC_ALL=C FVALUE=$(printf '%.*f\n' 0 "${FVALUE}") # round + NEWVAL=$(echo "${FVALUE} + ${CYCLESTEP}" | bc) + [ "${NEWVAL}" -gt 100 ] && NEWVAL=0 + echo "Brightness cycling to ${NEWVAL}%" + NEWVAL=$(expr "${NEWVAL}" "*" "${XMAX}" / 100) + setValue "${NEWVAL}" "${XMAX}" + exit 0 +} + +# get +if test $# = 0 +then + X=$(brightness get) + FVALUE=$(echo "scale=3;${X}" "*" "100" / "${XMAX}" | bc) + LC_ALL=C printf '%.*f\n' 0 "${FVALUE}" # round + exit 0 +fi + +# set +if test $# = 1 +then + if [ "${1}" = "cycle" ]; then + cycle + else + NEWVAL=$(expr "${1}" "*" "${XMAX}" / 100) +# setValue "${NEWVAL}" "${XMAX}" + brightness set "${NEWVAL}" + exit 0 + fi +fi + +# set + +if test $# = 2 +then + X=$(brightness get) + DELTA=$(expr "${2}" '*' ${XMAX} / 100) + NEWVAL=$(expr "${X}" "${1}" "${DELTA}") + setValue "${NEWVAL}" "${XMAX}" + exit 0 +fi + +# help +echo "${0}" >&2 +echo "${0} + 10" >&2 +echo "${0} - 20" >&2 +echo "${0} cycle" >&2 +exit 1 diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-resolution b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-resolution new file mode 100755 index 00000000000..5f86774de82 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/batocera-resolution @@ -0,0 +1,44 @@ +#!/bin/bash + +FILEMODES="/sys/class/graphics/fb0/modes" + +f_usage() { + echo "$0 currentMode" >&2 + echo "$0 currentResolution" >&2 +} + +if [ $# -eq 0 ]; then + f_usage + exit 1 +fi + +ACTION=$1 +shift + +case "${ACTION}" in + "supportSystemRotation") + exit 1 + ;; + "listModes") + ;; + "setMode") + ;; + "minTomaxResolution" | "minTomaxResolution-secure") + ;; + "currentMode"|"currentResolution") + hdmi_state_file="/sys/devices/platform/soc/6000000.hdmi/extcon/hdmi/state" + # + # # Read the state + state=$(cat "$hdmi_state_file") + if [ "$state" == "HDMI=1" ]; then + echo 1280x720 + else + echo 640x480 + fi + ;; + *) + f_usage + >&2 echo "error: invalid command ${ACTION}" + exit 1 +esac +exit 0 diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/brightness b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/brightness new file mode 100755 index 00000000000..7071a4e2b4c Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/brightness differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/charger b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/charger new file mode 100755 index 00000000000..a7c1fcde955 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/charger differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/hdmi_audio_switch.sh b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/hdmi_audio_switch.sh new file mode 100755 index 00000000000..11ea4cd349d --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/hdmi_audio_switch.sh @@ -0,0 +1,61 @@ +#!/bin/bash + +# Check if debugfs is mounted +if grep -qs 'debugfs' /proc/mounts; then + echo "debugfs is mounted." >> /var/log/hdmi-event.log +else + echo "debugfs is not mounted. Attempting to mount..." >> /var/log/hdmi-event.log + mount -t debugfs debugfs /sys/kernel/debug + if [ $? -eq 0 ]; then + echo "debugfs successfully mounted." >> /var/log/hdmi-event.log + else + echo "Failed to mount debugfs." >> /var/log/hdmi-event.log + exit 1 + fi +fi + +# Path to the HDMI state file +hdmi_state_file="/sys/devices/platform/soc/6000000.hdmi/extcon/hdmi/state" + +# Read the state +state=$(cat "$hdmi_state_file") + +display="/sys/kernel/debug/dispdbg" + +echo "$(date) - HDMI event triggered - ${state}" >> /var/log/hdmi-event.log + +es_state=$(batocera-es-swissknife --espid) + +if [ "$state" == "HDMI=1" ]; then +# batocera-audio set alsa_output.platform-soc_03000000_ahub1_mach.unknown + batocera-audio set alsa_output._sys_devices_platform_soc_soc_03000000_ahub1_mach_sound_card2.stereo-fallback + + echo disp0 > $display/name + echo switch1 > $display/command + echo 4 10 0 0 0x4 0x101 0 0 0 8 > $display/param + echo 1 > $display/start + + if [ "$es_state" != 0 ]; then + batocera-es-swissknife --restart + fi + + fbset -g 1280 720 1280 1440 32 # -t 13426 192 56 22 1 136 3 + echo "CONNECTED!" +else +# batocera-audio set alsa_output.platform-soc_03000000_codec_mach.unknown + batocera-audio set alsa_output._sys_devices_platform_soc_soc_03000000_codec_mach_sound_card0.stereo-fallback + + echo disp0 > $display/name + echo switch > $display/command + echo 1 0 > $display/param + echo 1 > $display/start + + if [ "$es_state" != 0 ]; then + batocera-es-swissknife --restart + fi + + fbset -g 480 640 480 1280 32 + + echo "HDMI DISCONNECTED!" +fi + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/poweroff.sh b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/poweroff.sh new file mode 100755 index 00000000000..ff8236f2c55 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/poweroff.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +# Save ALSA mixer state +# alsactl store 0 -f /userdata/system/.asound.state + +# Try to stop all processes cleanly +/etc/init.d/rcK +sync + +# Start a background process that waits for a timeout duration before forcing shutdown +( sleep 5 && reboot -f -p ) & + +# Try a clean shutdown +shutdown -Ph now + +# If we reach this point, the shutdown was successful and we can kill the background job +kill $! + + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/progressbar b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/progressbar new file mode 100755 index 00000000000..c54bcee623e Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/progressbar differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/reboot.sh b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/reboot.sh new file mode 100755 index 00000000000..5fcb221c1a5 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/reboot.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +#alsactl store 0 -f /userdata/system/.asound.state + +/etc/init.d/rcK +sync + +reboot + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/rtk_hciattach b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/rtk_hciattach new file mode 100755 index 00000000000..78d45917c6a Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/rtk_hciattach differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/store-brightness b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/store-brightness new file mode 100755 index 00000000000..6f6acd4b522 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/bin/store-brightness @@ -0,0 +1,6 @@ +#!/bin/sh + +VAL=`brightness get` + +echo $VAL > /userdata/system/.brightness + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/sbin/fbset b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/sbin/fbset new file mode 100755 index 00000000000..8531723281b Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/sbin/fbset differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/batocera.conf b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/batocera.conf new file mode 100644 index 00000000000..dab527b9b55 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/batocera.conf @@ -0,0 +1,379 @@ +# ------------ A - System Options ----------- # + +## Security +## Enable this to enforce security, requiring a password to access the network share. +#system.security.enabled=0 + +## Services +# exampe: system.services=service1 service2 +#system.services= + +## Display rotation +## Leave commented out -> Auto. +## 0 -> No rotation. +## 1 -> Rotate 90 degrees clockwise. +## 2 -> Rotate 180 degrees clockwise. +## 3 -> Rotate 270 degrees clockwise. +#display.rotate=0 + +## Power button behavior +## Change what the power button does when pressed. +## shutdown -> Immediately shutdown the system. +## suspend -> Enter low-power standby mode. +## hybrid -> Enter an even lower-power standy mode, only available on supported devices. +#system.suspendmode=suspend + +## File system compression (btrfs only) +## Natively compresses files as they are stored, reduces disk write speed but increases space available. +#system.fscompression.enabled=0 + +## Send the CEC standby command to the first video output device during shutdown. +#system.cec.standby=1 + +## EmulationStation menu style +## default -> default all options menu +## none -> no menu except the game search menu +## bartop -> less menu, only needed for bartops +#system.es.menu=default + +## Show or hide Kodi in the EmulationStation menu. +kodi.enabled=1 +## Start Kodi at launch. +kodi.atstartup=0 +## Enable the North button Kodi shortcut. +kodi.xbutton=1 + +## Kodi networking delay +## Kodi can be instructed to wait for a network host to become available before starting. +## All three upcoming keys must be completed in order for the wait to take effect. + +## waithost decides which host name to ping while waiting to start. +#kodi.network.waithost=192.168.0.50 + +## waittime decides how long to wait up to in seconds. +#kodi.network.waittime=10 + +## waitmode decides how dependent Kodi is on the specified host. +## noping -> Do not ping. Start Kodi immediately. This is the default. +## required -> Wait up to the specified time for the host to respond. Start Kodi only if the host responds. +## wish -> Wait up to the specified time for the host to respond. Start Kodi if the host responds or the waittime is reached. +#kodi.network.waitmode=required + +## Splash screen +## Set sound option to 0 to silence the video splash +#splash.screen.enabled=1 +#splash.screen.sound=1 +## Set resize option to scale the splash video & playback resolution +#splash.screen.resize=1920x1080 + +# ------------ A1 - Platform Specific Options ----------- # + +## Raspberry Pi 1/2/3/4 system power switch/utility +## Select one option. See https://wiki.batocera.org/add_powerdevices_rpi_only +## ARGONONE -> Activate fan control for Argon One case (RPi4) +## ATX_RASPI_R2_6 -> http://lowpowerlab.com/atxraspi/#installation +## MAUSBERRY -> http://mausberry-circuits.myshopify.com/pages/setup +## ONOFFSHIM -> https://shop.pimoroni.com/products/onoff-shim +## POWERHAT -> https://www.raspberrypiplastics.com/power-hat-board +## REMOTEPIBOARD_2003 -> http://www.msldigital.com/pages/support-for-remotepi-board-2013 +## REMOTEPIBOARD_2005 -> http://www.msldigital.com/pages/support-for-remotepi-board-plus-2015 +## KINTARO -> http://www.kintaro.co SNES style case aka Roshambo/Super Kintaro Kuma System +## RETROFLAG -> http://www.retroflag.com -- note: enable UART in config.txt for LED action +## RETROFLAG_ADV -> Activate on RESET button more commands to quit emulators or restart ES +## RETROFLAG_GPI -> Activate GPi CASE SAFE SHUTDOWN functions. +## PIBOY -> Activate PIBOY. +## DESKPIPRO -> Fan & power control for RPi4 DeskPi Pro case. +## PISTATION_LCD -> Config.txt tweaks to get the display to work. +## Simple Switches without active devices +## See https://wiki.batocera.org/add_powerdevices_rpi_only#simple_push-button_or_switches +## PIN56ONOFF -> For latching switches +## PIN56PUSH -> For momentary buttons +## PIN356ONOFFRESET -> Restart and shutdown board. Needs 2 switches. +#system.power.switch=RETROFLAG + +## Rockpro64 +## Roshambo/Kintaro case. +#roshambo.enabled=1 + + +# ------------ B - Network ------------ # + +## Set system hostname, accessible via network share. +system.hostname=KNULLI +## Wi-Fi country code (00 for World), see https://wiki.batocera.org/wifi_ssid#i_can_t_see_my_ssid_in_the_list_but_i_can_see_my_neighbor_s +#wifi.country=FR +## Activate Wi-Fi (0,1) +wifi.enabled=0 +## Wi-Fi SSID (string) +#wifi.ssid=new ssid +## Wi-Fi KEY (string) +## Escape your special chars (# ; $) with a backslash. eg. $ becomes \$ +#wifi.key=new key + +## Secondary Wi-Fi (not configurable via the user interface) +#wifi2.ssid=new ssid +#wifi2.key=new key + +## Third Wi-Fi (not configurable via the user interface) +#wifi3.ssid=new ssid +#wifi3.key=new key + +## Add values here to connect to a hidden AP. +#wifi.hidden.ssid=hidden SSID +#wifi.hidden.key=new key + +## Disable Samba share, see https://wiki.batocera.org/add_games_bios#while_batocera_is_running +#system.samba.enabled=0 + +## Disable SSH, see https://wiki.batocera.org/access_the_batocera_via_ssh +#system.ssh.enabled=0 + + +# ------------ C - Audio ------------ # + +## Set the audio device +## Use "batocera-audio list" to see available devices. +audio.device=auto +## Set system volume (0-100) +audio.volume=90 +## Set max volume for boost sound (100-150) +audio.volume.boost=100 +## Enable or disable system sounds in ES (0,1) +audio.bgmusic=1 + + +# -------------- D - Controllers ----------------- # + +## Enable Bluetooth +controllers.bluetooth.enabled=1 + +## Bluetooth Debug +## Enables extra Bluetooth logging for developers. +#controllers.bluetooth.debug=1 + +# -------------- D1 - PS3 Controllers ------------ # + +## Enable support for PS3 controllers (and likely some other Bluetooth controllers too) +## PS3 controller support enables CVE-2023-45866 security vulnerability. Disable if not needed. +controllers.ps3.enabled=1 +## Choose a Bluetooth driver. +## bluez -> bluez 5 + kernel drivers, supports official and Shanwan Sixaxis. +## official -> sixad drivers, supports official and Gasia Sixaxis. +## shanwan -> shanwan drivers, supports official and Shanwan Sixaxis. +controllers.ps3.driver=bluez + +# ------------ D2 - Other Controllers ------------ # + +## XGaming's XArcade Tankstik and other compatible devices. +controllers.xarcade.enabled=1 + +# ------------ D3 - GPIO Controllers (RPi only) ------------ # + +## GPIO Controllers +## Enable controllers on GPIO with mk_arcarde_joystick_rpi. +controllers.gpio.enabled=0 +## GPIO arguments +## map=1 -> For one controller. +## map=1,2 -> For two controllers. +controllers.gpio.args=map=1,2 + +## DB9 Controllers +## Enable DB9 drivers for Atari, Megadrive and Amiga controllers. +controllers.db9.enabled=0 +## DB9 arguments +controllers.db9.args=map=1 + +## Gamecon controllers +## Enable Gamecon controllers, for NES, SNES and PSX controllers. +controllers.gamecon.enabled=0 +## Gamecon arguments +controllers.gamecon.args=map=1 + + +# ------------ F - Language and Keyboard ------------ # + +## System language +## Some common examples: +## en_US -> English +## en_GB -> English (UK) +## fr_FR -> French +## de_DE -> German +## pt_BR -> Brazillian Portuguese +## it_IT -> Italian +## tr_TR -> Turkish +## zh_CN -> Chinese +## Check the menu in ES for more. +#system.language=en_US + +## Set the keyboard layout (fr,de,us,es). +## To view all available layouts, i.e. English, via terminal type: +## sed '/! layout/,/^$/!d;/English/!d' < /usr/share/X11/xkb/rules/evdev.lst +#system.kblayout=de + +## Setting a keyboard variant is optional +## To view all variants for German language variants, via terminal type: +## sed '/! variant/,/^$/!d;/German/!d' < /usr/share/X11/xkb/rules/evdev.lst +#system.kbvariant=nodeadkeys + +## Set the local time zone +## To view all available time zones, run: ls /usr/share/zoneinfo/ +#system.timezone=Europe/Paris + + +# ------------ G - Updates ------------ # + +## Automatically check for updates after booting. +updates.enabled=1 +## Set the update type. +## stable -> Current stable version +## butterfly -> Current development verion, use at your own risk +updates.type=stable + + +# ------------ H - Global Emulator Configuration ------------ # + +## The global value will be used for all emulators, except if the value is redefined in the emulator + +## Video mode +## Force the emulator to run at this resolution. To check available resolutions, run: batocera-resolution listModes +## See https://wiki.batocera.org/display_issues +#global.videomode=CEA 4 HDMI + +## Set the preferred output +## To check available outputs, run: batocera-resolution listOutputs +#global.videooutput="" + +## DPI +## If the text is too small, adjust this value. +#global.dpi=96 + +## Shader set +## Automatically select shaders for all systems, see https://wiki.batocera.org/emulationstation:shaders_set +## default -> Default shader +## none -> No shader +## curvature -> Realistic CRT curve with scanlines, CPU expensive +## enhanced -> Upscale pixel graphics +## flatten-glow -> Make the image glow +## mega-bezel -> Add reflections to shader bezel, CPU expensive +## retro -> Pixelated shader +## scanlines -> Add scanlines to the image +## zfast -> Cheaper version for scanlines +#global.shaderset=none + +## Integer scaling (pixel perfect) +## Only scale the image in integers, maintaining pixel ratio. +#global.integerscale=0 + +## Decoration set +## See https://wiki.batocera.org/decoration +#global.bezel=default + +## Game aspect ratio +## Set the ratio for emulators. +#global.ratio=auto + +## Smooth games (bilinear filtering) +## Softens the image. Is overidden if using a shader set. +#global.smooth=1 + +## Rewind +## Very CPU and RAM expensive for some emulators. Take care with enabling this globally. +#global.rewind=1 + +## Auto save/load +## Automatically save state when exiting emulators. Automatically load latest savestate when launching emulators. +#global.autosave=0 + +## Incremental savestates +#global.incrementalsavestates=0 + +## Retroachievement settings +## Set up your www.retroachievements.org username/password first +## Escape your special chars (# ; $) with a backslash. eg. $ becomes \$ +#global.retroachievements=0 +#global.retroachievements.hardcore=0 +#global.retroachievements.leaderboards=0 +#global.retroachievements.verbose=0 +#global.retroachievements.screenshot=0 +#global.retroachievements.challenge_indicators=0 +#global.retroachievements.username= +#global.retroachievements.password= +#global.retroachievements.sound= + +## Enable RetroArch AI game translation service +#global.ai_service_enabled=0 +#global.ai_service_url=http://ztranslate.net/service?api_key=BATOCERA +#global.ai_target_lang= + +## HUD (x86 or RPi4 only) +## game -> Show game's boxart/metadata info +## perf -> Show current performance statistics +## custom -> Use hud_custom configuration +#global.hud=perf +## Custom HUD configuration +## Performance eg. position=bottom-left\nbackground_alpha=0.9\nlegacy_layout=false\ncustom_text=%GAMENAME%\ncustom_text=%SYSTEMNAME%\ncustom_text=%EMULATORCORE%\nfps\ngpu_name\nengine_version\nvulkan_driver\nresolution\nram\ngpu_stats\ngpu_temp\ncpu_stats\ncpu_temp\ncore_load +## Game eg. position=bottom-left\nbackground_alpha=0\nlegacy_layout=false\nfont_size=32\nimage_max_width=200\nimage=%THUMBNAIL%\ncustom_text=%GAMENAME%\ncustom_text=%SYSTEMNAME%\ncustom_text=%EMULATORCORE% +## More examples at https://github.com/flightlessmango/MangoHud/blob/master/README.md#mangohud_config-and-mangohud_configfile-environment-variables +#global.hud_custom=position=bottom-left\nbackground_alpha=0\nlegacy_layout=false\nfont_size=64\nimage_max_width=200\nimage=%THUMBNAIL%\ncustom_text=%GAMENAME%\ncustom_text=%SYSTEMNAME%\ncustom_text=%EMULATORCORE% + + +# ------------ I - Per System Advanced Configuration ----------- # + +## It's also possible to apply unique settings per system. +## eg. to set unique options for SNES: +#snes.core=snes9x_next +#snes.shaders=/userdata/shaders/shaders_glsl/mysnesshader.gplsp +#snes.ratio=16/9 +#snes.smooth=0 +#snes.rewind=1 +#snes.autosave=0 +#snes.emulator=libretro +#snes.integerscale=0 + +## Advanced RetroArch configuration +## See https://wiki.batocera.org/advanced_retroarch_settings +#snes.retroarch.menu_driver=rgui +#global.retroarch.input_max_users=4 + +## Emulate Wiimotes for Dolphin +## Allows regular pads to act as if though they were Wiimotes when running Dolphin. +## Real Wiimotes must not be paired with Batocera while using this option. +#wii.emulatedwiimotes=0 + +# ------------ J - LED's ----------- # + +## Enable LED options for devices + +## -= AYN Loki =- +## Standard colour options: red, blue, green +## Custom colour options, any combination of red blue green with values of 0-255. +## Note: The Ayn kernel module is in order RBG, not RGB +## Example custom colour - purple: ayn.led.colour=128 128 0 +## Brightness options: low, medium, high, off +## Settings get applied at boot +#ayn.led.colour=blue +#ayn.led.brightness=high + +# ------------ K - AMD TDP ----------- # + +## AMD TDP value in watts +#amd.tdp=10 + +# ------------ L - Other ----------- # + +## Scraper +## Set order scraper prefers, separated by commas. +## s -> snapshot +## b -> boxart +## f -> fanart +## a -> banner +## l -> logo +## 3b -> 3D boxart +#scrapper.style=s,b,f,a,l,3b + +## Enable DXVK for Wine and FPS HUD. +#windows.dxvk=0 +#windows.dxvk_hud=0 + + +# ------------ User-generated Configurations ----------- # diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/about.info b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/about.info new file mode 100644 index 00000000000..87b6254685e --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/about.info @@ -0,0 +1 @@ +KNULLI diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_input.cfg b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_input.cfg new file mode 100644 index 00000000000..a8dcd6b8b6b --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_input.cfg @@ -0,0 +1,5053 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_settings.cfg b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_settings.cfg new file mode 100644 index 00000000000..5cf7c978b49 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/batocera/datainit/system/configs/emulationstation/es_settings.cfg @@ -0,0 +1,5 @@ + + + + + diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/emulationstation/resources/logo.png b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/emulationstation/resources/logo.png new file mode 100644 index 00000000000..be464ad706f Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/emulationstation/resources/logo.png differ diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/vulkan/icd.d/mali_icd.json b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/vulkan/icd.d/mali_icd.json new file mode 100644 index 00000000000..5fb0bce3549 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/vulkan/icd.d/mali_icd.json @@ -0,0 +1,7 @@ +{ + "ICD": { + "api_version": "1.0.108", + "library_path": "/usr/lib/libmali.so" + }, + "file_format_version": "1.0.0" +} diff --git a/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/wireplumber/main.lua.d/50-alsa-config.lua b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/wireplumber/main.lua.d/50-alsa-config.lua new file mode 100644 index 00000000000..295509d2cce --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/fsoverlay/usr/share/wireplumber/main.lua.d/50-alsa-config.lua @@ -0,0 +1,147 @@ +alsa_monitor.enabled = true + +alsa_monitor.properties = { + -- Create a JACK device. This is not enabled by default because + -- it requires that the PipeWire JACK replacement libraries are + -- not used by the session manager, in order to be able to + -- connect to the real JACK server. + --["alsa.jack-device"] = false, + + -- Reserve devices via org.freedesktop.ReserveDevice1 on D-Bus + -- Disable if you are running a system-wide instance, which + -- doesn't have access to the D-Bus user session + ["alsa.reserve"] = false, + --["alsa.reserve.priority"] = -20, + --["alsa.reserve.application-name"] = "WirePlumber", + + -- Enables MIDI functionality + ["alsa.midi"] = true, + + -- Enables monitoring of alsa MIDI devices + ["alsa.midi.monitoring"] = true, + + -- These properties override node defaults when running in a virtual machine. + -- The rules below still override those. + ["vm.node.defaults"] = { + ["api.alsa.period-size"] = 256, + ["api.alsa.headroom"] = 8192, + }, +} + +alsa_monitor.rules = { + -- An array of matches/actions to evaluate. + -- + -- If you want to disable some devices or nodes, you can apply properties per device as the following example. + -- The name can be found by running pw-cli ls Device, or pw-cli dump Device + --{ + -- matches = { + -- { + -- { "device.name", "matches", "name_of_some_disabled_card" }, + -- }, + -- }, + -- apply_properties = { + -- ["device.disabled"] = true, + -- }, + --} + { + -- Rules for matching a device or node. It is an array of + -- properties that all need to match the regexp. If any of the + -- matches work, the actions are executed for the object. + matches = { + { + -- This matches all cards. + { "device.name", "matches", "alsa_card.*" }, + }, + }, + -- Apply properties on the matched object. + apply_properties = { + -- Use ALSA-Card-Profile devices. They use UCM or the profile + -- configuration to configure the device and mixer settings. + ["api.alsa.use-acp"] = true, + + -- Use UCM instead of profile when available. Can be + -- disabled to skip trying to use the UCM profile. + ["api.alsa.use-ucm"] = false, + + -- Don't use the hardware mixer for volume control. It + -- will only use software volume. The mixer is still used + -- to mute unused paths based on the selected port. + ["api.alsa.soft-mixer"] = true, + + -- Ignore decibel settings of the driver. Can be used to + -- work around buggy drivers that report wrong values. + --["api.alsa.ignore-dB"] = false, + + -- The profile set to use for the device. Usually this is + -- "default.conf" but can be changed with a udev rule or here. + --["device.profile-set"] = "profileset-name", + + -- The default active profile. Is by default set to "Off". + --["device.profile"] = "default profile name", + + -- Automatically select the best profile. This is the + -- highest priority available profile. This is disabled + -- here and instead implemented in the session manager + -- where it can save and load previous preferences. + ["api.acp.auto-profile"] = false, + + -- Automatically switch to the highest priority available port. + -- This is disabled here and implemented in the session manager instead. + ["api.acp.auto-port"] = false, + + -- Other properties can be set here. + --["device.nick"] = "My Device", + }, + }, + { + matches = { + { + -- Matches all sources. + { "node.name", "matches", "alsa_input.*" }, + }, + { + -- Matches all sinks. + { "node.name", "matches", "alsa_output.*" }, + }, + }, + apply_properties = { + --["node.nick"] = "My Node", + --["node.description"] = "My Node Description", + --["priority.driver"] = 100, + --["priority.session"] = 100, + --["node.pause-on-idle"] = false, + --["monitor.channel-volumes"] = false + --["resample.quality"] = 4, + --["resample.disable"] = false, + --["channelmix.normalize"] = false, + --["channelmix.mix-lfe"] = false, + --["channelmix.upmix"] = true, + --["channelmix.upmix-method"] = "psd", -- "none" or "simple" + --["channelmix.lfe-cutoff"] = 150, + --["channelmix.fc-cutoff"] = 12000, + --["channelmix.rear-delay"] = 12.0, + --["channelmix.stereo-widen"] = 0.0, + --["channelmix.hilbert-taps"] = 0, + --["channelmix.disable"] = false, + --["dither.noise"] = 0, + --["dither.method"] = "none", -- "rectangular", "triangular" or "shaped5" + --["audio.channels"] = 2, + --["audio.format"] = "S16LE", + --["audio.rate"] = 44100, + --["audio.allowed-rates"] = "32000,96000", + --["audio.position"] = "FL,FR", + --["api.alsa.period-size"] = 1024, + --["api.alsa.period-num"] = 2, + --["api.alsa.headroom"] = 0, + --["api.alsa.start-delay"] = 0, + --["api.alsa.disable-mmap"] = false, + --["api.alsa.disable-batch"] = false, + --["api.alsa.use-chmap"] = false, + --["api.alsa.multirate"] = true, + --["latency.internal.rate"] = 0 + --["latency.internal.ns"] = 0 + --["clock.name"] = "api.alsa.0" + --["session.suspend-timeout-seconds"] = 5, -- 0 disables suspend + }, + }, +} diff --git a/board/batocera/allwinner/h700/rg28xx/genimage.cfg b/board/batocera/allwinner/h700/rg28xx/genimage.cfg new file mode 100644 index 00000000000..983f6d3d007 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/genimage.cfg @@ -0,0 +1,79 @@ +image boot.vfat { + vfat { + extraargs = "-F 32 -n BATOCERA" + @files + } + + # Setting the size to 1200M exposes the error (from genimage command line): + # Total number of sectors (2457600) not a multiple of sectors per track (63)! + # + # Setting the size to 1201M exposes the error (from genimage command line): + # Total number of sectors (2459648) not a multiple of sectors per track (63)! + # + # Note (1): It seems the error only shows up in Ubuntu 17.04, but not in 16.04 + # Note (2): The error message does not come from genimage nor mtools (likely from a library it links with) + # + # 1200M = 1200 x 1024 x 1024 bytes => 2457600 sectors => 512 bytes/sector => 39009.52 tracks + # + # So, the closest values to respect the 63 sectors/track constraints are 39009 and 39010: + # 39009 tracks * 63 sector / track = 2457567 * 512 bytes / sector = 1258274304 bytes (16896 bytes under 1200M) + # 39010 tracks * 63 sector / track = 2457630 * 512 bytes / sector = 1258306560 bytes (15360 bytes over 1200M) + # + # 81765 * 512 * 63 = 2637411840 + # 2637411840 / 1024 / 1024 = 2515 MiB + size = 4G +} + +image userdata.ext4 { + ext4 { + label = "SHARE" + use-mke2fs = "true" + extraargs = "-m 0 -O ^metadata_csum" + } + size = "512M" + # include files from TARGET_DIR/userdata + mountpoint = "/userdata" +} + +image batocera.img { + hdimage { + align = "1M" + partition-table-type = "gpt" + gpt-location = 81920 + } + + partition bootloader { + in-partition-table = "no" + image = "../partitions/boot0.img" +# offset = 8192 + offset = 262144 + } + + partition boot-package { + in-partition-table = "no" + image = "../partitions/boot_package.fex" + offset = 16793600 + } + + partition boot { + image = "../partitions/boot.img" + offset = 37748736 + } + + partition env { + image = "../partitions/env.img" + } + + partition boot-resource { + partition-type-uuid = "F" + bootable = "true" + image = "boot.vfat" + } + + partition userdata { + partition-type-uuid = "L" + image = "userdata.ext4" + } + +} + diff --git a/board/batocera/allwinner/h700/rg28xx/linux-sunxi64-legacy.config b/board/batocera/allwinner/h700/rg28xx/linux-sunxi64-legacy.config new file mode 100644 index 00000000000..c8f8a2e9c8c --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/linux-sunxi64-legacy.config @@ -0,0 +1,4171 @@ +# +# Automatically generated file; DO NOT EDIT. +# Linux/arm64 4.9.170 Kernel Configuration +# +CONFIG_ARM64=y +CONFIG_64BIT=y +CONFIG_ARCH_PHYS_ADDR_T_64BIT=y +CONFIG_MMU=y +CONFIG_DEBUG_RODATA=y +CONFIG_ARM64_PAGE_SHIFT=12 +CONFIG_ARM64_CONT_SHIFT=4 +CONFIG_ARCH_MMAP_RND_BITS_MIN=18 +CONFIG_ARCH_MMAP_RND_BITS_MAX=24 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=16 +CONFIG_NO_IOPORT_MAP=y +CONFIG_STACKTRACE_SUPPORT=y +CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000 +CONFIG_LOCKDEP_SUPPORT=y +CONFIG_TRACE_IRQFLAGS_SUPPORT=y +CONFIG_RWSEM_XCHGADD_ALGORITHM=y +CONFIG_GENERIC_BUG=y +CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y +CONFIG_GENERIC_HWEIGHT=y +CONFIG_GENERIC_CSUM=y +CONFIG_GENERIC_CALIBRATE_DELAY=y +CONFIG_ZONE_DMA=y +CONFIG_HAVE_GENERIC_RCU_GUP=y +CONFIG_ARCH_DMA_ADDR_T_64BIT=y +CONFIG_NEED_DMA_MAP_STATE=y +CONFIG_NEED_SG_DMA_LENGTH=y +CONFIG_SMP=y +CONFIG_SWIOTLB=y +CONFIG_IOMMU_HELPER=y +CONFIG_KERNEL_MODE_NEON=y +CONFIG_FIX_EARLYCON_MEM=y +CONFIG_PGTABLE_LEVELS=3 +CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" +CONFIG_IRQ_WORK=y +CONFIG_BUILDTIME_EXTABLE_SORT=y +CONFIG_THREAD_INFO_IN_TASK=y + +# +# General setup +# +CONFIG_INIT_ENV_ARG_LIMIT=32 +CONFIG_CROSS_COMPILE="" +# CONFIG_COMPILE_TEST is not set +CONFIG_LOCALVERSION="" +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_DEFAULT_HOSTNAME="H700" +CONFIG_SWAP=y +# CONFIG_SYSVIPC is not set +# CONFIG_POSIX_MQUEUE is not set +CONFIG_CROSS_MEMORY_ATTACH=y +CONFIG_FHANDLE=y +# CONFIG_USELIB is not set +CONFIG_AUDIT=y +CONFIG_HAVE_ARCH_AUDITSYSCALL=y +CONFIG_AUDITSYSCALL=y +CONFIG_AUDIT_WATCH=y +CONFIG_AUDIT_TREE=y + +# +# IRQ subsystem +# +CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_GENERIC_IRQ_SHOW=y +CONFIG_GENERIC_IRQ_SHOW_LEVEL=y +CONFIG_GENERIC_IRQ_MIGRATION=y +CONFIG_HARDIRQS_SW_RESEND=y +CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_IRQ_DOMAIN=y +CONFIG_IRQ_DOMAIN_HIERARCHY=y +CONFIG_HANDLE_DOMAIN_IRQ=y +# CONFIG_IRQ_DOMAIN_DEBUG is not set +CONFIG_IRQ_FORCED_THREADING=y +CONFIG_SPARSE_IRQ=y +CONFIG_ARCH_CLOCKSOURCE_DATA=y +CONFIG_GENERIC_TIME_VSYSCALL=y +CONFIG_GENERIC_CLOCKEVENTS=y +CONFIG_ARCH_HAS_TICK_BROADCAST=y +CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y + +# +# Timers subsystem +# +CONFIG_TICK_ONESHOT=y +CONFIG_NO_HZ_COMMON=y +# CONFIG_HZ_PERIODIC is not set +CONFIG_NO_HZ_IDLE=y +# CONFIG_NO_HZ_FULL is not set +CONFIG_NO_HZ=y +CONFIG_HIGH_RES_TIMERS=y + +# +# CPU/Task time and stats accounting +# +CONFIG_TICK_CPU_ACCOUNTING=y +# CONFIG_VIRT_CPU_ACCOUNTING_GEN is not set +# CONFIG_IRQ_TIME_ACCOUNTING is not set +# CONFIG_SCHED_WALT is not set +CONFIG_BSD_PROCESS_ACCT=y +CONFIG_BSD_PROCESS_ACCT_V3=y +CONFIG_TASKSTATS=y +CONFIG_TASK_DELAY_ACCT=y +CONFIG_TASK_XACCT=y +CONFIG_TASK_IO_ACCOUNTING=y +CONFIG_PSI=y +# CONFIG_PSI_DEFAULT_DISABLED is not set + +# +# RCU Subsystem +# +CONFIG_PREEMPT_RCU=y +# CONFIG_RCU_EXPERT is not set +CONFIG_SRCU=y +# CONFIG_TASKS_RCU is not set +CONFIG_RCU_STALL_COMMON=y +# CONFIG_TREE_RCU_TRACE is not set +# CONFIG_RCU_EXPEDITE_BOOT is not set +CONFIG_BUILD_BIN2C=y +CONFIG_IKCONFIG=y +CONFIG_IKCONFIG_PROC=y +CONFIG_LOG_BUF_SHIFT=14 +CONFIG_LOG_CPU_MAX_BUF_SHIFT=12 +CONFIG_GENERIC_SCHED_CLOCK=y +CONFIG_ARCH_SUPPORTS_NUMA_BALANCING=y +CONFIG_CGROUPS=y +# CONFIG_CGROUP_DEBUG is not set +CONFIG_CGROUP_FREEZER=y +# CONFIG_CGROUP_PIDS is not set +CONFIG_CGROUP_DEVICE=y +# CONFIG_CPUSETS is not set +CONFIG_CGROUP_CPUACCT=y +CONFIG_PAGE_COUNTER=y +CONFIG_MEMCG=y +CONFIG_MEMCG_SWAP=y +CONFIG_MEMCG_SWAP_ENABLED=y +# CONFIG_BLK_CGROUP is not set +CONFIG_CGROUP_SCHED=y +CONFIG_FAIR_GROUP_SCHED=y +# CONFIG_CFS_BANDWIDTH is not set +CONFIG_RT_GROUP_SCHED=y +CONFIG_CGROUP_PERF=y +CONFIG_CGROUP_BPF=y +CONFIG_SOCK_CGROUP_DATA=y +# CONFIG_CHECKPOINT_RESTORE is not set +CONFIG_NAMESPACES=y +# CONFIG_UTS_NS is not set +# CONFIG_USER_NS is not set +# CONFIG_PID_NS is not set +CONFIG_NET_NS=y +CONFIG_SCHED_AUTOGROUP=y +# CONFIG_SCHED_TUNE is not set +# CONFIG_DEFAULT_USE_ENERGY_AWARE is not set +# CONFIG_SYSFS_DEPRECATED is not set +CONFIG_RELAY=y +CONFIG_BLK_DEV_INITRD=y +CONFIG_INITRAMFS_SOURCE="" +CONFIG_RD_GZIP=y +CONFIG_RD_BZIP2=y +CONFIG_RD_LZMA=y +CONFIG_RD_XZ=y +CONFIG_RD_LZO=y +CONFIG_RD_LZ4=y +# CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE is not set +CONFIG_CC_OPTIMIZE_FOR_SIZE=y +CONFIG_SYSCTL=y +CONFIG_ANON_INODES=y +CONFIG_HAVE_UID16=y +CONFIG_SYSCTL_EXCEPTION_TRACE=y +CONFIG_BPF=y +CONFIG_EXPERT=y +CONFIG_UID16=y +CONFIG_MULTIUSER=y +# CONFIG_SGETMASK_SYSCALL is not set +CONFIG_SYSFS_SYSCALL=y +# CONFIG_SYSCTL_SYSCALL is not set +CONFIG_KALLSYMS=y +CONFIG_KALLSYMS_ALL=y +# CONFIG_KALLSYMS_ABSOLUTE_PERCPU is not set +CONFIG_KALLSYMS_BASE_RELATIVE=y +CONFIG_PRINTK=y +CONFIG_BUG=y +CONFIG_ELF_CORE=y +CONFIG_BASE_FULL=y +CONFIG_FUTEX=y +CONFIG_EPOLL=y +CONFIG_SIGNALFD=y +CONFIG_TIMERFD=y +CONFIG_EVENTFD=y +CONFIG_BPF_SYSCALL=y +CONFIG_SHMEM=y +CONFIG_AIO=y +CONFIG_ADVISE_SYSCALLS=y +# CONFIG_USERFAULTFD is not set +CONFIG_MEMBARRIER=y +CONFIG_EMBEDDED=y +CONFIG_HAVE_PERF_EVENTS=y + +# +# Kernel Performance Events And Counters +# +CONFIG_PERF_EVENTS=y +# CONFIG_DEBUG_PERF_USE_VMALLOC is not set +CONFIG_VM_EVENT_COUNTERS=y +# CONFIG_SLUB_DEBUG is not set +# CONFIG_SLUB_MEMCG_SYSFS_ON is not set +# CONFIG_COMPAT_BRK is not set +# CONFIG_SLAB is not set +CONFIG_SLUB=y +# CONFIG_SLOB is not set +# CONFIG_SLAB_FREELIST_RANDOM is not set +CONFIG_SLUB_CPU_PARTIAL=y +# CONFIG_SYSTEM_DATA_VERIFICATION is not set +CONFIG_PROFILING=y +# CONFIG_KPROBES is not set +CONFIG_JUMP_LABEL=y +# CONFIG_STATIC_KEYS_SELFTEST is not set +# CONFIG_UPROBES is not set +# CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set +CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y +CONFIG_HAVE_KPROBES=y +CONFIG_HAVE_KRETPROBES=y +CONFIG_HAVE_ARCH_TRACEHOOK=y +CONFIG_HAVE_DMA_CONTIGUOUS=y +CONFIG_GENERIC_SMP_IDLE_THREAD=y +CONFIG_GENERIC_IDLE_POLL_SETUP=y +CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y +CONFIG_HAVE_CLK=y +CONFIG_HAVE_DMA_API_DEBUG=y +CONFIG_HAVE_HW_BREAKPOINT=y +CONFIG_HAVE_PERF_REGS=y +CONFIG_HAVE_PERF_USER_STACK_DUMP=y +CONFIG_HAVE_ARCH_JUMP_LABEL=y +CONFIG_HAVE_RCU_TABLE_FREE=y +CONFIG_HAVE_ALIGNED_STRUCT_PAGE=y +CONFIG_HAVE_CMPXCHG_LOCAL=y +CONFIG_HAVE_CMPXCHG_DOUBLE=y +CONFIG_ARCH_WANT_COMPAT_IPC_PARSE_VERSION=y +CONFIG_HAVE_ARCH_SECCOMP_FILTER=y +CONFIG_SECCOMP_FILTER=y +CONFIG_HAVE_GCC_PLUGINS=y +# CONFIG_GCC_PLUGINS is not set +CONFIG_HAVE_CC_STACKPROTECTOR=y +CONFIG_CC_STACKPROTECTOR=y +# CONFIG_CC_STACKPROTECTOR_NONE is not set +# CONFIG_CC_STACKPROTECTOR_REGULAR is not set +CONFIG_CC_STACKPROTECTOR_STRONG=y +# CONFIG_LTO is not set +CONFIG_ARCH_SUPPORTS_LTO_CLANG=y +CONFIG_LTO_NONE=y +# CONFIG_LTO_CLANG is not set +CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_VIRT_CPU_ACCOUNTING_GEN=y +CONFIG_HAVE_IRQ_TIME_ACCOUNTING=y +CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE=y +CONFIG_HAVE_ARCH_HUGE_VMAP=y +CONFIG_HAVE_MOD_ARCH_SPECIFIC=y +CONFIG_MODULES_USE_ELF_RELA=y +CONFIG_ARCH_HAS_ELF_RANDOMIZE=y +CONFIG_HAVE_ARCH_MMAP_RND_BITS=y +CONFIG_ARCH_MMAP_RND_BITS=18 +CONFIG_HAVE_ARCH_MMAP_RND_COMPAT_BITS=y +CONFIG_ARCH_MMAP_RND_COMPAT_BITS=11 +# CONFIG_HAVE_ARCH_HASH is not set +# CONFIG_ISA_BUS_API is not set +CONFIG_CLONE_BACKWARDS=y +CONFIG_OLD_SIGSUSPEND3=y +CONFIG_COMPAT_OLD_SIGACTION=y +# CONFIG_CPU_NO_EFFICIENT_FFS is not set +# CONFIG_HAVE_ARCH_VMAP_STACK is not set + +# +# GCOV-based kernel profiling +# +# CONFIG_GCOV_KERNEL is not set +CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y +CONFIG_HAVE_GENERIC_DMA_COHERENT=y +CONFIG_RT_MUTEXES=y +CONFIG_BASE_SMALL=0 +CONFIG_MODULES=y +CONFIG_MODULE_FORCE_LOAD=y +CONFIG_MODULE_UNLOAD=y +CONFIG_MODULE_FORCE_UNLOAD=y +CONFIG_MODVERSIONS=y +CONFIG_MODULE_SRCVERSION_ALL=y +# CONFIG_MODULE_SIG is not set +# CONFIG_MODULE_COMPRESS is not set +# CONFIG_TRIM_UNUSED_KSYMS is not set +CONFIG_MODULES_TREE_LOOKUP=y +CONFIG_BLOCK=y +CONFIG_BLK_DEV_BSG=y +# CONFIG_BLK_DEV_BSGLIB is not set +# CONFIG_BLK_DEV_INTEGRITY is not set +# CONFIG_BLK_CMDLINE_PARSER is not set + +# +# Partition Types +# +# CONFIG_PARTITION_ADVANCED is not set +CONFIG_MSDOS_PARTITION=y +CONFIG_EFI_PARTITION=y +CONFIG_BLOCK_COMPAT=y + +# +# IO Schedulers +# +CONFIG_IOSCHED_NOOP=y +CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y +# CONFIG_DEFAULT_DEADLINE is not set +CONFIG_DEFAULT_CFQ=y +# CONFIG_DEFAULT_NOOP is not set +CONFIG_DEFAULT_IOSCHED="cfq" +CONFIG_UNINLINE_SPIN_UNLOCK=y +CONFIG_ARCH_SUPPORTS_ATOMIC_RMW=y +CONFIG_RWSEM_SPIN_ON_OWNER=y +CONFIG_LOCK_SPIN_ON_OWNER=y +CONFIG_FREEZER=y + +# +# Platform selection +# +CONFIG_ARCH_SUNXI=y +CONFIG_ARCH_SUN50I=y +# CONFIG_ARCH_SUN50IW1 is not set +# CONFIG_ARCH_SUN50IW2 is not set +# CONFIG_ARCH_SUN50IW3 is not set +# CONFIG_ARCH_SUN50IW6 is not set +# CONFIG_ARCH_SUN50IW8 is not set +CONFIG_ARCH_SUN50IW9=y +# CONFIG_ARCH_SUN50IW10 is not set +# CONFIG_ARCH_SUN50IW5T is not set +CONFIG_ARCH_SUN50IW9P1=y +# CONFIG_FPGA_V4_PLATFORM is not set +# CONFIG_FPGA_V7_PLATFORM is not set +CONFIG_EVB_PLATFORM=y +CONFIG_SUNXI_SOC_NAME="sun50iw9" +# CONFIG_ARCH_ALPINE is not set +# CONFIG_ARCH_BCM2835 is not set +# CONFIG_ARCH_BCM_IPROC is not set +# CONFIG_ARCH_BERLIN is not set +# CONFIG_ARCH_BRCMSTB is not set +# CONFIG_ARCH_EXYNOS is not set +# CONFIG_ARCH_LAYERSCAPE is not set +# CONFIG_ARCH_LG1K is not set +# CONFIG_ARCH_HISI is not set +# CONFIG_ARCH_MEDIATEK is not set +# CONFIG_ARCH_MESON is not set +# CONFIG_ARCH_MVEBU is not set +# CONFIG_ARCH_QCOM is not set +# CONFIG_ARCH_ROCKCHIP is not set +# CONFIG_ARCH_SEATTLE is not set +# CONFIG_ARCH_RENESAS is not set +# CONFIG_ARCH_STRATIX10 is not set +# CONFIG_ARCH_TEGRA is not set +# CONFIG_ARCH_SPRD is not set +# CONFIG_ARCH_THUNDER is not set +# CONFIG_ARCH_UNIPHIER is not set +# CONFIG_ARCH_VEXPRESS is not set +# CONFIG_ARCH_VULCAN is not set +# CONFIG_ARCH_XGENE is not set +# CONFIG_ARCH_ZX is not set +# CONFIG_ARCH_ZYNQMP is not set + +# +# Bus support +# +# CONFIG_PCI is not set +# CONFIG_PCI_DOMAINS is not set +# CONFIG_PCI_DOMAINS_GENERIC is not set +# CONFIG_PCI_SYSCALL is not set + +# +# Kernel Features +# + +# +# ARM errata workarounds via the alternatives framework +# +CONFIG_ARM64_ERRATUM_826319=y +CONFIG_ARM64_ERRATUM_827319=y +CONFIG_ARM64_ERRATUM_824069=y +CONFIG_ARM64_ERRATUM_819472=y +CONFIG_ARM64_ERRATUM_832075=y +CONFIG_ARM64_ERRATUM_845719=y +CONFIG_ARM64_ERRATUM_843419=y +CONFIG_ARM64_ERRATUM_1024718=y +CONFIG_CAVIUM_ERRATUM_22375=y +CONFIG_CAVIUM_ERRATUM_23154=y +CONFIG_CAVIUM_ERRATUM_27456=y +CONFIG_QCOM_QDF2400_ERRATUM_0065=y +CONFIG_ARM64_4K_PAGES=y +# CONFIG_ARM64_16K_PAGES is not set +# CONFIG_ARM64_64K_PAGES is not set +CONFIG_ARM64_VA_BITS_39=y +# CONFIG_ARM64_VA_BITS_48 is not set +CONFIG_ARM64_VA_BITS=39 +# CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_SCHED_MC=y +# CONFIG_SCHED_SMT is not set +CONFIG_NR_CPUS=4 +CONFIG_HOTPLUG_CPU=y +# CONFIG_NUMA is not set +# CONFIG_PREEMPT_NONE is not set +# CONFIG_PREEMPT_VOLUNTARY is not set +CONFIG_PREEMPT=y +CONFIG_PREEMPT_COUNT=y +CONFIG_HZ_100=y +# CONFIG_HZ_250 is not set +# CONFIG_HZ_300 is not set +# CONFIG_HZ_1000 is not set +CONFIG_HZ=100 +CONFIG_SCHED_HRTICK=y +CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y +CONFIG_ARCH_HAS_HOLES_MEMORYMODEL=y +CONFIG_ARCH_SPARSEMEM_ENABLE=y +CONFIG_ARCH_SPARSEMEM_DEFAULT=y +CONFIG_ARCH_SELECT_MEMORY_MODEL=y +CONFIG_HAVE_ARCH_PFN_VALID=y +CONFIG_HW_PERF_EVENTS=y +CONFIG_SYS_SUPPORTS_HUGETLBFS=y +CONFIG_ARCH_WANT_HUGE_PMD_SHARE=y +CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y +CONFIG_SELECT_MEMORY_MODEL=y +CONFIG_SPARSEMEM_MANUAL=y +CONFIG_SPARSEMEM=y +CONFIG_HAVE_MEMORY_PRESENT=y +CONFIG_SPARSEMEM_EXTREME=y +CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y +CONFIG_SPARSEMEM_VMEMMAP=y +CONFIG_HAVE_MEMBLOCK=y +CONFIG_NO_BOOTMEM=y +CONFIG_MEMORY_ISOLATION=y +# CONFIG_HAVE_BOOTMEM_INFO_NODE is not set +CONFIG_SPLIT_PTLOCK_CPUS=4 +CONFIG_COMPACTION=y +CONFIG_MIGRATION=y +CONFIG_PHYS_ADDR_T_64BIT=y +CONFIG_BOUNCE=y +# CONFIG_KSM is not set +CONFIG_DEFAULT_MMAP_MIN_ADDR=4096 +# CONFIG_TRANSPARENT_HUGEPAGE is not set +# CONFIG_CLEANCACHE is not set +# CONFIG_FRONTSWAP is not set +CONFIG_CMA=y +# CONFIG_CMA_DEBUG is not set +# CONFIG_CMA_DEBUGFS is not set +CONFIG_CMA_AREAS=7 +# CONFIG_ZPOOL is not set +# CONFIG_ZBUD is not set +CONFIG_ZSMALLOC=y +CONFIG_PGTABLE_MAPPING=y +CONFIG_ZSMALLOC_STAT=y +CONFIG_GENERIC_EARLY_IOREMAP=y +# CONFIG_IDLE_PAGE_TRACKING is not set +CONFIG_FRAME_VECTOR=y +CONFIG_SECCOMP=y +# CONFIG_PARAVIRT is not set +# CONFIG_PARAVIRT_TIME_ACCOUNTING is not set +# CONFIG_KEXEC is not set +# CONFIG_XEN is not set +CONFIG_FORCE_MAX_ZONEORDER=11 +CONFIG_UNMAP_KERNEL_AT_EL0=y +CONFIG_HARDEN_BRANCH_PREDICTOR=y +CONFIG_ARM64_SSBD=y +CONFIG_ARMV8_DEPRECATED=y +CONFIG_SWP_EMULATION=y +CONFIG_CP15_BARRIER_EMULATION=y +CONFIG_SETEND_EMULATION=y +CONFIG_ARM64_SW_TTBR0_PAN=y + +# +# ARMv8.1 architectural features +# +CONFIG_ARM64_HW_AFDBM=y +CONFIG_ARM64_PAN=y +# CONFIG_ARM64_LSE_ATOMICS is not set +CONFIG_ARM64_VHE=y + +# +# ARMv8.2 architectural features +# +CONFIG_ARM64_UAO=y +CONFIG_ARM64_MODULE_CMODEL_LARGE=y +CONFIG_ARM64_MODULE_PLTS=y +CONFIG_RELOCATABLE=y +CONFIG_RANDOMIZE_BASE=y +CONFIG_RANDOMIZE_MODULE_REGION_FULL=y + +# +# Boot options +# +CONFIG_CMDLINE="earlyprintk=sunxi-uart,0x05000000 loglevel=8 initcall_debug=0 console=ttyS0 init=/init" +CONFIG_CMDLINE_FROM_BOOTLOADER=y +# CONFIG_CMDLINE_EXTEND is not set +# CONFIG_CMDLINE_FORCE is not set +# CONFIG_EFI is not set +# CONFIG_BUILD_ARM64_APPENDED_DTB_IMAGE is not set + +# +# Userspace binary formats +# +CONFIG_BINFMT_ELF=y +CONFIG_COMPAT_BINFMT_ELF=y +CONFIG_ELFCORE=y +# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set +CONFIG_BINFMT_SCRIPT=y +# CONFIG_HAVE_AOUT is not set +# CONFIG_BINFMT_MISC is not set +CONFIG_COREDUMP=y +CONFIG_COMPAT=y +CONFIG_KEYS_COMPAT=y + +# +# Power management options +# +CONFIG_SUSPEND=y +CONFIG_SUSPEND_FREEZER=y +# CONFIG_SUSPEND_SKIP_SYNC is not set +# CONFIG_HIBERNATION is not set +CONFIG_PM_SLEEP=y +CONFIG_PM_SLEEP_SMP=y +# CONFIG_PM_AUTOSLEEP is not set +CONFIG_PM_WAKELOCKS=y +CONFIG_PM_WAKELOCKS_LIMIT=100 +CONFIG_PM_WAKELOCKS_GC=y +CONFIG_PM=y +CONFIG_PM_DEBUG=y +CONFIG_PM_ADVANCED_DEBUG=y +# CONFIG_PM_TEST_SUSPEND is not set +CONFIG_PM_SLEEP_DEBUG=y +# CONFIG_DPM_WATCHDOG is not set +CONFIG_PM_OPP=y +CONFIG_PM_CLK=y +# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set +CONFIG_CPU_PM=y +CONFIG_ARCH_HIBERNATION_POSSIBLE=y +CONFIG_ARCH_SUSPEND_POSSIBLE=y + +# +# CPU Power Management +# + +# +# CPU Idle +# +CONFIG_CPU_IDLE=y +CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y +# CONFIG_CPU_IDLE_GOV_LADDER is not set +CONFIG_CPU_IDLE_GOV_MENU=y +CONFIG_DT_IDLE_STATES=y + +# +# ARM CPU Idle Drivers +# +CONFIG_ARM_CPUIDLE=y +CONFIG_SUNXI_CPU0IDLE=y +# CONFIG_ARM_SUNXI_CPUIDLE is not set +# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED is not set + +# +# CPU Frequency scaling +# +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +# CONFIG_CPU_FREQ_STAT is not set +CONFIG_CPU_FREQ_TIMES=y +CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_INTERACTIVE is not set +# CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL is not set +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_INTERACTIVE=y +CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y + +# +# CPU frequency scaling drivers +# +CONFIG_CPUFREQ_DT=y +CONFIG_CPUFREQ_DT_PLATDEV=y +# CONFIG_ARM_BIG_LITTLE_CPUFREQ is not set +# CONFIG_ARM_KIRKWOOD_CPUFREQ is not set +CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y +# CONFIG_ARM_SUNXI_CPUFREQ is not set +# CONFIG_CPU_AUTOHOTPLUG is not set +CONFIG_NET=y +CONFIG_NET_INGRESS=y +CONFIG_NET_EGRESS=y + +# +# Networking options +# +CONFIG_PACKET=y +# CONFIG_PACKET_DIAG is not set +CONFIG_UNIX=y +CONFIG_UNIX_DIAG=y +CONFIG_XFRM=y +CONFIG_XFRM_ALGO=y +CONFIG_XFRM_USER=y +CONFIG_XFRM_INTERFACE=y +CONFIG_XFRM_SUB_POLICY=y +CONFIG_XFRM_MIGRATE=y +CONFIG_XFRM_STATISTICS=y +CONFIG_XFRM_IPCOMP=y +CONFIG_NET_KEY=y +CONFIG_NET_KEY_MIGRATE=y +CONFIG_INET=y +CONFIG_IP_MULTICAST=y +CONFIG_IP_ADVANCED_ROUTER=y +CONFIG_IP_FIB_TRIE_STATS=y +CONFIG_IP_MULTIPLE_TABLES=y +CONFIG_IP_ROUTE_MULTIPATH=y +CONFIG_IP_ROUTE_VERBOSE=y +CONFIG_IP_PNP=y +CONFIG_IP_PNP_DHCP=y +CONFIG_IP_PNP_BOOTP=y +CONFIG_IP_PNP_RARP=y +CONFIG_NET_IPIP=y +CONFIG_NET_IPGRE_DEMUX=y +CONFIG_NET_IP_TUNNEL=y +CONFIG_NET_IPGRE=y +CONFIG_NET_IPGRE_BROADCAST=y +CONFIG_IP_MROUTE=y +CONFIG_IP_MROUTE_MULTIPLE_TABLES=y +CONFIG_IP_PIMSM_V1=y +CONFIG_IP_PIMSM_V2=y +CONFIG_SYN_COOKIES=y +CONFIG_NET_IPVTI=y +CONFIG_NET_UDP_TUNNEL=y +CONFIG_NET_FOU=y +CONFIG_NET_FOU_IP_TUNNELS=y +CONFIG_INET_AH=y +CONFIG_INET_ESP=y +CONFIG_INET_IPCOMP=y +CONFIG_INET_XFRM_TUNNEL=y +CONFIG_INET_TUNNEL=y +CONFIG_INET_XFRM_MODE_TRANSPORT=y +CONFIG_INET_XFRM_MODE_TUNNEL=y +CONFIG_INET_XFRM_MODE_BEET=y +CONFIG_INET_DIAG=y +CONFIG_INET_TCP_DIAG=y +CONFIG_INET_UDP_DIAG=y +CONFIG_INET_DIAG_DESTROY=y +CONFIG_TCP_CONG_ADVANCED=y +CONFIG_TCP_CONG_BIC=y +CONFIG_TCP_CONG_CUBIC=y +CONFIG_TCP_CONG_WESTWOOD=y +CONFIG_TCP_CONG_HTCP=y +# CONFIG_TCP_CONG_HSTCP is not set +# CONFIG_TCP_CONG_HYBLA is not set +# CONFIG_TCP_CONG_VEGAS is not set +# CONFIG_TCP_CONG_NV is not set +# CONFIG_TCP_CONG_SCALABLE is not set +# CONFIG_TCP_CONG_LP is not set +# CONFIG_TCP_CONG_VENO is not set +# CONFIG_TCP_CONG_YEAH is not set +# CONFIG_TCP_CONG_ILLINOIS is not set +# CONFIG_TCP_CONG_DCTCP is not set +# CONFIG_TCP_CONG_CDG is not set +# CONFIG_TCP_CONG_BBR is not set +# CONFIG_DEFAULT_BIC is not set +CONFIG_DEFAULT_CUBIC=y +# CONFIG_DEFAULT_HTCP is not set +# CONFIG_DEFAULT_WESTWOOD is not set +# CONFIG_DEFAULT_RENO is not set +CONFIG_DEFAULT_TCP_CONG="cubic" +CONFIG_TCP_MD5SIG=y +CONFIG_IPV6=y +CONFIG_IPV6_ROUTER_PREF=y +CONFIG_IPV6_ROUTE_INFO=y +CONFIG_IPV6_OPTIMISTIC_DAD=y +CONFIG_INET6_AH=y +CONFIG_INET6_ESP=y +CONFIG_INET6_IPCOMP=y +CONFIG_IPV6_MIP6=y +# CONFIG_IPV6_ILA is not set +CONFIG_INET6_XFRM_TUNNEL=y +CONFIG_INET6_TUNNEL=y +CONFIG_INET6_XFRM_MODE_TRANSPORT=y +CONFIG_INET6_XFRM_MODE_TUNNEL=y +CONFIG_INET6_XFRM_MODE_BEET=y +# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set +CONFIG_IPV6_VTI=y +CONFIG_IPV6_SIT=y +# CONFIG_IPV6_SIT_6RD is not set +CONFIG_IPV6_NDISC_NODETYPE=y +CONFIG_IPV6_TUNNEL=y +# CONFIG_IPV6_GRE is not set +CONFIG_IPV6_FOU=y +CONFIG_IPV6_FOU_TUNNEL=y +CONFIG_IPV6_MULTIPLE_TABLES=y +# CONFIG_IPV6_SUBTREES is not set +# CONFIG_IPV6_MROUTE is not set +# CONFIG_NETLABEL is not set +# CONFIG_ANDROID_PARANOID_NETWORK is not set +CONFIG_NETWORK_SECMARK=y +# CONFIG_NET_PTP_CLASSIFY is not set +# CONFIG_NETWORK_PHY_TIMESTAMPING is not set +CONFIG_NETFILTER=y +# CONFIG_NETFILTER_DEBUG is not set +CONFIG_NETFILTER_ADVANCED=y + +# +# Core Netfilter Configuration +# +CONFIG_NETFILTER_INGRESS=y +CONFIG_NETFILTER_NETLINK=y +CONFIG_NETFILTER_NETLINK_ACCT=y +CONFIG_NETFILTER_NETLINK_QUEUE=y +CONFIG_NETFILTER_NETLINK_LOG=y +CONFIG_NF_CONNTRACK=y +CONFIG_NF_CONNTRACK_MARK=y +CONFIG_NF_CONNTRACK_SECMARK=y +# CONFIG_NF_CONNTRACK_ZONES is not set +CONFIG_NF_CONNTRACK_PROCFS=y +CONFIG_NF_CONNTRACK_EVENTS=y +# CONFIG_NF_CONNTRACK_TIMEOUT is not set +# CONFIG_NF_CONNTRACK_TIMESTAMP is not set +CONFIG_NF_CT_PROTO_DCCP=y +CONFIG_NF_CT_PROTO_GRE=y +CONFIG_NF_CT_PROTO_SCTP=y +CONFIG_NF_CT_PROTO_UDPLITE=y +CONFIG_NF_CONNTRACK_AMANDA=y +CONFIG_NF_CONNTRACK_FTP=y +CONFIG_NF_CONNTRACK_H323=y +CONFIG_NF_CONNTRACK_IRC=y +CONFIG_NF_CONNTRACK_BROADCAST=y +CONFIG_NF_CONNTRACK_NETBIOS_NS=y +# CONFIG_NF_CONNTRACK_SNMP is not set +CONFIG_NF_CONNTRACK_PPTP=y +CONFIG_NF_CONNTRACK_SANE=y +# CONFIG_NF_CONNTRACK_SIP is not set +CONFIG_NF_CONNTRACK_TFTP=y +CONFIG_NF_CT_NETLINK=y +CONFIG_NF_CT_NETLINK_TIMEOUT=y +CONFIG_NF_CT_NETLINK_HELPER=y +CONFIG_NETFILTER_NETLINK_GLUE_CT=y +CONFIG_NF_NAT=y +CONFIG_NF_NAT_NEEDED=y +CONFIG_NF_NAT_PROTO_DCCP=y +CONFIG_NF_NAT_PROTO_UDPLITE=y +CONFIG_NF_NAT_PROTO_SCTP=y +CONFIG_NF_NAT_AMANDA=y +CONFIG_NF_NAT_FTP=y +CONFIG_NF_NAT_IRC=y +# CONFIG_NF_NAT_SIP is not set +CONFIG_NF_NAT_TFTP=y +CONFIG_NF_NAT_REDIRECT=y +# CONFIG_NF_TABLES is not set +CONFIG_NETFILTER_XTABLES=y + +# +# Xtables combined modules +# +CONFIG_NETFILTER_XT_MARK=y +CONFIG_NETFILTER_XT_CONNMARK=y + +# +# Xtables targets +# +CONFIG_NETFILTER_XT_TARGET_AUDIT=y +# CONFIG_NETFILTER_XT_TARGET_CHECKSUM is not set +CONFIG_NETFILTER_XT_TARGET_CLASSIFY=y +CONFIG_NETFILTER_XT_TARGET_CONNMARK=y +CONFIG_NETFILTER_XT_TARGET_CONNSECMARK=y +CONFIG_NETFILTER_XT_TARGET_CT=y +# CONFIG_NETFILTER_XT_TARGET_DSCP is not set +CONFIG_NETFILTER_XT_TARGET_HL=y +# CONFIG_NETFILTER_XT_TARGET_HMARK is not set +CONFIG_NETFILTER_XT_TARGET_IDLETIMER=y +# CONFIG_NETFILTER_XT_TARGET_LED is not set +# CONFIG_NETFILTER_XT_TARGET_LOG is not set +CONFIG_NETFILTER_XT_TARGET_MARK=y +CONFIG_NETFILTER_XT_NAT=y +CONFIG_NETFILTER_XT_TARGET_NETMAP=y +CONFIG_NETFILTER_XT_TARGET_NFLOG=y +CONFIG_NETFILTER_XT_TARGET_NFQUEUE=y +# CONFIG_NETFILTER_XT_TARGET_NOTRACK is not set +CONFIG_NETFILTER_XT_TARGET_RATEEST=y +CONFIG_NETFILTER_XT_TARGET_REDIRECT=y +# CONFIG_NETFILTER_XT_TARGET_TEE is not set +CONFIG_NETFILTER_XT_TARGET_TPROXY=y +CONFIG_NETFILTER_XT_TARGET_TRACE=y +CONFIG_NETFILTER_XT_TARGET_SECMARK=y +CONFIG_NETFILTER_XT_TARGET_TCPMSS=y +# CONFIG_NETFILTER_XT_TARGET_TCPOPTSTRIP is not set + +# +# Xtables matches +# +# CONFIG_NETFILTER_XT_MATCH_ADDRTYPE is not set +CONFIG_NETFILTER_XT_MATCH_BPF=y +# CONFIG_NETFILTER_XT_MATCH_CGROUP is not set +# CONFIG_NETFILTER_XT_MATCH_CLUSTER is not set +CONFIG_NETFILTER_XT_MATCH_COMMENT=y +# CONFIG_NETFILTER_XT_MATCH_CONNBYTES is not set +# CONFIG_NETFILTER_XT_MATCH_CONNLABEL is not set +CONFIG_NETFILTER_XT_MATCH_CONNLIMIT=y +CONFIG_NETFILTER_XT_MATCH_CONNMARK=y +CONFIG_NETFILTER_XT_MATCH_CONNTRACK=y +# CONFIG_NETFILTER_XT_MATCH_CPU is not set +# CONFIG_NETFILTER_XT_MATCH_DCCP is not set +# CONFIG_NETFILTER_XT_MATCH_DEVGROUP is not set +# CONFIG_NETFILTER_XT_MATCH_DSCP is not set +CONFIG_NETFILTER_XT_MATCH_ECN=y +# CONFIG_NETFILTER_XT_MATCH_ESP is not set +CONFIG_NETFILTER_XT_MATCH_HASHLIMIT=y +CONFIG_NETFILTER_XT_MATCH_HELPER=y +CONFIG_NETFILTER_XT_MATCH_HL=y +# CONFIG_NETFILTER_XT_MATCH_IPCOMP is not set +CONFIG_NETFILTER_XT_MATCH_IPRANGE=y +# CONFIG_NETFILTER_XT_MATCH_L2TP is not set +CONFIG_NETFILTER_XT_MATCH_LENGTH=y +CONFIG_NETFILTER_XT_MATCH_LIMIT=y +CONFIG_NETFILTER_XT_MATCH_MAC=y +CONFIG_NETFILTER_XT_MATCH_MARK=y +# CONFIG_NETFILTER_XT_MATCH_MULTIPORT is not set +# CONFIG_NETFILTER_XT_MATCH_NFACCT is not set +# CONFIG_NETFILTER_XT_MATCH_OSF is not set +CONFIG_NETFILTER_XT_MATCH_OWNER=y +CONFIG_NETFILTER_XT_MATCH_POLICY=y +CONFIG_NETFILTER_XT_MATCH_PKTTYPE=y +CONFIG_NETFILTER_XT_MATCH_QUOTA=y +CONFIG_NETFILTER_XT_MATCH_QUOTA2=y +# CONFIG_NETFILTER_XT_MATCH_QUOTA2_LOG is not set +# CONFIG_NETFILTER_XT_MATCH_RATEEST is not set +# CONFIG_NETFILTER_XT_MATCH_REALM is not set +# CONFIG_NETFILTER_XT_MATCH_RECENT is not set +# CONFIG_NETFILTER_XT_MATCH_SCTP is not set +CONFIG_NETFILTER_XT_MATCH_SOCKET=y +CONFIG_NETFILTER_XT_MATCH_STATE=y +CONFIG_NETFILTER_XT_MATCH_STATISTIC=y +CONFIG_NETFILTER_XT_MATCH_STRING=y +# CONFIG_NETFILTER_XT_MATCH_TCPMSS is not set +CONFIG_NETFILTER_XT_MATCH_TIME=y +CONFIG_NETFILTER_XT_MATCH_U32=y +# CONFIG_IP_SET is not set +# CONFIG_IP_VS is not set + +# +# IP: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV4=y +CONFIG_NF_CONNTRACK_IPV4=y +CONFIG_NF_DUP_IPV4=y +# CONFIG_NF_LOG_ARP is not set +# CONFIG_NF_LOG_IPV4 is not set +CONFIG_NF_REJECT_IPV4=y +CONFIG_NF_NAT_IPV4=y +CONFIG_NF_NAT_MASQUERADE_IPV4=y +CONFIG_NF_NAT_PROTO_GRE=y +CONFIG_NF_NAT_PPTP=y +CONFIG_NF_NAT_H323=y +CONFIG_IP_NF_IPTABLES=y +CONFIG_IP_NF_MATCH_AH=y +CONFIG_IP_NF_MATCH_ECN=y +# CONFIG_IP_NF_MATCH_RPFILTER is not set +CONFIG_IP_NF_MATCH_TTL=y +CONFIG_IP_NF_FILTER=y +CONFIG_IP_NF_TARGET_REJECT=y +# CONFIG_IP_NF_TARGET_SYNPROXY is not set +CONFIG_IP_NF_NAT=y +CONFIG_IP_NF_TARGET_MASQUERADE=y +CONFIG_IP_NF_TARGET_NETMAP=y +CONFIG_IP_NF_TARGET_REDIRECT=y +CONFIG_IP_NF_MANGLE=y +# CONFIG_IP_NF_TARGET_CLUSTERIP is not set +CONFIG_IP_NF_TARGET_ECN=y +CONFIG_IP_NF_TARGET_TTL=y +CONFIG_IP_NF_RAW=y +CONFIG_IP_NF_SECURITY=y +CONFIG_IP_NF_ARPTABLES=y +CONFIG_IP_NF_ARPFILTER=y +CONFIG_IP_NF_ARP_MANGLE=y + +# +# IPv6: Netfilter Configuration +# +CONFIG_NF_DEFRAG_IPV6=y +CONFIG_NF_CONNTRACK_IPV6=y +# CONFIG_NF_DUP_IPV6 is not set +CONFIG_NF_REJECT_IPV6=y +# CONFIG_NF_LOG_IPV6 is not set +CONFIG_NF_NAT_IPV6=y +# CONFIG_NF_NAT_MASQUERADE_IPV6 is not set +CONFIG_IP6_NF_IPTABLES=y +CONFIG_IP6_NF_MATCH_AH=y +CONFIG_IP6_NF_MATCH_EUI64=y +CONFIG_IP6_NF_MATCH_FRAG=y +CONFIG_IP6_NF_MATCH_OPTS=y +CONFIG_IP6_NF_MATCH_HL=y +CONFIG_IP6_NF_MATCH_IPV6HEADER=y +CONFIG_IP6_NF_MATCH_MH=y +CONFIG_IP6_NF_MATCH_RPFILTER=y +CONFIG_IP6_NF_MATCH_RT=y +# CONFIG_IP6_NF_TARGET_HL is not set +CONFIG_IP6_NF_FILTER=y +CONFIG_IP6_NF_TARGET_REJECT=y +# CONFIG_IP6_NF_TARGET_SYNPROXY is not set +CONFIG_IP6_NF_MANGLE=y +CONFIG_IP6_NF_RAW=y +CONFIG_IP6_NF_SECURITY=y +CONFIG_IP6_NF_NAT=y +# CONFIG_IP6_NF_TARGET_MASQUERADE is not set +# CONFIG_IP6_NF_TARGET_NPT is not set +# CONFIG_IP_DCCP is not set +# CONFIG_IP_SCTP is not set +# CONFIG_RDS is not set +# CONFIG_TIPC is not set +# CONFIG_ATM is not set +CONFIG_L2TP=y +# CONFIG_L2TP_DEBUGFS is not set +# CONFIG_L2TP_V3 is not set +# CONFIG_BRIDGE is not set +CONFIG_HAVE_NET_DSA=y +# CONFIG_NET_DSA is not set +# CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set +# CONFIG_LLC2 is not set +# CONFIG_IPX is not set +# CONFIG_ATALK is not set +# CONFIG_X25 is not set +# CONFIG_LAPB is not set +# CONFIG_PHONET is not set +# CONFIG_6LOWPAN is not set +# CONFIG_IEEE802154 is not set +CONFIG_NET_SCHED=y + +# +# Queueing/Scheduling +# +# CONFIG_NET_SCH_CBQ is not set +CONFIG_NET_SCH_HTB=y +# CONFIG_NET_SCH_HFSC is not set +# CONFIG_NET_SCH_PRIO is not set +# CONFIG_NET_SCH_MULTIQ is not set +# CONFIG_NET_SCH_RED is not set +# CONFIG_NET_SCH_SFB is not set +# CONFIG_NET_SCH_SFQ is not set +# CONFIG_NET_SCH_TEQL is not set +# CONFIG_NET_SCH_TBF is not set +# CONFIG_NET_SCH_GRED is not set +# CONFIG_NET_SCH_DSMARK is not set +# CONFIG_NET_SCH_NETEM is not set +# CONFIG_NET_SCH_DRR is not set +# CONFIG_NET_SCH_MQPRIO is not set +# CONFIG_NET_SCH_CHOKE is not set +CONFIG_NET_SCH_QFQ=y +# CONFIG_NET_SCH_CODEL is not set +# CONFIG_NET_SCH_FQ_CODEL is not set +# CONFIG_NET_SCH_FQ is not set +# CONFIG_NET_SCH_HHF is not set +# CONFIG_NET_SCH_PIE is not set +CONFIG_NET_SCH_INGRESS=y +# CONFIG_NET_SCH_PLUG is not set + +# +# Classification +# +CONFIG_NET_CLS=y +# CONFIG_NET_CLS_BASIC is not set +# CONFIG_NET_CLS_TCINDEX is not set +# CONFIG_NET_CLS_ROUTE4 is not set +# CONFIG_NET_CLS_FW is not set +CONFIG_NET_CLS_U32=y +# CONFIG_CLS_U32_PERF is not set +# CONFIG_CLS_U32_MARK is not set +# CONFIG_NET_CLS_RSVP is not set +# CONFIG_NET_CLS_RSVP6 is not set +# CONFIG_NET_CLS_FLOW is not set +# CONFIG_NET_CLS_CGROUP is not set +CONFIG_NET_CLS_BPF=y +# CONFIG_NET_CLS_FLOWER is not set +# CONFIG_NET_CLS_MATCHALL is not set +CONFIG_NET_EMATCH=y +CONFIG_NET_EMATCH_STACK=32 +# CONFIG_NET_EMATCH_CMP is not set +# CONFIG_NET_EMATCH_NBYTE is not set +CONFIG_NET_EMATCH_U32=y +# CONFIG_NET_EMATCH_META is not set +# CONFIG_NET_EMATCH_TEXT is not set +CONFIG_NET_CLS_ACT=y +# CONFIG_NET_ACT_POLICE is not set +# CONFIG_NET_ACT_GACT is not set +# CONFIG_NET_ACT_MIRRED is not set +# CONFIG_NET_ACT_IPT is not set +# CONFIG_NET_ACT_NAT is not set +# CONFIG_NET_ACT_PEDIT is not set +# CONFIG_NET_ACT_SIMP is not set +# CONFIG_NET_ACT_SKBEDIT is not set +# CONFIG_NET_ACT_CSUM is not set +# CONFIG_NET_ACT_VLAN is not set +# CONFIG_NET_ACT_BPF is not set +# CONFIG_NET_ACT_CONNMARK is not set +# CONFIG_NET_ACT_SKBMOD is not set +# CONFIG_NET_ACT_IFE is not set +# CONFIG_NET_ACT_TUNNEL_KEY is not set +# CONFIG_NET_CLS_IND is not set +CONFIG_NET_SCH_FIFO=y +# CONFIG_DCB is not set +# CONFIG_DNS_RESOLVER is not set +# CONFIG_BATMAN_ADV is not set +# CONFIG_OPENVSWITCH is not set +# CONFIG_VSOCKETS is not set +# CONFIG_NETLINK_DIAG is not set +# CONFIG_MPLS is not set +# CONFIG_HSR is not set +# CONFIG_NET_SWITCHDEV is not set +# CONFIG_NET_L3_MASTER_DEV is not set +# CONFIG_NET_NCSI is not set +CONFIG_RPS=y +CONFIG_RFS_ACCEL=y +CONFIG_XPS=y +# CONFIG_CGROUP_NET_PRIO is not set +# CONFIG_CGROUP_NET_CLASSID is not set +CONFIG_NET_RX_BUSY_POLL=y +CONFIG_BQL=y +# CONFIG_BPF_JIT is not set +CONFIG_NET_FLOW_LIMIT=y + +# +# Network testing +# +CONFIG_NET_PKTGEN=y +# CONFIG_HAMRADIO is not set +# CONFIG_CAN is not set +# CONFIG_IRDA is not set +CONFIG_BT=y +CONFIG_BT_BREDR=y +CONFIG_BT_RFCOMM=y +CONFIG_BT_RFCOMM_TTY=y +# CONFIG_BT_BNEP is not set +CONFIG_BT_HIDP=y +# CONFIG_BT_HS is not set +CONFIG_BT_LE=y +# CONFIG_BT_LEDS is not set +# CONFIG_BT_SELFTEST is not set +CONFIG_BT_DEBUGFS=y + +# +# Bluetooth device drivers +# +# CONFIG_BT_HCIBTUSB is not set +# CONFIG_BT_RTKBTUSB is not set +# CONFIG_BT_HCIBTSDIO is not set +CONFIG_BT_HCIUART=y +CONFIG_BT_HCIUART_H4=y +# CONFIG_BT_HCIUART_BCSP is not set +# CONFIG_BT_HCIUART_ATH3K is not set +CONFIG_BT_HCIUART_LL=y +CONFIG_BT_HCIUART_3WIRE=y +# CONFIG_BT_HCIUART_INTEL is not set +# CONFIG_BT_HCIUART_BCM is not set +# CONFIG_BT_HCIUART_QCA is not set +# CONFIG_BT_HCIUART_AG6XX is not set +# CONFIG_BT_HCIUART_MRVL is not set +# CONFIG_BT_HCIBCM203X is not set +# CONFIG_BT_HCIBPA10X is not set +# CONFIG_BT_HCIBFUSB is not set +# CONFIG_BT_HCIVHCI is not set +CONFIG_BCM_BT_LPM=m +CONFIG_RTL_BT_LPM=m +# CONFIG_XR_BT_LPM is not set +# CONFIG_BT_MRVL is not set +# CONFIG_AF_RXRPC is not set +# CONFIG_AF_KCM is not set +# CONFIG_STREAM_PARSER is not set +CONFIG_FIB_RULES=y +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +# CONFIG_NL80211_TESTMODE is not set +# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set +# CONFIG_CFG80211_CERTIFICATION_ONUS is not set +CONFIG_CFG80211_DEFAULT_PS=y +# CONFIG_CFG80211_DEBUGFS is not set +# CONFIG_CFG80211_INTERNAL_REGDB is not set +CONFIG_CFG80211_CRDA_SUPPORT=y +# CONFIG_CFG80211_WEXT is not set +# CONFIG_LIB80211 is not set +CONFIG_MAC80211=y +CONFIG_MAC80211_HAS_RC=y +CONFIG_MAC80211_RC_MINSTREL=y +CONFIG_MAC80211_RC_MINSTREL_HT=y +# CONFIG_MAC80211_RC_MINSTREL_VHT is not set +CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y +CONFIG_MAC80211_RC_DEFAULT="minstrel_ht" +# CONFIG_MAC80211_MESH is not set +# CONFIG_MAC80211_LEDS is not set +# CONFIG_MAC80211_DEBUGFS is not set +# CONFIG_MAC80211_MESSAGE_TRACING is not set +# CONFIG_MAC80211_DEBUG_MENU is not set +CONFIG_MAC80211_STA_HASH_MAX_SIZE=0 +# CONFIG_WIMAX is not set +CONFIG_RFKILL=y +CONFIG_RFKILL_PM=y +CONFIG_RFKILL_LEDS=y +# CONFIG_RFKILL_INPUT is not set +# CONFIG_RFKILL_REGULATOR is not set +# CONFIG_RFKILL_GPIO is not set +# CONFIG_NET_9P is not set +# CONFIG_CAIF is not set +# CONFIG_CEPH_LIB is not set +# CONFIG_NFC is not set +CONFIG_LWTUNNEL=y +CONFIG_DST_CACHE=y +# CONFIG_NET_DEVLINK is not set +CONFIG_MAY_USE_DEVLINK=y +CONFIG_HAVE_EBPF_JIT=y + +# +# Device Drivers +# +CONFIG_ARM_AMBA=y + +# +# Generic Driver Options +# +CONFIG_UEVENT_HELPER=y +CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" +CONFIG_DEVTMPFS=y +# CONFIG_DEVTMPFS_MOUNT is not set +CONFIG_STANDALONE=y +CONFIG_PREVENT_FIRMWARE_BUILD=y +CONFIG_FW_LOADER=y +CONFIG_FIRMWARE_IN_KERNEL=y +CONFIG_EXTRA_FIRMWARE="" +# CONFIG_FW_LOADER_USER_HELPER_FALLBACK is not set +CONFIG_ALLOW_DEV_COREDUMP=y +# CONFIG_DEBUG_DRIVER is not set +# CONFIG_DEBUG_DEVRES is not set +# CONFIG_DEBUG_TEST_DRIVER_REMOVE is not set +# CONFIG_SYS_HYPERVISOR is not set +# CONFIG_GENERIC_CPU_DEVICES is not set +CONFIG_GENERIC_CPU_AUTOPROBE=y +CONFIG_REGMAP=y +CONFIG_REGMAP_I2C=y +CONFIG_REGMAP_MMIO=y +CONFIG_REGMAP_IRQ=y +CONFIG_DMA_SHARED_BUFFER=y +# CONFIG_FENCE_TRACE is not set +CONFIG_DMA_CMA=y + +# +# Default contiguous memory area size: +# +CONFIG_CMA_SIZE_MBYTES=16 +CONFIG_CMA_SIZE_SEL_MBYTES=y +# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set +# CONFIG_CMA_SIZE_SEL_MIN is not set +# CONFIG_CMA_SIZE_SEL_MAX is not set +CONFIG_CMA_ALIGNMENT=8 + +# +# Bus devices +# +# CONFIG_ARM_CCI400_PMU is not set +# CONFIG_ARM_CCI5xx_PMU is not set +# CONFIG_ARM_CCN is not set +# CONFIG_SUNXI_RSB is not set +CONFIG_SUNXI_MBUS=y +# CONFIG_VEXPRESS_CONFIG is not set +# CONFIG_CONNECTOR is not set +# CONFIG_MTD is not set +CONFIG_DTC=y +CONFIG_OF=y +# CONFIG_OF_UNITTEST is not set +CONFIG_OF_FLATTREE=y +CONFIG_OF_EARLY_FLATTREE=y +CONFIG_OF_ADDRESS=y +CONFIG_OF_IRQ=y +CONFIG_OF_NET=y +CONFIG_OF_MDIO=y +CONFIG_OF_RESERVED_MEM=y +# CONFIG_OF_OVERLAY is not set +# CONFIG_PARPORT is not set +CONFIG_BLK_DEV=y +# CONFIG_BLK_DEV_NULL_BLK is not set +# CONFIG_ZRAM is not set +CONFIG_SUNXI_NAND=y +CONFIG_SUNXI_RAWNAND=y +# CONFIG_SUNXI_SPINAND is not set +# CONFIG_BLK_DEV_COW_COMMON is not set +CONFIG_BLK_DEV_LOOP=y +CONFIG_BLK_DEV_LOOP_MIN_COUNT=8 +# CONFIG_BLK_DEV_CRYPTOLOOP is not set +# CONFIG_BLK_DEV_DRBD is not set +# CONFIG_BLK_DEV_NBD is not set +CONFIG_BLK_DEV_RAM=y +CONFIG_BLK_DEV_RAM_COUNT=16 +CONFIG_BLK_DEV_RAM_SIZE=8192 +# CONFIG_CDROM_PKTCDVD is not set +# CONFIG_ATA_OVER_ETH is not set +# CONFIG_BLK_DEV_RBD is not set +# CONFIG_NVME_TARGET is not set + +# +# Misc devices +# +# CONFIG_SENSORS_LIS3LV02D is not set +# CONFIG_AD525X_DPOT is not set +# CONFIG_DUMMY_IRQ is not set +# CONFIG_ICS932S401 is not set +# CONFIG_ENCLOSURE_SERVICES is not set +# CONFIG_APDS9802ALS is not set +# CONFIG_ISL29003 is not set +# CONFIG_ISL29020 is not set +# CONFIG_SENSORS_TSL2550 is not set +# CONFIG_SENSORS_BH1770 is not set +# CONFIG_SENSORS_APDS990X is not set +# CONFIG_HMC6352 is not set +# CONFIG_DS1682 is not set +# CONFIG_USB_SWITCH_FSA9480 is not set +# CONFIG_SRAM is not set +CONFIG_UID_SYS_STATS=y +# CONFIG_UID_SYS_STATS_DEBUG is not set +CONFIG_MEMORY_STATE_TIME=y +CONFIG_SUNXI_SST_STORAGE=y +# CONFIG_C2PORT is not set + +# +# EEPROM support +# +# CONFIG_EEPROM_AT24 is not set +# CONFIG_EEPROM_LEGACY is not set +# CONFIG_EEPROM_MAX6875 is not set +# CONFIG_EEPROM_93CX6 is not set + +# +# Texas Instruments shared transport line discipline +# +# CONFIG_TI_ST is not set +# CONFIG_SENSORS_LIS3_I2C is not set + +# +# Altera FPGA firmware download module +# +# CONFIG_ALTERA_STAPL is not set + +# +# Intel MIC Bus Driver +# + +# +# SCIF Bus Driver +# + +# +# VOP Bus Driver +# + +# +# Intel MIC Host Driver +# + +# +# Intel MIC Card Driver +# + +# +# SCIF Driver +# + +# +# Intel MIC Coprocessor State Management (COSM) Drivers +# + +# +# VOP Driver +# +# CONFIG_ECHO is not set +# CONFIG_CXL_BASE is not set +# CONFIG_CXL_AFU_DRIVER_OPS is not set +CONFIG_SUNXI_RFKILL=y +CONFIG_SUNXI_ADDR_MGT=y +CONFIG_SUNXI_BOOTEVENT=y + +# +# SCSI device support +# +CONFIG_SCSI_MOD=y +# CONFIG_RAID_ATTRS is not set +CONFIG_SCSI=y +CONFIG_SCSI_DMA=y +# CONFIG_SCSI_NETLINK is not set +# CONFIG_SCSI_MQ_DEFAULT is not set +CONFIG_SCSI_PROC_FS=y + +# +# SCSI support type (disk, tape, CD-ROM) +# +CONFIG_BLK_DEV_SD=y +# CONFIG_CHR_DEV_ST is not set +# CONFIG_CHR_DEV_OSST is not set +# CONFIG_BLK_DEV_SR is not set +# CONFIG_CHR_DEV_SG is not set +# CONFIG_CHR_DEV_SCH is not set +# CONFIG_SCSI_CONSTANTS is not set +# CONFIG_SCSI_LOGGING is not set +# CONFIG_SCSI_SCAN_ASYNC is not set + +# +# SCSI Transports +# +# CONFIG_SCSI_SPI_ATTRS is not set +# CONFIG_SCSI_FC_ATTRS is not set +# CONFIG_SCSI_ISCSI_ATTRS is not set +# CONFIG_SCSI_SAS_ATTRS is not set +# CONFIG_SCSI_SAS_LIBSAS is not set +# CONFIG_SCSI_SRP_ATTRS is not set +CONFIG_SCSI_LOWLEVEL=y +# CONFIG_ISCSI_TCP is not set +# CONFIG_ISCSI_BOOT_SYSFS is not set +# CONFIG_SCSI_HISI_SAS is not set +# CONFIG_SCSI_UFSHCD is not set +# CONFIG_SCSI_DEBUG is not set +# CONFIG_SCSI_LOWLEVEL_PCMCIA is not set +# CONFIG_SCSI_DH is not set +# CONFIG_SCSI_OSD_INITIATOR is not set +CONFIG_HAVE_PATA_PLATFORM=y +# CONFIG_ATA is not set +CONFIG_MD=y +# CONFIG_BLK_DEV_MD is not set +# CONFIG_BCACHE is not set +CONFIG_BLK_DEV_DM_BUILTIN=y +CONFIG_BLK_DEV_DM=y +# CONFIG_DM_MQ_DEFAULT is not set +# CONFIG_DM_DEBUG is not set +CONFIG_DM_BUFIO=y +# CONFIG_DM_DEBUG_BLOCK_STACK_TRACING is not set +CONFIG_DM_CRYPT=y +# CONFIG_DM_SNAPSHOT is not set +# CONFIG_DM_THIN_PROVISIONING is not set +# CONFIG_DM_CACHE is not set +# CONFIG_DM_ERA is not set +# CONFIG_DM_MIRROR is not set +# CONFIG_DM_RAID is not set +# CONFIG_DM_ZERO is not set +# CONFIG_DM_MULTIPATH is not set +# CONFIG_DM_DELAY is not set +CONFIG_DM_UEVENT=y +# CONFIG_DM_FLAKEY is not set +CONFIG_DM_VERITY=y +CONFIG_DM_VERITY_FEC=y +# CONFIG_DM_SWITCH is not set +# CONFIG_DM_LOG_WRITES is not set +# CONFIG_DM_VERITY_AVB is not set +# CONFIG_DM_ANDROID_VERITY_AT_MOST_ONCE_DEFAULT_ENABLED is not set +# CONFIG_DM_BOW is not set +# CONFIG_TARGET_CORE is not set +CONFIG_NETDEVICES=y +CONFIG_MII=y +CONFIG_NET_CORE=y +# CONFIG_BONDING is not set +# CONFIG_DUMMY is not set +# CONFIG_EQUALIZER is not set +# CONFIG_IFB is not set +# CONFIG_NET_TEAM is not set +# CONFIG_MACVLAN is not set +# CONFIG_VXLAN is not set +# CONFIG_GENEVE is not set +# CONFIG_GTP is not set +# CONFIG_MACSEC is not set +# CONFIG_NETCONSOLE is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +CONFIG_TUN=y +# CONFIG_TUN_VNET_CROSS_LE is not set +# CONFIG_VETH is not set +# CONFIG_NLMON is not set + +# +# CAIF transport drivers +# + +# +# Distributed Switch Architecture drivers +# +CONFIG_ETHERNET=y +CONFIG_NET_VENDOR_ALLWINNER=y +# CONFIG_SUN4I_EMAC is not set +# CONFIG_SUNXI_GMAC is not set +# CONFIG_ALTERA_TSE is not set +CONFIG_NET_VENDOR_AMAZON=y +CONFIG_NET_VENDOR_AMD=y +# CONFIG_AMD_XGBE is not set +CONFIG_NET_VENDOR_ARC=y +# CONFIG_ARC_EMAC is not set +# CONFIG_EMAC_ROCKCHIP is not set +# CONFIG_NET_VENDOR_AURORA is not set +CONFIG_NET_CADENCE=y +# CONFIG_MACB is not set +CONFIG_NET_VENDOR_BROADCOM=y +# CONFIG_B44 is not set +# CONFIG_BCMGENET is not set +# CONFIG_SYSTEMPORT is not set +# CONFIG_DNET is not set +CONFIG_NET_VENDOR_EZCHIP=y +# CONFIG_EZCHIP_NPS_MANAGEMENT_ENET is not set +CONFIG_NET_VENDOR_HISILICON=y +# CONFIG_HIX5HD2_GMAC is not set +# CONFIG_HISI_FEMAC is not set +# CONFIG_HIP04_ETH is not set +# CONFIG_HNS is not set +# CONFIG_HNS_DSAF is not set +# CONFIG_HNS_ENET is not set +CONFIG_NET_VENDOR_INTEL=y +CONFIG_NET_VENDOR_I825XX=y +CONFIG_NET_VENDOR_MARVELL=y +# CONFIG_MVMDIO is not set +# CONFIG_MVNETA_BM is not set +CONFIG_NET_VENDOR_MICREL=y +# CONFIG_KS8842 is not set +# CONFIG_KS8851_MLL is not set +CONFIG_NET_VENDOR_NATSEMI=y +CONFIG_NET_VENDOR_NETRONOME=y +CONFIG_NET_VENDOR_8390=y +# CONFIG_ETHOC is not set +CONFIG_NET_VENDOR_QUALCOMM=y +# CONFIG_QCOM_EMAC is not set +CONFIG_NET_VENDOR_RENESAS=y +CONFIG_NET_VENDOR_ROCKER=y +CONFIG_NET_VENDOR_SAMSUNG=y +# CONFIG_SXGBE_ETH is not set +CONFIG_NET_VENDOR_SEEQ=y +CONFIG_NET_VENDOR_SMSC=y +# CONFIG_SMC91X is not set +# CONFIG_SMSC911X is not set +CONFIG_NET_VENDOR_STMICRO=y +# CONFIG_STMMAC_ETH is not set +CONFIG_NET_VENDOR_SYNOPSYS=y +# CONFIG_SYNOPSYS_DWC_ETH_QOS is not set +CONFIG_NET_VENDOR_VIA=y +# CONFIG_VIA_RHINE is not set +# CONFIG_VIA_VELOCITY is not set +CONFIG_NET_VENDOR_WIZNET=y +# CONFIG_WIZNET_W5100 is not set +# CONFIG_WIZNET_W5300 is not set +CONFIG_PHYLIB=y +CONFIG_SWPHY=y + +# +# MDIO bus device drivers +# +# CONFIG_MDIO_BCM_UNIMAC is not set +# CONFIG_MDIO_BITBANG is not set +# CONFIG_MDIO_BUS_MUX_GPIO is not set +# CONFIG_MDIO_BUS_MUX_MMIOREG is not set +# CONFIG_MDIO_HISI_FEMAC is not set +# CONFIG_MDIO_OCTEON is not set +# CONFIG_MDIO_SUN4I is not set + +# +# MII PHY device drivers +# +# CONFIG_AMD_PHY is not set +# CONFIG_AQUANTIA_PHY is not set +# CONFIG_AT803X_PHY is not set +# CONFIG_BCM7XXX_PHY is not set +# CONFIG_BCM87XX_PHY is not set +# CONFIG_BROADCOM_PHY is not set +# CONFIG_CICADA_PHY is not set +# CONFIG_DAVICOM_PHY is not set +# CONFIG_DP83848_PHY is not set +# CONFIG_DP83867_PHY is not set +CONFIG_FIXED_PHY=y +# CONFIG_ICPLUS_PHY is not set +# CONFIG_INTEL_XWAY_PHY is not set +# CONFIG_LSI_ET1011C_PHY is not set +# CONFIG_LXT_PHY is not set +# CONFIG_MARVELL_PHY is not set +# CONFIG_MICREL_PHY is not set +# CONFIG_MICROCHIP_PHY is not set +# CONFIG_MICROSEMI_PHY is not set +CONFIG_MOTORCOMM_PHY=y +# CONFIG_NATIONAL_PHY is not set +# CONFIG_QSEMI_PHY is not set +# CONFIG_REALTEK_PHY is not set +# CONFIG_SMSC_PHY is not set +# CONFIG_STE10XP is not set +# CONFIG_TERANETICS_PHY is not set +# CONFIG_VITESSE_PHY is not set +# CONFIG_XILINX_GMII2RGMII is not set +CONFIG_PPP=y +CONFIG_PPP_BSDCOMP=y +CONFIG_PPP_DEFLATE=y +CONFIG_PPP_FILTER=y +CONFIG_PPP_MPPE=y +CONFIG_PPP_MULTILINK=y +CONFIG_PPPOE=y +CONFIG_PPTP=y +CONFIG_PPPOL2TP=y +CONFIG_PPPOLAC=y +CONFIG_PPPOPNS=y +CONFIG_PPP_ASYNC=y +CONFIG_PPP_SYNC_TTY=y +# CONFIG_SLIP is not set +CONFIG_SLHC=y +CONFIG_USB_NET_DRIVERS=y +# CONFIG_USB_CATC is not set +# CONFIG_USB_KAWETH is not set +# CONFIG_USB_PEGASUS is not set +# CONFIG_USB_RTL8150 is not set +CONFIG_USB_RTL8152=y +# CONFIG_USB_LAN78XX is not set +CONFIG_USB_USBNET=y +CONFIG_USB_NET_AX8817X=y +CONFIG_USB_NET_AX88179_178A=y +CONFIG_USB_NET_CDCETHER=y +# CONFIG_USB_NET_CDC_EEM is not set +CONFIG_USB_NET_CDC_NCM=y +# CONFIG_USB_NET_HUAWEI_CDC_NCM is not set +# CONFIG_USB_NET_CDC_MBIM is not set +# CONFIG_USB_NET_DM9601 is not set +# CONFIG_USB_NET_SR9700 is not set +# CONFIG_USB_NET_SR9800 is not set +# CONFIG_USB_NET_SMSC75XX is not set +# CONFIG_USB_NET_SMSC95XX is not set +# CONFIG_USB_NET_GL620A is not set +CONFIG_USB_NET_NET1080=y +# CONFIG_USB_NET_PLUSB is not set +# CONFIG_USB_NET_MCS7830 is not set +# CONFIG_USB_NET_RNDIS_HOST is not set +CONFIG_USB_NET_CDC_SUBSET_ENABLE=y +CONFIG_USB_NET_CDC_SUBSET=y +# CONFIG_USB_ALI_M5632 is not set +# CONFIG_USB_AN2720 is not set +CONFIG_USB_BELKIN=y +CONFIG_USB_ARMLINUX=y +# CONFIG_USB_EPSON2888 is not set +# CONFIG_USB_KC2190 is not set +CONFIG_USB_NET_ZAURUS=y +# CONFIG_USB_NET_CX82310_ETH is not set +# CONFIG_USB_NET_KALMIA is not set +# CONFIG_USB_NET_QMI_WWAN is not set +# CONFIG_USB_HSO is not set +# CONFIG_USB_NET_INT51X1 is not set +# CONFIG_USB_IPHETH is not set +# CONFIG_USB_SIERRA_NET is not set +# CONFIG_USB_VL600 is not set +# CONFIG_USB_NET_CH9200 is not set +# CONFIG_USB_NET_QUECTEL is not set +CONFIG_WLAN=y +CONFIG_WLAN_VENDOR_ADMTEK=y +CONFIG_WLAN_VENDOR_ATH=y +# CONFIG_ATH_DEBUG is not set +# CONFIG_ATH9K is not set +# CONFIG_ATH9K_HTC is not set +# CONFIG_CARL9170 is not set +# CONFIG_ATH6KL is not set +# CONFIG_AR5523 is not set +# CONFIG_ATH10K is not set +# CONFIG_WCN36XX is not set +CONFIG_WLAN_VENDOR_ATMEL=y +# CONFIG_AT76C50X_USB is not set +CONFIG_WLAN_VENDOR_BROADCOM=y +# CONFIG_B43 is not set +# CONFIG_B43LEGACY is not set +# CONFIG_BRCMSMAC is not set +# CONFIG_BRCMFMAC is not set +CONFIG_WLAN_VENDOR_CISCO=y +CONFIG_WLAN_VENDOR_INTEL=y +CONFIG_WLAN_VENDOR_INTERSIL=y +# CONFIG_HOSTAP is not set +# CONFIG_P54_COMMON is not set +CONFIG_WLAN_VENDOR_MARVELL=y +# CONFIG_LIBERTAS is not set +# CONFIG_LIBERTAS_THINFIRM is not set +# CONFIG_MWIFIEX is not set +CONFIG_WLAN_VENDOR_MEDIATEK=y +# CONFIG_MT7601U is not set +CONFIG_WLAN_VENDOR_RALINK=y +# CONFIG_RT2X00 is not set +CONFIG_WLAN_VENDOR_REALTEK=y +# CONFIG_RTL8187 is not set +CONFIG_RTL_CARDS=y +# CONFIG_RTL8192CU is not set +# CONFIG_RTL8XXXU is not set +CONFIG_WLAN_VENDOR_RSI=y +# CONFIG_RSI_91X is not set +CONFIG_WLAN_VENDOR_ST=y +# CONFIG_CW1200 is not set +CONFIG_WLAN_VENDOR_TI=y +# CONFIG_WL1251 is not set +# CONFIG_WL12XX is not set +# CONFIG_WL18XX is not set +# CONFIG_WLCORE is not set +CONFIG_WLAN_VENDOR_ZYDAS=y +# CONFIG_USB_ZD1201 is not set +# CONFIG_ZD1211RW is not set +# CONFIG_XR819_WLAN is not set +# CONFIG_XR829_WLAN is not set +# CONFIG_MAC80211_HWSIM is not set +# CONFIG_USB_NET_RNDIS_WLAN is not set +# CONFIG_VIRT_WIFI is not set +# CONFIG_BCMDHD is not set +# CONFIG_RTL8723CS is not set +# CONFIG_RTL8723BS_VQ0 is not set +# CONFIG_SPARD_WLAN_SUPPORT is not set +# CONFIG_RTL8822BS is not set +CONFIG_RTL8821CS=m + +# +# Enable WiMAX (Networking options) to see the WiMAX drivers +# +# CONFIG_WAN is not set +# CONFIG_ISDN is not set +# CONFIG_NVM is not set + +# +# Input device support +# +CONFIG_INPUT=y +CONFIG_INPUT_LEDS=y +CONFIG_INPUT_FF_MEMLESS=y +CONFIG_INPUT_POLLDEV=y +# CONFIG_INPUT_SPARSEKMAP is not set +# CONFIG_INPUT_MATRIXKMAP is not set + +# +# Userland interfaces +# +# CONFIG_INPUT_MOUSEDEV is not set +CONFIG_INPUT_JOYDEV=y +CONFIG_INPUT_EVDEV=y +# CONFIG_INPUT_EVBUG is not set +CONFIG_INPUT_KEYRESET=y +CONFIG_INPUT_KEYCOMBO=y +CONFIG_INPUT_SENSORINIT=y + +# +# Input Device Drivers +# +CONFIG_INPUT_KEYBOARD=y +# CONFIG_KEYBOARD_ADP5588 is not set +# CONFIG_KEYBOARD_ADP5589 is not set +CONFIG_KEYBOARD_ATKBD=y +# CONFIG_KEYBOARD_QT1070 is not set +# CONFIG_KEYBOARD_QT2160 is not set +# CONFIG_KEYBOARD_LKKBD is not set +# CONFIG_KEYBOARD_GPIO is not set +CONFIG_KEYBOARD_GPIO_POLLED=y +# CONFIG_KEYBOARD_TCA6416 is not set +# CONFIG_KEYBOARD_TCA8418 is not set +# CONFIG_KEYBOARD_MATRIX is not set +# CONFIG_KEYBOARD_LM8323 is not set +# CONFIG_KEYBOARD_LM8333 is not set +# CONFIG_KEYBOARD_MAX7359 is not set +# CONFIG_KEYBOARD_MCS is not set +# CONFIG_KEYBOARD_MPR121 is not set +# CONFIG_KEYBOARD_NEWTON is not set +# CONFIG_KEYBOARD_OPENCORES is not set +# CONFIG_KEYBOARD_SAMSUNG is not set +# CONFIG_KEYBOARD_STOWAWAY is not set +# CONFIG_KEYBOARD_SUNKBD is not set +# CONFIG_KEYBOARD_SUN4I_LRADC is not set +# CONFIG_KEYBOARD_OMAP4 is not set +# CONFIG_KEYBOARD_XTKBD is not set +# CONFIG_KEYBOARD_CAP11XX is not set +# CONFIG_KEYBOARD_BCM is not set +# CONFIG_KEYBOARD_SUNXI is not set +# CONFIG_IR_TX_SUNXI is not set +# CONFIG_INPUT_MOUSE is not set +CONFIG_INPUT_JOYSTICK=y +CONFIG_JOYSTICK_ANALOG=y +# CONFIG_JOYSTICK_A3D is not set +# CONFIG_JOYSTICK_ADI is not set +# CONFIG_JOYSTICK_COBRA is not set +# CONFIG_JOYSTICK_GF2K is not set +# CONFIG_JOYSTICK_GRIP is not set +# CONFIG_JOYSTICK_GRIP_MP is not set +# CONFIG_JOYSTICK_GUILLEMOT is not set +# CONFIG_JOYSTICK_INTERACT is not set +CONFIG_JOYSTICK_SIDEWINDER=y +# CONFIG_JOYSTICK_TMDC is not set +# CONFIG_JOYSTICK_IFORCE is not set +# CONFIG_JOYSTICK_WARRIOR is not set +# CONFIG_JOYSTICK_MAGELLAN is not set +# CONFIG_JOYSTICK_SPACEORB is not set +# CONFIG_JOYSTICK_SPACEBALL is not set +# CONFIG_JOYSTICK_STINGER is not set +# CONFIG_JOYSTICK_TWIDJOY is not set +# CONFIG_JOYSTICK_ZHENHUA is not set +# CONFIG_JOYSTICK_AS5011 is not set +# CONFIG_JOYSTICK_JOYDUMP is not set +CONFIG_JOYSTICK_XPAD=y +CONFIG_JOYSTICK_XPAD_FF=y +# CONFIG_JOYSTICK_XPAD_LEDS is not set +# CONFIG_INPUT_TABLET is not set +# CONFIG_INPUT_TOUCHSCREEN is not set +CONFIG_INPUT_MISC=y +# CONFIG_INPUT_AD714X is not set +# CONFIG_INPUT_ATMEL_CAPTOUCH is not set +# CONFIG_INPUT_BMA150 is not set +# CONFIG_INPUT_E3X0_BUTTON is not set +# CONFIG_INPUT_MMA8450 is not set +# CONFIG_INPUT_MPU3050 is not set +# CONFIG_INPUT_GP2A is not set +# CONFIG_INPUT_GPIO_BEEPER is not set +# CONFIG_INPUT_GPIO_TILT_POLLED is not set +# CONFIG_INPUT_GPIO_DECODER is not set +# CONFIG_INPUT_ATI_REMOTE2 is not set +# CONFIG_INPUT_KEYSPAN_REMOTE is not set +# CONFIG_INPUT_KXTJ9 is not set +# CONFIG_INPUT_POWERMATE is not set +# CONFIG_INPUT_YEALINK is not set +# CONFIG_INPUT_CM109 is not set +# CONFIG_INPUT_REGULATOR_HAPTIC is not set +CONFIG_INPUT_AXP2101_PEK=y +CONFIG_INPUT_UINPUT=y +CONFIG_INPUT_GPIO=y +# CONFIG_INPUT_PCF8574 is not set +# CONFIG_INPUT_PWM_BEEPER is not set +# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set +# CONFIG_INPUT_ADXL34X is not set +# CONFIG_INPUT_IMS_PCU is not set +# CONFIG_INPUT_CMA3000 is not set +# CONFIG_INPUT_DRV260X_HAPTICS is not set +# CONFIG_INPUT_DRV2665_HAPTICS is not set +# CONFIG_INPUT_DRV2667_HAPTICS is not set +# CONFIG_STK3X1X is not set +# CONFIG_HALL_OCH175 is not set +# CONFIG_RMI4_CORE is not set +# CONFIG_INPUT_SENSOR is not set +# CONFIG_SENSORS_BMA2X2 is not set +# CONFIG_SENSORS_BMA2X2_ENABLE_INT1 is not set +# CONFIG_SENSORS_BMA2X2_ENABLE_INT2 is not set + +# +# Hardware I/O ports +# +CONFIG_SERIO=y +# CONFIG_SERIO_SERPORT is not set +# CONFIG_SERIO_AMBAKMI is not set +CONFIG_SERIO_LIBPS2=y +# CONFIG_SERIO_RAW is not set +# CONFIG_SERIO_ALTERA_PS2 is not set +# CONFIG_SERIO_PS2MULT is not set +# CONFIG_SERIO_ARC_PS2 is not set +# CONFIG_SERIO_APBPS2 is not set +# CONFIG_SERIO_SUN4I_PS2 is not set +# CONFIG_USERIO is not set +CONFIG_GAMEPORT=y +# CONFIG_GAMEPORT_NS558 is not set +# CONFIG_GAMEPORT_L4 is not set + +# +# Character devices +# +CONFIG_TTY=y +CONFIG_VT=y +CONFIG_CONSOLE_TRANSLATIONS=y +CONFIG_VT_CONSOLE=y +CONFIG_VT_CONSOLE_SLEEP=y +CONFIG_HW_CONSOLE=y +CONFIG_VT_HW_CONSOLE_BINDING=y +CONFIG_UNIX98_PTYS=y +# CONFIG_LEGACY_PTYS is not set +# CONFIG_SERIAL_NONSTANDARD is not set +# CONFIG_N_GSM is not set +# CONFIG_TRACE_SINK is not set +CONFIG_LDISC_AUTOLOAD=y +CONFIG_DEVMEM=y +CONFIG_DEVKMEM=y + +# +# Serial drivers +# +# CONFIG_SERIAL_8250 is not set + +# +# Non-8250 serial port support +# +# CONFIG_SERIAL_AMBA_PL010 is not set +# CONFIG_SERIAL_AMBA_PL011 is not set +# CONFIG_SERIAL_EARLYCON_ARM_SEMIHOST is not set +# CONFIG_SERIAL_UARTLITE is not set +CONFIG_SERIAL_CORE=y +CONFIG_SERIAL_CORE_CONSOLE=y +# CONFIG_SERIAL_SCCNXP is not set +# CONFIG_SERIAL_SC16IS7XX is not set +# CONFIG_SERIAL_ALTERA_JTAGUART is not set +# CONFIG_SERIAL_ALTERA_UART is not set +# CONFIG_SERIAL_XILINX_PS_UART is not set +# CONFIG_SERIAL_ARC is not set +# CONFIG_SERIAL_FSL_LPUART is not set +# CONFIG_SERIAL_CONEXANT_DIGICOLOR is not set +CONFIG_SERIAL_SUNXI=y +# CONFIG_SERIAL_SUNXI_DMA is not set +CONFIG_SERIAL_SUNXI_CONSOLE=y +# CONFIG_SERIAL_SUNXI_EARLYCON is not set +# CONFIG_TTY_PRINTK is not set +# CONFIG_HVC_DCC is not set +# CONFIG_IPMI_HANDLER is not set +# CONFIG_HW_RANDOM is not set + +# +# PCMCIA character devices +# +# CONFIG_RAW_DRIVER is not set +# CONFIG_TCG_TPM is not set +# CONFIG_XILLYBUS is not set +# CONFIG_SUNXI_SCR is not set +CONFIG_SUNXI_SYS_INFO=y +CONFIG_SUNXI_QA_TEST=y +CONFIG_SUNXI_SMC=y +CONFIG_DUMP_REG=y +CONFIG_DUMP_REG_MISC=y +# CONFIG_SUNXI_TIMER_TEST is not set +# CONFIG_SUNXI_TRANSFORM is not set +CONFIG_SUNXI_DI=y +# CONFIG_SUNXI_G2D is not set +# CONFIG_TDA7729_AUDIO_DSP is not set + +# +# I2C support +# +CONFIG_I2C=y +CONFIG_I2C_BOARDINFO=y +# CONFIG_I2C_COMPAT is not set +CONFIG_I2C_CHARDEV=y +CONFIG_I2C_MUX=y + +# +# Multiplexer I2C Chip support +# +# CONFIG_I2C_ARB_GPIO_CHALLENGE is not set +# CONFIG_I2C_MUX_GPIO is not set +# CONFIG_I2C_MUX_PCA9541 is not set +# CONFIG_I2C_MUX_PCA954x is not set +# CONFIG_I2C_MUX_PINCTRL is not set +# CONFIG_I2C_MUX_REG is not set +# CONFIG_I2C_DEMUX_PINCTRL is not set +# CONFIG_I2C_HELPER_AUTO is not set +CONFIG_I2C_SMBUS=y + +# +# I2C Algorithms +# +# CONFIG_I2C_ALGOBIT is not set +# CONFIG_I2C_ALGOPCF is not set +# CONFIG_I2C_ALGOPCA is not set + +# +# I2C Hardware Bus support +# + +# +# I2C system bus drivers (mostly embedded / system-on-chip) +# +# CONFIG_I2C_CADENCE is not set +# CONFIG_I2C_CBUS_GPIO is not set +# CONFIG_I2C_DESIGNWARE_PLATFORM is not set +# CONFIG_I2C_EMEV2 is not set +# CONFIG_I2C_GPIO is not set +# CONFIG_I2C_MV64XXX is not set +# CONFIG_I2C_NOMADIK is not set +# CONFIG_I2C_OCORES is not set +CONFIG_I2C_SUNXI=y +# CONFIG_I2C_PCA_PLATFORM is not set +# CONFIG_I2C_PXA_PCI is not set +# CONFIG_I2C_RK3X is not set +# CONFIG_I2C_SIMTEC is not set +# CONFIG_I2C_XILINX is not set + +# +# External I2C/SMBus adapter drivers +# +# CONFIG_I2C_DIOLAN_U2C is not set +# CONFIG_I2C_PARPORT_LIGHT is not set +# CONFIG_I2C_ROBOTFUZZ_OSIF is not set +# CONFIG_I2C_TAOS_EVM is not set +# CONFIG_I2C_TINY_USB is not set + +# +# Other I2C/SMBus bus drivers +# +# CONFIG_I2C_STUB is not set +CONFIG_I2C_SLAVE=y +# CONFIG_I2C_SLAVE_EEPROM is not set +# CONFIG_I2C_DEBUG_CORE is not set +# CONFIG_I2C_DEBUG_ALGO is not set +# CONFIG_I2C_DEBUG_BUS is not set +# CONFIG_SPI is not set +# CONFIG_SPMI is not set +# CONFIG_HSI is not set + +# +# PPS support +# +# CONFIG_PPS is not set + +# +# PPS generators support +# + +# +# PTP clock support +# +# CONFIG_PTP_1588_CLOCK is not set + +# +# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks. +# +CONFIG_PINCTRL=y + +# +# Pin controllers +# +CONFIG_PINMUX=y +CONFIG_PINCONF=y +CONFIG_GENERIC_PINCONF=y +# CONFIG_DEBUG_PINCTRL is not set +# CONFIG_PINCTRL_AMD is not set +# CONFIG_PINCTRL_SINGLE is not set + +# +# Allwinner SOC PINCTRL DRIVER +# +CONFIG_PINCTRL_SUNXI=y +# CONFIG_PINCTRL_SUNXI_TEST is not set +# CONFIG_PINCTRL_SUN4I_A10 is not set +# CONFIG_PINCTRL_SUN5I_A10S is not set +# CONFIG_PINCTRL_SUN5I_A13 is not set +# CONFIG_PINCTRL_GR8 is not set +# CONFIG_PINCTRL_SUN6I_A31 is not set +# CONFIG_PINCTRL_SUN6I_A31S is not set +# CONFIG_PINCTRL_SUN6I_A31_R is not set +# CONFIG_PINCTRL_SUN7I_A20 is not set +# CONFIG_PINCTRL_SUN8I_A23 is not set +# CONFIG_PINCTRL_SUN8I_A33 is not set +# CONFIG_PINCTRL_SUN8I_A83T is not set +# CONFIG_PINCTRL_SUN8I_A23_R is not set +# CONFIG_PINCTRL_SUN8I_H3 is not set +# CONFIG_PINCTRL_SUN8I_H3_R is not set +# CONFIG_PINCTRL_SUN9I_A80 is not set +# CONFIG_PINCTRL_SUN9I_A80_R is not set +CONFIG_PINCTRL_SUN50IW9P1=y +CONFIG_PINCTRL_SUN50IW9P1_R=y +CONFIG_GPIOLIB=y +CONFIG_OF_GPIO=y +# CONFIG_DEBUG_GPIO is not set +# CONFIG_GPIO_SYSFS is not set +CONFIG_GPIO_GENERIC=y + +# +# Memory mapped GPIO drivers +# +# CONFIG_GPIO_74XX_MMIO is not set +# CONFIG_GPIO_ALTERA is not set +# CONFIG_GPIO_AXP858 is not set +CONFIG_GPIO_SUNXI=y +# CONFIG_GPIO_DWAPB is not set +CONFIG_GPIO_GENERIC_PLATFORM=y +# CONFIG_GPIO_GRGPIO is not set +# CONFIG_GPIO_MOCKUP is not set +# CONFIG_GPIO_PL061 is not set +# CONFIG_GPIO_SYSCON is not set +# CONFIG_GPIO_XGENE is not set +# CONFIG_GPIO_XILINX is not set +# CONFIG_GPIO_ZX is not set + +# +# I2C GPIO expanders +# +# CONFIG_GPIO_ADP5588 is not set +# CONFIG_GPIO_ADNP is not set +# CONFIG_GPIO_MAX7300 is not set +# CONFIG_GPIO_MAX732X is not set +# CONFIG_GPIO_PCA953X is not set +# CONFIG_GPIO_PCF857X is not set +# CONFIG_GPIO_SX150X is not set +# CONFIG_GPIO_TPIC2810 is not set +# CONFIG_GPIO_TS4900 is not set + +# +# MFD GPIO expanders +# + +# +# SPI or I2C GPIO expanders +# +# CONFIG_GPIO_MCP23S08 is not set + +# +# USB GPIO expanders +# +# CONFIG_W1 is not set +# CONFIG_POWER_AVS is not set +CONFIG_POWER_RESET=y +# CONFIG_POWER_RESET_GPIO is not set +# CONFIG_POWER_RESET_GPIO_RESTART is not set +# CONFIG_POWER_RESET_LTC2952 is not set +# CONFIG_POWER_RESET_RESTART is not set +# CONFIG_POWER_RESET_XGENE is not set +# CONFIG_POWER_RESET_SYSCON is not set +# CONFIG_POWER_RESET_SYSCON_POWEROFF is not set +# CONFIG_SYSCON_REBOOT_MODE is not set +CONFIG_POWER_SUPPLY=y +# CONFIG_AW_AXP is not set +# CONFIG_POWER_SUPPLY_DEBUG is not set +# CONFIG_PDA_POWER is not set +# CONFIG_TEST_POWER is not set +# CONFIG_BATTERY_DS2780 is not set +# CONFIG_BATTERY_DS2781 is not set +# CONFIG_BATTERY_DS2782 is not set +# CONFIG_BATTERY_SBS is not set +# CONFIG_BATTERY_BQ27XXX is not set +# CONFIG_BATTERY_MAX17040 is not set +# CONFIG_BATTERY_MAX17042 is not set +# CONFIG_CHARGER_MAX8903 is not set +# CONFIG_CHARGER_LP8727 is not set +# CONFIG_CHARGER_GPIO is not set +# CONFIG_CHARGER_MANAGER is not set +# CONFIG_CHARGER_BQ2415X is not set +# CONFIG_CHARGER_BQ24190 is not set +# CONFIG_CHARGER_BQ24257 is not set +# CONFIG_CHARGER_BQ24735 is not set +# CONFIG_CHARGER_BQ25890 is not set +# CONFIG_CHARGER_SMB347 is not set +# CONFIG_BATTERY_GAUGE_LTC2941 is not set +# CONFIG_CHARGER_RT9455 is not set +CONFIG_HWMON=y +# CONFIG_HWMON_VID is not set +# CONFIG_HWMON_DEBUG_CHIP is not set + +# +# Native drivers +# +# CONFIG_SENSORS_AD7414 is not set +# CONFIG_SENSORS_AD7418 is not set +# CONFIG_SENSORS_ADM1021 is not set +# CONFIG_SENSORS_ADM1025 is not set +# CONFIG_SENSORS_ADM1026 is not set +# CONFIG_SENSORS_ADM1029 is not set +# CONFIG_SENSORS_ADM1031 is not set +# CONFIG_SENSORS_ADM9240 is not set +# CONFIG_SENSORS_ADT7410 is not set +# CONFIG_SENSORS_ADT7411 is not set +# CONFIG_SENSORS_ADT7462 is not set +# CONFIG_SENSORS_ADT7470 is not set +# CONFIG_SENSORS_ADT7475 is not set +# CONFIG_SENSORS_ASC7621 is not set +# CONFIG_SENSORS_ATXP1 is not set +# CONFIG_SENSORS_DS620 is not set +# CONFIG_SENSORS_DS1621 is not set +# CONFIG_SENSORS_F71805F is not set +# CONFIG_SENSORS_F71882FG is not set +# CONFIG_SENSORS_F75375S is not set +# CONFIG_SENSORS_GL518SM is not set +# CONFIG_SENSORS_GL520SM is not set +# CONFIG_SENSORS_G760A is not set +# CONFIG_SENSORS_G762 is not set +# CONFIG_SENSORS_GPIO_FAN is not set +# CONFIG_SENSORS_HIH6130 is not set +# CONFIG_SENSORS_IT87 is not set +# CONFIG_SENSORS_JC42 is not set +# CONFIG_SENSORS_POWR1220 is not set +# CONFIG_SENSORS_LINEAGE is not set +# CONFIG_SENSORS_LTC2945 is not set +# CONFIG_SENSORS_LTC2990 is not set +# CONFIG_SENSORS_LTC4151 is not set +# CONFIG_SENSORS_LTC4215 is not set +# CONFIG_SENSORS_LTC4222 is not set +# CONFIG_SENSORS_LTC4245 is not set +# CONFIG_SENSORS_LTC4260 is not set +# CONFIG_SENSORS_LTC4261 is not set +# CONFIG_SENSORS_MAX16065 is not set +# CONFIG_SENSORS_MAX1619 is not set +# CONFIG_SENSORS_MAX1668 is not set +# CONFIG_SENSORS_MAX197 is not set +# CONFIG_SENSORS_MAX6639 is not set +# CONFIG_SENSORS_MAX6642 is not set +# CONFIG_SENSORS_MAX6650 is not set +# CONFIG_SENSORS_MAX6697 is not set +# CONFIG_SENSORS_MAX31790 is not set +# CONFIG_SENSORS_MCP3021 is not set +# CONFIG_SENSORS_LM63 is not set +# CONFIG_SENSORS_LM73 is not set +# CONFIG_SENSORS_LM75 is not set +# CONFIG_SENSORS_LM77 is not set +# CONFIG_SENSORS_LM78 is not set +# CONFIG_SENSORS_LM80 is not set +# CONFIG_SENSORS_LM83 is not set +# CONFIG_SENSORS_LM85 is not set +# CONFIG_SENSORS_LM87 is not set +# CONFIG_SENSORS_LM90 is not set +# CONFIG_SENSORS_LM92 is not set +# CONFIG_SENSORS_LM93 is not set +# CONFIG_SENSORS_LM95234 is not set +# CONFIG_SENSORS_LM95241 is not set +# CONFIG_SENSORS_LM95245 is not set +# CONFIG_SENSORS_PC87360 is not set +# CONFIG_SENSORS_PC87427 is not set +# CONFIG_SENSORS_NTC_THERMISTOR is not set +# CONFIG_SENSORS_NCT6683 is not set +# CONFIG_SENSORS_NCT6775 is not set +# CONFIG_SENSORS_NCT7802 is not set +# CONFIG_SENSORS_NCT7904 is not set +# CONFIG_SENSORS_PCF8591 is not set +# CONFIG_PMBUS is not set +# CONFIG_SENSORS_PWM_FAN is not set +# CONFIG_SENSORS_SHT15 is not set +# CONFIG_SENSORS_SHT21 is not set +# CONFIG_SENSORS_SHT3x is not set +# CONFIG_SENSORS_SHTC1 is not set +# CONFIG_SENSORS_DME1737 is not set +# CONFIG_SENSORS_EMC1403 is not set +# CONFIG_SENSORS_EMC2103 is not set +# CONFIG_SENSORS_EMC6W201 is not set +# CONFIG_SENSORS_SMSC47M1 is not set +# CONFIG_SENSORS_SMSC47M192 is not set +# CONFIG_SENSORS_SMSC47B397 is not set +# CONFIG_SENSORS_SCH56XX_COMMON is not set +# CONFIG_SENSORS_SMM665 is not set +# CONFIG_SENSORS_ADC128D818 is not set +# CONFIG_SENSORS_ADS1015 is not set +# CONFIG_SENSORS_ADS7828 is not set +# CONFIG_SENSORS_AMC6821 is not set +# CONFIG_SENSORS_INA209 is not set +# CONFIG_SENSORS_INA2XX is not set +# CONFIG_SENSORS_INA3221 is not set +# CONFIG_SENSORS_TC74 is not set +# CONFIG_SENSORS_THMC50 is not set +# CONFIG_SENSORS_TMP102 is not set +# CONFIG_SENSORS_TMP103 is not set +# CONFIG_SENSORS_TMP401 is not set +# CONFIG_SENSORS_TMP421 is not set +# CONFIG_SENSORS_VT1211 is not set +# CONFIG_SENSORS_W83781D is not set +# CONFIG_SENSORS_W83791D is not set +# CONFIG_SENSORS_W83792D is not set +# CONFIG_SENSORS_W83793 is not set +# CONFIG_SENSORS_W83795 is not set +# CONFIG_SENSORS_W83L785TS is not set +# CONFIG_SENSORS_W83L786NG is not set +# CONFIG_SENSORS_W83627HF is not set +# CONFIG_SENSORS_W83627EHF is not set +CONFIG_THERMAL=y +CONFIG_THERMAL_HWMON=y +CONFIG_THERMAL_OF=y +CONFIG_THERMAL_WRITABLE_TRIPS=y +# CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE is not set +# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set +CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR=y +# CONFIG_THERMAL_GOV_FAIR_SHARE is not set +# CONFIG_THERMAL_GOV_STEP_WISE is not set +# CONFIG_THERMAL_GOV_BANG_BANG is not set +# CONFIG_THERMAL_GOV_USER_SPACE is not set +CONFIG_THERMAL_GOV_POWER_ALLOCATOR=y +CONFIG_CPU_THERMAL=y +# CONFIG_CLOCK_THERMAL is not set +CONFIG_DEVFREQ_THERMAL=y +CONFIG_THERMAL_EMULATION=y +# CONFIG_QORIQ_THERMAL is not set +CONFIG_SUNXI_THERMAL_NG=y + +# +# ACPI INT340X thermal drivers +# + +# +# allwinner(SUNXI) thermal drivers +# + +# +# allwinner(SUNXI) thermal cooling device drivers +# +# CONFIG_SUNXI_GPU_COOLING is not set + +# +# allwinner(SUNXI) thermal sensor drivers +# +# CONFIG_SUNXI_THERMAL_SENSOR is not set +# CONFIG_WATCHDOG is not set +CONFIG_SSB_POSSIBLE=y + +# +# Sonics Silicon Backplane +# +# CONFIG_SSB is not set +CONFIG_BCMA_POSSIBLE=y + +# +# Broadcom specific AMBA +# +# CONFIG_BCMA is not set + +# +# Multifunction device drivers +# +CONFIG_MFD_CORE=y +# CONFIG_MFD_ACX00 is not set +# CONFIG_MFD_ACT8945A is not set +# CONFIG_MFD_AS3711 is not set +# CONFIG_MFD_AS3722 is not set +# CONFIG_PMIC_ADP5520 is not set +# CONFIG_MFD_AAT2870_CORE is not set +# CONFIG_MFD_ATMEL_FLEXCOM is not set +# CONFIG_MFD_ATMEL_HLCDC is not set +# CONFIG_MFD_BCM590XX is not set +CONFIG_MFD_AXP2101=y +CONFIG_MFD_AXP2101_I2C=y +# CONFIG_MFD_AXP20X_I2C is not set +# CONFIG_MFD_CROS_EC is not set +# CONFIG_PMIC_DA903X is not set +# CONFIG_MFD_DA9052_I2C is not set +# CONFIG_MFD_DA9055 is not set +# CONFIG_MFD_DA9062 is not set +# CONFIG_MFD_DA9063 is not set +# CONFIG_MFD_DA9150 is not set +# CONFIG_MFD_DLN2 is not set +# CONFIG_MFD_EXYNOS_LPASS is not set +# CONFIG_MFD_MC13XXX_I2C is not set +# CONFIG_MFD_HI6421_PMIC is not set +# CONFIG_HTC_PASIC3 is not set +# CONFIG_HTC_I2CPLD is not set +# CONFIG_INTEL_SOC_PMIC is not set +# CONFIG_MFD_KEMPLD is not set +# CONFIG_MFD_88PM800 is not set +# CONFIG_MFD_88PM805 is not set +# CONFIG_MFD_88PM860X is not set +# CONFIG_MFD_MAX14577 is not set +# CONFIG_MFD_MAX77620 is not set +# CONFIG_MFD_MAX77686 is not set +# CONFIG_MFD_MAX77693 is not set +# CONFIG_MFD_MAX77843 is not set +# CONFIG_MFD_MAX8907 is not set +# CONFIG_MFD_MAX8925 is not set +# CONFIG_MFD_MAX8997 is not set +# CONFIG_MFD_MAX8998 is not set +# CONFIG_MFD_MT6397 is not set +# CONFIG_MFD_MENF21BMC is not set +# CONFIG_MFD_VIPERBOARD is not set +# CONFIG_MFD_RETU is not set +# CONFIG_MFD_PCF50633 is not set +# CONFIG_MFD_RT5033 is not set +# CONFIG_MFD_RTSX_USB is not set +# CONFIG_MFD_RC5T583 is not set +# CONFIG_MFD_RK808 is not set +# CONFIG_MFD_RN5T618 is not set +# CONFIG_MFD_SEC_CORE is not set +# CONFIG_MFD_SI476X_CORE is not set +# CONFIG_MFD_SM501 is not set +# CONFIG_MFD_SKY81452 is not set +# CONFIG_MFD_SMSC is not set +# CONFIG_ABX500_CORE is not set +# CONFIG_MFD_STMPE is not set +# CONFIG_MFD_SUN6I_PRCM is not set +CONFIG_MFD_SYSCON=y +# CONFIG_MFD_TI_AM335X_TSCADC is not set +# CONFIG_MFD_LP3943 is not set +# CONFIG_MFD_LP8788 is not set +# CONFIG_MFD_PALMAS is not set +# CONFIG_TPS6105X is not set +# CONFIG_TPS65010 is not set +# CONFIG_TPS6507X is not set +# CONFIG_MFD_TPS65086 is not set +# CONFIG_MFD_TPS65090 is not set +# CONFIG_MFD_TPS65217 is not set +# CONFIG_MFD_TI_LP873X is not set +# CONFIG_MFD_TPS65218 is not set +# CONFIG_MFD_TPS6586X is not set +# CONFIG_MFD_TPS65910 is not set +# CONFIG_MFD_TPS65912_I2C is not set +# CONFIG_MFD_TPS80031 is not set +# CONFIG_TWL4030_CORE is not set +# CONFIG_TWL6040_CORE is not set +# CONFIG_MFD_WL1273_CORE is not set +# CONFIG_MFD_LM3533 is not set +# CONFIG_MFD_TC3589X is not set +# CONFIG_MFD_TMIO is not set +# CONFIG_MFD_ARIZONA_I2C is not set +# CONFIG_MFD_WM8400 is not set +# CONFIG_MFD_WM831X_I2C is not set +# CONFIG_MFD_WM8350_I2C is not set +# CONFIG_MFD_WM8994 is not set +CONFIG_REGULATOR=y +# CONFIG_REGULATOR_DEBUG is not set +CONFIG_REGULATOR_FIXED_VOLTAGE=y +CONFIG_REGULATOR_VIRTUAL_CONSUMER=y +CONFIG_REGULATOR_USERSPACE_CONSUMER=y +# CONFIG_REGULATOR_ACT8865 is not set +# CONFIG_REGULATOR_AD5398 is not set +# CONFIG_REGULATOR_ANATOP is not set +CONFIG_REGULATOR_AXP2101=y +CONFIG_SUNXI_REGULATOR_DT=y +# CONFIG_REGULATOR_DA9210 is not set +# CONFIG_REGULATOR_DA9211 is not set +# CONFIG_REGULATOR_FAN53555 is not set +# CONFIG_REGULATOR_GPIO is not set +# CONFIG_REGULATOR_ISL9305 is not set +# CONFIG_REGULATOR_ISL6271A is not set +# CONFIG_REGULATOR_LP3971 is not set +# CONFIG_REGULATOR_LP3972 is not set +# CONFIG_REGULATOR_LP872X is not set +# CONFIG_REGULATOR_LP8755 is not set +# CONFIG_REGULATOR_LTC3589 is not set +# CONFIG_REGULATOR_LTC3676 is not set +# CONFIG_REGULATOR_MAX1586 is not set +# CONFIG_REGULATOR_MAX8649 is not set +# CONFIG_REGULATOR_MAX8660 is not set +# CONFIG_REGULATOR_MAX8952 is not set +# CONFIG_REGULATOR_MAX8973 is not set +# CONFIG_REGULATOR_MT6311 is not set +# CONFIG_REGULATOR_PFUZE100 is not set +# CONFIG_REGULATOR_PV88060 is not set +# CONFIG_REGULATOR_PV88080 is not set +# CONFIG_REGULATOR_PV88090 is not set +# CONFIG_REGULATOR_PWM is not set +# CONFIG_REGULATOR_TPS51632 is not set +# CONFIG_REGULATOR_TPS62360 is not set +# CONFIG_REGULATOR_TPS65023 is not set +# CONFIG_REGULATOR_TPS6507X is not set +CONFIG_MEDIA_SUPPORT=y + +# +# Multimedia core support +# +CONFIG_MEDIA_CAMERA_SUPPORT=y +# CONFIG_MEDIA_ANALOG_TV_SUPPORT is not set +# CONFIG_MEDIA_DIGITAL_TV_SUPPORT is not set +# CONFIG_MEDIA_RADIO_SUPPORT is not set +# CONFIG_MEDIA_SDR_SUPPORT is not set +CONFIG_MEDIA_RC_SUPPORT=y +CONFIG_MEDIA_CONTROLLER=y +CONFIG_MEDIA_CONTROLLER_DVB=y +CONFIG_VIDEO_DEV=y +CONFIG_VIDEO_V4L2_SUBDEV_API=y +CONFIG_VIDEO_V4L2=y +# CONFIG_VIDEO_ADV_DEBUG is not set +# CONFIG_VIDEO_FIXED_MINOR_RANGES is not set +CONFIG_VIDEOBUF2_CORE=y +CONFIG_VIDEOBUF2_MEMOPS=y +CONFIG_VIDEOBUF2_DMA_CONTIG=y +CONFIG_VIDEOBUF2_VMALLOC=m +# CONFIG_TTPCI_EEPROM is not set + +# +# Media drivers +# +CONFIG_RC_CORE=y +# CONFIG_RC_MAP is not set +# CONFIG_RC_DECODERS is not set +# CONFIG_RC_DEVICES is not set +CONFIG_MEDIA_USB_SUPPORT=y + +# +# Webcam devices +# +CONFIG_USB_VIDEO_CLASS=m +CONFIG_USB_VIDEO_CLASS_INPUT_EVDEV=y +CONFIG_USB_GSPCA=m +# CONFIG_USB_M5602 is not set +# CONFIG_USB_STV06XX is not set +# CONFIG_USB_GL860 is not set +# CONFIG_USB_GSPCA_BENQ is not set +# CONFIG_USB_GSPCA_CONEX is not set +# CONFIG_USB_GSPCA_CPIA1 is not set +# CONFIG_USB_GSPCA_DTCS033 is not set +# CONFIG_USB_GSPCA_ETOMS is not set +# CONFIG_USB_GSPCA_FINEPIX is not set +# CONFIG_USB_GSPCA_JEILINJ is not set +# CONFIG_USB_GSPCA_JL2005BCD is not set +# CONFIG_USB_GSPCA_KINECT is not set +# CONFIG_USB_GSPCA_KONICA is not set +# CONFIG_USB_GSPCA_MARS is not set +# CONFIG_USB_GSPCA_MR97310A is not set +# CONFIG_USB_GSPCA_NW80X is not set +# CONFIG_USB_GSPCA_OV519 is not set +# CONFIG_USB_GSPCA_OV534 is not set +# CONFIG_USB_GSPCA_OV534_9 is not set +# CONFIG_USB_GSPCA_PAC207 is not set +# CONFIG_USB_GSPCA_PAC7302 is not set +# CONFIG_USB_GSPCA_PAC7311 is not set +# CONFIG_USB_GSPCA_SE401 is not set +# CONFIG_USB_GSPCA_SN9C2028 is not set +# CONFIG_USB_GSPCA_SN9C20X is not set +# CONFIG_USB_GSPCA_SONIXB is not set +# CONFIG_USB_GSPCA_SONIXJ is not set +# CONFIG_USB_GSPCA_SPCA500 is not set +# CONFIG_USB_GSPCA_SPCA501 is not set +# CONFIG_USB_GSPCA_SPCA505 is not set +# CONFIG_USB_GSPCA_SPCA506 is not set +# CONFIG_USB_GSPCA_SPCA508 is not set +# CONFIG_USB_GSPCA_SPCA561 is not set +# CONFIG_USB_GSPCA_SPCA1528 is not set +# CONFIG_USB_GSPCA_SQ905 is not set +# CONFIG_USB_GSPCA_SQ905C is not set +# CONFIG_USB_GSPCA_SQ930X is not set +# CONFIG_USB_GSPCA_STK014 is not set +# CONFIG_USB_GSPCA_STK1135 is not set +# CONFIG_USB_GSPCA_STV0680 is not set +# CONFIG_USB_GSPCA_SUNPLUS is not set +# CONFIG_USB_GSPCA_T613 is not set +# CONFIG_USB_GSPCA_TOPRO is not set +# CONFIG_USB_GSPCA_TOUPTEK is not set +# CONFIG_USB_GSPCA_TV8532 is not set +# CONFIG_USB_GSPCA_VC032X is not set +# CONFIG_USB_GSPCA_VICAM is not set +# CONFIG_USB_GSPCA_XIRLINK_CIT is not set +# CONFIG_USB_GSPCA_ZC3XX is not set +# CONFIG_USB_PWC is not set +# CONFIG_VIDEO_CPIA2 is not set +# CONFIG_USB_ZR364XX is not set +# CONFIG_USB_STKWEBCAM is not set +# CONFIG_USB_S2255 is not set +# CONFIG_VIDEO_USBTV is not set + +# +# Webcam, TV (analog/digital) USB devices +# +# CONFIG_VIDEO_EM28XX is not set +CONFIG_V4L_PLATFORM_DRIVERS=y +# CONFIG_SOC_CAMERA is not set +# CONFIG_VIDEO_XILINX is not set +CONFIG_VIDEO_SUNXI_VIN=y +CONFIG_CSI_VIN=y +# CONFIG_ENABLE_SENSOR_FLIP_OPTION is not set +# CONFIG_CSI_CCI is not set +# CONFIG_FLASH is not set +# CONFIG_ACTUATOR is not set +# CONFIG_SENSOR_LIST is not set +# CONFIG_BUF_AUTO_UPDATE is not set +# CONFIG_VIN_LOG is not set +# CONFIG_PIPELINE_RESET is not set +# CONFIG_MULTI_FRAME is not set +# CONFIG_SUPPORT_ISP_TDM is not set +# CONFIG_DISPPLAY_SYNC is not set +CONFIG_VIN_IOMMU=y +# CONFIG_D3D is not set +CONFIG_WDR=y +# CONFIG_VIDEO_SUNXI_VFE is not set +CONFIG_VIDEO_SUNXI_CAR_REVERSE=y +# CONFIG_SUPPORT_BIRDVIEW is not set +# CONFIG_SUPPORT_AUXILIARY_LINE is not set +CONFIG_VIDEO_SUNXI_VIN_SPECIAL=y +# CONFIG_VIDEO_SUNXI_TVD_SPECIAL is not set +# CONFIG_V4L_MEM2MEM_DRIVERS is not set +# CONFIG_V4L_TEST_DRIVERS is not set + +# +# Supported MMC/SDIO adapters +# +# CONFIG_CYPRESS_FIRMWARE is not set + +# +# Media ancillary drivers (tuners, sensors, i2c, spi, frontends) +# +CONFIG_MEDIA_SUBDRV_AUTOSELECT=y +CONFIG_VIDEO_IR_I2C=y + +# +# Audio decoders, processors and mixers +# + +# +# RDS decoders +# + +# +# Video decoders +# + +# +# Video and audio decoders +# + +# +# Video encoders +# + +# +# Camera sensor devices +# + +# +# Flash devices +# + +# +# Video improvement chips +# + +# +# Audio/Video compression chips +# + +# +# Miscellaneous helper chips +# + +# +# Sensors used on soc_camera driver +# + +# +# Tools to develop new frontends +# +# CONFIG_DVB_DUMMY_FE is not set +CONFIG_VIDEO_ENCODER_DECODER_SUNXI=y +# CONFIG_VIDEO_GOOGLE_VP9_DECODER_SUNXI is not set +# CONFIG_AW_TSC is not set + +# +# Graphics support +# + +# +# GPU support for sunxi +# +CONFIG_SUNXI_GPU_TYPE="mali-g31" +# CONFIG_DRM is not set + +# +# ACP (Audio CoProcessor) Configuration +# + +# +# Frame buffer Devices +# +CONFIG_FB=y +# CONFIG_FIRMWARE_EDID is not set +CONFIG_FB_CMDLINE=y +CONFIG_FB_NOTIFY=y +# CONFIG_FB_DDC is not set +# CONFIG_FB_BOOT_VESA_SUPPORT is not set +CONFIG_FB_CFB_FILLRECT=y +CONFIG_FB_CFB_COPYAREA=y +CONFIG_FB_CFB_IMAGEBLIT=y +# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set +# CONFIG_FB_SYS_FILLRECT is not set +# CONFIG_FB_SYS_COPYAREA is not set +# CONFIG_FB_SYS_IMAGEBLIT is not set +# CONFIG_FB_FOREIGN_ENDIAN is not set +# CONFIG_FB_SYS_FOPS is not set +# CONFIG_FB_SVGALIB is not set +# CONFIG_FB_MACMODES is not set +# CONFIG_FB_BACKLIGHT is not set +# CONFIG_FB_MODE_HELPERS is not set +# CONFIG_FB_TILEBLITTING is not set + +# +# Frame buffer hardware drivers +# +# CONFIG_FB_ARMCLCD is not set +# CONFIG_FB_OPENCORES is not set +# CONFIG_FB_S1D13XXX is not set +# CONFIG_FB_SMSCUFX is not set +# CONFIG_FB_UDL is not set +# CONFIG_FB_IBM_GXT4500 is not set +# CONFIG_FB_VIRTUAL is not set +# CONFIG_FB_METRONOME is not set +# CONFIG_FB_BROADSHEET is not set +# CONFIG_FB_AUO_K190X is not set +# CONFIG_FB_SIMPLE is not set + +# +# Video support for sunxi +# +CONFIG_FB_CONSOLE_SUNXI=y +CONFIG_DISP2_SUNXI=y +# CONFIG_HDMI_DISP2_SUNXI is not set +CONFIG_HDMI2_HDCP_SUNXI=y +CONFIG_HDMI2_HDCP22_SUNXI=y +CONFIG_HDMI2_CEC_SUNXI=y +CONFIG_HDMI2_CEC_USER=y +# CONFIG_HDMI2_FREQ_SPREAD_SPECTRUM is not set +CONFIG_HDMI2_DISP2_SUNXI=y +# CONFIG_TV_DISP2_SUNXI is not set +# CONFIG_VDPO_DISP2_SUNXI is not set +# CONFIG_EDP_DISP2_SUNXI is not set +# CONFIG_DISP2_SUNXI_BOOT_COLORBAR is not set +CONFIG_DISP2_SUNXI_DEBUG=y +CONFIG_DISP2_SUNXI_COMPOSER=y +# CONFIG_DISP2_LCD_ESD_DETECT is not set +# CONFIG_FB_SSD1307 is not set +CONFIG_BACKLIGHT_LCD_SUPPORT=y +CONFIG_LCD_CLASS_DEVICE=m +# CONFIG_LCD_PLATFORM is not set +CONFIG_BACKLIGHT_CLASS_DEVICE=m +CONFIG_BACKLIGHT_GENERIC=m +# CONFIG_BACKLIGHT_PWM is not set +# CONFIG_BACKLIGHT_PM8941_WLED is not set +# CONFIG_BACKLIGHT_ADP8860 is not set +# CONFIG_BACKLIGHT_ADP8870 is not set +# CONFIG_BACKLIGHT_LM3630A is not set +# CONFIG_BACKLIGHT_LM3639 is not set +# CONFIG_BACKLIGHT_LP855X is not set +# CONFIG_BACKLIGHT_GPIO is not set +# CONFIG_BACKLIGHT_LV5207LP is not set +# CONFIG_BACKLIGHT_BD6107 is not set +# CONFIG_VGASTATE is not set + +# +# Console display driver support +# +CONFIG_DUMMY_CONSOLE=y +CONFIG_DUMMY_CONSOLE_COLUMNS=80 +CONFIG_DUMMY_CONSOLE_ROWS=25 +# CONFIG_FRAMEBUFFER_CONSOLE is not set +# CONFIG_LOGO is not set +CONFIG_SOUND=y +# CONFIG_SOUND_OSS_CORE is not set +CONFIG_SND=y +CONFIG_SND_TIMER=y +CONFIG_SND_PCM=y +CONFIG_SND_RAWMIDI=y +CONFIG_SND_JACK=y +CONFIG_SND_JACK_INPUT_DEV=y +CONFIG_SND_SEQUENCER=y +CONFIG_SND_SEQ_DUMMY=y +# CONFIG_SND_MIXER_OSS is not set +# CONFIG_SND_PCM_OSS is not set +CONFIG_SND_PCM_TIMER=y +# CONFIG_SND_SEQUENCER_OSS is not set +CONFIG_SND_HRTIMER=y +CONFIG_SND_SEQ_HRTIMER_DEFAULT=y +# CONFIG_SND_DYNAMIC_MINORS is not set +CONFIG_SND_SUPPORT_OLD_API=y +CONFIG_SND_PROC_FS=y +CONFIG_SND_VERBOSE_PROCFS=y +# CONFIG_SND_VERBOSE_PRINTK is not set +# CONFIG_SND_DEBUG is not set +CONFIG_SND_RAWMIDI_SEQ=y +# CONFIG_SND_OPL3_LIB_SEQ is not set +# CONFIG_SND_OPL4_LIB_SEQ is not set +# CONFIG_SND_SBAWE_SEQ is not set +# CONFIG_SND_EMU10K1_SEQ is not set +CONFIG_SND_DRIVERS=y +# CONFIG_SND_DUMMY is not set +# CONFIG_SND_ALOOP is not set +# CONFIG_SND_VIRMIDI is not set +# CONFIG_SND_MTPAV is not set +# CONFIG_SND_SERIAL_U16550 is not set +# CONFIG_SND_MPU401 is not set + +# +# HD-Audio +# +CONFIG_SND_HDA_PREALLOC_SIZE=64 +CONFIG_SND_USB=y +# CONFIG_SND_USB_AUDIO is not set +# CONFIG_SND_USB_UA101 is not set +# CONFIG_SND_USB_CAIAQ is not set +# CONFIG_SND_USB_6FIRE is not set +# CONFIG_SND_USB_HIFACE is not set +# CONFIG_SND_BCD2000 is not set +# CONFIG_SND_USB_POD is not set +# CONFIG_SND_USB_PODHD is not set +# CONFIG_SND_USB_TONEPORT is not set +# CONFIG_SND_USB_VARIAX is not set +CONFIG_SND_SOC=y +# CONFIG_SND_SOC_AMD_ACP is not set +# CONFIG_SND_ATMEL_SOC is not set +# CONFIG_SND_DESIGNWARE_I2S is not set + +# +# SoC Audio for Freescale CPUs +# + +# +# Common SoC Audio options for Freescale CPUs: +# +# CONFIG_SND_SOC_FSL_ASRC is not set +# CONFIG_SND_SOC_FSL_SAI is not set +# CONFIG_SND_SOC_FSL_SSI is not set +# CONFIG_SND_SOC_FSL_SPDIF is not set +# CONFIG_SND_SOC_FSL_ESAI is not set +# CONFIG_SND_SOC_IMX_AUDMUX is not set +# CONFIG_SND_SOC_IMG is not set + +# +# Allwinner SoC Audio support +# +# CONFIG_SND_SUNXI_SOC_SUN50IW9_CODEC is not set +# CONFIG_SND_SUNXI_SOC_CODEC_CPU_DAI is not set +# CONFIG_SND_SUNXI_SOC_SUNXI_HDMIAUDIO is not set +# CONFIG_SND_SUNXI_SOC_SUNXI_DAUDIO is not set +# CONFIG_SND_SUNXI_SOC_SUNXI_SPDIF is not set +# CONFIG_SND_SUNXI_SOC_SUNXI_DMIC is not set +# CONFIG_SND_SUNXI_SOC_AHUB is not set +# CONFIG_SND_SOC_XTFPGA_I2S is not set +CONFIG_SND_SOC_I2C_AND_SPI=y + +# +# CODEC drivers +# +# CONFIG_SND_SOC_AC97_CODEC is not set +# CONFIG_SND_SOC_ADAU1701 is not set +# CONFIG_SND_SOC_ADAU7002 is not set +# CONFIG_SND_SOC_AK4554 is not set +# CONFIG_SND_SOC_AK4613 is not set +# CONFIG_SND_SOC_AK4642 is not set +# CONFIG_SND_SOC_AK5386 is not set +# CONFIG_SND_SOC_ALC5623 is not set +# CONFIG_SND_SOC_BT_SCO is not set +# CONFIG_SND_SOC_CS35L32 is not set +# CONFIG_SND_SOC_CS35L33 is not set +# CONFIG_SND_SOC_CS42L51_I2C is not set +# CONFIG_SND_SOC_CS42L52 is not set +# CONFIG_SND_SOC_CS42L56 is not set +# CONFIG_SND_SOC_CS42L73 is not set +# CONFIG_SND_SOC_CS4265 is not set +# CONFIG_SND_SOC_CS4270 is not set +# CONFIG_SND_SOC_CS4271_I2C is not set +# CONFIG_SND_SOC_CS42XX8_I2C is not set +# CONFIG_SND_SOC_CS4349 is not set +# CONFIG_SND_SOC_CS53L30 is not set +# CONFIG_SND_SOC_ES8328 is not set +# CONFIG_SND_SOC_GTM601 is not set +# CONFIG_SND_SOC_INNO_RK3036 is not set +# CONFIG_SND_SOC_MAX98504 is not set +# CONFIG_SND_SOC_MAX9860 is not set +# CONFIG_SND_SOC_PCM1681 is not set +# CONFIG_SND_SOC_PCM179X_I2C is not set +# CONFIG_SND_SOC_PCM3168A_I2C is not set +# CONFIG_SND_SOC_PCM512x_I2C is not set +# CONFIG_SND_SOC_RT5616 is not set +# CONFIG_SND_SOC_RT5631 is not set +# CONFIG_SND_SOC_RT5677_SPI is not set +# CONFIG_SND_SOC_SGTL5000 is not set +# CONFIG_SND_SOC_SIRF_AUDIO_CODEC is not set +# CONFIG_SND_SOC_SPDIF is not set +# CONFIG_SND_SOC_SSM2602_I2C is not set +# CONFIG_SND_SOC_SSM4567 is not set +# CONFIG_SND_SOC_STA32X is not set +# CONFIG_SND_SOC_STA350 is not set +# CONFIG_SND_SOC_STI_SAS is not set +# CONFIG_SND_SOC_TAS2552 is not set +# CONFIG_SND_SOC_TAS5086 is not set +# CONFIG_SND_SOC_TAS571X is not set +# CONFIG_SND_SOC_TAS5720 is not set +# CONFIG_SND_SOC_TFA9879 is not set +# CONFIG_SND_SOC_TLV320AIC23_I2C is not set +# CONFIG_SND_SOC_TLV320AIC31XX is not set +# CONFIG_SND_SOC_TLV320AIC3X is not set +# CONFIG_SND_SOC_TS3A227E is not set +# CONFIG_SND_SOC_WM8510 is not set +# CONFIG_SND_SOC_WM8523 is not set +# CONFIG_SND_SOC_WM8580 is not set +# CONFIG_SND_SOC_WM8711 is not set +# CONFIG_SND_SOC_WM8728 is not set +# CONFIG_SND_SOC_WM8731 is not set +# CONFIG_SND_SOC_WM8737 is not set +# CONFIG_SND_SOC_WM8741 is not set +# CONFIG_SND_SOC_WM8750 is not set +# CONFIG_SND_SOC_WM8753 is not set +# CONFIG_SND_SOC_WM8776 is not set +# CONFIG_SND_SOC_WM8804_I2C is not set +# CONFIG_SND_SOC_WM8903 is not set +# CONFIG_SND_SOC_WM8960 is not set +# CONFIG_SND_SOC_WM8962 is not set +# CONFIG_SND_SOC_WM8974 is not set +# CONFIG_SND_SOC_WM8978 is not set +# CONFIG_SND_SOC_WM8985 is not set +# CONFIG_SND_SOC_NAU8810 is not set +# CONFIG_SND_SOC_TPA6130A2 is not set +# CONFIG_SND_SOC_AC107 is not set +# CONFIG_SND_SIMPLE_CARD is not set +# CONFIG_SND_SIMPLE_SCU_CARD is not set +# CONFIG_SOUND_PRIME is not set + +# +# HID support +# +CONFIG_HID=y +CONFIG_HID_BATTERY_STRENGTH=y +CONFIG_HIDRAW=y +CONFIG_UHID=y +CONFIG_HID_GENERIC=y + +# +# Special HID drivers +# +CONFIG_HID_A4TECH=y +CONFIG_HID_ACRUX=y +CONFIG_HID_ACRUX_FF=y +CONFIG_HID_APPLE=y +# CONFIG_HID_APPLEIR is not set +# CONFIG_HID_AUREAL is not set +CONFIG_HID_BELKIN=y +CONFIG_HID_BETOP_FF=y +CONFIG_HID_CHERRY=y +CONFIG_HID_CHICONY=y +# CONFIG_HID_CORSAIR is not set +CONFIG_HID_PRODIKEYS=y +# CONFIG_HID_CMEDIA is not set +# CONFIG_HID_CP2112 is not set +CONFIG_HID_CYPRESS=y +CONFIG_HID_DRAGONRISE=y +CONFIG_DRAGONRISE_FF=y +CONFIG_HID_EMS_FF=y +CONFIG_HID_ELECOM=y +# CONFIG_HID_ELO is not set +CONFIG_HID_EZKEY=y +# CONFIG_HID_GEMBIRD is not set +# CONFIG_HID_GFRM is not set +CONFIG_HID_HOLTEK=y +# CONFIG_HOLTEK_FF is not set +# CONFIG_HID_GT683R is not set +CONFIG_HID_KEYTOUCH=y +CONFIG_HID_KYE=y +CONFIG_HID_UCLOGIC=y +CONFIG_HID_WALTOP=y +CONFIG_HID_GYRATION=y +# CONFIG_HID_ICADE is not set +CONFIG_HID_TWINHAN=y +CONFIG_HID_KENSINGTON=y +CONFIG_HID_LCPOWER=y +# CONFIG_HID_LED is not set +# CONFIG_HID_LENOVO is not set +CONFIG_HID_LOGITECH=y +CONFIG_HID_LOGITECH_DJ=y +CONFIG_HID_LOGITECH_HIDPP=y +CONFIG_LOGITECH_FF=y +CONFIG_LOGIRUMBLEPAD2_FF=y +CONFIG_LOGIG940_FF=y +CONFIG_LOGIWHEELS_FF=y +CONFIG_HID_MAGICMOUSE=y +CONFIG_HID_MICROSOFT=y +CONFIG_HID_MONTEREY=y +CONFIG_HID_MULTITOUCH=y +CONFIG_HID_NTRIG=y +CONFIG_HID_ORTEK=y +CONFIG_HID_PANTHERLORD=y +CONFIG_PANTHERLORD_FF=y +# CONFIG_HID_PENMOUNT is not set +CONFIG_HID_PETALYNX=y +CONFIG_HID_PICOLCD=y +# CONFIG_HID_PICOLCD_FB is not set +# CONFIG_HID_PICOLCD_LEDS is not set +# CONFIG_HID_PICOLCD_CIR is not set +# CONFIG_HID_PLANTRONICS is not set +CONFIG_HID_PRIMAX=y +CONFIG_HID_ROCCAT=y +CONFIG_HID_SAITEK=y +CONFIG_HID_SAMSUNG=y +CONFIG_HID_SONY=y +CONFIG_SONY_FF=y +CONFIG_HID_SPEEDLINK=y +# CONFIG_HID_STEELSERIES is not set +CONFIG_HID_SUNPLUS=y +# CONFIG_HID_RMI is not set +CONFIG_HID_GREENASIA=y +CONFIG_GREENASIA_FF=y +CONFIG_HID_SMARTJOYPLUS=y +CONFIG_SMARTJOYPLUS_FF=y +CONFIG_HID_TIVO=y +CONFIG_HID_TOPSEED=y +# CONFIG_HID_THINGM is not set +CONFIG_HID_THRUSTMASTER=y +# CONFIG_THRUSTMASTER_FF is not set +CONFIG_HID_WACOM=y +CONFIG_HID_WIIMOTE=y +# CONFIG_HID_XINMO is not set +CONFIG_HID_ZEROPLUS=y +# CONFIG_ZEROPLUS_FF is not set +CONFIG_HID_ZYDACRON=y +# CONFIG_HID_SENSOR_HUB is not set +# CONFIG_HID_ALPS is not set + +# +# USB HID support +# +CONFIG_USB_HID=y +# CONFIG_HID_PID is not set +CONFIG_USB_HIDDEV=y + +# +# I2C HID support +# +# CONFIG_I2C_HID is not set +CONFIG_USB_OHCI_LITTLE_ENDIAN=y +CONFIG_USB_SUPPORT=y +CONFIG_USB_COMMON=y +CONFIG_USB_ARCH_HAS_HCD=y +CONFIG_USB=y +# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set + +# +# Miscellaneous USB options +# +CONFIG_USB_DEFAULT_PERSIST=y +# CONFIG_USB_DYNAMIC_MINORS is not set +# CONFIG_USB_OTG is not set +# CONFIG_USB_OTG_WHITELIST is not set +# CONFIG_USB_OTG_BLACKLIST_HUB is not set +# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set +# CONFIG_USB_MON is not set +# CONFIG_USB_WUSB_CBAF is not set + +# +# USB Host Controller Drivers +# +# CONFIG_USB_C67X00_HCD is not set +# CONFIG_USB_XHCI_HCD is not set +CONFIG_USB_EHCI_HCD=y +# CONFIG_USB_EHCI_ROOT_HUB_TT is not set +CONFIG_USB_EHCI_TT_NEWSCHED=y +# CONFIG_USB_EHCI_HCD_PLATFORM is not set +# CONFIG_USB_OXU210HP_HCD is not set +# CONFIG_USB_ISP116X_HCD is not set +# CONFIG_USB_ISP1362_HCD is not set +# CONFIG_USB_FOTG210_HCD is not set +CONFIG_USB_OHCI_HCD=y +# CONFIG_USB_OHCI_HCD_PLATFORM is not set +# CONFIG_USB_SL811_HCD is not set +# CONFIG_USB_R8A66597_HCD is not set +# CONFIG_USB_HCD_TEST_MODE is not set +CONFIG_USB_SUNXI_HCD=y +CONFIG_USB_SUNXI_HCI=y +CONFIG_USB_SUNXI_EHCI0=y +CONFIG_USB_SUNXI_EHCI1=y +CONFIG_USB_SUNXI_EHCI2=y +CONFIG_USB_SUNXI_EHCI3=y +CONFIG_USB_SUNXI_OHCI0=y +CONFIG_USB_SUNXI_OHCI1=y +CONFIG_USB_SUNXI_OHCI2=y +CONFIG_USB_SUNXI_OHCI3=y + +# +# USB Device Class drivers +# +# CONFIG_USB_ACM is not set +# CONFIG_USB_PRINTER is not set +# CONFIG_USB_WDM is not set +# CONFIG_USB_TMC is not set + +# +# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may +# + +# +# also be needed; see USB_STORAGE Help for more info +# +CONFIG_USB_STORAGE=y +# CONFIG_USB_STORAGE_DEBUG is not set +CONFIG_USB_STORAGE_REALTEK=y +CONFIG_REALTEK_AUTOPM=y +CONFIG_USB_STORAGE_DATAFAB=y +CONFIG_USB_STORAGE_FREECOM=y +CONFIG_USB_STORAGE_ISD200=y +CONFIG_USB_STORAGE_USBAT=y +CONFIG_USB_STORAGE_SDDR09=y +CONFIG_USB_STORAGE_SDDR55=y +CONFIG_USB_STORAGE_JUMPSHOT=y +CONFIG_USB_STORAGE_ALAUDA=y +CONFIG_USB_STORAGE_ONETOUCH=y +CONFIG_USB_STORAGE_KARMA=y +CONFIG_USB_STORAGE_CYPRESS_ATACB=y +CONFIG_USB_STORAGE_ENE_UB6250=y +CONFIG_USB_UAS=y + +# +# USB Imaging devices +# +# CONFIG_USB_MDC800 is not set +# CONFIG_USB_MICROTEK is not set +# CONFIG_USBIP_CORE is not set +# CONFIG_USB_MUSB_HDRC is not set +# CONFIG_USB_DWC3 is not set +# CONFIG_USB_DWC2 is not set +# CONFIG_USB_CHIPIDEA is not set +# CONFIG_USB_ISP1760 is not set + +# +# USB port drivers +# +# CONFIG_USB_SERIAL is not set + +# +# USB Miscellaneous drivers +# +# CONFIG_USB_EMI62 is not set +# CONFIG_USB_EMI26 is not set +# CONFIG_USB_ADUTUX is not set +# CONFIG_USB_SEVSEG is not set +# CONFIG_USB_RIO500 is not set +# CONFIG_USB_LEGOTOWER is not set +# CONFIG_USB_LCD is not set +# CONFIG_USB_CYPRESS_CY7C63 is not set +# CONFIG_USB_CYTHERM is not set +# CONFIG_USB_IDMOUSE is not set +# CONFIG_USB_FTDI_ELAN is not set +# CONFIG_USB_APPLEDISPLAY is not set +# CONFIG_USB_SISUSBVGA is not set +# CONFIG_USB_LD is not set +# CONFIG_USB_TRANCEVIBRATOR is not set +# CONFIG_USB_IOWARRIOR is not set +# CONFIG_USB_TEST is not set +# CONFIG_USB_EHSET_TEST_FIXTURE is not set +# CONFIG_USB_ISIGHTFW is not set +# CONFIG_USB_YUREX is not set +# CONFIG_USB_EZUSB_FX2 is not set +# CONFIG_USB_HSIC_USB3503 is not set +# CONFIG_USB_HSIC_USB4604 is not set +# CONFIG_USB_LINK_LAYER_TEST is not set + +# +# USB Physical Layer drivers +# +# CONFIG_USB_PHY is not set +# CONFIG_USB_OTG_WAKELOCK is not set +# CONFIG_NOP_USB_XCEIV is not set +# CONFIG_USB_GPIO_VBUS is not set +# CONFIG_USB_ISP1301 is not set +# CONFIG_USB_ULPI is not set +CONFIG_USB_GADGET=y +# CONFIG_USB_GADGET_DEBUG is not set +# CONFIG_USB_GADGET_DEBUG_FILES is not set +# CONFIG_USB_GADGET_DEBUG_FS is not set +CONFIG_USB_GADGET_VBUS_DRAW=2 +CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 + +# +# USB Peripheral Controller +# +# CONFIG_USB_FOTG210_UDC is not set +# CONFIG_USB_GR_UDC is not set +# CONFIG_USB_R8A66597 is not set +# CONFIG_USB_PXA27X is not set +# CONFIG_USB_MV_UDC is not set +# CONFIG_USB_MV_U3D is not set +# CONFIG_USB_M66592 is not set +# CONFIG_USB_BDC_UDC is not set +# CONFIG_USB_NET2272 is not set +CONFIG_USB_SUNXI_UDC0=y +# CONFIG_USB_GADGET_XILINX is not set +# CONFIG_USB_DUMMY_HCD is not set +CONFIG_USB_LIBCOMPOSITE=y +CONFIG_USB_F_MASS_STORAGE=y +CONFIG_USB_F_FS=y +CONFIG_USB_F_MIDI=y +CONFIG_USB_F_MTP=y +CONFIG_USB_F_AUDIO_SRC=y +CONFIG_USB_F_ACC=y +CONFIG_USB_CONFIGFS=y +# CONFIG_USB_CONFIGFS_SERIAL is not set +# CONFIG_USB_CONFIGFS_ACM is not set +# CONFIG_USB_CONFIGFS_OBEX is not set +# CONFIG_USB_CONFIGFS_NCM is not set +# CONFIG_USB_CONFIGFS_ECM is not set +# CONFIG_USB_CONFIGFS_ECM_SUBSET is not set +# CONFIG_USB_CONFIGFS_RNDIS is not set +# CONFIG_USB_CONFIGFS_EEM is not set +CONFIG_USB_CONFIGFS_MASS_STORAGE=y +# CONFIG_USB_CONFIGFS_F_LB_SS is not set +CONFIG_USB_CONFIGFS_F_FS=y +CONFIG_USB_CONFIGFS_F_MTP=y +# CONFIG_USB_CONFIGFS_F_PTP is not set +CONFIG_USB_CONFIGFS_F_ACC=y +CONFIG_USB_CONFIGFS_F_AUDIO_SRC=y +CONFIG_USB_CONFIGFS_UEVENT=y +# CONFIG_USB_CONFIGFS_F_UAC1 is not set +# CONFIG_USB_CONFIGFS_F_UAC2 is not set +CONFIG_USB_CONFIGFS_F_MIDI=y +# CONFIG_USB_CONFIGFS_F_HID is not set +# CONFIG_USB_CONFIGFS_F_UVC is not set +# CONFIG_USB_CONFIGFS_F_PRINTER is not set +CONFIG_USB_SUNXI_USB=y +CONFIG_USB_SUNXI_USB_MANAGER=y +CONFIG_USB_SUNXI_USB_DEBUG=y +CONFIG_USB_SUNXI_USB_ADB=y +# CONFIG_USB_LED_TRIG is not set +# CONFIG_USB_ULPI_BUS is not set +# CONFIG_UWB is not set +CONFIG_MMC=y +# CONFIG_MMC_DEBUG is not set +CONFIG_PWRSEQ_EMMC=y +CONFIG_PWRSEQ_SIMPLE=y +# CONFIG_MMC_EMBEDDED_SDIO is not set +# CONFIG_MMC_PARANOID_SD_INIT is not set + +# +# MMC/SD/SDIO Card Drivers +# +CONFIG_MMC_BLOCK=y +CONFIG_MMC_BLOCK_MINORS=16 +CONFIG_MMC_BLOCK_BOUNCE=y +# CONFIG_SDIO_UART is not set +# CONFIG_MMC_TEST is not set +# CONFIG_MMC_SIMULATE_MAX_SPEED is not set + +# +# MMC/SD/SDIO Host Controller Drivers +# +# CONFIG_MMC_ARMMMCI is not set +# CONFIG_MMC_SDHCI is not set +# CONFIG_MMC_DW is not set +# CONFIG_MMC_VUB300 is not set +# CONFIG_MMC_USHC is not set +# CONFIG_MMC_USDHI6ROL0 is not set +CONFIG_MMC_SUNXI=y +# CONFIG_MMC_MTK is not set +# CONFIG_MEMSTICK is not set +CONFIG_NEW_LEDS=y +CONFIG_LEDS_CLASS=y +# CONFIG_LEDS_CLASS_FLASH is not set + +# +# LED drivers +# +# CONFIG_LEDS_BCM6328 is not set +# CONFIG_LEDS_BCM6358 is not set +# CONFIG_LEDS_LM3530 is not set +# CONFIG_LEDS_LM3642 is not set +# CONFIG_LEDS_PCA9532 is not set +# CONFIG_LEDS_GPIO is not set +# CONFIG_LEDS_LP3944 is not set +# CONFIG_LEDS_LP5521 is not set +# CONFIG_LEDS_LP5523 is not set +# CONFIG_LEDS_LP5562 is not set +# CONFIG_LEDS_LP8501 is not set +# CONFIG_LEDS_LP8860 is not set +# CONFIG_LEDS_PCA955X is not set +# CONFIG_LEDS_PCA963X is not set +# CONFIG_LEDS_PWM is not set +# CONFIG_LEDS_REGULATOR is not set +# CONFIG_LEDS_BD2802 is not set +# CONFIG_LEDS_LT3593 is not set +# CONFIG_LEDS_TCA6507 is not set +# CONFIG_LEDS_TLC591XX is not set +# CONFIG_LEDS_LM355x is not set +# CONFIG_LEDS_IS31FL319X is not set +# CONFIG_LEDS_IS31FL32XX is not set + +# +# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM) +# +# CONFIG_LEDS_BLINKM is not set +# CONFIG_LEDS_SYSCON is not set +# CONFIG_LEDS_SUNXI is not set + +# +# LED Triggers +# +CONFIG_LEDS_TRIGGERS=y +# CONFIG_LEDS_TRIGGER_TIMER is not set +# CONFIG_LEDS_TRIGGER_ONESHOT is not set +# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set +# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set +# CONFIG_LEDS_TRIGGER_CPU is not set +# CONFIG_LEDS_TRIGGER_GPIO is not set +# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set + +# +# iptables trigger is under Netfilter config (LED target) +# +# CONFIG_LEDS_TRIGGER_TRANSIENT is not set +# CONFIG_LEDS_TRIGGER_CAMERA is not set +# CONFIG_LEDS_TRIGGER_PANIC is not set +# CONFIG_ACCESSIBILITY is not set +CONFIG_EDAC_SUPPORT=y +# CONFIG_EDAC is not set +CONFIG_RTC_LIB=y +CONFIG_RTC_CLASS=y +CONFIG_RTC_HCTOSYS=y +CONFIG_RTC_HCTOSYS_DEVICE="rtc0" +CONFIG_RTC_SYSTOHC=y +CONFIG_RTC_SYSTOHC_DEVICE="rtc0" +# CONFIG_RTC_DEBUG is not set +# CONFIG_RTC_SHUTDOWN_ALARM is not set + +# +# RTC interfaces +# +CONFIG_RTC_INTF_SYSFS=y +CONFIG_RTC_INTF_PROC=y +CONFIG_RTC_INTF_DEV=y +# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set +# CONFIG_RTC_DRV_TEST is not set + +# +# I2C RTC drivers +# +# CONFIG_RTC_DRV_ABB5ZES3 is not set +# CONFIG_RTC_DRV_ABX80X is not set +# CONFIG_RTC_DRV_DS1307 is not set +# CONFIG_RTC_DRV_DS1374 is not set +# CONFIG_RTC_DRV_DS1672 is not set +# CONFIG_RTC_DRV_HYM8563 is not set +# CONFIG_RTC_DRV_MAX6900 is not set +# CONFIG_RTC_DRV_RS5C372 is not set +# CONFIG_RTC_DRV_ISL1208 is not set +# CONFIG_RTC_DRV_ISL12022 is not set +# CONFIG_RTC_DRV_X1205 is not set +# CONFIG_RTC_DRV_PCF8523 is not set +# CONFIG_RTC_DRV_PCF85063 is not set +# CONFIG_RTC_DRV_PCF8563 is not set +# CONFIG_RTC_DRV_PCF8583 is not set +# CONFIG_RTC_DRV_M41T80 is not set +# CONFIG_RTC_DRV_BQ32K is not set +# CONFIG_RTC_DRV_S35390A is not set +# CONFIG_RTC_DRV_FM3130 is not set +# CONFIG_RTC_DRV_RX8010 is not set +# CONFIG_RTC_DRV_RX8581 is not set +# CONFIG_RTC_DRV_RX8025 is not set +# CONFIG_RTC_DRV_EM3027 is not set +# CONFIG_RTC_DRV_RV8803 is not set + +# +# SPI RTC drivers +# +CONFIG_RTC_I2C_AND_SPI=y + +# +# SPI and I2C RTC drivers +# +# CONFIG_RTC_DRV_DS3232 is not set +# CONFIG_RTC_DRV_PCF2127 is not set +# CONFIG_RTC_DRV_RV3029C2 is not set + +# +# Platform RTC drivers +# +# CONFIG_RTC_DRV_DS1286 is not set +# CONFIG_RTC_DRV_DS1511 is not set +# CONFIG_RTC_DRV_DS1553 is not set +# CONFIG_RTC_DRV_DS1685_FAMILY is not set +# CONFIG_RTC_DRV_DS1742 is not set +# CONFIG_RTC_DRV_DS2404 is not set +# CONFIG_RTC_DRV_STK17TA8 is not set +# CONFIG_RTC_DRV_M48T86 is not set +# CONFIG_RTC_DRV_M48T35 is not set +# CONFIG_RTC_DRV_M48T59 is not set +# CONFIG_RTC_DRV_MSM6242 is not set +# CONFIG_RTC_DRV_BQ4802 is not set +# CONFIG_RTC_DRV_RP5C01 is not set +# CONFIG_RTC_DRV_V3020 is not set +# CONFIG_RTC_DRV_ZYNQMP is not set + +# +# on-CPU RTC drivers +# +# CONFIG_RTC_DRV_PL030 is not set +# CONFIG_RTC_DRV_PL031 is not set +CONFIG_RTC_DRV_SUNXI=y +# CONFIG_SUNXI_FAKE_POWEROFF is not set +CONFIG_SUNXI_BOOTUP_EXTEND=y +# CONFIG_RTC_DRV_SNVS is not set + +# +# HID Sensor RTC drivers +# +# CONFIG_RTC_DRV_HID_SENSOR_TIME is not set +CONFIG_DMADEVICES=y +# CONFIG_DMADEVICES_DEBUG is not set + +# +# DMA Devices +# +CONFIG_DMA_ENGINE=y +CONFIG_DMA_VIRTUAL_CHANNELS=y +CONFIG_DMA_OF=y +# CONFIG_AMBA_PL08X is not set +CONFIG_DMA_SUNXI=y +CONFIG_DMA_SUNXI_SUPPORT_4G=y +# CONFIG_FSL_EDMA is not set +# CONFIG_INTEL_IDMA64 is not set +# CONFIG_MV_XOR_V2 is not set +# CONFIG_PL330_DMA is not set +# CONFIG_XILINX_DMA is not set +# CONFIG_XILINX_ZYNQMP_DMA is not set +# CONFIG_QCOM_HIDMA_MGMT is not set +# CONFIG_QCOM_HIDMA is not set +# CONFIG_DW_DMAC is not set + +# +# DMA Clients +# +# CONFIG_ASYNC_TX_DMA is not set +# CONFIG_DMATEST is not set + +# +# DMABUF options +# +CONFIG_SYNC_FILE=y +# CONFIG_SW_SYNC is not set +# CONFIG_AUXDISPLAY is not set +# CONFIG_UIO is not set +# CONFIG_VFIO is not set +# CONFIG_VIRT_DRIVERS is not set + +# +# Virtio drivers +# +# CONFIG_VIRTIO_MMIO is not set + +# +# Microsoft Hyper-V guest support +# +CONFIG_STAGING=y +# CONFIG_PRISM2_USB is not set +# CONFIG_COMEDI is not set +# CONFIG_RTLLIB is not set +# CONFIG_R8712U is not set +# CONFIG_R8188EU is not set +# CONFIG_VT6656 is not set + +# +# Speakup console speech +# +# CONFIG_SPEAKUP is not set +# CONFIG_STAGING_MEDIA is not set + +# +# Android +# +CONFIG_ASHMEM=y +# CONFIG_ANDROID_LOW_MEMORY_KILLER is not set +CONFIG_ION=y +# CONFIG_ION_TEST is not set +# CONFIG_ION_DUMMY is not set +CONFIG_ION_SUNXI=y +CONFIG_ION_OF=y +# CONFIG_FIQ_DEBUGGER is not set +# CONFIG_FIQ_WATCHDOG is not set +# CONFIG_STAGING_BOARD is not set +# CONFIG_LTE_GDM724X is not set +# CONFIG_LNET is not set +# CONFIG_GS_FPGABOOT is not set +# CONFIG_COMMON_CLK_XLNX_CLKWZRD is not set +# CONFIG_FSL_MC_BUS is not set +# CONFIG_WILC1000_SDIO is not set +# CONFIG_MOST is not set +# CONFIG_KS7010 is not set +# CONFIG_GREYBUS is not set +# CONFIG_NANOHUB is not set +# CONFIG_GOLDFISH is not set +# CONFIG_CHROME_PLATFORMS is not set +CONFIG_CLKDEV_LOOKUP=y +CONFIG_HAVE_CLK_PREPARE=y +CONFIG_COMMON_CLK=y + +# +# Common Clock Framework +# +CONFIG_COMMON_CLK_DEBUG=y +# CONFIG_COMMON_CLK_VERSATILE is not set +# CONFIG_COMMON_CLK_SI5351 is not set +# CONFIG_COMMON_CLK_SI514 is not set +# CONFIG_COMMON_CLK_SI570 is not set +# CONFIG_COMMON_CLK_CDCE706 is not set +# CONFIG_COMMON_CLK_CDCE925 is not set +# CONFIG_COMMON_CLK_CS2000_CP is not set +# CONFIG_CLK_QORIQ is not set +# CONFIG_COMMON_CLK_XGENE is not set +# CONFIG_COMMON_CLK_NXP is not set +# CONFIG_COMMON_CLK_PWM is not set +# CONFIG_COMMON_CLK_PXA is not set +# CONFIG_COMMON_CLK_PIC32 is not set +# CONFIG_SUNXI_CCU is not set + +# +# Hardware Spinlock drivers +# +# CONFIG_HWSPINLOCK_SUNXI is not set + +# +# Clock Source drivers +# +CONFIG_CLKSRC_OF=y +CONFIG_CLKSRC_PROBE=y +CONFIG_CLKSRC_MMIO=y +CONFIG_SUN4I_TIMER=y +CONFIG_ARM_ARCH_TIMER=y +# CONFIG_ARM_ARCH_TIMER_EVTSTREAM is not set +CONFIG_ARM_ARCH_TIMER_VCT_ACCESS=y +# CONFIG_FSL_ERRATUM_A008585 is not set +# CONFIG_ARM_TIMER_SP804 is not set +# CONFIG_ATMEL_PIT is not set +# CONFIG_SH_TIMER_CMT is not set +# CONFIG_SH_TIMER_MTU2 is not set +# CONFIG_SH_TIMER_TMU is not set +# CONFIG_EM_TIMER_STI is not set +# CONFIG_MAILBOX is not set +CONFIG_IOMMU_API=y +CONFIG_IOMMU_SUPPORT=y + +# +# Generic IOMMU Pagetable Support +# +# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set +# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set +CONFIG_IOMMU_IOVA=y +CONFIG_OF_IOMMU=y +CONFIG_IOMMU_DMA=y +CONFIG_SUNXI_IOMMU=y +# CONFIG_ARM_SMMU is not set +# CONFIG_ARM_SMMU_V3 is not set +# CONFIG_IOMMU_DEBUG is not set + +# +# Remoteproc drivers +# +# CONFIG_STE_MODEM_RPROC is not set + +# +# Rpmsg drivers +# + +# +# SOC (System On Chip) specific Drivers +# + +# +# Broadcom SoC drivers +# +# CONFIG_SOC_SUNXI is not set +# CONFIG_SOC_TI is not set +CONFIG_PM_DEVFREQ=y + +# +# DEVFREQ Governors +# +CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND=y +# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set +# CONFIG_DEVFREQ_GOV_POWERSAVE is not set +# CONFIG_DEVFREQ_GOV_USERSPACE is not set +# CONFIG_DEVFREQ_GOV_PASSIVE is not set +# CONFIG_DEVFREQ_GOV_ADAPTIVE is not set + +# +# DEVFREQ Drivers +# +# CONFIG_ARM_SUNXI_DRAM_DEVFREQ is not set +# CONFIG_PM_DEVFREQ_EVENT is not set +CONFIG_EXTCON=y + +# +# Extcon Device Drivers +# +# CONFIG_EXTCON_GPIO is not set +# CONFIG_EXTCON_MAX3355 is not set +# CONFIG_EXTCON_QCOM_SPMI_MISC is not set +# CONFIG_EXTCON_RT8973A is not set +# CONFIG_EXTCON_SM5502 is not set +# CONFIG_EXTCON_USB_GPIO is not set +# CONFIG_MEMORY is not set +# CONFIG_IIO is not set +CONFIG_PWM=y +CONFIG_PWM_SYSFS=y +# CONFIG_PWM_FSL_FTM is not set +# CONFIG_PWM_PCA9685 is not set +# CONFIG_PWM_SUN4I is not set +# CONFIG_PWM_SUNXI is not set +CONFIG_PWM_SUNXI_NEW=y +CONFIG_IRQCHIP=y +CONFIG_ARM_GIC=y +CONFIG_ARM_GIC_MAX_NR=1 +CONFIG_ARM_GIC_V3=y +CONFIG_PARTITION_PERCPU=y +# CONFIG_IPACK_BUS is not set +CONFIG_ARCH_HAS_RESET_CONTROLLER=y +CONFIG_RESET_CONTROLLER=y +# CONFIG_RESET_ATH79 is not set +# CONFIG_RESET_BERLIN is not set +# CONFIG_RESET_LPC18XX is not set +# CONFIG_RESET_MESON is not set +# CONFIG_RESET_PISTACHIO is not set +# CONFIG_RESET_SOCFPGA is not set +# CONFIG_RESET_STM32 is not set +CONFIG_RESET_SUNXI=y +# CONFIG_TI_SYSCON_RESET is not set +# CONFIG_RESET_ZYNQ is not set +# CONFIG_FMC is not set + +# +# PHY Subsystem +# +# CONFIG_GENERIC_PHY is not set +# CONFIG_PHY_PXA_28NM_HSIC is not set +# CONFIG_PHY_PXA_28NM_USB2 is not set +# CONFIG_BCM_KONA_USB2_PHY is not set +# CONFIG_PHY_SUN4I_USB is not set +# CONFIG_PHY_SUN9I_USB is not set +# CONFIG_PHY_XGENE is not set +# CONFIG_POWERCAP is not set +# CONFIG_MCB is not set + +# +# Performance monitor support +# +CONFIG_ARM_PMU=y +# CONFIG_RAS is not set + +# +# Android +# +CONFIG_ANDROID=y +CONFIG_ANDROID_BINDER_IPC=y +CONFIG_ANDROID_BINDER_DEVICES="binder,hwbinder,vndbinder" +# CONFIG_ANDROID_BINDER_IPC_SELFTEST is not set +# CONFIG_LIBNVDIMM is not set +CONFIG_NVMEM=y +CONFIG_NVMEM_AXP=y +CONFIG_NVMEM_SUN50I_SID=y +# CONFIG_NVMEM_SUNXI_SID is not set +# CONFIG_STM is not set +# CONFIG_INTEL_TH is not set + +# +# FPGA Configuration Support +# +# CONFIG_FPGA is not set +# CONFIG_SUNXI_MPP is not set +CONFIG_TEE=y + +# +# TEE drivers +# +CONFIG_OPTEE=y +# CONFIG_OPTEE_BENCHMARK is not set +# CONFIG_GATOR is not set + +# +# Firmware Drivers +# +CONFIG_ARM_PSCI_FW=y +# CONFIG_FIRMWARE_MEMMAP is not set +CONFIG_HAVE_ARM_SMCCC=y +# CONFIG_MESON_SM is not set + +# +# File systems +# +CONFIG_DCACHE_WORD_ACCESS=y +CONFIG_EXT2_FS=y +# CONFIG_EXT2_FS_XATTR is not set +CONFIG_EXT3_FS=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set +CONFIG_EXT4_FS=y +# CONFIG_EXT4_FS_POSIX_ACL is not set +CONFIG_EXT4_FS_SECURITY=y +CONFIG_EXT4_ENCRYPTION=y +CONFIG_EXT4_FS_ENCRYPTION=y +# CONFIG_EXT4_DEBUG is not set +CONFIG_JBD2=y +# CONFIG_JBD2_DEBUG is not set +CONFIG_FS_MBCACHE=y +# CONFIG_REISERFS_FS is not set +# CONFIG_JFS_FS is not set +# CONFIG_XFS_FS is not set +# CONFIG_GFS2_FS is not set +# CONFIG_OCFS2_FS is not set +# CONFIG_BTRFS_FS is not set +# CONFIG_NILFS2_FS is not set +CONFIG_F2FS_FS=y +CONFIG_F2FS_STAT_FS=y +CONFIG_F2FS_FS_XATTR=y +CONFIG_F2FS_FS_POSIX_ACL=y +CONFIG_F2FS_FS_SECURITY=y +# CONFIG_F2FS_CHECK_FS is not set +CONFIG_F2FS_FS_ENCRYPTION=y +# CONFIG_F2FS_FAULT_INJECTION is not set +# CONFIG_FS_DAX is not set +CONFIG_FS_POSIX_ACL=y +CONFIG_EXPORTFS=y +# CONFIG_EXPORTFS_BLOCK_OPS is not set +CONFIG_FILE_LOCKING=y +CONFIG_MANDATORY_FILE_LOCKING=y +CONFIG_FS_ENCRYPTION=y +CONFIG_FSNOTIFY=y +CONFIG_DNOTIFY=y +CONFIG_INOTIFY_USER=y +# CONFIG_FANOTIFY is not set +CONFIG_QUOTA=y +CONFIG_QUOTA_NETLINK_INTERFACE=y +CONFIG_PRINT_QUOTA_WARNING=y +# CONFIG_QUOTA_DEBUG is not set +CONFIG_QUOTA_TREE=y +# CONFIG_QFMT_V1 is not set +CONFIG_QFMT_V2=y +CONFIG_QUOTACTL=y +# CONFIG_AUTOFS4_FS is not set +CONFIG_FUSE_FS=y +CONFIG_CUSE=y +CONFIG_OVERLAY_FS=y + +# +# Caches +# +# CONFIG_FSCACHE is not set + +# +# CD-ROM/DVD Filesystems +# +CONFIG_ISO9660_FS=y +CONFIG_JOLIET=y +CONFIG_ZISOFS=y +CONFIG_UDF_FS=y +CONFIG_UDF_NLS=y + +# +# DOS/FAT/NT Filesystems +# +CONFIG_FAT_FS=y +CONFIG_MSDOS_FS=y +CONFIG_VFAT_FS=y +CONFIG_FAT_DEFAULT_CODEPAGE=437 +CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" +# CONFIG_FAT_DEFAULT_UTF8 is not set +CONFIG_NTFS_FS=y +# CONFIG_NTFS_DEBUG is not set +CONFIG_NTFS_RW=y + +# +# Pseudo filesystems +# +CONFIG_PROC_FS=y +# CONFIG_PROC_KCORE is not set +CONFIG_PROC_SYSCTL=y +CONFIG_PROC_PAGE_MONITOR=y +# CONFIG_PROC_CHILDREN is not set +CONFIG_PROC_UID=y +CONFIG_KERNFS=y +CONFIG_SYSFS=y +CONFIG_TMPFS=y +CONFIG_TMPFS_POSIX_ACL=y +CONFIG_TMPFS_XATTR=y +# CONFIG_HUGETLBFS is not set +# CONFIG_HUGETLB_PAGE is not set +CONFIG_ARCH_HAS_GIGANTIC_PAGE=y +CONFIG_CONFIGFS_FS=y +CONFIG_MISC_FILESYSTEMS=y +# CONFIG_ORANGEFS_FS is not set +# CONFIG_ADFS_FS is not set +# CONFIG_AFFS_FS is not set +# CONFIG_ECRYPT_FS is not set +CONFIG_SDCARD_FS=y +# CONFIG_HFS_FS is not set +# CONFIG_HFSPLUS_FS is not set +# CONFIG_BEFS_FS is not set +# CONFIG_BFS_FS is not set +# CONFIG_EFS_FS is not set +# CONFIG_LOGFS is not set +# CONFIG_CRAMFS is not set +CONFIG_SQUASHFS=m +CONFIG_SQUASHFS_DECOMP_SINGLE=y +# CONFIG_SQUASHFS_DECOMP_MULTI is not set +# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set +# CONFIG_SQUASHFS_XATTR is not set +CONFIG_SQUASHFS_ZLIB=y +# CONFIG_SQUASHFS_LZ4 is not set +# CONFIG_SQUASHFS_LZO is not set +CONFIG_SQUASHFS_XZ=y +# CONFIG_SQUASHFS_4K_DEVBLK_SIZE is not set +# CONFIG_SQUASHFS_EMBEDDED is not set +CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3 +# CONFIG_VXFS_FS is not set +# CONFIG_MINIX_FS is not set +# CONFIG_OMFS_FS is not set +# CONFIG_HPFS_FS is not set +# CONFIG_QNX4FS_FS is not set +# CONFIG_QNX6FS_FS is not set +# CONFIG_ROMFS_FS is not set +CONFIG_PSTORE=y +CONFIG_PSTORE_ZLIB_COMPRESS=y +# CONFIG_PSTORE_LZO_COMPRESS is not set +# CONFIG_PSTORE_LZ4_COMPRESS is not set +CONFIG_PSTORE_CONSOLE=y +CONFIG_PSTORE_PMSG=y +CONFIG_PSTORE_RAM=y +# CONFIG_SYSV_FS is not set +# CONFIG_UFS_FS is not set +# CONFIG_NETWORK_FILESYSTEMS is not set +CONFIG_NLS=y +CONFIG_NLS_DEFAULT="iso8859-1" +CONFIG_NLS_CODEPAGE_437=y +# CONFIG_NLS_CODEPAGE_737 is not set +# CONFIG_NLS_CODEPAGE_775 is not set +# CONFIG_NLS_CODEPAGE_850 is not set +# CONFIG_NLS_CODEPAGE_852 is not set +# CONFIG_NLS_CODEPAGE_855 is not set +# CONFIG_NLS_CODEPAGE_857 is not set +# CONFIG_NLS_CODEPAGE_860 is not set +# CONFIG_NLS_CODEPAGE_861 is not set +# CONFIG_NLS_CODEPAGE_862 is not set +# CONFIG_NLS_CODEPAGE_863 is not set +# CONFIG_NLS_CODEPAGE_864 is not set +# CONFIG_NLS_CODEPAGE_865 is not set +# CONFIG_NLS_CODEPAGE_866 is not set +# CONFIG_NLS_CODEPAGE_869 is not set +CONFIG_NLS_CODEPAGE_936=y +# CONFIG_NLS_CODEPAGE_950 is not set +# CONFIG_NLS_CODEPAGE_932 is not set +# CONFIG_NLS_CODEPAGE_949 is not set +# CONFIG_NLS_CODEPAGE_874 is not set +# CONFIG_NLS_ISO8859_8 is not set +# CONFIG_NLS_CODEPAGE_1250 is not set +# CONFIG_NLS_CODEPAGE_1251 is not set +CONFIG_NLS_ASCII=y +CONFIG_NLS_ISO8859_1=y +# CONFIG_NLS_ISO8859_2 is not set +# CONFIG_NLS_ISO8859_3 is not set +# CONFIG_NLS_ISO8859_4 is not set +# CONFIG_NLS_ISO8859_5 is not set +# CONFIG_NLS_ISO8859_6 is not set +# CONFIG_NLS_ISO8859_7 is not set +# CONFIG_NLS_ISO8859_9 is not set +# CONFIG_NLS_ISO8859_13 is not set +# CONFIG_NLS_ISO8859_14 is not set +# CONFIG_NLS_ISO8859_15 is not set +# CONFIG_NLS_KOI8_R is not set +# CONFIG_NLS_KOI8_U is not set +# CONFIG_NLS_MAC_ROMAN is not set +# CONFIG_NLS_MAC_CELTIC is not set +# CONFIG_NLS_MAC_CENTEURO is not set +# CONFIG_NLS_MAC_CROATIAN is not set +# CONFIG_NLS_MAC_CYRILLIC is not set +# CONFIG_NLS_MAC_GAELIC is not set +# CONFIG_NLS_MAC_GREEK is not set +# CONFIG_NLS_MAC_ICELAND is not set +# CONFIG_NLS_MAC_INUIT is not set +# CONFIG_NLS_MAC_ROMANIAN is not set +# CONFIG_NLS_MAC_TURKISH is not set +CONFIG_NLS_UTF8=y +# CONFIG_DLM is not set +# CONFIG_VIRTUALIZATION is not set + +# +# Kernel hacking +# + +# +# printk and dmesg options +# +CONFIG_PRINTK_TIME=y +CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7 +# CONFIG_BOOT_PRINTK_DELAY is not set +CONFIG_DYNAMIC_DEBUG=y + +# +# Compile-time checks and compiler options +# +CONFIG_DEBUG_INFO=y +# CONFIG_DEBUG_INFO_REDUCED is not set +# CONFIG_DEBUG_INFO_SPLIT is not set +# CONFIG_DEBUG_INFO_DWARF4 is not set +# CONFIG_GDB_SCRIPTS is not set +CONFIG_ENABLE_WARN_DEPRECATED=y +CONFIG_ENABLE_MUST_CHECK=y +CONFIG_FRAME_WARN=2048 +# CONFIG_STRIP_ASM_SYMS is not set +# CONFIG_READABLE_ASM is not set +# CONFIG_UNUSED_SYMBOLS is not set +# CONFIG_PAGE_OWNER is not set +CONFIG_DEBUG_FS=y +# CONFIG_HEADERS_CHECK is not set +# CONFIG_DEBUG_SECTION_MISMATCH is not set +CONFIG_SECTION_MISMATCH_WARN_ONLY=y +CONFIG_ARCH_WANT_FRAME_POINTERS=y +CONFIG_FRAME_POINTER=y +# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set +CONFIG_MAGIC_SYSRQ=y +CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1 +CONFIG_DEBUG_KERNEL=y + +# +# Memory Debugging +# +# CONFIG_PAGE_EXTENSION is not set +# CONFIG_DEBUG_PAGEALLOC is not set +# CONFIG_PAGE_POISONING is not set +# CONFIG_DEBUG_OBJECTS is not set +# CONFIG_SLUB_STATS is not set +CONFIG_HAVE_DEBUG_KMEMLEAK=y +# CONFIG_DEBUG_KMEMLEAK is not set +# CONFIG_DEBUG_STACK_USAGE is not set +CONFIG_DEBUG_VM=y +# CONFIG_DEBUG_VM_VMACACHE is not set +# CONFIG_DEBUG_VM_RB is not set +# CONFIG_DEBUG_VM_PGFLAGS is not set +# CONFIG_DEBUG_MEMORY_INIT is not set +# CONFIG_DEBUG_PER_CPU_MAPS is not set +CONFIG_HAVE_ARCH_KASAN=y +# CONFIG_KASAN is not set +CONFIG_ARCH_HAS_KCOV=y +# CONFIG_KCOV is not set +# CONFIG_DEBUG_SHIRQ is not set + +# +# Debug Lockups and Hangs +# +# CONFIG_LOCKUP_DETECTOR is not set +# CONFIG_DETECT_HUNG_TASK is not set +# CONFIG_WQ_WATCHDOG is not set +# CONFIG_PANIC_ON_OOPS is not set +CONFIG_PANIC_ON_OOPS_VALUE=0 +CONFIG_PANIC_TIMEOUT=0 +CONFIG_SCHED_DEBUG=y +CONFIG_SCHED_INFO=y +# CONFIG_PANIC_ON_RT_THROTTLING is not set +CONFIG_SCHEDSTATS=y +# CONFIG_SCHED_STACK_END_CHECK is not set +# CONFIG_DEBUG_TIMEKEEPING is not set +CONFIG_TIMER_STATS=y +CONFIG_DEBUG_PREEMPT=y + +# +# Lock Debugging (spinlocks, mutexes, etc...) +# +# CONFIG_DEBUG_RT_MUTEXES is not set +# CONFIG_DEBUG_SPINLOCK is not set +CONFIG_DEBUG_MUTEXES=y +# CONFIG_DEBUG_WW_MUTEX_SLOWPATH is not set +# CONFIG_DEBUG_LOCK_ALLOC is not set +# CONFIG_PROVE_LOCKING is not set +# CONFIG_LOCK_STAT is not set +# CONFIG_DEBUG_ATOMIC_SLEEP is not set +# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set +# CONFIG_LOCK_TORTURE_TEST is not set +CONFIG_STACKTRACE=y +# CONFIG_DEBUG_KOBJECT is not set +CONFIG_HAVE_DEBUG_BUGVERBOSE=y +CONFIG_DEBUG_BUGVERBOSE=y +# CONFIG_DEBUG_LIST is not set +# CONFIG_DEBUG_PI_LIST is not set +# CONFIG_DEBUG_SG is not set +# CONFIG_DEBUG_NOTIFIERS is not set +# CONFIG_DEBUG_CREDENTIALS is not set + +# +# RCU Debugging +# +# CONFIG_PROVE_RCU is not set +# CONFIG_SPARSE_RCU_POINTER is not set +# CONFIG_TORTURE_TEST is not set +# CONFIG_RCU_PERF_TEST is not set +# CONFIG_RCU_TORTURE_TEST is not set +CONFIG_RCU_CPU_STALL_TIMEOUT=21 +# CONFIG_RCU_TRACE is not set +# CONFIG_RCU_EQS_DEBUG is not set +# CONFIG_DEBUG_WQ_FORCE_RR_CPU is not set +# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set +# CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set +# CONFIG_NOTIFIER_ERROR_INJECTION is not set +# CONFIG_FAULT_INJECTION is not set +# CONFIG_LATENCYTOP is not set +CONFIG_HAVE_FUNCTION_TRACER=y +CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y +CONFIG_HAVE_DYNAMIC_FTRACE=y +CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y +CONFIG_HAVE_SYSCALL_TRACEPOINTS=y +CONFIG_HAVE_C_RECORDMCOUNT=y +CONFIG_TRACING_SUPPORT=y +# CONFIG_FTRACE is not set + +# +# Runtime Testing +# +# CONFIG_LKDTM is not set +# CONFIG_TEST_LIST_SORT is not set +# CONFIG_BACKTRACE_SELF_TEST is not set +# CONFIG_RBTREE_TEST is not set +# CONFIG_INTERVAL_TREE_TEST is not set +# CONFIG_PERCPU_TEST is not set +CONFIG_ATOMIC64_SELFTEST=y +# CONFIG_TEST_HEXDUMP is not set +# CONFIG_TEST_STRING_HELPERS is not set +# CONFIG_TEST_KSTRTOX is not set +# CONFIG_TEST_PRINTF is not set +# CONFIG_TEST_BITMAP is not set +# CONFIG_TEST_UUID is not set +# CONFIG_TEST_RHASHTABLE is not set +# CONFIG_TEST_HASH is not set +# CONFIG_DMA_API_DEBUG is not set +# CONFIG_TEST_LKM is not set +# CONFIG_TEST_USER_COPY is not set +# CONFIG_TEST_BPF is not set +# CONFIG_TEST_FIRMWARE is not set +# CONFIG_TEST_UDELAY is not set +# CONFIG_MEMTEST is not set +# CONFIG_TEST_STATIC_KEYS is not set +# CONFIG_BUG_ON_DATA_CORRUPTION is not set +# CONFIG_SAMPLES is not set +CONFIG_HAVE_ARCH_KGDB=y +# CONFIG_KGDB is not set +CONFIG_ARCH_HAS_UBSAN_SANITIZE_ALL=y +# CONFIG_ARCH_WANTS_UBSAN_NO_NULL is not set +# CONFIG_UBSAN is not set +CONFIG_ARCH_HAS_DEVMEM_IS_ALLOWED=y +# CONFIG_STRICT_DEVMEM is not set +# CONFIG_ARM64_PTDUMP is not set +CONFIG_EARLY_PRINTK=y +# CONFIG_PID_IN_CONTEXTIDR is not set +# CONFIG_ARM64_RANDOMIZE_TEXT_OFFSET is not set +CONFIG_DEBUG_SET_MODULE_RONX=y +# CONFIG_DEBUG_ALIGN_RODATA is not set +CONFIG_SUNXI_DUMP=y +# CONFIG_CORESIGHT is not set + +# +# Security options +# +CONFIG_KEYS=y +# CONFIG_PERSISTENT_KEYRINGS is not set +# CONFIG_BIG_KEYS is not set +# CONFIG_ENCRYPTED_KEYS is not set +# CONFIG_KEY_DH_OPERATIONS is not set +# CONFIG_SECURITY_DMESG_RESTRICT is not set +CONFIG_SECURITY_PERF_EVENTS_RESTRICT=y +CONFIG_SECURITY=y +CONFIG_SECURITYFS=y +CONFIG_SECURITY_NETWORK=y +# CONFIG_SECURITY_NETWORK_XFRM is not set +CONFIG_SECURITY_PATH=y +CONFIG_LSM_MMAP_MIN_ADDR=32768 +CONFIG_HAVE_HARDENED_USERCOPY_ALLOCATOR=y +CONFIG_HAVE_ARCH_HARDENED_USERCOPY=y +CONFIG_HARDENED_USERCOPY=y +# CONFIG_HARDENED_USERCOPY_PAGESPAN is not set +# CONFIG_FILE_INTEGRITY is not set +CONFIG_SECURITY_SELINUX=y +CONFIG_SECURITY_SELINUX_BOOTPARAM=y +CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=1 +# CONFIG_SECURITY_SELINUX_DISABLE is not set +CONFIG_SECURITY_SELINUX_DEVELOP=y +CONFIG_SECURITY_SELINUX_AVC_STATS=y +CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=0 +# CONFIG_SECURITY_SMACK is not set +# CONFIG_SECURITY_TOMOYO is not set +# CONFIG_SECURITY_APPARMOR is not set +# CONFIG_SECURITY_LOADPIN is not set +# CONFIG_SECURITY_YAMA is not set +CONFIG_INTEGRITY=y +# CONFIG_INTEGRITY_SIGNATURE is not set +CONFIG_INTEGRITY_AUDIT=y +# CONFIG_IMA is not set +# CONFIG_EVM is not set +CONFIG_DEFAULT_SECURITY_SELINUX=y +# CONFIG_DEFAULT_SECURITY_DAC is not set +CONFIG_DEFAULT_SECURITY="selinux" +CONFIG_CRYPTO=y + +# +# Crypto core or helper +# +CONFIG_CRYPTO_ALGAPI=y +CONFIG_CRYPTO_ALGAPI2=y +CONFIG_CRYPTO_AEAD=y +CONFIG_CRYPTO_AEAD2=y +CONFIG_CRYPTO_BLKCIPHER=y +CONFIG_CRYPTO_BLKCIPHER2=y +CONFIG_CRYPTO_HASH=y +CONFIG_CRYPTO_HASH2=y +CONFIG_CRYPTO_RNG=y +CONFIG_CRYPTO_RNG2=y +CONFIG_CRYPTO_RNG_DEFAULT=y +CONFIG_CRYPTO_AKCIPHER2=y +CONFIG_CRYPTO_KPP2=y +# CONFIG_CRYPTO_RSA is not set +# CONFIG_CRYPTO_DH is not set +# CONFIG_CRYPTO_ECDH is not set +CONFIG_CRYPTO_MANAGER=y +CONFIG_CRYPTO_MANAGER2=y +# CONFIG_CRYPTO_USER is not set +CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y +CONFIG_CRYPTO_GF128MUL=y +CONFIG_CRYPTO_NULL=y +CONFIG_CRYPTO_NULL2=y +# CONFIG_CRYPTO_PCRYPT is not set +CONFIG_CRYPTO_WORKQUEUE=y +CONFIG_CRYPTO_CRYPTD=y +# CONFIG_CRYPTO_MCRYPTD is not set +CONFIG_CRYPTO_AUTHENC=y +# CONFIG_CRYPTO_TEST is not set +CONFIG_CRYPTO_ABLK_HELPER=y + +# +# Authenticated Encryption with Associated Data +# +CONFIG_CRYPTO_CCM=y +CONFIG_CRYPTO_GCM=y +# CONFIG_CRYPTO_CHACHA20POLY1305 is not set +CONFIG_CRYPTO_SEQIV=y +CONFIG_CRYPTO_ECHAINIV=y + +# +# Block modes +# +CONFIG_CRYPTO_CBC=y +CONFIG_CRYPTO_CTR=y +CONFIG_CRYPTO_CTS=y +CONFIG_CRYPTO_ECB=y +# CONFIG_CRYPTO_LRW is not set +# CONFIG_CRYPTO_PCBC is not set +CONFIG_CRYPTO_XTS=y +# CONFIG_CRYPTO_KEYWRAP is not set +CONFIG_CRYPTO_NHPOLY1305=y +CONFIG_CRYPTO_ADIANTUM=y + +# +# Hash modes +# +CONFIG_CRYPTO_CMAC=y +CONFIG_CRYPTO_HMAC=y +# CONFIG_CRYPTO_XCBC is not set +# CONFIG_CRYPTO_VMAC is not set + +# +# Digest +# +CONFIG_CRYPTO_CRC32C=y +CONFIG_CRYPTO_CRC32=y +# CONFIG_CRYPTO_CRCT10DIF is not set +CONFIG_CRYPTO_GHASH=y +CONFIG_CRYPTO_POLY1305=y +CONFIG_CRYPTO_MD4=y +CONFIG_CRYPTO_MD5=y +# CONFIG_CRYPTO_MICHAEL_MIC is not set +# CONFIG_CRYPTO_RMD128 is not set +# CONFIG_CRYPTO_RMD160 is not set +# CONFIG_CRYPTO_RMD256 is not set +# CONFIG_CRYPTO_RMD320 is not set +CONFIG_CRYPTO_SHA1=y +CONFIG_CRYPTO_SHA256=y +CONFIG_CRYPTO_SHA512=y +# CONFIG_CRYPTO_SHA3 is not set +# CONFIG_CRYPTO_TGR192 is not set +# CONFIG_CRYPTO_WP512 is not set + +# +# Ciphers +# +CONFIG_CRYPTO_AES=y +# CONFIG_CRYPTO_ANUBIS is not set +CONFIG_CRYPTO_ARC4=y +# CONFIG_CRYPTO_BLOWFISH is not set +# CONFIG_CRYPTO_CAMELLIA is not set +# CONFIG_CRYPTO_CAST5 is not set +# CONFIG_CRYPTO_CAST6 is not set +CONFIG_CRYPTO_DES=y +# CONFIG_CRYPTO_FCRYPT is not set +# CONFIG_CRYPTO_KHAZAD is not set +# CONFIG_CRYPTO_SALSA20 is not set +CONFIG_CRYPTO_CHACHA20=y +# CONFIG_CRYPTO_SEED is not set +# CONFIG_CRYPTO_SERPENT is not set +# CONFIG_CRYPTO_TEA is not set +# CONFIG_CRYPTO_TWOFISH is not set + +# +# Compression +# +CONFIG_CRYPTO_DEFLATE=y +CONFIG_CRYPTO_LZO=y +# CONFIG_CRYPTO_842 is not set +CONFIG_CRYPTO_LZ4=y +# CONFIG_CRYPTO_LZ4HC is not set +# CONFIG_CRYPTO_ZSTD is not set + +# +# Random Number Generation +# +# CONFIG_CRYPTO_ANSI_CPRNG is not set +CONFIG_CRYPTO_DRBG_MENU=y +CONFIG_CRYPTO_DRBG_HMAC=y +# CONFIG_CRYPTO_DRBG_HASH is not set +# CONFIG_CRYPTO_DRBG_CTR is not set +CONFIG_CRYPTO_DRBG=y +CONFIG_CRYPTO_JITTERENTROPY=y +# CONFIG_CRYPTO_USER_API_HASH is not set +# CONFIG_CRYPTO_USER_API_SKCIPHER is not set +# CONFIG_CRYPTO_USER_API_RNG is not set +# CONFIG_CRYPTO_USER_API_AEAD is not set +CONFIG_CRYPTO_HW=y +# CONFIG_CRYPTO_DEV_CCP is not set +# CONFIG_CRYPTO_DEV_SUNXI is not set +# CONFIG_SUNXI_EMCE is not set +# CONFIG_ASYMMETRIC_KEY_TYPE is not set + +# +# Certificates for signature checking +# +CONFIG_ARM64_CRYPTO=y +# CONFIG_CRYPTO_SHA1_ARM64_CE is not set +# CONFIG_CRYPTO_SHA2_ARM64_CE is not set +# CONFIG_CRYPTO_GHASH_ARM64_CE is not set +CONFIG_CRYPTO_AES_ARM64_CE=y +# CONFIG_CRYPTO_AES_ARM64_CE_CCM is not set +CONFIG_CRYPTO_AES_ARM64_CE_BLK=y +# CONFIG_CRYPTO_AES_ARM64_NEON_BLK is not set +# CONFIG_CRYPTO_CRC32_ARM64 is not set +# CONFIG_BINARY_PRINTF is not set + +# +# Library routines +# +CONFIG_BITREVERSE=y +CONFIG_HAVE_ARCH_BITREVERSE=y +CONFIG_RATIONAL=y +CONFIG_GENERIC_STRNCPY_FROM_USER=y +CONFIG_GENERIC_STRNLEN_USER=y +CONFIG_GENERIC_NET_UTILS=y +CONFIG_GENERIC_PCI_IOMAP=y +CONFIG_GENERIC_IO=y +CONFIG_ARCH_USE_CMPXCHG_LOCKREF=y +CONFIG_CRC_CCITT=y +CONFIG_CRC16=y +# CONFIG_CRC_T10DIF is not set +CONFIG_CRC_ITU_T=y +CONFIG_CRC32=y +# CONFIG_CRC32_SELFTEST is not set +CONFIG_CRC32_SLICEBY8=y +# CONFIG_CRC32_SLICEBY4 is not set +# CONFIG_CRC32_SARWATE is not set +# CONFIG_CRC32_BIT is not set +# CONFIG_CRC7 is not set +CONFIG_LIBCRC32C=y +# CONFIG_CRC8 is not set +CONFIG_AUDIT_GENERIC=y +CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y +CONFIG_AUDIT_COMPAT_GENERIC=y +# CONFIG_RANDOM32_SELFTEST is not set +CONFIG_ZLIB_INFLATE=y +CONFIG_ZLIB_DEFLATE=y +CONFIG_LZO_COMPRESS=y +CONFIG_LZO_DECOMPRESS=y +CONFIG_LZ4_COMPRESS=y +CONFIG_LZ4_DECOMPRESS=y +CONFIG_XZ_DEC=y +CONFIG_XZ_DEC_X86=y +CONFIG_XZ_DEC_POWERPC=y +CONFIG_XZ_DEC_IA64=y +CONFIG_XZ_DEC_ARM=y +CONFIG_XZ_DEC_ARMTHUMB=y +CONFIG_XZ_DEC_SPARC=y +CONFIG_XZ_DEC_BCJ=y +# CONFIG_XZ_DEC_TEST is not set +CONFIG_DECOMPRESS_GZIP=y +CONFIG_DECOMPRESS_BZIP2=y +CONFIG_DECOMPRESS_LZMA=y +CONFIG_DECOMPRESS_XZ=y +CONFIG_DECOMPRESS_LZO=y +CONFIG_DECOMPRESS_LZ4=y +CONFIG_GENERIC_ALLOCATOR=y +CONFIG_REED_SOLOMON=y +CONFIG_REED_SOLOMON_ENC8=y +CONFIG_REED_SOLOMON_DEC8=y +CONFIG_TEXTSEARCH=y +CONFIG_TEXTSEARCH_KMP=y +CONFIG_TEXTSEARCH_BM=y +CONFIG_TEXTSEARCH_FSM=y +CONFIG_ASSOCIATIVE_ARRAY=y +CONFIG_HAS_IOMEM=y +CONFIG_HAS_DMA=y +CONFIG_CPU_RMAP=y +CONFIG_DQL=y +CONFIG_NLATTR=y +# CONFIG_CORDIC is not set +# CONFIG_DDR is not set +# CONFIG_IRQ_POLL is not set +CONFIG_LIBFDT=y +# CONFIG_SG_SPLIT is not set +CONFIG_SG_POOL=y +CONFIG_ARCH_HAS_SG_CHAIN=y +CONFIG_SBITMAP=y diff --git a/board/batocera/allwinner/h700/rg28xx/partitions/boot.img b/board/batocera/allwinner/h700/rg28xx/partitions/boot.img new file mode 100644 index 00000000000..a3fda0f7d0d Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/partitions/boot.img differ diff --git a/board/batocera/allwinner/h700/rg28xx/partitions/boot0.img b/board/batocera/allwinner/h700/rg28xx/partitions/boot0.img new file mode 100644 index 00000000000..cb173e99ba2 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/partitions/boot0.img differ diff --git a/board/batocera/allwinner/h700/rg28xx/partitions/boot_package.fex b/board/batocera/allwinner/h700/rg28xx/partitions/boot_package.fex new file mode 100644 index 00000000000..645fdca8484 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/partitions/boot_package.fex differ diff --git a/board/batocera/allwinner/h700/rg28xx/partitions/env.img b/board/batocera/allwinner/h700/rg28xx/partitions/env.img new file mode 100644 index 00000000000..7d4e0398668 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/partitions/env.img differ diff --git a/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/001_fix_battery_path.patch b/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/001_fix_battery_path.patch new file mode 100644 index 00000000000..7c4da105601 --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/001_fix_battery_path.patch @@ -0,0 +1,12 @@ +--- a/es-core/src/utils/Platform.cpp 2023-11-24 06:55:19.000000000 +0000 ++++ b/es-core/src/utils/Platform.cpp 2024-01-26 16:13:30.299581930 +0000 +@@ -402,6 +402,9 @@ + auto files = Utils::FileSystem::getDirContent("/sys/class/power_supply"); + for (auto file : files) + { ++ if ((Utils::String::toLower(file).find("/axp2202") != std::string::npos) && (batteryRootPath.empty())) ++ batteryRootPath = file; ++ + if ((Utils::String::toLower(file).find("/bat") != std::string::npos) && (batteryRootPath.empty())) + batteryRootPath = file; + diff --git a/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/002-add-custom-powerooff-reboot.patch b/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/002-add-custom-powerooff-reboot.patch new file mode 100644 index 00000000000..65abe20290c --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/patches/batocera-emulationstation/002-add-custom-powerooff-reboot.patch @@ -0,0 +1,20 @@ +--- a/es-core/src/utils/Platform.cpp 2024-02-07 23:35:12.786035592 +0000 ++++ b/es-core/src/utils/Platform.cpp 2024-02-07 23:37:15.749772341 +0000 +@@ -171,7 +171,7 @@ + #ifdef WIN32 // windows + return system("shutdown -s -t 0"); + #else // osx / linux +- return system("shutdown -h now"); ++ return system("poweroff.sh"); + #endif + } + +@@ -180,7 +180,7 @@ + #ifdef WIN32 // windows + return system("shutdown -r -t 0"); + #else // osx / linux +- return system("shutdown -r now"); ++ return system("reboot.sh"); + #endif + } + diff --git a/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/001-add-video-malifb-driver.patch b/board/batocera/allwinner/h700/rg28xx/patches/sdl2/001-add-video-malifb-driver.patch similarity index 100% rename from board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/001-add-video-malifb-driver.patch rename to board/batocera/allwinner/h700/rg28xx/patches/sdl2/001-add-video-malifb-driver.patch diff --git a/board/batocera/allwinner/h700/rg28xx/post-build-script.sh b/board/batocera/allwinner/h700/rg28xx/post-build-script.sh new file mode 100755 index 00000000000..b1cb450207d --- /dev/null +++ b/board/batocera/allwinner/h700/rg28xx/post-build-script.sh @@ -0,0 +1,15 @@ +#!/bin/sh -x +BOARD_DIR="$(dirname $0)" +echo "BOARD_DIR" +echo $BOARD_DIR +cp $BOARD_DIR/bootlogo.bmp $BINARIES_DIR/bootlogo.bmp +cp $BOARD_DIR/uImage $BINARIES_DIR/uImage +cp $BOARD_DIR/batocera-boot.conf $BINARIES_DIR/batocera-boot.conf +cp $BOARD_DIR/uInitrd $BINARIES_DIR/uInitrd +cp -r $BOARD_DIR/partitions $BINARIES_DIR/ + + +# We don't really need this but the batocera image script requires it +#cp -r $BOARD_DIR/tools $BINARIES_DIR/ +mkdir -p $BINARIES_DIR/tools + diff --git a/board/batocera/allwinner/h700/rg28xx/uImage b/board/batocera/allwinner/h700/rg28xx/uImage new file mode 100755 index 00000000000..103c72ad473 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/uImage differ diff --git a/board/batocera/allwinner/h700/rg28xx/uInitrd b/board/batocera/allwinner/h700/rg28xx/uInitrd new file mode 100755 index 00000000000..32e649cb148 Binary files /dev/null and b/board/batocera/allwinner/h700/rg28xx/uInitrd differ diff --git a/board/batocera/allwinner/h700/rg35xx-plus/S02resize b/board/batocera/allwinner/h700/rg35xx-plus/S02resize new file mode 100755 index 00000000000..ce86d808dde --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/S02resize @@ -0,0 +1,75 @@ +#!/bin/bash + +log="/tmp/resize.log" + +# only at start +test "$1" != "start" && exit 0 + +mount -o rw,remount /boot +# true if triggers are not available or not set to do so +if [ ! -f /boot/boot/autoresize ] +then + exit 0 +fi + +# UI Output with dialog, default colorset +function dialogoutput() +{ + local percent="$1" + local text="Do not switch off your device!" + + dialog --backtitle "KNULLI RG35XX" --title " Resizing Partition " \ + --mixedgauge "$text" 18 50 "$percent" "${arr[@]}" &>/dev/tty1 +} + +# Executing parameters and watch background pid +# Changes text messages parsed to dialog --mixedgauge +function textoutput() +{ + local cmd="$3" + local percent="$2" + local pid ret + echo "cmd:$cmd" >> $log + $cmd >> $log 2>&1 & + ret=$? + pid=$! + arr[$1]=7 #msg: In Progress + dialogoutput "$percent" + wait $pid + code=$? + echo "cmd code:$code" >> $log + arr[$1]=$ret #msg: Depends from return value +} + + # --- BEGIN RESIZE --- + # remove the trigger + rm -f /boot/boot/autoresize + DISK=/dev/mmcblk0 + PART=/dev/mmcblk0p4 + PARTNUM=4 + + sync + # Backup bootloader +# dd if=/dev/mmcblk0 bs=1 skip=8192 count=$((0x10000)) of=/tmp/boot_backup.img + + sgdisk -e ${DISK} + parted -s -m ${DISK} align-check opt ${PARTNUM} + parted -s -m ${DISK} resizepart ${PARTNUM} 100% + partprobe ${DISK} + + #mkfs.vfat -n SHARE ${PART} + mkfs.exfat -n SHARE ${PART} + + # Restore bootloader +# dd if=/tmp/boot_backup.img of=/dev/mmcblk0 bs=1024 seek=8 + + echo -e "r\nb\nc\nY\nw\nY\n" | gdisk ${DISK} + + partprobe ${DISK} + + sync + +#Cleanup, restore screen, set progress of last item to 100% +dialogoutput 100 +clear > /dev/tty1 +exit 0 diff --git a/board/batocera/allwinner/h700/rg35xx-plus/S03checkfat b/board/batocera/allwinner/h700/rg35xx-plus/S03checkfat deleted file mode 100755 index 66fa4114574..00000000000 --- a/board/batocera/allwinner/h700/rg35xx-plus/S03checkfat +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/sh - -PATH=/sbin:/bin:/usr/sbin:/usr/bin -DEVICE="/dev/mmcblk0p4" - -case "$1" in - start) - # Check if the device is mounted - MOUNTPOINT=$(grep $DEVICE /etc/mtab | cut -d ' ' -f 2) - if [ -n "$MOUNTPOINT" ]; then - # Unmount the device - echo "Unmounting $DEVICE..." - umount $DEVICE - fi - - # Check and repair the filesystem - echo "Checking FAT32 filesystem on $DEVICE..." - fsck.vfat -aw $DEVICE - - # If the device was originally mounted, remount it - if [ -n "$MOUNTPOINT" ]; then - echo "Remounting $DEVICE to $MOUNTPOINT..." - mount $DEVICE $MOUNTPOINT - fi - ;; - *) - echo "Usage: /etc/init.d/S08checkfat {start}" - exit 1 - ;; -esac - -exit 0 - diff --git a/board/batocera/allwinner/h700/rg35xx-plus/create-boot-script.sh b/board/batocera/allwinner/h700/rg35xx-plus/create-boot-script.sh index 5d6e0ccccb6..092c6cc617c 100755 --- a/board/batocera/allwinner/h700/rg35xx-plus/create-boot-script.sh +++ b/board/batocera/allwinner/h700/rg35xx-plus/create-boot-script.sh @@ -16,11 +16,13 @@ BATOCERA_BINARIES_DIR=$6 mkdir -p "${BATOCERA_BINARIES_DIR}/boot/boot" || exit 1 -cp "${BOARD_DIR}/uImage" "${BATOCERA_BINARIES_DIR}/boot/uImage" || exit 1 -cp "${BOARD_DIR}/uInitrd" "${BATOCERA_BINARIES_DIR}/boot/uInitrd" || exit 1 -cp "${BINARIES_DIR}/rootfs.squashfs" "${BATOCERA_BINARIES_DIR}/boot/boot/batocera.update" || exit 1 -cp "${BOARD_DIR}/batocera-boot.conf" "${BATOCERA_BINARIES_DIR}/boot/batocera-boot.conf" || exit 1 -cp "${BOARD_DIR}/bootlogo.bmp" "${BATOCERA_BINARIES_DIR}/boot/bootlogo.bmp" || exit 1 +cp "${BOARD_DIR}/uImage" "${BATOCERA_BINARIES_DIR}/boot/uImage" || exit 1 +cp "${BOARD_DIR}/uInitrd" "${BATOCERA_BINARIES_DIR}/boot/uInitrd" || exit 1 +cp "${BINARIES_DIR}/rootfs.squashfs" "${BATOCERA_BINARIES_DIR}/boot/boot/batocera.update" || exit 1 +cp "${BOARD_DIR}/batocera-boot.conf" "${BATOCERA_BINARIES_DIR}/boot/batocera-boot.conf" || exit 1 +cp "${BOARD_DIR}/bootlogo.bmp" "${BATOCERA_BINARIES_DIR}/boot/bootlogo.bmp" || exit 1 + +cp -r "${BOARD_DIR}/partitions" "${BATOCERA_BINARIES_DIR}" || exit 1 touch "${BATOCERA_BINARIES_DIR}/boot/boot/autoresize" diff --git a/board/batocera/allwinner/h700/rg35xx-plus/drastic.cfg b/board/batocera/allwinner/h700/rg35xx-plus/drastic.cfg deleted file mode 100755 index 28d6ab829f3..00000000000 --- a/board/batocera/allwinner/h700/rg35xx-plus/drastic.cfg +++ /dev/null @@ -1,105 +0,0 @@ -frameskip_type = 0 -frameskip_value = 1 -show_frame_counter = 0 -screen_orientation = 3 -screen_scaling = 1 -screen_swap = 0 -savestate_number = 0 -fast_forward = 0 -enable_sound = 1 -clock_speed = 0 -threaded_3d = 0 -mirror_touch = 0 -compress_savestates = 1 -savestate_snapshot = 1 -unzip_roms = 0 -backup_in_savestates = 1 -ignore_gamecard_limit = 0 -frame_interval = 0 -trim_roms = 0 -fix_main_2d_screen = 0 -disable_edge_marking = 1 -hires_3d = 0 -use_rtc_custom_time = 0 -rtc_custom_time = 0 -rtc_system_time = 1 -firmware.username = Batocera -firmware.language = 1 -firmware.favorite_color = 11 -firmware.birthday_month = 11 -firmware.birthday_day = 25 -enable_cheats = 1 -controls_a[CONTROL_INDEX_UP] = 1089 -controls_a[CONTROL_INDEX_DOWN] = 1092 -controls_a[CONTROL_INDEX_LEFT] = 1096 -controls_a[CONTROL_INDEX_RIGHT] = 1090 -controls_a[CONTROL_INDEX_A] = 1027 -controls_a[CONTROL_INDEX_B] = 1028 -controls_a[CONTROL_INDEX_X] = 1030 -controls_a[CONTROL_INDEX_Y] = 1029 -controls_a[CONTROL_INDEX_L] = 1031 -controls_a[CONTROL_INDEX_R] = 1032 -controls_a[CONTROL_INDEX_START] = 1034 -controls_a[CONTROL_INDEX_SELECT] = 1033 -controls_a[CONTROL_INDEX_HINGE] = 104 -controls_a[CONTROL_INDEX_TOUCH_CURSOR_UP] = 105 -controls_a[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 107 -controls_a[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 106 -controls_a[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 108 -controls_a[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 110 -controls_a[CONTROL_INDEX_MENU] = 1035 -controls_a[CONTROL_INDEX_SAVE_STATE] = 318 -controls_a[CONTROL_INDEX_LOAD_STATE] = 320 -controls_a[CONTROL_INDEX_FAST_FORWARD] = 8 -controls_a[CONTROL_INDEX_SWAP_SCREENS] = 1037 -controls_a[CONTROL_INDEX_SWAP_ORIENTATION_A] = 1031 -controls_a[CONTROL_INDEX_SWAP_ORIENTATION_B] = 1032 -controls_a[CONTROL_INDEX_LOAD_GAME] = 65535 -controls_a[CONTROL_INDEX_QUIT] = 65535 -controls_a[CONTROL_INDEX_UI_UP] = 1089 -controls_a[CONTROL_INDEX_UI_DOWN] = 1092 -controls_a[CONTROL_INDEX_UI_LEFT] = 1096 -controls_a[CONTROL_INDEX_UI_RIGHT] = 1090 -controls_a[CONTROL_INDEX_UI_SELECT] = 1027 -controls_a[CONTROL_INDEX_UI_BACK] = 8 -controls_a[CONTROL_INDEX_UI_EXIT] = 1035 -controls_a[CONTROL_INDEX_UI_PAGE_UP] = 331 -controls_a[CONTROL_INDEX_UI_PAGE_DOWN] = 334 -controls_a[CONTROL_INDEX_UI_SWITCH] = 481 -controls_b[CONTROL_INDEX_UP] = 65535 -controls_b[CONTROL_INDEX_DOWN] = 65535 -controls_b[CONTROL_INDEX_LEFT] = 65535 -controls_b[CONTROL_INDEX_RIGHT] = 65535 -controls_b[CONTROL_INDEX_A] = 65535 -controls_b[CONTROL_INDEX_B] = 65535 -controls_b[CONTROL_INDEX_X] = 65535 -controls_b[CONTROL_INDEX_Y] = 65535 -controls_b[CONTROL_INDEX_L] = 65535 -controls_b[CONTROL_INDEX_R] = 65535 -controls_b[CONTROL_INDEX_START] = 65535 -controls_b[CONTROL_INDEX_SELECT] = 65535 -controls_b[CONTROL_INDEX_HINGE] = 65535 -controls_b[CONTROL_INDEX_TOUCH_CURSOR_UP] = 1217 -controls_b[CONTROL_INDEX_TOUCH_CURSOR_DOWN] = 1153 -controls_b[CONTROL_INDEX_TOUCH_CURSOR_LEFT] = 1216 -controls_b[CONTROL_INDEX_TOUCH_CURSOR_RIGHT] = 1152 -controls_b[CONTROL_INDEX_TOUCH_CURSOR_PRESS] = 1157 -controls_b[CONTROL_INDEX_MENU] = 65535 -controls_b[CONTROL_INDEX_SAVE_STATE] = 65535 -controls_b[CONTROL_INDEX_LOAD_STATE] = 65535 -controls_b[CONTROL_INDEX_FAST_FORWARD] = 65535 -controls_b[CONTROL_INDEX_SWAP_SCREENS] = 65535 -controls_b[CONTROL_INDEX_SWAP_ORIENTATION_A] = 65535 -controls_b[CONTROL_INDEX_SWAP_ORIENTATION_B] = 65535 -controls_b[CONTROL_INDEX_LOAD_GAME] = 65535 -controls_b[CONTROL_INDEX_QUIT] = 65535 -controls_b[CONTROL_INDEX_UI_UP] = 65535 -controls_b[CONTROL_INDEX_UI_DOWN] = 65535 -controls_b[CONTROL_INDEX_UI_LEFT] = 65535 -controls_b[CONTROL_INDEX_UI_RIGHT] = 65535 -controls_b[CONTROL_INDEX_UI_SELECT] = 65535 -controls_b[CONTROL_INDEX_UI_BACK] = 65535 -controls_b[CONTROL_INDEX_UI_EXIT] = 65535 -controls_b[CONTROL_INDEX_UI_PAGE_UP] = 65535 -controls_b[CONTROL_INDEX_UI_PAGE_DOWN] = 65535 -controls_b[CONTROL_INDEX_UI_SWITCH] = 65535 diff --git a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/S02overclock b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/S02overclock new file mode 100755 index 00000000000..2b41d2890b3 --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/S02overclock @@ -0,0 +1,43 @@ +#!/bin/bash + +do_overclock() { + echo "$1" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq + echo "$1" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq +} + + +if test "${1}" = "start" +then + OVALUE=$(grep -E '^[ ]*overclocking[ ]*=[ ]*.*[ ]*$' /boot/batocera-boot.conf | sed -e s+"^[ ]*overclocking[ ]*=[ ]*\(.*\)[ ]*$"+"\1"+) + + # ULTRALOW LOW MEDIUM HIGH TURBO EXTREME + # 480000 720000 1032000 1104000 1200000 1296000 1416000 1512000 + + case "${OVALUE}" in + "extreme") + do_overclock 1512000 + ;; + "turbo") + do_overclock 1416000 + ;; + "high") + do_overclock 1296000 + ;; + "none") + do_overclock 1200000 + ;; + "low") + do_overclock 1032000 + ;; + "powersave") + do_overclock 480000 + ;; + *) + # default + do_overclock 1512000 + ;; + esac +fi + diff --git a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/rcS b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/rcS index f7af9a54712..873b4b5abbc 100755 --- a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/rcS +++ b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/etc/init.d/rcS @@ -1,9 +1,5 @@ #!/bin/sh -# Initialize the counter for the bar -counter=4 -multiplier=$(echo "100/$(($(ls /etc/init.d/S[0-2]*|wc -l)-1))"|bc -l) - # We need the graphics module in order to use SDL since we are # using the sdl-compat/SDL2 for rendering insmod /lib/modules/mali_kbase.ko @@ -11,6 +7,9 @@ insmod /lib/modules/mali_kbase.ko # Call the charger process /usr/bin/charger +# Start the progress bar +/usr/bin/progressbar & + # Start all init scripts in /etc/init.d # executing them in numerical order. # @@ -29,14 +28,9 @@ for i in /etc/init.d/S??* ;do ) ;; *) + echo "$i" > /tmp/status.txt # No sh extension, so fork subprocess. $i start - script_number=$(echo "$i" | sed -n 's/.*\/S\([0-9]\+\).*/\1/p') - if [ "$script_number" -le 31 ]; then - num=$(echo "$multiplier * $counter" |bc -l) - counter=$(($counter + 1)) - /usr/bin/progressbar $num - fi ;; esac diff --git a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/batocera-overclock b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/batocera-overclock new file mode 100755 index 00000000000..1da02dc13d9 --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/batocera-overclock @@ -0,0 +1,392 @@ +#!/bin/sh + +f_usage() { + echo "$0 list" >&2 + echo "$0 set " >&2 +} + +ARCH="$(cat /usr/share/batocera/batocera.arch)" +GRPICONFFILE="/boot/config.txt" +GODROIDCONFFILE="/boot/batocera-boot.conf" + +if test "${ARCH}" = "bcm2836" || test "${ARCH}" = "bcm2837" +then + RPIMODEL="/proc/device-tree/model" + + if grep -q "^Raspberry Pi 2" ${RPIMODEL} + then + ARCH="bcm2836" + elif grep -q "^Raspberry Pi 3 Model [A-Z] Plus" ${RPIMODEL} + then + ARCH="rpi3+" + elif grep -q "^Raspberry Pi 3" ${RPIMODEL} + then + ARCH="rpi3" + elif grep -q "^Raspberry Pi Zero 2" ${RPIMODEL} + then + ARCH="rpizero2" + fi +fi + +preBootRWConfig() { + mount -o remount,rw /boot +} + +postBootRWConfig() { + mount -o remount,ro /boot +} + +doList() { + case "${ARCH}" in + "bcm2835") + echo "none NONE" + echo "high HIGH (950Mhz)" + echo "turbo TURBO (1000Mhz)" + echo "extreme EXTREME (1100Mhz)" + ;; + "bcm2836") + echo "none NONE (900Mhz)" + echo "high HIGH (1050Mhz)" + ;; + "rpi3") + echo "none NONE (1200Mhz)" + echo "high HIGH (1300Mhz)" + echo "turbo TURBO (1325Mhz)" + echo "extreme EXTREME (1350Mhz)" + ;; + "rpi3+") + echo "none NONE (1400Mhz)" + echo "high HIGH (1425Mhz)" + echo "turbo TURBO (1450Mhz)" + echo "extreme EXTREME (1500Mhz)" + ;; + "bcm2711") + echo "none NONE (B0 - 1500Mhz or C0 - 1800MHz)" + echo "high HIGH (B0 HEATSINK - 1700Mhz)" + echo "turbo TURBO (B0 HEATSINK - 1800Mhz)" + echo "extreme EXTREME (HEATSINK & FAN 1950Mhz)" + echo "ruinsane INSANE (HEATSINK & FAN 2100Mhz)" + echo "cm4 CAUTION (C0 stepping only - HEATSINK & FAN 2275Mhz)" + ;; + "rpizero2") + echo "none NONE (1000Mhz)" + ;; + "s922x") + MODEL=$(cat /sys/firmware/devicetree/base/model) + if test "${MODEL}" = "Hardkernel ODROID-N2Plus" -o "${MODEL}" = "Khadas VIM3" -o "${MODEL}" = "Beelink GT-King Pro" + then + echo "none NONE (2200Mhz)" + echo "high HIGH (2300Mhz)" + echo "extreme EXTREME (2400Mhz)" + fi + ;; + "rg35xx") + # 240000 504000 720000 840000 1008000 1104000 1200000 1296000 1392000 1488000 + + echo "powersave POWERSAVE (240 MHz)" + echo "low LOW (720 MHz)" + echo "medium MEDIUM (1008 MHz)" + echo "high HIGH (1200 MHz)" + echo "turbo TURBO (1392 MHz)" + echo "extreme EXTREME (1488 MHz)" + ;; + "h700") + # 480000 720000 1032000 1104000 1200000 1296000 1416000 1512000 + echo "powersave POWERSAVE (480 MHz)" + echo "low LOW (720 MHz)" + echo "none NONE (1200 MHz)" + echo "medium MEDIUM (1032 MHz)" + echo "high HIGH (1296 MHz)" + echo "turbo TURBO (1416 MHz)" + echo "extreme EXTREME (1512 MHz)" + ;; + "a133") + # 408000 600000 816000 1008000 1200000 1416000 1608000 1800000 2000000 + echo "powersave POWERSAVE (480 MHz)" + echo "low LOW (816 MHz)" + echo "none NONE (1200 MHz)" + echo "medium MEDIUM (1416 MHz)" + echo "high HIGH (1608 MHz)" + echo "turbo TURBO (1800 MHz)" + echo "extreme EXTREME (2000 MHz)" + ;; + *) + echo "none NONE" + esac +} + +setValue_rpiNone() { + preBootRWConfig || return 1 + for entry in arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + do + sed -i "/^${entry}/d" "${GRPICONFFILE}" + done + postBootRWConfig || return 1 +} + +setValue_rpi4None() { + preBootRWConfig || return 1 + for entry in over_voltage arm_freq gpu_freq + do + sed -i "/^${entry}/d" "${GRPICONFFILE}" + done + postBootRWConfig || return 1 +} + +setValue_rpiPutVars() { + arm_freq=$1 + core_freq=$2 + sdram_freq=$3 + force_turbo=$4 + over_voltage=$5 + over_voltage_sdram=$6 + gpu_freq=$7 + + preBootRWConfig || return 1 + + # put variable lines if not existing + if ! grep -q "Overclock" "${GRPICONFFILE}" + then + echo >> "${GRPICONFFILE}" + echo "[Overclock]" >> "${GRPICONFFILE}" + fi + for entry in arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + do + if ! grep -q "${entry}" "${GRPICONFFILE}" + then + if ! echo "${entry}=" >> "${GRPICONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?arm_freq=.*/arm_freq=${arm_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?core_freq=.*/core_freq=${core_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?sdram_freq=.*/sdram_freq=${sdram_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?force_turbo=.*/force_turbo=${force_turbo}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?over_voltage=.*/over_voltage=${over_voltage}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?over_voltage_sdram=.*/over_voltage_sdram=${over_voltage_sdram}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?gpu_freq=.*/gpu_freq=${gpu_freq}/g" "${GRPICONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_rpi4PutVars() { + over_voltage=$1 + arm_freq=$2 + gpu_freq=$3 + + preBootRWConfig || return 1 + + # put variable lines if not existing + if ! grep -q "Overclock" "${GRPICONFFILE}" + then + echo >> "${GRPICONFFILE}" + echo "[Overclock]" >> "${GRPICONFFILE}" + fi + for entry in over_voltage arm_freq gpu_freq + do + if ! grep -q "${entry}" "${GRPICONFFILE}" + then + if ! echo "${entry}=" >> "${GRPICONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?over_voltage=.*/over_voltage=${over_voltage}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?arm_freq=.*/arm_freq=${arm_freq}/g" "${GRPICONFFILE}" || return 1 + sed -i "s/#\?gpu_freq=.*/gpu_freq=${gpu_freq}/g" "${GRPICONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_odroidn2() { + VALUE=$1 + + preBootRWConfig || return 1 + + # put variable lines if not existing + for entry in overclocking + do + if ! grep -q "${entry}" "${GODROIDCONFFILE}" + then + if ! echo "${entry}=" >> "${GODROIDCONFFILE}" + then + return 1 + fi + fi + done + + # put values + sed -i "s/#\?overclocking=.*/overclocking=${VALUE}/g" "${GODROIDCONFFILE}" || return 1 + + postBootRWConfig || return 1 +} + +setValue_rg35xx() { + VALUE=$1 + preBootRWConfig || return 1 + + # put variable lines if not existing + for entry in overclocking + do + if ! grep -q "${entry}" "${GODROIDCONFFILE}" + then + if ! echo "${entry}=" >> "${GODROIDCONFFILE}" + then + return 1 + fi + fi + + done + # put values + sed -i "s/#\?overclocking=.*/overclocking=${VALUE}/g" "${GODROIDCONFFILE}" || return 1 + + /etc/init.d/S02overclock start + postBootRWConfig || return 1 +} + +setValue() { + VALUE=$1 + + case "${ARCH}" in + "bcm2835") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + # arm_freq core_freq sdram_freq force_turbo over_voltage over_voltage_sdram gpu_freq + setValue_rpiPutVars 950 250 450 0 6 0 250 + ;; + "turbo") + setValue_rpiPutVars 1000 500 600 0 6 0 250 + ;; + "extreme") + setValue_rpiPutVars 1100 550 600 1 8 6 250 + ;; + esac + ;; + "bcm2836") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1050 525 450 0 4 2 350 + ;; + esac + ;; + "rpi3") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1300 525 500 0 4 4 500 + ;; + "turbo") + setValue_rpiPutVars 1325 525 520 0 4 4 500 + ;; + "extreme") + setValue_rpiPutVars 1350 550 550 1 4 5 525 + ;; + esac + ;; + "rpi3+") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + "high") + setValue_rpiPutVars 1425 525 500 0 4 4 500 + ;; + "turbo") + setValue_rpiPutVars 1450 525 520 0 4 4 500 + ;; + "extreme") + setValue_rpiPutVars 1500 550 550 1 4 5 525 + ;; + esac + ;; + "bcm2711") + case "${VALUE}" in + "none") + setValue_rpi4None + ;; + "high") + setValue_rpi4PutVars 2 1700 500 + ;; + "turbo") + setValue_rpi4PutVars 3 1800 600 + ;; + "extreme") + setValue_rpi4PutVars 5 1950 700 + ;; + "ruinsane") + setValue_rpi4PutVars 6 2100 750 + ;; + "cm4") + setValue_rpi4PutVars 8 2275 750 + esac + ;; + "rpizero2") + case "${VALUE}" in + "none") + setValue_rpiNone + ;; + esac + ;; + "s922x") + MODEL=$(cat /sys/firmware/devicetree/base/model) + if test "${MODEL}" = "Hardkernel ODROID-N2Plus" -o "${MODEL}" = "Khadas VIM3" -o "${MODEL}" = "Beelink GT-King Pro" + then + setValue_odroidn2 "${VALUE}" + fi + ;; + "rg35xx") + setValue_rg35xx "${VALUE}" + ;; + "h700") + setValue_rg35xx "${VALUE}" + ;; + "a133") + setValue_rg35xx "${VALUE}" + ;; + esac +} + +if [ $# -eq 0 ]; then + f_usage + exit 1 +fi + +ACTION=$1 +shift + +case "${ACTION}" in + "list") + if ! doList + then + exit 1 + fi + ;; + "set") + VALUE=$1 + if ! setValue "${VALUE}" + then + exit 1 + fi + ;; + *) + f_usage + >&2 echo "error: invalid command ${ACTION}" + exit 1 +esac + +exit 0 diff --git a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/progressbar b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/progressbar index eea0c7e0243..95888f0adee 100755 Binary files a/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/progressbar and b/board/batocera/allwinner/h700/rg35xx-plus/fsoverlay/usr/bin/progressbar differ diff --git a/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch b/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch new file mode 100644 index 00000000000..7ecfb58e2f2 --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch @@ -0,0 +1,42 @@ +diff --git a/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py b/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py +index 8a932cba30e..a73cea81a0d 100644 +--- a/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py ++++ b/package/batocera/core/batocera-configgen/configgen/configgen/generators/libretro/libretroConfig.py +@@ -14,11 +14,22 @@ + import utils.bezels as bezelsUtil + import utils.videoMode as videoMode + import controllersConfig ++import xml.etree.ElementTree as ET + + eslog = get_logger(__name__) + sys.path.append( + os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) + ++# Return value for es invertedbuttons ++def getInvertButtonsValue(): ++ tree = ET.parse(batoceraFiles.esSettings) ++ root = tree.getroot() ++ # Find the InvertButtons element and return value ++ elem = root.find(".//bool[@name='InvertButtons']") ++ if elem is not None: ++ return elem.get('value') == 'true' ++ return False # Return False if not found ++ + # return true if the option is considered defined + def defined(key, dict): + return key in dict and isinstance(dict[key], str) and len(dict[key]) > 0 +@@ -110,11 +121,14 @@ def createLibretroConfig(generator, system, controllers, metadata, guns, wheels, + systemConfig = system.config + renderConfig = system.renderconfig + systemCore = system.config['core'] ++ # Get value from ES settings ++ swapButtons = '"false"' if getInvertButtonsValue() else '"true"' + + # Basic configuration + retroarchConfig['quit_press_twice'] = 'false' # not aligned behavior on other emus + retroarchConfig['menu_show_restart_retroarch'] = 'false' # this option messes everything up on Batocera if ever clicked + retroarchConfig['menu_show_load_content_animation'] = 'false' # hide popup when starting a game ++ retroarchConfig['menu_swap_ok_cancel_buttons'] = swapButtons # Set the correct value to match ES confirm /cancel inputs + + retroarchConfig['video_driver'] = '"' + gfxBackend + '"' # needed for the ozone menu + # Set Vulkan diff --git a/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0002-libretroConfig-tate-mode.patch b/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0002-libretroConfig-tate-mode.patch new file mode 100644 index 00000000000..1f3e0bd158d --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/patches/batocera-configgen/0002-libretroConfig-tate-mode.patch @@ -0,0 +1,69 @@ +--- a/configgen/generators/libretro/libretroConfig.py 2024-04-12 02:03:40.000000000 +0000 ++++ b/configgen/generators/libretro/libretroConfig.py 2024-04-12 02:03:40.000000000 +0000 +@@ -14,6 +14,7 @@ + import utils.bezels as bezelsUtil + import utils.videoMode as videoMode + import controllersConfig ++from pathlib import Path + + eslog = get_logger(__name__) + sys.path.append( +@@ -562,6 +563,58 @@ + controller, pad = controller_list[i - 1] + if (pad.guid in valid_n64_controller_guids and pad.configName in valid_n64_controller_names) or (system.isOptSet(f'{option}-controller{i}') and system.config[f'{option}-controller{i}'] != 'retropad'): + update_n64_controller_config(i) ++ ++ ## TATE mode remap for handhelds ++ if system.config['core'] in ['fbneo', 'mame']: ++ path = Path(rom) ++ folder_name = path.parent.name ++ ++ handhelds = { ++ ('19000000010000000100000000010000', 'Deeplay-keys'): { # rg35xx/h ++ 'rotation': 'left', ++ 'remap': { ++ 'stk_r_x+': '18', 'stk_r_x-': '19', 'stk_r_y+': '17', 'stk_r_y-': '16', ++ 'btn_a': '0', 'btn_b': '1', 'btn_x': '8', 'btn_y': '-1', ++ } ++ }, ++ ('19000000010000000100000000010000', 'odroidgo2 joypad'): { # rg28xx ++ 'rotation': 'right', ++ 'remap': { ++ 'btn_down': '7', 'btn_left': '5', 'btn_right': '4', 'btn_up': '6', ++ 'btn_start': '0', 'btn_select': '8', 'btn_l2': '1', 'btn_r': '2', ++ 'btn_r2': '3', 'btn_a': '-1', 'btn_b': '-1', 'btn_x': '-1', 'btn_y': '-1', ++ } ++ }, ++ ('030003f05e0400008e02000014010000', 'Xbox 360 Controller'): { # TrimUI ++ 'rotation': 'left', ++ 'remap': { ++ 'stk_r_x+': '18', 'stk_r_x-': '19', 'stk_r_y+': '17', 'stk_r_y-': '16', ++ 'btn_a': '0', 'btn_b': '1', 'btn_x': '8', 'btn_y': '-1', ++ } ++ }, ++ } ++ ++ def update_handheld_config(guid, name): ++ if (guid, name) in handhelds: ++ settings = handhelds[(guid, name)] ++ # set display rotation ++ if settings['rotation'] == 'left': ++ if (system.config['core'] == 'fbneo'): ++ coreSettings.save('fbneo-vertical-mode', '"' + 'TATE alternate' + '"') ++ elif (system.config['core'] == 'mame'): ++ coreSettings.save('mame_rotation_mode', '"' + 'tate-rol' + '"') ++ elif settings['rotation'] == 'right': ++ if (system.config['core'] == 'fbneo'): ++ coreSettings.save('fbneo-vertical-mode', '"' + 'TATE' + '"') ++ elif (system.config['core'] == 'mame'): ++ coreSettings.save('mame_rotation_mode', '"' + 'tate-ror' + '"') ++ # remap inputs ++ for btn, value in settings['remap'].items(): ++ retroarchConfig[f'input_player1_{btn}'] = value ++ ++ controller, pad = sorted(controllers.items())[0] ++ if (system.isOptSet(f"{systemCore}-hhtate") and system.config[f"{systemCore}-hhtate"] == "True" or folder_name == "tate"): ++ update_handheld_config(pad.guid, pad.configName) + + ## PORTS + ## Quake diff --git a/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0001-add-video-malifb-driver.patch b/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0001-add-video-malifb-driver.patch new file mode 100644 index 00000000000..d265574ed58 --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0001-add-video-malifb-driver.patch @@ -0,0 +1,675 @@ +diff -urN sdl2-2.0.22/cmake/sdlchecks.cmake build/sdl2-2.0.22/cmake/sdlchecks.cmake +--- a/cmake/sdlchecks.cmake 2022-04-09 01:19:19.000000000 +0000 ++++ b/cmake/sdlchecks.cmake 2022-09-12 15:58:19.338361448 +0000 +@@ -804,6 +804,28 @@ + endmacro() + + # Requires: ++# - n/a ++macro(CheckMali) ++ if(VIDEO_MALI) ++ check_c_source_compiles(" ++ #define LINUX ++ #define EGL_API_FB ++ #include ++ int main(int argc, char** argv) {}" HAVE_VIDEO_MALI_EGL_FB) ++ if(HAVE_VIDEO_MALI_EGL_FB) ++ set(HAVE_VIDEO_MALI TRUE) ++ set(HAVE_SDL_VIDEO TRUE) ++ ++ file(GLOB MALI_SOURCES ${SDL2_SOURCE_DIR}/src/video/mali-fbdev/*.c) ++ set(SOURCE_FILES ${SOURCE_FILES} ${MALI_SOURCES}) ++ set(SDL_VIDEO_DRIVER_MALI 1) ++ set(SDL_CFLAGS "${SDL_CFLAGS} -DLINUX -DEGL_API_FB") ++ list(APPEND EXTRA_LIBS EGL) ++ endif(HAVE_VIDEO_MALI_EGL_MALI) ++ endif(VIDEO_MALI) ++endmacro(CheckMali) ++ ++# Requires: + # - nada + macro(CheckGLX) + if(SDL_OPENGL) +diff -urN sdl2-2.0.22/CMakeLists.txt build/sdl2-2.0.22/CMakeLists.txt +--- a/CMakeLists.txt 2022-04-21 17:37:37.000000000 +0000 ++++ b/CMakeLists.txt 2022-09-12 15:58:19.338361448 +0000 +@@ -441,6 +441,7 @@ + set_option(SDL_RENDER_D3D "Enable the Direct3D render driver" ${WINDOWS}) + set_option(SDL_RENDER_METAL "Enable the Metal render driver" ${APPLE}) + set_option(SDL_VIVANTE "Use Vivante EGL video driver" ${UNIX_SYS}) ++set_option(SDL_MALI "Use MaliFB EGL video driver" ${UNIX_SYS}) + dep_option(SDL_VULKAN "Enable Vulkan support" ON "ANDROID OR APPLE OR LINUX OR WINDOWS" OFF) + set_option(SDL_METAL "Enable Metal support" ${APPLE}) + set_option(SDL_KMSDRM "Use KMS DRM video driver" ${UNIX_SYS}) +@@ -1281,6 +1282,7 @@ + CheckOpenGLES() + CheckWayland() + CheckVivante() ++ CheckMali() + # FIXME: implement CheckVulkan() + if(SDL_VULKAN) + set(SDL_VIDEO_VULKAN 1) +diff -urN sdl2-2.0.22/configure build/sdl2-2.0.22/configure +--- a/configure 2022-09-13 19:22:27.631790323 +0000 ++++ b/configure 2022-09-12 15:58:19.342361438 +0000 +@@ -22686,6 +22686,56 @@ + fi + } + ++CheckMaliVideo() ++{ ++ # Check whether --enable-video-mali was given. ++if test "${enable_video_mali+set}" = set; then : ++ enableval=$enable_video_mali; ++else ++ enable_video_mali=yes ++fi ++ ++ if test x$enable_video = xyes -a x$enable_video_mali = xyes; then ++ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mali FB API" >&5 ++$as_echo_n "checking for Mali FB API... " >&6; } ++ have_mali_egl=no ++ cat confdefs.h - <<_ACEOF >conftest.$ac_ext ++/* end confdefs.h. */ ++ ++ #define LINUX ++ #define EGL_API_FB ++ #include ++ ++int ++main () ++{ ++ ++ ++ ; ++ return 0; ++} ++_ACEOF ++if ac_fn_c_try_compile "$LINENO"; then : ++ ++ have_mali_egl=yes ++ ++fi ++rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ++ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_mali_egl" >&5 ++$as_echo "$have_mali_egl" >&6; } ++ ++ if test x$have_mali_egl = xyes; then ++ ++$as_echo "#define SDL_VIDEO_DRIVER_MALI 1" >>confdefs.h ++ ++ EXTRA_CFLAGS="$EXTRA_CFLAGS -DLINUX -DEGL_API_FB" ++ SOURCES="$SOURCES $srcdir/src/video/mali-fbdev/*.c" ++ SUMMARY_video="${SUMMARY_video} mali" ++ have_video=yes ++ fi ++ fi ++} ++ + CheckHaikuVideo() + { + if test x$enable_video = xyes; then +@@ -25960,6 +26010,7 @@ + CheckLinuxVersion + CheckRPATH + CheckVivanteVideo ++ CheckMaliVideo + + # Set up files for the misc library + if test x$enable_misc = xyes; then +diff -urN sdl2-2.0.22/include/SDL_config.h.cmake build/sdl2-2.0.22/include/SDL_config.h.cmake +--- sdl2-2.0.22/include/SDL_config.h.cmake 2022-04-09 01:19:19.000000000 +0000 ++++ build/sdl2-2.0.22/include/SDL_config.h.cmake 2022-09-12 15:58:19.342361438 +0000 +@@ -400,6 +400,7 @@ + #cmakedefine SDL_VIDEO_DRIVER_RPI @SDL_VIDEO_DRIVER_RPI@ + #cmakedefine SDL_VIDEO_DRIVER_VIVANTE @SDL_VIDEO_DRIVER_VIVANTE@ + #cmakedefine SDL_VIDEO_DRIVER_VIVANTE_VDK @SDL_VIDEO_DRIVER_VIVANTE_VDK@ ++#cmakedefine SDL_VIDEO_DRIVER_MALI @SDL_VIDEO_DRIVER_MALI@ + #cmakedefine SDL_VIDEO_DRIVER_OS2 @SDL_VIDEO_DRIVER_OS2@ + #cmakedefine SDL_VIDEO_DRIVER_QNX @SDL_VIDEO_DRIVER_QNX@ + #cmakedefine SDL_VIDEO_DRIVER_RISCOS @SDL_VIDEO_DRIVER_RISCOS@ +diff -urN sdl2-2.0.22/src/video/mali-fbdev/SDL_maliopengles.c build/sdl2-2.0.22/src/video/mali-fbdev/SDL_maliopengles.c +--- a/src/video/mali-fbdev/SDL_maliopengles.c 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliopengles.c 2022-09-12 15:58:19.342361438 +0000 +@@ -0,0 +1,43 @@ ++/* ++ Simple DirectMedia Layer ++ Copyright (C) 1997-2014 Sam Lantinga ++ ++ This software is provided 'as-is', without any express or implied ++ warranty. In no event will the authors be held liable for any damages ++ arising from the use of this software. ++ ++ Permission is granted to anyone to use this software for any purpose, ++ including commercial applications, and to alter it and redistribute it ++ freely, subject to the following restrictions: ++ ++ 1. The origin of this software must not be misrepresented; you must not ++ claim that you wrote the original software. If you use this software ++ in a product, an acknowledgment in the product documentation would be ++ appreciated but is not required. ++ 2. Altered source versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. ++ 3. This notice may not be removed or altered from any source distribution. ++*/ ++#include "../../SDL_internal.h" ++ ++#if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL ++ ++#include "SDL_maliopengles.h" ++#include "SDL_malivideo.h" ++ ++/* EGL implementation of SDL OpenGL support */ ++ ++int ++MALI_GLES_LoadLibrary(_THIS, const char *path) ++{ ++ return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0); ++} ++ ++SDL_EGL_CreateContext_impl(MALI) ++SDL_EGL_SwapWindow_impl(MALI) ++SDL_EGL_MakeCurrent_impl(MALI) ++ ++#endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ ++ ++/* vi: set ts=4 sw=4 expandtab: */ ++ +diff -urN sdl2-2.0.22/src/video/mali-fbdev/SDL_maliopengles.h build/sdl2-2.0.22/src/video/mali-fbdev/SDL_maliopengles.h +--- a/src/video/mali-fbdev/SDL_maliopengles.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_maliopengles.h 2022-09-12 15:58:19.342361438 +0000 +@@ -0,0 +1,48 @@ ++/* ++ Simple DirectMedia Layer ++ Copyright (C) 1997-2014 Sam Lantinga ++ ++ This software is provided 'as-is', without any express or implied ++ warranty. In no event will the authors be held liable for any damages ++ arising from the use of this software. ++ ++ Permission is granted to anyone to use this software for any purpose, ++ including commercial applications, and to alter it and redistribute it ++ freely, subject to the following restrictions: ++ ++ 1. The origin of this software must not be misrepresented; you must not ++ claim that you wrote the original software. If you use this software ++ in a product, an acknowledgment in the product documentation would be ++ appreciated but is not required. ++ 2. Altered source versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. ++ 3. This notice may not be removed or altered from any source distribution. ++*/ ++#include "../../SDL_internal.h" ++ ++#ifndef _SDL_maliopengles_h ++#define _SDL_maliopengles_h ++ ++#if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL ++ ++#include "../SDL_sysvideo.h" ++#include "../SDL_egl_c.h" ++ ++/* OpenGLES functions */ ++#define MALI_GLES_GetAttribute SDL_EGL_GetAttribute ++#define MALI_GLES_GetProcAddress SDL_EGL_GetProcAddress ++#define MALI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary ++#define MALI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval ++#define MALI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval ++#define MALI_GLES_DeleteContext SDL_EGL_DeleteContext ++ ++extern int MALI_GLES_LoadLibrary(_THIS, const char *path); ++extern SDL_GLContext MALI_GLES_CreateContext(_THIS, SDL_Window * window); ++extern int MALI_GLES_SwapWindow(_THIS, SDL_Window * window); ++extern int MALI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); ++ ++#endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ ++ ++#endif /* _SDL_maliopengles_h */ ++ ++/* vi: set ts=4 sw=4 expandtab: */ +diff -urN sdl2-2.0.22/src/video/mali-fbdev/SDL_malivideo.c build/sdl2-2.0.22/src/video/mali-fbdev/SDL_malivideo.c +--- a/src/video/mali-fbdev/SDL_malivideo.c 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_malivideo.c 2022-09-12 15:58:19.342361438 +0000 +@@ -0,0 +1,323 @@ ++/* ++ Simple DirectMedia Layer ++ Copyright (C) 1997-2014 Sam Lantinga ++ ++ This software is provided 'as-is', without any express or implied ++ warranty. In no event will the authors be held liable for any damages ++ arising from the use of this software. ++ ++ Permission is granted to anyone to use this software for any purpose, ++ including commercial applications, and to alter it and redistribute it ++ freely, subject to the following restrictions: ++ ++ 1. The origin of this software must not be misrepresented; you must not ++ claim that you wrote the original software. If you use this software ++ in a product, an acknowledgment in the product documentation would be ++ appreciated but is not required. ++ 2. Altered source versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. ++ 3. This notice may not be removed or altered from any source distribution. ++*/ ++#include "../../SDL_internal.h" ++ ++#if SDL_VIDEO_DRIVER_MALI ++ ++/* SDL internals */ ++#include "../SDL_sysvideo.h" ++#include "SDL_version.h" ++#include "SDL_syswm.h" ++#include "SDL_loadso.h" ++#include "SDL_events.h" ++#include "../../events/SDL_events_c.h" ++ ++#ifdef SDL_INPUT_LINUXEV ++#include "../../core/linux/SDL_evdev.h" ++#endif ++ ++#include "SDL_malivideo.h" ++#include "SDL_maliopengles.h" ++ ++ ++//static int ++//MALI_Available(void) ++//{ ++// return 1; ++//} ++ ++static void ++MALI_Destroy(SDL_VideoDevice * device) ++{ ++ if (device->driverdata != NULL) { ++ SDL_free(device->driverdata); ++ device->driverdata = NULL; ++ } ++} ++ ++static SDL_VideoDevice * ++MALI_Create() ++{ ++ SDL_VideoDevice *device; ++ ++ /* Initialize SDL_VideoDevice structure */ ++ device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); ++ if (device == NULL) { ++ SDL_OutOfMemory(); ++ return NULL; ++ } ++ ++ device->driverdata = NULL; ++ ++ /* Setup amount of available displays and current display */ ++ device->num_displays = 0; ++ ++ /* Set device free function */ ++ device->free = MALI_Destroy; ++ ++ /* Setup all functions which we can handle */ ++ device->VideoInit = MALI_VideoInit; ++ device->VideoQuit = MALI_VideoQuit; ++ device->GetDisplayModes = MALI_GetDisplayModes; ++ device->SetDisplayMode = MALI_SetDisplayMode; ++ device->CreateSDLWindow = MALI_CreateWindow; ++ device->SetWindowTitle = MALI_SetWindowTitle; ++ device->SetWindowPosition = MALI_SetWindowPosition; ++ device->SetWindowSize = MALI_SetWindowSize; ++ device->ShowWindow = MALI_ShowWindow; ++ device->HideWindow = MALI_HideWindow; ++ device->DestroyWindow = MALI_DestroyWindow; ++ device->GetWindowWMInfo = MALI_GetWindowWMInfo; ++ ++ device->GL_LoadLibrary = MALI_GLES_LoadLibrary; ++ device->GL_GetProcAddress = MALI_GLES_GetProcAddress; ++ device->GL_UnloadLibrary = MALI_GLES_UnloadLibrary; ++ device->GL_CreateContext = MALI_GLES_CreateContext; ++ device->GL_MakeCurrent = MALI_GLES_MakeCurrent; ++ device->GL_SetSwapInterval = MALI_GLES_SetSwapInterval; ++ device->GL_GetSwapInterval = MALI_GLES_GetSwapInterval; ++ device->GL_SwapWindow = MALI_GLES_SwapWindow; ++ device->GL_DeleteContext = MALI_GLES_DeleteContext; ++ ++ device->PumpEvents = MALI_PumpEvents; ++ ++ return device; ++} ++ ++VideoBootStrap MALI_bootstrap = { ++ "mali", ++ "Mali EGL Video Driver", ++// MALI_Available, ++ MALI_Create ++}; ++ ++/*****************************************************************************/ ++/* SDL Video and Display initialization/handling functions */ ++/*****************************************************************************/ ++ ++int ++MALI_VideoInit(_THIS) ++{ ++ SDL_VideoDisplay display; ++ SDL_DisplayMode current_mode; ++ SDL_DisplayData *data; ++ struct fb_var_screeninfo vinfo; ++ int fd; ++ ++ data = (SDL_DisplayData *) SDL_calloc(1, sizeof(SDL_DisplayData)); ++ if (data == NULL) { ++ return SDL_OutOfMemory(); ++ } ++ ++ fd = open("/dev/fb0", O_RDWR, 0); ++ if (fd < 0) { ++ return SDL_SetError("mali-fbdev: Could not open framebuffer device"); ++ } ++ ++ if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) { ++ MALI_VideoQuit(_this); ++ return SDL_SetError("mali-fbdev: Could not get framebuffer information"); ++ } ++ /* Enable triple buffering */ ++ /* ++ vinfo.yres_virtual = vinfo.yres * 3; ++ if (ioctl(fd, FBIOPUT_VSCREENINFO, vinfo) == -1) { ++ printf("mali-fbdev: Error setting VSCREENINFO\n"); ++ } ++ */ ++ close(fd); ++// system("setterm -cursor off"); ++ ++ data->native_display.width = vinfo.xres; ++ data->native_display.height = vinfo.yres; ++ ++ SDL_zero(current_mode); ++ current_mode.w = vinfo.xres; ++ current_mode.h = vinfo.yres; ++ /* FIXME: Is there a way to tell the actual refresh rate? */ ++ current_mode.refresh_rate = 60; ++ /* 32 bpp for default */ ++ //current_mode.format = SDL_PIXELFORMAT_ABGR8888; ++ current_mode.format = SDL_PIXELFORMAT_RGBX8888; ++ ++ current_mode.driverdata = NULL; ++ ++ SDL_zero(display); ++ display.desktop_mode = current_mode; ++ display.current_mode = current_mode; ++ display.driverdata = data; ++ ++ SDL_AddVideoDisplay(&display, SDL_FALSE); ++ ++#ifdef SDL_INPUT_LINUXEV ++ if (SDL_EVDEV_Init() < 0) { ++ return -1; ++ } ++#endif ++ ++ return 0; ++} ++ ++void ++MALI_VideoQuit(_THIS) ++{ ++ /* Clear the framebuffer and ser cursor on again */ ++// int fd = open("/dev/tty", O_RDWR); ++// ioctl(fd, VT_ACTIVATE, 5); ++// ioctl(fd, VT_ACTIVATE, 1); ++// close(fd); ++// system("setterm -cursor on"); ++ ++#ifdef SDL_INPUT_LINUXEV ++ SDL_EVDEV_Quit(); ++#endif ++ ++} ++ ++void ++MALI_GetDisplayModes(_THIS, SDL_VideoDisplay * display) ++{ ++ /* Only one display mode available, the current one */ ++ SDL_AddDisplayMode(display, &display->current_mode); ++} ++ ++int ++MALI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) ++{ ++ return 0; ++} ++ ++int ++MALI_CreateWindow(_THIS, SDL_Window * window) ++{ ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata; ++ ++ displaydata = SDL_GetDisplayDriverData(0); ++ ++ /* Allocate window internal data */ ++ windowdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); ++ if (windowdata == NULL) { ++ return SDL_OutOfMemory(); ++ } ++ ++ /* Windows have one size for now */ ++ window->w = displaydata->native_display.width; ++ window->h = displaydata->native_display.height; ++ ++ /* OpenGL ES is the law here */ ++ window->flags |= SDL_WINDOW_OPENGL; ++ ++ if (!_this->egl_data) { ++ if (SDL_GL_LoadLibrary(NULL) < 0) { ++ return -1; ++ } ++ } ++ windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); ++ ++ if (windowdata->egl_surface == EGL_NO_SURFACE) { ++ MALI_VideoQuit(_this); ++ return SDL_SetError("mali-fbdev: Can't create EGL window surface"); ++ } ++ ++ /* Setup driver data for this window */ ++ window->driverdata = windowdata; ++ ++ /* One window, it always has focus */ ++ SDL_SetMouseFocus(window); ++ SDL_SetKeyboardFocus(window); ++ ++ /* Window has been successfully created */ ++ return 0; ++} ++ ++void ++MALI_DestroyWindow(_THIS, SDL_Window * window) ++{ ++ SDL_WindowData *data; ++ ++ data = window->driverdata; ++ if (data) { ++ if (data->egl_surface != EGL_NO_SURFACE) { ++ SDL_EGL_DestroySurface(_this, data->egl_surface); ++ data->egl_surface = EGL_NO_SURFACE; ++ } ++ SDL_free(data); ++ } ++ window->driverdata = NULL; ++} ++ ++void ++MALI_SetWindowTitle(_THIS, SDL_Window * window) ++{ ++} ++ ++void ++MALI_SetWindowPosition(_THIS, SDL_Window * window) ++{ ++} ++ ++void ++MALI_SetWindowSize(_THIS, SDL_Window * window) ++{ ++} ++ ++void ++MALI_ShowWindow(_THIS, SDL_Window * window) ++{ ++} ++ ++void ++MALI_HideWindow(_THIS, SDL_Window * window) ++{ ++} ++ ++/*****************************************************************************/ ++/* SDL Window Manager function */ ++/*****************************************************************************/ ++SDL_bool ++MALI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) ++{ ++ if (info->version.major <= SDL_MAJOR_VERSION) { ++ return SDL_TRUE; ++ } else { ++ SDL_SetError("application not compiled with SDL %d.%d\n", ++ SDL_MAJOR_VERSION, SDL_MINOR_VERSION); ++ } ++ ++ /* Failed to get window manager information */ ++ return SDL_FALSE; ++} ++ ++/*****************************************************************************/ ++/* SDL event functions */ ++/*****************************************************************************/ ++void MALI_PumpEvents(_THIS) ++{ ++#ifdef SDL_INPUT_LINUXEV ++ SDL_EVDEV_Poll(); ++#endif ++} ++ ++#endif /* SDL_VIDEO_DRIVER_MALI */ ++ ++/* vi: set ts=4 sw=4 expandtab: */ ++ +diff -urN sdl2-2.0.22/src/video/mali-fbdev/SDL_malivideo.h build/sdl2-2.0.22/src/video/mali-fbdev/SDL_malivideo.h +--- a/src/video/mali-fbdev/SDL_malivideo.h 1970-01-01 00:00:00.000000000 +0000 ++++ b/src/video/mali-fbdev/SDL_malivideo.h 2022-09-12 15:58:19.342361438 +0000 +@@ -0,0 +1,79 @@ ++/* ++ Simple DirectMedia Layer ++ Copyright (C) 1997-2014 Sam Lantinga ++ ++ This software is provided 'as-is', without any express or implied ++ warranty. In no event will the authors be held liable for any damages ++ arising from the use of this software. ++ ++ Permission is granted to anyone to use this software for any purpose, ++ including commercial applications, and to alter it and redistribute it ++ freely, subject to the following restrictions: ++ ++ 1. The origin of this software must not be misrepresented; you must not ++ claim that you wrote the original software. If you use this software ++ in a product, an acknowledgment in the product documentation would be ++ appreciated but is not required. ++ 2. Altered source versions must be plainly marked as such, and must not be ++ misrepresented as being the original software. ++ 3. This notice may not be removed or altered from any source distribution. ++*/ ++ ++#ifndef _SDL_malivideo_h ++#define _SDL_malivideo_h ++ ++#include "../../SDL_internal.h" ++#include "../SDL_sysvideo.h" ++ ++#include "SDL_egl.h" ++ ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++#include ++ ++typedef struct SDL_DisplayData ++{ ++ struct { ++ unsigned short width; ++ unsigned short height; ++ } native_display; ++} SDL_DisplayData; ++ ++typedef struct SDL_WindowData ++{ ++ EGLSurface egl_surface; ++} SDL_WindowData; ++ ++/****************************************************************************/ ++/* SDL_VideoDevice functions declaration */ ++/****************************************************************************/ ++ ++/* Display and window functions */ ++int MALI_VideoInit(_THIS); ++void MALI_VideoQuit(_THIS); ++void MALI_GetDisplayModes(_THIS, SDL_VideoDisplay * display); ++int MALI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); ++int MALI_CreateWindow(_THIS, SDL_Window * window); ++void MALI_SetWindowTitle(_THIS, SDL_Window * window); ++void MALI_SetWindowPosition(_THIS, SDL_Window * window); ++void MALI_SetWindowSize(_THIS, SDL_Window * window); ++void MALI_ShowWindow(_THIS, SDL_Window * window); ++void MALI_HideWindow(_THIS, SDL_Window * window); ++void MALI_DestroyWindow(_THIS, SDL_Window * window); ++ ++/* Window manager function */ ++SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window * window, ++ struct SDL_SysWMinfo *info); ++ ++/* Event functions */ ++void MALI_PumpEvents(_THIS); ++ ++#endif /* _SDL_malivideo_h */ ++ ++/* vi: set ts=4 sw=4 expandtab: */ ++ +diff -urN sdl2-2.0.22/src/video/SDL_egl.c build/sdl2-2.0.22/src/video/SDL_egl.c +--- a/src/video/SDL_egl.c 2022-09-13 19:22:27.575790497 +0000 ++++ b/src/video/SDL_egl.c 2022-09-12 15:58:19.342361438 +0000 +@@ -66,7 +66,7 @@ + #define DEFAULT_OGL_ES_PVR (vc4 ? "libGLES_CM.so.1" : "libbrcmGLESv2.so") + #define DEFAULT_OGL_ES (vc4 ? "libGLESv1_CM.so.1" : "libbrcmGLESv2.so") + +-#elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE ++#elif SDL_VIDEO_DRIVER_ANDROID || SDL_VIDEO_DRIVER_VIVANTE || defined(SDL_VIDEO_DRIVER_MALI) + /* Android */ + #define DEFAULT_EGL "libEGL.so" + #define DEFAULT_OGL_ES2 "libGLESv2.so" +diff -urN sdl2-2.0.22/src/video/SDL_sysvideo.h build/sdl2-2.0.22/src/video/SDL_sysvideo.h +--- a/src/video/SDL_sysvideo.h 2022-04-09 01:19:19.000000000 +0000 ++++ b/src/video/SDL_sysvideo.h 2022-09-12 15:58:19.342361438 +0000 +@@ -453,6 +453,7 @@ + extern VideoBootStrap Wayland_bootstrap; + extern VideoBootStrap NACL_bootstrap; + extern VideoBootStrap VIVANTE_bootstrap; ++extern VideoBootStrap MALI_bootstrap; + extern VideoBootStrap Emscripten_bootstrap; + extern VideoBootStrap QNX_bootstrap; + extern VideoBootStrap OFFSCREEN_bootstrap; +diff -urN sdl2-2.0.22/src/video/SDL_video.c build/sdl2-2.0.22/src/video/SDL_video.c +--- a/src/video/SDL_video.c 2022-04-21 17:37:37.000000000 +0000 ++++ b/src/video/SDL_video.c 2022-09-12 15:58:19.342361438 +0000 +@@ -77,6 +77,9 @@ + #if SDL_VIDEO_DRIVER_VIVANTE + &VIVANTE_bootstrap, + #endif ++#ifdef SDL_VIDEO_DRIVER_MALI ++ &MALI_bootstrap, ++#endif + #if SDL_VIDEO_DRIVER_DIRECTFB + &DirectFB_bootstrap, + #endif diff --git a/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0002-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch b/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0002-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch new file mode 100644 index 00000000000..262ac5912a2 --- /dev/null +++ b/board/batocera/allwinner/h700/rg35xx-plus/patches/sdl2/0002-mali-fbdev-Implemented-MALI-Zero-Copy-fbdev-rotation.patch @@ -0,0 +1,1769 @@ +From cff95e49a3d6ef5365ce248a3bbfacffe8e88735 Mon Sep 17 00:00:00 2001 +From: JohnnyonFlame +Date: Sat, 27 Apr 2024 03:53:43 -0300 +Subject: [PATCH] mali-fbdev: Implemented MALI Zero-Copy fbdev rotation/scaler. + +--- + src/video/SDL_egl.c | 2 + + src/video/SDL_egl_c.h | 9 +- + src/video/mali-fbdev/SDL_maliblitter.c | 586 ++++++++++++++++++ + src/video/mali-fbdev/SDL_maliblitter.h | 55 ++ + .../mali-fbdev/SDL_maliblitter_egl_funcs.h | 30 + + .../mali-fbdev/SDL_maliblitter_gles_funcs.h | 60 ++ + src/video/mali-fbdev/SDL_maliopengles.c | 52 +- + src/video/mali-fbdev/SDL_maliopengles.h | 3 +- + src/video/mali-fbdev/SDL_malivideo.c | 304 ++++++++- + src/video/mali-fbdev/SDL_malivideo.h | 40 +- + src/video/mali-fbdev/ion.h | 247 ++++++++ + src/video/mali-fbdev/mali.h | 59 ++ + 12 files changed, 1407 insertions(+), 40 deletions(-) + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.c + create mode 100644 src/video/mali-fbdev/SDL_maliblitter.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h + create mode 100644 src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h + create mode 100644 src/video/mali-fbdev/ion.h + create mode 100644 src/video/mali-fbdev/mali.h + +diff --git a/src/video/SDL_egl.c b/src/video/SDL_egl.c +index 47f5e6ee7..9913be03f 100644 +--- a/src/video/SDL_egl.c ++++ b/src/video/SDL_egl.c +@@ -432,8 +432,10 @@ static int SDL_EGL_LoadLibraryInternal(_THIS, const char *egl_path) + LOAD_FUNC(eglGetConfigAttrib); + LOAD_FUNC(eglCreateContext); + LOAD_FUNC(eglDestroyContext); ++ LOAD_FUNC(eglCreatePixmapSurface); + LOAD_FUNC(eglCreatePbufferSurface); + LOAD_FUNC(eglCreateWindowSurface); ++ LOAD_FUNC(eglGetCurrentSurface); + LOAD_FUNC(eglDestroySurface); + LOAD_FUNC(eglMakeCurrent); + LOAD_FUNC(eglSwapBuffers); +diff --git a/src/video/SDL_egl_c.h b/src/video/SDL_egl_c.h +index feb889a1c..f1f8052b5 100644 +--- a/src/video/SDL_egl_c.h ++++ b/src/video/SDL_egl_c.h +@@ -67,7 +67,12 @@ typedef struct SDL_EGL_VideoData + const EGLint * attrib_list); + + EGLBoolean(EGLAPIENTRY *eglDestroyContext) (EGLDisplay dpy, EGLContext ctx); +- ++ ++ EGLSurface(EGLAPIENTRY *eglCreatePixmapSurface) (EGLDisplay dpy, ++ EGLConfig config, ++ NativePixmapType pixmap, ++ const EGLint * attrib_list); ++ + EGLSurface(EGLAPIENTRY *eglCreatePbufferSurface)(EGLDisplay dpy, EGLConfig config, + EGLint const* attrib_list); + +@@ -76,6 +81,8 @@ typedef struct SDL_EGL_VideoData + NativeWindowType window, + const EGLint * attrib_list); + EGLBoolean(EGLAPIENTRY *eglDestroySurface) (EGLDisplay dpy, EGLSurface surface); ++ ++ EGLSurface(EGLAPIENTRY *eglGetCurrentSurface) (EGLint readdraw); + + EGLBoolean(EGLAPIENTRY *eglMakeCurrent) (EGLDisplay dpy, EGLSurface draw, + EGLSurface read, EGLContext ctx); +diff --git a/src/video/mali-fbdev/SDL_maliblitter.c b/src/video/mali-fbdev/SDL_maliblitter.c +new file mode 100644 +index 000000000..e335938a1 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter.c +@@ -0,0 +1,586 @@ ++#include "../../SDL_internal.h" ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "SDL.h" ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" ++ ++#define MAX_CONFIGS 128 ++ ++/* used to simplify code */ ++typedef struct mat4 { ++ GLfloat v[16]; ++} mat4; ++ ++static GLchar* blit_vert_fmt = ++"#version 100\n" ++"varying vec2 vTexCoord;\n" ++"attribute vec2 aVertCoord;\n" ++"attribute vec2 aTexCoord;\n" ++"uniform mat4 uProj;\n" ++"uniform vec2 uTexSize;\n" ++"void main() {\n" ++" %s\n" ++" %s\n" ++" gl_Position = uProj * vec4(aVertCoord, 0.0, 1.0);\n" ++"}"; ++ ++static GLchar* blit_frag_standard = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" gl_FragColor = texture2D(uFBOTex, vTexCoord);\n" ++"}\n"; ++ ++// Ported from TheMaister's sharp-bilinear-simple.slang ++static GLchar* blit_frag_bilinear_simple = ++"#version 100\n" ++"precision mediump float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 texel_floored = floor(vTexCoord);\n" ++" vec2 s = fract(vTexCoord);\n" ++" vec2 region_range = 0.5 - 0.5 / uScale;\n" ++" vec2 center_dist = s - 0.5;\n" ++" vec2 f = (center_dist - clamp(center_dist, -region_range, region_range)) * uScale + 0.5;\n" ++" vec2 mod_texel = texel_floored + f;\n" ++" gl_FragColor = texture2D(uFBOTex, mod_texel / uTexSize);\n" ++"}\n"; ++ ++// Ported from Iquilez ++static GLchar* blit_frag_quilez = ++"#version 100\n" ++"precision highp float;\n" ++"varying vec2 vTexCoord;\n" ++"uniform sampler2D uFBOTex;\n" ++"uniform vec2 uTexSize;\n" ++"uniform vec2 uScale;\n" ++"void main() {\n" ++" vec2 p = vTexCoord + 0.5;\n" ++" vec2 i = floor(p);\n" ++" vec2 f = p - i;\n" ++" f = f*f*f*(f*(f*6.0-15.0)+10.0);\n" ++" p = i + f;\n" ++" p = (p - 0.5)/uTexSize;\n" ++" gl_FragColor = texture2D( uFBOTex, p );\n" ++"}\n"; ++ ++int MALI_Blitter_CreateContext(_THIS, MALI_Blitter *blitter, NativeWindowType nw) ++{ ++ /* max 14 values plus terminator. */ ++ EGLint screen_attribs[] = { ++ EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, ++ EGL_SURFACE_TYPE, EGL_WINDOW_BIT, ++ EGL_RED_SIZE, 8, ++ EGL_GREEN_SIZE, 8, ++ EGL_BLUE_SIZE, 8, ++ EGL_ALPHA_SIZE, 8, ++ EGL_DEPTH_SIZE, 0, ++ EGL_STENCIL_SIZE, 0, ++ EGL_NONE ++ }; ++ ++ EGLint window_attribs[] = { ++ EGL_NONE, ++ }; ++ ++ EGLint context_attribs[] = { ++ EGL_CONTEXT_CLIENT_VERSION, 2, ++ EGL_NONE ++ }; ++ ++ EGLConfig configs[MAX_CONFIGS]; ++ EGLint config_chosen, config_count; ++ ++ if (!_this->egl_data) { ++ SDL_SetError("EGL not initialized"); ++ return 0; ++ } ++ ++ blitter->egl_display = _this->egl_data->egl_display; ++ if (blitter->eglGetConfigs(blitter->egl_display, configs, MAX_CONFIGS, &config_count) == EGL_FALSE) { ++ SDL_EGL_SetError("mali-fbdev: No compatible EGL configs", "eglGetConfigs"); ++ return 0; ++ } ++ ++ if (!blitter->eglChooseConfig(blitter->egl_display, screen_attribs, configs, MAX_CONFIGS, &config_chosen)) ++ { ++ SDL_EGL_SetError("mali-fbdev: Failed to choose an EGL config", "eglChooseConfig"); ++ return 0; ++ } ++ ++ blitter->gl_context = blitter->eglCreateContext(blitter->egl_display, ++ configs[0], ++ EGL_NO_CONTEXT, context_attribs); ++ if (blitter->gl_context == EGL_NO_CONTEXT) { ++ SDL_EGL_SetError("mali-fbdev: Could not create EGL context", "eglCreateContext"); ++ return 0; ++ } ++ ++ blitter->egl_surface = blitter->eglCreateWindowSurface(blitter->egl_display, configs[0], nw, window_attribs); ++ if (blitter->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: failed to create window surface", "eglCreateContext"); ++ return 0; ++ } ++ ++ return 1; ++} ++ ++static void ++get_aspect_correct_coords(int viewport[2], int plane[2], int rotation, GLfloat vert[4][4], GLfloat scale[2]) ++{ ++ /* FIXME: Sorry for the spaghetti! */ ++ float aspect_plane, aspect_viewport, ratio_x, ratio_y; ++ int shift_x, shift_y, temp; ++ ++ // when sideways, invert plane coords ++ if (rotation & 1) { ++ temp = plane[0]; ++ plane[0] = plane[1]; ++ plane[1] = temp; ++ } ++ ++ // Choose which edge to touch ++ aspect_plane = (float)plane[0] / plane[1]; ++ aspect_viewport = (float)viewport[0] / viewport[1]; ++ ++ if (aspect_viewport > aspect_plane) { ++ // viewport wider than plane ++ ratio_x = plane[0] * (float)((float)viewport[1] / plane[1]); ++ ratio_y = viewport[1]; ++ shift_x = (viewport[0] - ratio_x) / 2.0f; ++ shift_y = 0; ++ } else { ++ // plane wider than viewport ++ ratio_x = viewport[0]; ++ ratio_y = plane[1] * (float)((float)viewport[0] / plane[0]); ++ shift_x = 0; ++ shift_y = (viewport[1] - ratio_y) / 2.0f; ++ } ++ ++ // Instead of normalized UVs, use full texture size. ++ vert[0][2] = (int)(0.0f * plane[0]); vert[0][3] = (int)(0.0f * plane[1]); ++ vert[1][2] = (int)(0.0f * plane[0]); vert[1][3] = (int)(1.0f * plane[1]); ++ vert[2][2] = (int)(1.0f * plane[0]); vert[2][3] = (int)(0.0f * plane[1]); ++ vert[3][2] = (int)(1.0f * plane[0]); vert[3][3] = (int)(1.0f * plane[1]); ++ ++ // Get aspect corrected sizes within pixel boundaries ++ vert[0][0] = (int)(0.0f * ratio_x) + shift_x; vert[0][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[1][0] = (int)(0.0f * ratio_x) + shift_x; vert[1][1] = (int)(1.0f * ratio_y) + shift_y; ++ vert[2][0] = (int)(1.0f * ratio_x) + shift_x; vert[2][1] = (int)(0.0f * ratio_y) + shift_y; ++ vert[3][0] = (int)(1.0f * ratio_x) + shift_x; vert[3][1] = (int)(1.0f * ratio_y) + shift_y; ++ ++ // Get scale, for filtering. ++ scale[0] = ratio_x / plane[0]; ++ scale[1] = ratio_y / plane[1]; ++} ++ ++static ++void mat_ortho(float left, float right, float bottom, float top, float Result[4][4]) ++{ ++ *(mat4*)Result = (mat4){{[0 ... 15] = 0}}; ++ Result[0][0] = 2.0f / (right - left); ++ Result[1][1] = 2.0f / (top - bottom); ++ Result[2][2] = -1.0f; ++ Result[3][0] = - (right + left) / (right - left); ++ Result[3][1] = - (top + bottom) / (top - bottom); ++ Result[3][3] = 1.0f; ++} ++ ++static void ++MALI_Blitter_GetTexture(_THIS, MALI_Blitter *blitter, MALI_EGL_Surface *surf) ++{ ++ /* Define attributes of the EGLImage that will import our dmabuf file descriptor */ ++ EGLint attribute_list[] = { ++ EGL_WIDTH, blitter->plane_width, ++ EGL_HEIGHT, blitter->plane_height, ++ EGL_LINUX_DRM_FOURCC_EXT, DRM_FORMAT_XRGB8888, ++ EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0, ++ EGL_DMA_BUF_PLANE0_PITCH_EXT, blitter->plane_pitch, ++ EGL_DMA_BUF_PLANE0_FD_EXT, surf->dmabuf_fd, ++ EGL_NONE ++ }; ++ ++ /* Now create the EGLImage object. */ ++ surf->egl_image = blitter->eglCreateImageKHR(blitter->egl_display, ++ EGL_NO_CONTEXT, ++ EGL_LINUX_DMA_BUF_EXT, ++ (EGLClientBuffer)NULL, ++ attribute_list); ++ if (surf->egl_image == EGL_NO_IMAGE_KHR) { ++ SDL_EGL_SetError("Failed to create Blitter EGL Image", "eglCreateImageKHR"); ++ return; ++ } ++ ++ /* Create a texture to host our image */ ++ blitter->glGenTextures(1, &surf->texture); ++ blitter->glActiveTexture(GL_TEXTURE0); ++ blitter->glBindTexture(GL_TEXTURE_2D, surf->texture); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); ++ blitter->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); ++ ++ /* And populate our texture with the EGLImage */ ++ blitter->glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, surf->egl_image); ++} ++ ++int ++MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation) ++{ ++ char *use_hq_scaler; ++ GLchar msg[2048] = {}, blit_vert[2048] = {}; ++ const GLchar *sources[2] = { blit_vert, blit_frag_standard }; ++ float scale[2]; ++ ++ /* ++ * SDL_HQ_SCALER: Selects one of the available scalers: ++ * - 0: Linear filtering ++ * - 1: Sharp Bilinear Simple ++ * - 2: Quilez ++ */ ++ if ((use_hq_scaler = SDL_getenv("SDL_HQ_SCALER")) != NULL && *use_hq_scaler != '0') { ++ switch (*use_hq_scaler) { ++ case '1': sources[1] = blit_frag_bilinear_simple; break; ++ case '2': sources[1] = blit_frag_quilez; break; ++ default: use_hq_scaler = NULL; break; ++ } ++ } else { ++ use_hq_scaler = NULL; ++ } ++ ++ /* Bail out early if we're already initialized. */ ++ if (blitter->initted) { ++ return 1; ++ } ++ ++ /* The blitter thread needs to have an OpenGL ES 2.0 context available! */ ++ if (!MALI_Blitter_CreateContext(_this, blitter, nw)) { ++ return 0; ++ } ++ ++ if (!blitter->eglMakeCurrent(blitter->egl_display, ++ blitter->egl_surface, ++ blitter->egl_surface, ++ blitter->gl_context)) ++ { ++ SDL_EGL_SetError("Unable to make blitter EGL context current", "eglMakeCurrent"); ++ return 0; ++ } ++ ++ /* Setup vertex shader coord orientation */ ++ SDL_snprintf(blit_vert, sizeof(blit_vert), blit_vert_fmt, ++ /* rotation */ ++ (rotation == 0) ? "vTexCoord = aTexCoord;" : ++ (rotation == 1) ? "vTexCoord = vec2(aTexCoord.y, -aTexCoord.x);" : ++ (rotation == 2) ? "vTexCoord = vec2(-aTexCoord.x, -aTexCoord.y);" : ++ (rotation == 3) ? "vTexCoord = vec2(-aTexCoord.y, aTexCoord.x);" : ++ "#error Orientation out of scope", ++ /* scalers */ ++ (use_hq_scaler) ? "vTexCoord = vTexCoord;" ++ : "vTexCoord = vTexCoord / uTexSize;"); ++ ++ /* Compile vertex shader */ ++ blitter->vert = blitter->glCreateShader(GL_VERTEX_SHADER); ++ blitter->glShaderSource(blitter->vert, 1, &sources[0], NULL); ++ blitter->glCompileShader(blitter->vert); ++ blitter->glGetShaderInfoLog(blitter->vert, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Vertex Shader Info: %s\n", msg); ++ ++ /* Compile the fragment shader */ ++ blitter->frag = blitter->glCreateShader(GL_FRAGMENT_SHADER); ++ blitter->glShaderSource(blitter->frag, 1, &sources[1], NULL); ++ blitter->glCompileShader(blitter->frag); ++ blitter->glGetShaderInfoLog(blitter->frag, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Fragment Shader Info: %s\n", msg); ++ ++ blitter->prog = blitter->glCreateProgram(); ++ blitter->glAttachShader(blitter->prog, blitter->vert); ++ blitter->glAttachShader(blitter->prog, blitter->frag); ++ ++ blitter->glLinkProgram(blitter->prog); ++ blitter->loc_aVertCoord = blitter->glGetAttribLocation(blitter->prog, "aVertCoord"); ++ blitter->loc_aTexCoord = blitter->glGetAttribLocation(blitter->prog, "aTexCoord"); ++ blitter->loc_uFBOtex = blitter->glGetUniformLocation(blitter->prog, "uFBOTex"); ++ blitter->loc_uProj = blitter->glGetUniformLocation(blitter->prog, "uProj"); ++ blitter->loc_uTexSize = blitter->glGetUniformLocation(blitter->prog, "uTexSize"); ++ blitter->loc_uScale = blitter->glGetUniformLocation(blitter->prog, "uScale"); ++ ++ blitter->glGetProgramInfoLog(blitter->prog, sizeof(msg), NULL, msg); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "Blitter Program Info: %s\n", msg); ++ ++ /* Setup programs */ ++ blitter->glUseProgram(blitter->prog); ++ blitter->glUniform1i(blitter->loc_uFBOtex, 0); ++ ++ /* Prepare projection and aspect corrected bounds */ ++ mat_ortho(0, blitter->viewport_width, 0, blitter->viewport_height, blitter->mat_projection); ++ get_aspect_correct_coords( ++ (int [2]){blitter->viewport_width, blitter->viewport_height}, ++ (int [2]){blitter->plane_width, blitter->plane_height}, ++ rotation, ++ blitter->vert_buffer_data, ++ scale ++ ); ++ ++ /* Setup viewport, projection, scale, texture size */ ++ blitter->glViewport(0, 0, blitter->viewport_width, blitter->viewport_height); ++ blitter->glUniformMatrix4fv(blitter->loc_uProj, 1, 0, (GLfloat*)blitter->mat_projection); ++ blitter->glUniform2f(blitter->loc_uScale, scale[0], scale[1]); ++ blitter->glUniform2f(blitter->loc_uTexSize, blitter->plane_width, blitter->plane_height); ++ ++ /* Generate buffers */ ++ blitter->glGenBuffers(1, &blitter->vbo); ++ blitter->glGenVertexArraysOES(1, &blitter->vao); ++ ++ /* Populate buffers */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindBuffer(GL_ARRAY_BUFFER, blitter->vbo); ++ blitter->glEnableVertexAttribArray(blitter->loc_aVertCoord); ++ blitter->glEnableVertexAttribArray(blitter->loc_aTexCoord); ++ blitter->glVertexAttribPointer(blitter->loc_aVertCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(0 * sizeof(float))); ++ blitter->glVertexAttribPointer(blitter->loc_aTexCoord, 2, GL_FLOAT, GL_FALSE, 4 * sizeof(float), (void*)(2 * sizeof(float))); ++ blitter->glBufferData(GL_ARRAY_BUFFER, sizeof(blitter->vert_buffer_data), blitter->vert_buffer_data, GL_STATIC_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(windata->surface); i++) { ++ MALI_Blitter_GetTexture(_this, blitter, &windata->surface[i]); ++ } ++ ++ blitter->initted = 1; ++ return 1; ++} ++ ++void ++MALI_DeinitBlitterContext(_THIS, MALI_Blitter *blitter) ++{ ++ int i; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ ++ /* Delete all texture and related egl objects */ ++ if (blitter->window) { ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ ++ blitter->glBindTexture(GL_TEXTURE_2D, 0); ++ for (i = 0; i < SDL_arraysize(windata->surface); i++) { ++ blitter->glDeleteTextures(1, &windata->surface[i].texture); ++ blitter->eglDestroyImageKHR(blitter->egl_display, windata->surface[i].egl_image); ++ } ++ } ++ ++ /* Tear down egl */ ++ blitter->eglMakeCurrent(blitter->egl_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT); ++ blitter->eglDestroySurface(blitter->egl_display, blitter->egl_surface); ++ blitter->eglDestroyContext(blitter->egl_display, blitter->gl_context); ++ blitter->eglReleaseThread(); ++ ++ blitter->window = NULL; ++ blitter->initted = 0; ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_BlitterThread: Released thread.\n"); ++} ++ ++void ++MALI_Blitter_Blit(_THIS, MALI_Blitter *blitter, GLuint texture) ++{ ++ /* Simple quad rendering. */ ++ blitter->glBindVertexArrayOES(blitter->vao); ++ blitter->glBindTexture(GL_TEXTURE_2D, texture); ++ blitter->glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); ++} ++ ++static void MALI_Blitter_LoadFuncs(MALI_Blitter *blitter) ++{ ++ int fail = 0; ++ blitter->egl_obj = SDL_LoadObject("libEGL.so"); ++ blitter->gles2_obj = SDL_LoadObject("libGLESv2.so"); ++ if (!blitter->egl_obj || !blitter->gles2_obj) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading one or more dynamic libraries (%p %p).", blitter->gles2_obj, blitter->egl_obj); ++ SDL_Quit(); ++ } ++ ++ if ((blitter->eglGetProcAddress = SDL_LoadFunction(blitter->egl_obj, "eglGetProcAddress")) == NULL) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Could not locate eglGetProcAddress."); ++ SDL_Quit(); ++ } ++ ++ /* Attempt to initialize necessary functions */ ++ #define SDL_PROC(ret,func,params) \ ++ blitter->func = blitter->eglGetProcAddress(#func); \ ++ if (blitter->func == NULL) \ ++ blitter->func = SDL_LoadFunction(blitter->egl_obj, #func); \ ++ if (blitter->func == NULL) \ ++ { \ ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed loading \"%s\".", #func); \ ++ fail = 1; \ ++ } ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++ ++ if (fail) { ++ SDL_Quit(); ++ } ++} ++ ++int MALI_BlitterThread(void *data) ++{ ++ int prevSwapInterval = -1; ++ MALI_Blitter *blitter = (MALI_Blitter*)data; ++ _THIS = blitter->_this; ++ SDL_Window *window; ++ SDL_WindowData *windata; ++ SDL_VideoDisplay *display; ++ SDL_DisplayData *dispdata = SDL_GetDisplayDriverData(0); ++ unsigned int page; ++ MALI_EGL_Surface *current_surface; ++ ++ MALI_Blitter_LoadFuncs(blitter); ++ ++ /* Signal triplebuf available */ ++ SDL_LockMutex(blitter->mutex); ++ SDL_CondSignal(blitter->cond); ++ ++ for (;;) { ++ SDL_CondWait(blitter->cond, blitter->mutex); ++ ++ // A thread stop can be either due to reconfigure requested, or due to ++ // SDL teardown, in both cases, we will destroy some resources. ++ if (blitter->thread_stop != 0) { ++ if (blitter->initted) { ++ MALI_DeinitBlitterContext(_this, blitter); ++ } ++ ++ // Signal 2 means we want to quit. ++ if (blitter->thread_stop == 2) { ++ break; ++ } ++ ++ blitter->thread_stop = 0; ++ continue; ++ } ++ ++ window = blitter->window; ++ windata = (SDL_WindowData *)window->driverdata; ++ display = SDL_GetDisplayForWindow(window); ++ dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ /* Initialize blitter on the first out frame we have */ ++ if (!MALI_InitBlitterContext(_this, blitter, windata, (NativeWindowType)&dispdata->native_display, blitter->rotation)) ++ { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "Failed to initialize blitter thread"); ++ SDL_Quit(); ++ } ++ ++ if (prevSwapInterval != _this->egl_data->egl_swapinterval) { ++ blitter->eglSwapInterval(blitter->egl_display, _this->egl_data->egl_swapinterval); ++ prevSwapInterval = _this->egl_data->egl_swapinterval; ++ } ++ ++ /* Flip the most recent back buffer with the front buffer */ ++ page = windata->queued_buffer; ++ windata->queued_buffer = windata->front_buffer; ++ windata->front_buffer = page; ++ ++ /* select surface to wait and blit */ ++ current_surface = &windata->surface[windata->queued_buffer]; ++ ++ /* wait for fence and flip display */ ++ if (blitter->eglClientWaitSyncKHR( ++ blitter->egl_display, ++ current_surface->egl_fence, ++ EGL_SYNC_FLUSH_COMMANDS_BIT_KHR, ++ EGL_FOREVER_NV)) ++ { ++ /* Discarding previous data... */ ++ blitter->glClear(GL_COLOR_BUFFER_BIT); ++ blitter->glClearColor(0.0, 0.0, 0.0, 1.0); ++ ++ /* Perform blitting */ ++ MALI_Blitter_Blit(_this, blitter, current_surface->texture); ++ ++ /* Perform the final buffer swap. */ ++ if (!(blitter->eglSwapBuffers(blitter->egl_display, blitter->egl_surface))) { ++ SDL_LogError(SDL_LOG_CATEGORY_VIDEO, "eglSwapBuffers failed"); ++ return 0; ++ } ++ } ++ else ++ { ++ SDL_LogWarn(SDL_LOG_CATEGORY_VIDEO, "Sync %p failed.", current_surface->egl_fence); ++ } ++ } ++ ++ /* Signal thread done */ ++ SDL_UnlockMutex(blitter->mutex); ++ return 0; ++} ++ ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter) ++{ ++ if (!blitter) ++ return; ++ ++ blitter->thread_stop = 1; ++ blitter->mutex = SDL_CreateMutex(); ++ blitter->cond = SDL_CreateCond(); ++ blitter->thread = SDL_CreateThread(MALI_BlitterThread, "MALI_BlitterThread", blitter); ++} ++ ++void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter) ++{ ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); ++ SDL_DisplayData *dispdata = (SDL_DisplayData *)display->driverdata; ++ ++ if (!blitter) ++ return; ++ ++ /* Flag a reconfigure request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->window = window; ++ blitter->egl_display = _this->egl_data->egl_display; ++ blitter->viewport_width = dispdata->native_display.width, ++ blitter->viewport_height = dispdata->native_display.height, ++ blitter->plane_width = window->w; ++ blitter->plane_height = window->h; ++ blitter->plane_pitch = dispdata->stride; ++ blitter->rotation = dispdata->rotation; ++ blitter->thread_stop = 1; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++} ++ ++void MALI_BlitterQuit(MALI_Blitter *blitter) ++{ ++ if (blitter == NULL) ++ return; ++ ++ /* Flag a stop request */ ++ SDL_LockMutex(blitter->mutex); ++ blitter->thread_stop = 2; ++ ++ /* Signal thread in order to perform stop */ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ /* Wait and perform teardown */ ++ SDL_WaitThread(blitter->thread, NULL); ++ blitter->thread = NULL; ++ SDL_DestroyMutex(blitter->mutex); ++ SDL_DestroyCond(blitter->cond); ++} ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ +\ No newline at end of file +diff --git a/src/video/mali-fbdev/SDL_maliblitter.h b/src/video/mali-fbdev/SDL_maliblitter.h +new file mode 100644 +index 000000000..ef6b4ffb6 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter.h +@@ -0,0 +1,55 @@ ++#include "../../SDL_internal.h" ++ ++#ifndef _SDL_maliblitter_h ++#define _SDL_maliblitter_h ++ ++#if SDL_VIDEO_OPENGL_EGL ++ ++#include "../SDL_sysvideo.h" ++#include "../SDL_egl_c.h" ++ ++#include "SDL_egl.h" ++#include "SDL_opengl.h" ++ ++typedef struct MALI_Blitter { ++ /* OpenGL Surface and Context */ ++ _THIS; ++ void *gles2_obj, *egl_obj; ++ EGLSurface *egl_surface; ++ EGLDisplay *egl_display; ++ SDL_GLContext *gl_context; ++ SDL_Window *window; ++ EGLConfig config; ++ GLuint frag, vert, prog, vbo, vao; ++ GLint loc_aVertCoord, loc_aTexCoord, loc_uFBOtex, loc_uProj, loc_uTexSize, loc_uScale; ++ GLsizei viewport_width, viewport_height; ++ GLint plane_width, plane_height, plane_pitch; ++ float mat_projection[4][4]; ++ float vert_buffer_data[4][4]; ++ ++ // Triple buffering thread ++ SDL_mutex *mutex; ++ SDL_cond *cond; ++ SDL_Thread *thread; ++ int thread_stop; ++ int rotation; ++ int next; ++ int initted; ++ ++ void *user_data; ++ ++ #define SDL_PROC(ret,func,params) ret (APIENTRY *func) params; ++ #include "SDL_maliblitter_egl_funcs.h" ++ #include "SDL_maliblitter_gles_funcs.h" ++ #undef SDL_PROC ++} MALI_Blitter; ++ ++extern int MALI_InitBlitterContext(_THIS, MALI_Blitter *blitter, SDL_WindowData *windata, NativeWindowType nw, int rotation); ++extern int MALI_BlitterThread(void *data); ++void MALI_BlitterInit(_THIS, MALI_Blitter *blitter); ++extern void MALI_BlitterReconfigure(_THIS, SDL_Window *window, MALI_Blitter *blitter); ++extern void MALI_BlitterQuit(MALI_Blitter *blitter); ++ ++#endif /* SDL_VIDEO_OPENGL_EGL */ ++ ++#endif /* _SDL_maliblitter_h */ +diff --git a/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h b/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h +new file mode 100644 +index 000000000..f18c66161 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter_egl_funcs.h +@@ -0,0 +1,30 @@ ++SDL_PROC(EGLDisplay, eglGetDisplay, (NativeDisplayType display)); ++SDL_PROC(EGLDisplay, eglGetPlatformDisplayEXT, (EGLenum platform, void *native_display, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglInitialize, (EGLDisplay dpy, EGLint * major, EGLint * minor)); ++SDL_PROC(EGLBoolean, eglTerminate, (EGLDisplay dpy)); ++SDL_PROC(void *, eglGetProcAddress, (const char * procName)); ++SDL_PROC(EGLBoolean, eglGetConfigs, (EGLDisplay dpy, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLBoolean, eglChooseConfig, (EGLDisplay dpy, const EGLint * attrib_list, EGLConfig * configs, EGLint config_size, EGLint * num_config)); ++SDL_PROC(EGLContext, eglCreateContext, (EGLDisplay dpy, EGLConfig config, EGLContext share_list, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyContext, (EGLDisplay dpy, EGLContext ctx)); ++SDL_PROC(EGLImageKHR, eglCreateImageKHR, (EGLDisplay display, EGLContext context, EGLenum target, EGLClientBuffer buffer, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroyImageKHR, (EGLDisplay dpy, EGLImageKHR image)); ++SDL_PROC(EGLSurface, eglCreatePixmapSurface, (EGLDisplay dpy, EGLConfig config, NativePixmapType pixmap, const EGLint * attrib_list)); ++SDL_PROC(EGLSurface, eglCreatePbufferSurface, (EGLDisplay dpy, EGLConfig config, EGLint const* attrib_list)); ++SDL_PROC(EGLSurface, eglCreateWindowSurface, (EGLDisplay dpy, EGLConfig config, NativeWindowType window, const EGLint * attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySurface, (EGLDisplay dpy, EGLSurface surface)); ++SDL_PROC(EGLBoolean, eglMakeCurrent, (EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)); ++SDL_PROC(EGLBoolean, eglSwapBuffers, (EGLDisplay dpy, EGLSurface draw)); ++SDL_PROC(EGLBoolean, eglSwapInterval, (EGLDisplay dpy, EGLint interval)); ++SDL_PROC(const char *, eglQueryString, (EGLDisplay dpy, EGLint name)); ++SDL_PROC(EGLenum, eglQueryAPI, (void)); ++SDL_PROC(EGLBoolean, eglGetConfigAttrib, (EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint * value)); ++SDL_PROC(EGLBoolean, eglWaitNative, (EGLint engine)); ++SDL_PROC(EGLBoolean, eglWaitGL, (void)); ++SDL_PROC(EGLBoolean, eglReleaseThread, (void)); ++SDL_PROC(EGLBoolean, eglBindAPI, (EGLenum)); ++SDL_PROC(EGLint, eglGetError, (void)); ++SDL_PROC(EGLSyncKHR, eglCreateSyncKHR, (EGLDisplay dpy, EGLenum type, const EGLint *attrib_list)); ++SDL_PROC(EGLBoolean, eglDestroySyncKHR, (EGLDisplay dpy, EGLSyncKHR sync)); ++//SDL_PROC(EGLint, eglWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags)); ++SDL_PROC(EGLint, eglClientWaitSyncKHR, (EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)); +diff --git a/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h b/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h +new file mode 100644 +index 000000000..3f0e20689 +--- /dev/null ++++ b/src/video/mali-fbdev/SDL_maliblitter_gles_funcs.h +@@ -0,0 +1,60 @@ ++SDL_PROC(void, glActiveTexture, (GLenum)) ++SDL_PROC(void, glAttachShader, (GLuint, GLuint)) ++// SDL_PROC(void, glBindAttribLocation, (GLuint, GLuint, const char *)) ++SDL_PROC(void, glBindTexture, (GLenum, GLuint)) ++// SDL_PROC(void, glBlendEquationSeparate, (GLenum, GLenum)) ++// SDL_PROC(void, glBlendFuncSeparate, (GLenum, GLenum, GLenum, GLenum)) ++SDL_PROC(void, glClear, (GLbitfield)) ++SDL_PROC(void, glClearColor, (GLclampf, GLclampf, GLclampf, GLclampf)) ++SDL_PROC(void, glCompileShader, (GLuint)) ++SDL_PROC(GLuint, glCreateProgram, (void)) ++SDL_PROC(GLuint, glCreateShader, (GLenum)) ++SDL_PROC(void, glDeleteProgram, (GLuint)) ++SDL_PROC(void, glDeleteShader, (GLuint)) ++SDL_PROC(void, glDeleteTextures, (GLsizei, const GLuint *)) ++SDL_PROC(void, glDisable, (GLenum)) ++SDL_PROC(void, glDisableVertexAttribArray, (GLuint)) ++SDL_PROC(void, glDrawArrays, (GLenum, GLint, GLsizei)) ++SDL_PROC(void, glEnable, (GLenum)) ++SDL_PROC(void, glEnableVertexAttribArray, (GLuint)) ++// SDL_PROC(void, glFinish, (void)) ++// SDL_PROC(void, glGenFramebuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glGenTextures, (GLsizei, GLuint *)) ++// SDL_PROC(const GLubyte *, glGetString, (GLenum)) ++SDL_PROC(GLenum, glGetError, (void)) ++// SDL_PROC(void, glGetIntegerv, (GLenum, GLint *)) ++// SDL_PROC(void, glGetProgramiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(void, glGetShaderInfoLog, (GLuint, GLsizei, GLsizei *, char *)) ++// SDL_PROC(void, glGetShaderiv, (GLuint, GLenum, GLint *)) ++SDL_PROC(GLint, glGetUniformLocation, (GLuint, const char *)) ++SDL_PROC(void, glLinkProgram, (GLuint)) ++// SDL_PROC(void, glPixelStorei, (GLenum, GLint)) ++// SDL_PROC(void, glReadPixels, (GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, GLvoid*)) ++// SDL_PROC(void, glScissor, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glShaderBinary, (GLsizei, const GLuint *, GLenum, const void *, GLsizei)) ++SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar* const*, const GLint *)) ++// SDL_PROC(void, glTexImage2D, (GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const void *)) ++SDL_PROC(void, glTexParameteri, (GLenum, GLenum, GLint)) ++// SDL_PROC(void, glTexSubImage2D, (GLenum, GLint, GLint, GLint, GLsizei, GLsizei, GLenum, GLenum, const GLvoid *)) ++SDL_PROC(void, glUniform1i, (GLint, GLint)) ++// SDL_PROC(void, glUniform4f, (GLint, GLfloat, GLfloat, GLfloat, GLfloat)) ++SDL_PROC(void, glUniform2f, (GLint, GLfloat, GLfloat)) ++SDL_PROC(void, glUniformMatrix4fv, (GLint, GLsizei, GLboolean, const GLfloat *)) ++SDL_PROC(void, glUseProgram, (GLuint)) ++SDL_PROC(void, glVertexAttribPointer, (GLuint, GLint, GLenum, GLboolean, GLsizei, const void *)) ++SDL_PROC(void, glViewport, (GLint, GLint, GLsizei, GLsizei)) ++// SDL_PROC(void, glBindFramebuffer, (GLenum, GLuint)) ++// SDL_PROC(void, glFramebufferTexture2D, (GLenum, GLenum, GLenum, GLuint, GLint)) ++// SDL_PROC(GLenum, glCheckFramebufferStatus, (GLenum)) ++// SDL_PROC(void, glDeleteFramebuffers, (GLsizei, const GLuint *)) ++SDL_PROC(GLint, glGetAttribLocation, (GLuint, const GLchar *)) ++SDL_PROC(void, glGetProgramInfoLog, (GLuint, GLsizei, GLsizei*, GLchar*)) ++SDL_PROC(void, glGenBuffers, (GLsizei, GLuint *)) ++SDL_PROC(void, glDeleteBuffers, (GLsizei, const GLuint *)) ++SDL_PROC(void, glBindBuffer, (GLenum, GLuint)) ++SDL_PROC(void, glBufferData, (GLenum, GLsizeiptr, const GLvoid *, GLenum)) ++// SDL_PROC(void, glBufferSubData, (GLenum, GLintptr, GLsizeiptr, const GLvoid *)) ++SDL_PROC(void, glEGLImageTargetTexture2DOES, (GLenum target, GLeglImageOES image)) ++SDL_PROC(void, glBindVertexArrayOES, (GLuint array)) ++SDL_PROC(void, glDeleteVertexArraysOES, (GLsizei n, const GLuint *arrays)) ++SDL_PROC(void, glGenVertexArraysOES, (GLsizei n, GLuint *arrays)) +diff --git a/src/video/mali-fbdev/SDL_maliopengles.c b/src/video/mali-fbdev/SDL_maliopengles.c +index 0e4836d2e..f16a2f76f 100644 +--- a/src/video/mali-fbdev/SDL_maliopengles.c ++++ b/src/video/mali-fbdev/SDL_maliopengles.c +@@ -22,20 +22,64 @@ + + #if SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL + +-#include "SDL_maliopengles.h" + #include "SDL_malivideo.h" ++#include "SDL_maliopengles.h" ++#include "SDL_maliblitter.h" + + /* EGL implementation of SDL OpenGL support */ ++void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor) ++{ ++ /* if SDL was _also_ built with the Raspberry Pi driver (so we're ++ definitely a Pi device), default to GLES2. */ ++ *mask = SDL_GL_CONTEXT_PROFILE_ES; ++ *major = 2; ++ *minor = 0; ++} + + int + MALI_GLES_LoadLibrary(_THIS, const char *path) + { +- return SDL_EGL_LoadLibrary(_this, path, EGL_DEFAULT_DISPLAY, 0); ++ /* Delay loading this until the very end. */ ++ return 0; ++} ++ ++int MALI_GLES_SwapWindow(_THIS, SDL_Window * window) ++{ ++ int r; ++ unsigned int prev; ++ EGLSurface surf; ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata = SDL_GetDisplayDriverData(0); ++ MALI_Blitter *blitter = displaydata->blitter; ++ ++ if (blitter == NULL) ++ return SDL_EGL_SwapBuffers(_this, ((SDL_WindowData *)window->driverdata)->egl_surface); ++ ++ windowdata = (SDL_WindowData*)_this->windows->driverdata; ++ ++ SDL_LockMutex(blitter->mutex); ++ ++ // First create the necessary fence ++ windowdata->surface[windowdata->back_buffer].egl_fence = _this->egl_data->eglCreateSyncKHR(_this->egl_data->egl_display, EGL_SYNC_FENCE_KHR, NULL); ++ ++ // Flip back and front buffers ++ prev = windowdata->front_buffer; ++ windowdata->front_buffer = windowdata->back_buffer; ++ windowdata->back_buffer = prev; ++ ++ // Done, update back buffer surfaces ++ surf = windowdata->surface[windowdata->back_buffer].egl_surface; ++ windowdata->egl_surface = surf; ++ r = _this->egl_data->eglMakeCurrent(_this->egl_data->egl_display, surf, surf, _this->current_glctx); ++ ++ SDL_CondSignal(blitter->cond); ++ SDL_UnlockMutex(blitter->mutex); ++ ++ return (r == EGL_TRUE) ? 0 : SDL_EGL_SetError("Failed to set current surface.", "eglMakeCurrent"); + } + +-SDL_EGL_CreateContext_impl(MALI) +-SDL_EGL_SwapWindow_impl(MALI) + SDL_EGL_MakeCurrent_impl(MALI) ++SDL_EGL_CreateContext_impl(MALI) + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +diff --git a/src/video/mali-fbdev/SDL_maliopengles.h b/src/video/mali-fbdev/SDL_maliopengles.h +index 121af74f9..3741b88d5 100644 +--- a/src/video/mali-fbdev/SDL_maliopengles.h ++++ b/src/video/mali-fbdev/SDL_maliopengles.h +@@ -32,14 +32,13 @@ + #define MALI_GLES_GetAttribute SDL_EGL_GetAttribute + #define MALI_GLES_GetProcAddress SDL_EGL_GetProcAddress + #define MALI_GLES_UnloadLibrary SDL_EGL_UnloadLibrary +-#define MALI_GLES_SetSwapInterval SDL_EGL_SetSwapInterval +-#define MALI_GLES_GetSwapInterval SDL_EGL_GetSwapInterval + #define MALI_GLES_DeleteContext SDL_EGL_DeleteContext + + extern int MALI_GLES_LoadLibrary(_THIS, const char *path); + extern SDL_GLContext MALI_GLES_CreateContext(_THIS, SDL_Window * window); + extern int MALI_GLES_SwapWindow(_THIS, SDL_Window * window); + extern int MALI_GLES_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context); ++extern void MALI_GLES_DefaultProfileConfig(_THIS, int *mask, int *major, int *minor); + + #endif /* SDL_VIDEO_DRIVER_MALI && SDL_VIDEO_OPENGL_EGL */ + +diff --git a/src/video/mali-fbdev/SDL_malivideo.c b/src/video/mali-fbdev/SDL_malivideo.c +index f70ae6431..0024457f1 100644 +--- a/src/video/mali-fbdev/SDL_malivideo.c ++++ b/src/video/mali-fbdev/SDL_malivideo.c +@@ -23,19 +23,21 @@ + #if SDL_VIDEO_DRIVER_MALI + + /* SDL internals */ ++#include "../../events/SDL_events_c.h" + #include "../SDL_sysvideo.h" +-#include "SDL_version.h" +-#include "SDL_syswm.h" +-#include "SDL_loadso.h" + #include "SDL_events.h" +-#include "../../events/SDL_events_c.h" ++#include "SDL_loadso.h" ++#include "SDL_syswm.h" ++#include "SDL_hints.h" ++#include "SDL_version.h" + + #ifdef SDL_INPUT_LINUXEV + #include "../../core/linux/SDL_evdev.h" + #endif + +-#include "SDL_malivideo.h" + #include "SDL_maliopengles.h" ++#include "SDL_malivideo.h" ++#include "SDL_maliblitter.h" + + + //static int +@@ -59,7 +61,7 @@ MALI_Create() + SDL_VideoDevice *device; + + /* Initialize SDL_VideoDevice structure */ +- device = (SDL_VideoDevice *) SDL_calloc(1, sizeof(SDL_VideoDevice)); ++ device = (SDL_VideoDevice *)SDL_calloc(1, sizeof(SDL_VideoDevice)); + if (device == NULL) { + SDL_OutOfMemory(); + return NULL; +@@ -82,6 +84,7 @@ MALI_Create() + device->SetWindowTitle = MALI_SetWindowTitle; + device->SetWindowPosition = MALI_SetWindowPosition; + device->SetWindowSize = MALI_SetWindowSize; ++ device->SetWindowFullscreen = MALI_SetWindowFullscreen; + device->ShowWindow = MALI_ShowWindow; + device->HideWindow = MALI_HideWindow; + device->DestroyWindow = MALI_DestroyWindow; +@@ -96,6 +99,7 @@ MALI_Create() + device->GL_GetSwapInterval = MALI_GLES_GetSwapInterval; + device->GL_SwapWindow = MALI_GLES_SwapWindow; + device->GL_DeleteContext = MALI_GLES_DeleteContext; ++ device->GL_DefaultProfileConfig = MALI_GLES_DefaultProfileConfig; + + device->PumpEvents = MALI_PumpEvents; + +@@ -105,7 +109,7 @@ MALI_Create() + VideoBootStrap MALI_bootstrap = { + "mali", + "Mali EGL Video Driver", +-// MALI_Available, ++ // MALI_Available, + MALI_Create + }; + +@@ -116,6 +120,7 @@ VideoBootStrap MALI_bootstrap = { + int + MALI_VideoInit(_THIS) + { ++ const char *blitter_status = NULL, *rotation = NULL; + SDL_VideoDisplay display; + SDL_DisplayMode current_mode; + SDL_DisplayData *data; +@@ -132,6 +137,11 @@ MALI_VideoInit(_THIS) + return SDL_SetError("mali-fbdev: Could not open framebuffer device"); + } + ++ data->ion_fd = open("/dev/ion", O_RDWR, 0); ++ if (data->ion_fd < 0) { ++ return SDL_SetError("mali-fbdev: Could not open ion device"); ++ } ++ + if (ioctl(fd, FBIOGET_VSCREENINFO, &vinfo) < 0) { + MALI_VideoQuit(_this); + return SDL_SetError("mali-fbdev: Could not get framebuffer information"); +@@ -140,18 +150,41 @@ MALI_VideoInit(_THIS) + /* + vinfo.yres_virtual = vinfo.yres * 3; + if (ioctl(fd, FBIOPUT_VSCREENINFO, vinfo) == -1) { +- printf("mali-fbdev: Error setting VSCREENINFO\n"); ++ printf("mali-fbdev: Error setting VSCREENINFO\n"); + } + */ + close(fd); +-// system("setterm -cursor off"); ++ // system("setterm -cursor off"); + + data->native_display.width = vinfo.xres; + data->native_display.height = vinfo.yres; + ++ /* If the device seems to be portrait mode, set default as rotated. */ ++ data->rotation = (vinfo.xres < vinfo.yres) ? 1 : 0; ++ ++ rotation = SDL_GetHint("SDL_ROTATION"); ++ blitter_status = SDL_GetHint("SDL_BLITTER_DISABLED"); ++ if (rotation != NULL) ++ data->rotation = SDL_atoi(rotation); ++ ++ if (!blitter_status || blitter_status[0] != '1') { ++ data->blitter = SDL_calloc(1, sizeof(MALI_Blitter)); ++ data->blitter->_this = _this; ++ MALI_BlitterInit(_this, data->blitter); ++ } else { ++ data->blitter = NULL; ++ data->rotation = 0; // no rotation when the blitter is off! ++ } ++ + SDL_zero(current_mode); +- current_mode.w = vinfo.xres; +- current_mode.h = vinfo.yres; ++ /* Flip the reported dimensions when rotated. */ ++ if ((data->rotation & 1) == 0) { ++ current_mode.w = vinfo.xres; ++ current_mode.h = vinfo.yres; ++ } else { ++ current_mode.w = vinfo.yres; ++ current_mode.h = vinfo.xres; ++ } + /* FIXME: Is there a way to tell the actual refresh rate? */ + current_mode.refresh_rate = 60; + /* 32 bpp for default */ +@@ -166,7 +199,6 @@ MALI_VideoInit(_THIS) + display.driverdata = data; + + SDL_AddVideoDisplay(&display, SDL_FALSE); +- + #ifdef SDL_INPUT_LINUXEV + if (SDL_EVDEV_Init() < 0) { + return -1; +@@ -180,11 +212,11 @@ void + MALI_VideoQuit(_THIS) + { + /* Clear the framebuffer and ser cursor on again */ +-// int fd = open("/dev/tty", O_RDWR); +-// ioctl(fd, VT_ACTIVATE, 5); +-// ioctl(fd, VT_ACTIVATE, 1); +-// close(fd); +-// system("setterm -cursor on"); ++ // int fd = open("/dev/tty", O_RDWR); ++ // ioctl(fd, VT_ACTIVATE, 5); ++ // ioctl(fd, VT_ACTIVATE, 1); ++ // close(fd); ++ // system("setterm -cursor on"); + + #ifdef SDL_INPUT_LINUXEV + SDL_EVDEV_Quit(); +@@ -205,33 +237,200 @@ MALI_SetDisplayMode(_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode) + return 0; + } + ++static EGLSurface * ++MALI_EGL_InitPixmapSurfaces(_THIS, int width, int height, SDL_WindowData *windowdata, SDL_DisplayData *displaydata) ++{ ++ struct ion_fd_data ion_data; ++ struct ion_allocation_data allocation_data; ++ int i, io; ++ ++ _this->egl_data->egl_surfacetype = EGL_PIXMAP_BIT; ++ if (SDL_EGL_ChooseConfig(_this) != 0) { ++ SDL_SetError("mali-fbdev: Unable to find a suitable EGL config"); ++ return EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Creating Pixmap (%dx%d) buffers", width, height); ++ if (_this->gl_config.framebuffer_srgb_capable) { ++ { ++ SDL_SetError("mali-fbdev: EGL implementation does not support sRGB system framebuffers"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ windowdata->back_buffer = 0; ++ windowdata->queued_buffer = 1; ++ windowdata->front_buffer = 2; ++ ++ // Populate pixmap definitions ++ displaydata->stride = MALI_ALIGN(width * 4, 64); ++ for (i = 0; i < 3; i++) { ++ MALI_EGL_Surface *surf = &windowdata->surface[i]; ++ surf->pixmap = (mali_pixmap){ ++ .width = width, ++ .height = height, ++ .planes[0] = (mali_plane){ ++ .stride = displaydata->stride, ++ .size = displaydata->stride * height, ++ .offset = 0 }, ++ .planes[1] = (mali_plane){}, ++ .planes[2] = (mali_plane){}, ++ .format = 0, ++ .handles = { -1, -1, -1 }, ++ .drm_fourcc = { ++ .dataspace = 0, ++ .format = DRM_FORMAT_ARGB8888, ++ .modifier = 0 ++ } ++ }; ++ ++ /* Allocate framebuffer data */ ++ allocation_data = (struct ion_allocation_data){ ++ .len = surf->pixmap.planes[0].size, ++ .heap_id_mask = (1 << ION_HEAP_TYPE_DMA), ++ .flags = 1 << ION_FLAG_CACHED ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_ALLOC, &allocation_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Unable to create backing ION buffers"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Export DMA_BUF handle for the framebuffer */ ++ ion_data = (struct ion_fd_data){ ++ .handle = allocation_data.handle ++ }; ++ ++ io = ioctl(displaydata->ion_fd, ION_IOC_SHARE, &ion_data); ++ if (io != 0) { ++ SDL_SetError("mali-fbdev: Failure exporting ION buffer handle"); ++ return EGL_NO_SURFACE; ++ } ++ ++ /* Recall fd and handle for teardown later */ ++ surf->dmabuf_handle = allocation_data.handle; ++ surf->dmabuf_fd = ion_data.fd; ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created ION buffer %d (fd: %d)\n", surf->dmabuf_handle, surf->dmabuf_fd); ++ ++ /* Create Pixmap Surface using DMA_BUF framebuffer fd */ ++ surf->pixmap.handles[0] = ion_data.fd; ++ ++ surf->pixmap_handle = displaydata->egl_create_pixmap_ID_mapping(&surf->pixmap); ++ SDL_LogDebug(SDL_LOG_CATEGORY_VIDEO, "mali-fbdev: Created pixmap handle %p\n", (void *)surf->pixmap_handle); ++ if ((int)surf->pixmap_handle < 0) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "egl_create_pixmap_ID_mapping"); ++ return EGL_NO_SURFACE; ++ } ++ ++ surf->egl_surface = _this->egl_data->eglCreatePixmapSurface( ++ _this->egl_data->egl_display, ++ _this->egl_data->egl_config, ++ surf->pixmap_handle, NULL); ++ if (surf->egl_surface == EGL_NO_SURFACE) { ++ SDL_EGL_SetError("mali-fbdev: Unable to create EGL window surface", "eglCreatePixmapSurface"); ++ return EGL_NO_SURFACE; ++ } ++ } ++ ++ return windowdata->surface[windowdata->back_buffer].egl_surface; ++} ++ ++static void ++MALI_EGL_DeinitPixmapSurfaces(_THIS, SDL_Window *window) ++{ ++ SDL_WindowData *data; ++ SDL_DisplayData *displaydata; ++ EGLSurface current_surface; ++ EGLContext current_context; ++ ++ data = window->driverdata; ++ displaydata = SDL_GetDisplayDriverData(0); ++ if (!displaydata->blitter) ++ return; ++ ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ ++ // Disable current surface ++ current_context = (EGLContext)SDL_GL_GetCurrentContext(); ++ current_surface = _this->egl_data->eglGetCurrentSurface(EGL_DRAW); ++ ++ for (int i = 0; i < SDL_arraysize(data->surface); i++) { ++ struct ion_handle_data handle_data; ++ if (data->surface[i].dmabuf_fd < 0) ++ continue; ++ ++ if ((current_surface != EGL_NO_SURFACE) && (data->surface[i].egl_surface == current_surface)) { ++ SDL_EGL_MakeCurrent(_this, EGL_NO_SURFACE, current_context); ++ current_surface = EGL_NO_SURFACE; ++ } ++ ++ SDL_LogInfo(SDL_LOG_CATEGORY_VIDEO, "MALI_DestroyWindow: Destroying surface %d.", i); ++ _this->egl_data->eglDestroySurface(_this->egl_data->egl_display, data->surface[i].egl_surface); ++ displaydata->egl_destroy_pixmap_ID_mapping(data->surface[i].pixmap_handle); ++ close(data->surface[i].dmabuf_fd); ++ ++ handle_data = (struct ion_handle_data){ ++ .handle = data->surface[i].dmabuf_handle ++ }; ++ ++ ioctl(displaydata->ion_fd, ION_IOC_FREE, &handle_data); ++ data->surface[i].dmabuf_fd = -1; ++ } ++} ++ + int + MALI_CreateWindow(_THIS, SDL_Window * window) + { + SDL_WindowData *windowdata; ++ SDL_VideoDisplay *display = SDL_GetDisplayForWindow(window); + SDL_DisplayData *displaydata; + + displaydata = SDL_GetDisplayDriverData(0); + + /* Allocate window internal data */ +- windowdata = (SDL_WindowData *) SDL_calloc(1, sizeof(SDL_WindowData)); ++ windowdata = (SDL_WindowData *)SDL_calloc(1, sizeof(SDL_WindowData)); + if (windowdata == NULL) { + return SDL_OutOfMemory(); + } + +- /* Windows have one size for now */ +- window->w = displaydata->native_display.width; +- window->h = displaydata->native_display.height; ++ /* Use the entire screen when the blitter isn't enabled */ ++ if (displaydata->blitter) { ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ } + + /* OpenGL ES is the law here */ + window->flags |= SDL_WINDOW_OPENGL; +- + if (!_this->egl_data) { +- if (SDL_GL_LoadLibrary(NULL) < 0) { +- return -1; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ /* Try again with OpenGL ES 2.0 */ ++ _this->gl_config.profile_mask = SDL_GL_CONTEXT_PROFILE_ES; ++ _this->gl_config.major_version = 2; ++ _this->gl_config.minor_version = 0; ++ if (SDL_EGL_LoadLibrary(_this, NULL, EGL_DEFAULT_DISPLAY, 0) < 0) { ++ return SDL_SetError("Can't load EGL/GL library on window creation."); ++ } + } ++ ++ _this->gl_config.driver_loaded = 1; ++ } ++ ++ /* If the blitter is required, we will manually create the EGL Surface resources using the ION allocator ++ and some reverse engineered mali internals */ ++ if (displaydata->blitter) { ++ displaydata->egl_create_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_create_pixmap_ID_mapping"); ++ displaydata->egl_destroy_pixmap_ID_mapping = SDL_EGL_GetProcAddress(_this, "egl_destroy_pixmap_ID_mapping"); ++ if (!displaydata->egl_create_pixmap_ID_mapping || !displaydata->egl_destroy_pixmap_ID_mapping) { ++ MALI_VideoQuit(_this); ++ return SDL_SetError("mali-fbdev: Can't find mali pixmap entrypoints"); ++ } ++ ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } else { ++ windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + } +- windowdata->egl_surface = SDL_EGL_CreateSurface(_this, (NativeWindowType) &displaydata->native_display); + + if (windowdata->egl_surface == EGL_NO_SURFACE) { + MALI_VideoQuit(_this); +@@ -249,13 +448,13 @@ MALI_CreateWindow(_THIS, SDL_Window * window) + return 0; + } + +-void +-MALI_DestroyWindow(_THIS, SDL_Window * window) ++void MALI_DestroyWindow(_THIS, SDL_Window *window) + { + SDL_WindowData *data; +- + data = window->driverdata; ++ + if (data) { ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); + if (data->egl_surface != EGL_NO_SURFACE) { + SDL_EGL_DestroySurface(_this, data->egl_surface); + data->egl_surface = EGL_NO_SURFACE; +@@ -278,6 +477,34 @@ MALI_SetWindowPosition(_THIS, SDL_Window * window) + void + MALI_SetWindowSize(_THIS, SDL_Window * window) + { ++ SDL_WindowData *windowdata; ++ SDL_DisplayData *displaydata; ++ ++ windowdata = window->driverdata; ++ displaydata = SDL_GetDisplayDriverData(0); ++ ++ // If we're using the blitter, we need to warn it about the surface reconfiguration! ++ if (displaydata->blitter) { ++ MALI_EGL_DeinitPixmapSurfaces(_this, window); ++ windowdata->egl_surface = MALI_EGL_InitPixmapSurfaces(_this, window->w, window->h, windowdata, displaydata); ++ MALI_BlitterReconfigure(_this, window, displaydata->blitter); ++ } ++} ++ ++void ++MALI_SetWindowFullscreen(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen) ++{ ++ if (fullscreen) { ++ // Remember that SDL_SendWindowEvent sets the window width and height for you, so let's ++ // recall the width and height first. ++ int prev_w = window->w, prev_h = window->h; ++ SDL_SendWindowEvent(window, SDL_WINDOWEVENT_RESIZED, ++ display->current_mode.w, display->current_mode.h); ++ ++ // If size has changed, let's reconfigure it. ++ if (display->current_mode.w != prev_w || display->current_mode.h != prev_h) ++ MALI_SetWindowSize(_this, window); ++ } + } + + void +@@ -290,6 +517,25 @@ MALI_HideWindow(_THIS, SDL_Window * window) + { + } + ++int ++MALI_GLES_SetSwapInterval(_THIS, int interval) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ _this->egl_data->egl_swapinterval = interval != 0; ++ return 0; ++} ++ ++int ++MALI_GLES_GetSwapInterval(_THIS) ++{ ++ if (!_this->egl_data) ++ return 0; ++ ++ return _this->egl_data->egl_swapinterval; ++} ++ + /*****************************************************************************/ + /* SDL Window Manager function */ + /*****************************************************************************/ +@@ -300,7 +546,7 @@ MALI_GetWindowWMInfo(_THIS, SDL_Window * window, struct SDL_SysWMinfo *info) + return SDL_TRUE; + } else { + SDL_SetError("application not compiled with SDL %d.%d\n", +- SDL_MAJOR_VERSION, SDL_MINOR_VERSION); ++ SDL_MAJOR_VERSION, SDL_MINOR_VERSION); + } + + /* Failed to get window manager information */ +diff --git a/src/video/mali-fbdev/SDL_malivideo.h b/src/video/mali-fbdev/SDL_malivideo.h +index 175483a88..3fad6e795 100644 +--- a/src/video/mali-fbdev/SDL_malivideo.h ++++ b/src/video/mali-fbdev/SDL_malivideo.h +@@ -26,27 +26,56 @@ + #include "../SDL_sysvideo.h" + + #include "SDL_egl.h" ++#include "SDL_opengl.h" ++#include "mali.h" + + #include + #include + #include + #include + #include ++#include + #include + #include + #include + ++#include "mali.h" ++#include "ion.h" ++ + typedef struct SDL_DisplayData + { +- struct { +- unsigned short width; +- unsigned short height; +- } native_display; ++ int ion_fd; ++ struct MALI_Blitter *blitter; ++ fbdev_window_s native_display; ++ int rotation; ++ unsigned long stride; ++ unsigned long w_align; ++ unsigned long h_align; ++ NativePixmapType (*egl_create_pixmap_ID_mapping)(mali_pixmap *); ++ NativePixmapType (*egl_destroy_pixmap_ID_mapping)(int id); + } SDL_DisplayData; + ++typedef struct MALI_EGL_Surface ++{ ++ // A pixmap is backed by multiple ION allocated backbuffers, EGL fences, etc. ++ EGLImageKHR egl_image; ++ GLuint texture; ++ EGLSyncKHR egl_fence; ++ EGLSurface egl_surface; ++ NativePixmapType pixmap_handle; ++ mali_pixmap pixmap; ++ int dmabuf_fd; ++ int dmabuf_handle; ++} MALI_EGL_Surface; ++ + typedef struct SDL_WindowData + { + EGLSurface egl_surface; ++ int back_buffer; ++ int queued_buffer; ++ int front_buffer; ++ ++ MALI_EGL_Surface surface[3]; + } SDL_WindowData; + + /****************************************************************************/ +@@ -62,9 +91,12 @@ int MALI_CreateWindow(_THIS, SDL_Window * window); + void MALI_SetWindowTitle(_THIS, SDL_Window * window); + void MALI_SetWindowPosition(_THIS, SDL_Window * window); + void MALI_SetWindowSize(_THIS, SDL_Window * window); ++void MALI_SetWindowFullscreen(_THIS, SDL_Window * window, SDL_VideoDisplay * display, SDL_bool fullscreen); + void MALI_ShowWindow(_THIS, SDL_Window * window); + void MALI_HideWindow(_THIS, SDL_Window * window); + void MALI_DestroyWindow(_THIS, SDL_Window * window); ++int MALI_GLES_SetSwapInterval(_THIS, int interval); ++int MALI_GLES_GetSwapInterval(_THIS); + + /* Window manager function */ + SDL_bool MALI_GetWindowWMInfo(_THIS, SDL_Window * window, +diff --git a/src/video/mali-fbdev/ion.h b/src/video/mali-fbdev/ion.h +new file mode 100644 +index 000000000..83397080f +--- /dev/null ++++ b/src/video/mali-fbdev/ion.h +@@ -0,0 +1,247 @@ ++/* ++ * drivers/staging/android/uapi/ion.h ++ * ++ * Copyright (C) 2011 Google, Inc. ++ * ++ * This software is licensed under the terms of the GNU General Public ++ * License version 2, as published by the Free Software Foundation, and ++ * may be copied, distributed, and modified under those terms. ++ * ++ * This program is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ++ * GNU General Public License for more details. ++ * ++ */ ++ ++#ifndef _UAPI_LINUX_ION_H ++#define _UAPI_LINUX_ION_H ++ ++#define CONFIG_AMLOGIC_MODIFY ++ ++#include ++#include ++ ++typedef int ion_user_handle_t; ++ ++/** ++ * enum ion_heap_types - list of all possible types of heaps ++ * @ION_HEAP_TYPE_SYSTEM: memory allocated via vmalloc ++ * @ION_HEAP_TYPE_SYSTEM_CONTIG: memory allocated via kmalloc ++ * @ION_HEAP_TYPE_CARVEOUT: memory allocated from a prereserved ++ * carveout heap, allocations are physically ++ * contiguous ++ * @ION_HEAP_TYPE_DMA: memory allocated via DMA API ++ * @ION_NUM_HEAPS: helper for iterating over heaps, a bit mask ++ * is used to identify the heaps, so only 32 ++ * total heap types are supported ++ */ ++enum ion_heap_type { ++ ION_HEAP_TYPE_SYSTEM, ++ ION_HEAP_TYPE_SYSTEM_CONTIG, ++ ION_HEAP_TYPE_CARVEOUT, ++ ION_HEAP_TYPE_CHUNK, ++ ION_HEAP_TYPE_DMA, ++ ION_HEAP_TYPE_CUSTOM, /* ++ * must be last so device specific heaps always ++ * are at the end of this enum ++ */ ++}; ++ ++#define ION_NUM_HEAP_IDS (sizeof(unsigned int) * 8) ++ ++/** ++ * allocation flags - the lower 16 bits are used by core ion, the upper 16 ++ * bits are reserved for use by the heaps themselves. ++ */ ++ ++/* ++ * mappings of this buffer should be cached, ion will do cache maintenance ++ * when the buffer is mapped for dma ++ */ ++#define ION_FLAG_CACHED 1 ++ ++/* ++ * mappings of this buffer will created at mmap time, if this is set ++ * caches must be managed manually ++ */ ++#define ION_FLAG_CACHED_NEEDS_SYNC 2 ++ ++/** ++ * DOC: Ion Userspace API ++ * ++ * create a client by opening /dev/ion ++ * most operations handled via following ioctls ++ * ++ */ ++ ++/** ++ * struct ion_allocation_data - metadata passed from userspace for allocations ++ * @len: size of the allocation ++ * @align: required alignment of the allocation ++ * @heap_id_mask: mask of heap ids to allocate from ++ * @flags: flags passed to heap ++ * @handle: pointer that will be populated with a cookie to use to ++ * refer to this allocation ++ * ++ * Provided by userspace as an argument to the ioctl ++ */ ++struct ion_allocation_data { ++ size_t len; ++ size_t align; ++ unsigned int heap_id_mask; ++ unsigned int flags; ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_fd_data - metadata passed to/from userspace for a handle/fd pair ++ * @handle: a handle ++ * @fd: a file descriptor representing that handle ++ * ++ * For ION_IOC_SHARE or ION_IOC_MAP userspace populates the handle field with ++ * the handle returned from ion alloc, and the kernel returns the file ++ * descriptor to share or map in the fd field. For ION_IOC_IMPORT, userspace ++ * provides the file descriptor and the kernel returns the handle. ++ */ ++struct ion_fd_data { ++ ion_user_handle_t handle; ++ int fd; ++}; ++ ++/** ++ * struct ion_handle_data - a handle passed to/from the kernel ++ * @handle: a handle ++ */ ++struct ion_handle_data { ++ ion_user_handle_t handle; ++}; ++ ++/** ++ * struct ion_custom_data - metadata passed to/from userspace for a custom ioctl ++ * @cmd: the custom ioctl function to call ++ * @arg: additional data to pass to the custom ioctl, typically a user ++ * pointer to a predefined structure ++ * ++ * This works just like the regular cmd and arg fields of an ioctl. ++ */ ++struct ion_custom_data { ++ unsigned int cmd; ++ unsigned long arg; ++}; ++ ++#define MAX_HEAP_NAME 32 ++ ++/** ++ * struct ion_heap_data - data about a heap ++ * @name - first 32 characters of the heap name ++ * @type - heap type ++ * @heap_id - heap id for the heap ++ */ ++struct ion_heap_data { ++ char name[MAX_HEAP_NAME]; ++ __u32 type; ++ __u32 heap_id; ++ __u32 reserved0; ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++/** ++ * struct ion_heap_query - collection of data about all heaps ++ * @cnt - total number of heaps to be copied ++ * @heaps - buffer to copy heap data ++ */ ++struct ion_heap_query { ++ __u32 cnt; /* Total number of heaps to be copied */ ++ __u32 reserved0; /* align to 64bits */ ++ __u64 heaps; /* buffer to be populated */ ++ __u32 reserved1; ++ __u32 reserved2; ++}; ++ ++#define ION_IOC_MAGIC 'I' ++ ++/** ++ * DOC: ION_IOC_ALLOC - allocate memory ++ * ++ * Takes an ion_allocation_data struct and returns it with the handle field ++ * populated with the opaque handle for the allocation. ++ */ ++#define ION_IOC_ALLOC _IOWR(ION_IOC_MAGIC, 0, \ ++ struct ion_allocation_data) ++ ++/** ++ * DOC: ION_IOC_FREE - free memory ++ * ++ * Takes an ion_handle_data struct and frees the handle. ++ */ ++#define ION_IOC_FREE _IOWR(ION_IOC_MAGIC, 1, struct ion_handle_data) ++ ++/** ++ * DOC: ION_IOC_MAP - get a file descriptor to mmap ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be used as an argument to mmap. ++ */ ++#define ION_IOC_MAP _IOWR(ION_IOC_MAGIC, 2, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SHARE - creates a file descriptor to use to share an allocation ++ * ++ * Takes an ion_fd_data struct with the handle field populated with a valid ++ * opaque handle. Returns the struct with the fd field set to a file ++ * descriptor open in the current address space. This file descriptor ++ * can then be passed to another process. The corresponding opaque handle can ++ * be retrieved via ION_IOC_IMPORT. ++ */ ++#define ION_IOC_SHARE _IOWR(ION_IOC_MAGIC, 4, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_IMPORT - imports a shared file descriptor ++ * ++ * Takes an ion_fd_data struct with the fd field populated with a valid file ++ * descriptor obtained from ION_IOC_SHARE and returns the struct with the handle ++ * filed set to the corresponding opaque handle. ++ */ ++#define ION_IOC_IMPORT _IOWR(ION_IOC_MAGIC, 5, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_SYNC - syncs a shared file descriptors to memory ++ * ++ * Deprecated in favor of using the dma_buf api's correctly (syncing ++ * will happen automatically when the buffer is mapped to a device). ++ * If necessary should be used after touching a cached buffer from the cpu, ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_SYNC _IOWR(ION_IOC_MAGIC, 7, struct ion_fd_data) ++ ++/** ++ * DOC: ION_IOC_CUSTOM - call architecture specific ion ioctl ++ * ++ * Takes the argument of the architecture specific ioctl to call and ++ * passes appropriate userdata for that ioctl ++ */ ++#define ION_IOC_CUSTOM _IOWR(ION_IOC_MAGIC, 6, struct ion_custom_data) ++ ++/** ++ * DOC: ION_IOC_HEAP_QUERY - information about available heaps ++ * ++ * Takes an ion_heap_query structure and populates information about ++ * available Ion heaps. ++ */ ++#define ION_IOC_HEAP_QUERY _IOWR(ION_IOC_MAGIC, 8, \ ++ struct ion_heap_query) ++ ++#ifdef CONFIG_AMLOGIC_MODIFY ++/** ++ * DOC: ION_IOC_INVALID_CACHE - invalid cache before ++ * cpu read the memory and after device write the memory. ++ * this will make the buffer in memory coherent. ++ */ ++#define ION_IOC_INVALID_CACHE _IOWR(ION_IOC_MAGIC, 9, struct ion_fd_data) ++#endif ++ ++#endif /* _UAPI_LINUX_ION_H */ +diff --git a/src/video/mali-fbdev/mali.h b/src/video/mali-fbdev/mali.h +new file mode 100644 +index 000000000..c7df119d1 +--- /dev/null ++++ b/src/video/mali-fbdev/mali.h +@@ -0,0 +1,59 @@ ++/* ++ * Copyright (C) 2017 João H. All rights reserved. ++ * ++ * This program is free software; you can redistribute it and/or modify ++ * it under the terms of the GNU General Public License as published by ++ * the Free Software Foundation; either version 2 of the License, or ++ * (at your option) any later version. ++ * ++ * This program is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for ++ * more details. ++ * ++ */ ++ ++#ifndef __MALI_H__ ++#define __MALI_H__ ++ ++#include ++ ++#define fourcc_code(a, b, c, d) ((__u32)(a) | ((__u32)(b) << 8) | \ ++ ((__u32)(c) << 16) | ((__u32)(d) << 24)) ++ ++#define DRM_FORMAT_ARGB8888 fourcc_code('A', 'R', '2', '4') ++#define DRM_FORMAT_XRGB8888 fourcc_code('X', 'R', '2', '4') ++ ++ ++#define MALI_ALIGN(val, align) (((val) + (align) - 1) & ~((align) - 1)) ++#define MALI_FORMAT_ARGB8888 (0x10bb60a) ++ ++typedef struct fbdev_window_s ++{ ++ unsigned short width; ++ unsigned short height; ++} fbdev_window_s; ++ ++typedef struct mali_plane { ++ unsigned long stride; ++ unsigned long size; ++ unsigned long offset; ++} mali_plane; ++ ++typedef struct mali_pixmap { ++ int width, height; ++ ++ mali_plane planes[3]; ++ ++ uint64_t format; //see 0x004e3c28... ++ int handles[3]; //seems to just be fds, see 0x004ec14c... ++ struct ++ { ++ uint32_t format; // drm_fourcc ++ uint64_t modifier; // afbc etc ++ uint32_t dataspace; // colorspace definitions e.g. bt709, srgb, etc ++ } drm_fourcc; // apparently an alternative to setting the format field? ++ // set .format = 0 and fill this if available on your blob. ++} mali_pixmap; ++ ++#endif /* __MALI_H__ */ +\ No newline at end of file +-- +2.20.1 + diff --git a/board/batocera/fsoverlay/etc/init.d/S02resize b/board/batocera/fsoverlay/etc/init.d/S02resize index bcbccb77160..13e98886d5b 100755 --- a/board/batocera/fsoverlay/etc/init.d/S02resize +++ b/board/batocera/fsoverlay/etc/init.d/S02resize @@ -109,6 +109,10 @@ then esac done + # Allwinner H700 + echo -e 'r\nb\nc\nY\nw\nY\n' | gdisk ${DISK} + partprobe ${DISK} + else ###### format internal share ##### FORMAT_INTERNAL_TYPE=$(grep -E '^[ ]*format-internal[ ]*=.*$' "${BOOTCONF}" | head -1 | sed -e s+"^[ ]*format-internal[ ]*=[ ]*\(.*\)[ ]*$"+"\1"+) diff --git a/package/batocera/core/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch b/package/batocera/core/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch new file mode 100644 index 00000000000..9e36e221018 --- /dev/null +++ b/package/batocera/core/batocera-configgen/0001-RA-menu-inputs-match-ES-Mikhailzrick.patch @@ -0,0 +1,40 @@ +--- a/configgen/generators/libretro/libretroConfig.py ++++ b/configgen/generators/libretro/libretroConfig.py +@@ -14,11 +14,22 @@ + import utils.bezels as bezelsUtil + import utils.videoMode as videoMode + import controllersConfig ++import xml.etree.ElementTree as ET + + eslog = get_logger(__name__) + sys.path.append( + os.path.abspath(os.path.join(os.path.dirname(__file__), '../..'))) + ++# Return value for es invertedbuttons ++def getInvertButtonsValue(): ++ tree = ET.parse(batoceraFiles.esSettings) ++ root = tree.getroot() ++ # Find the InvertButtons element and return value ++ elem = root.find(".//bool[@name='InvertButtons']") ++ if elem is not None: ++ return elem.get('value') == 'true' ++ return False # Return False if not found ++ + # return true if the option is considered defined + def defined(key, dict): + return key in dict and isinstance(dict[key], str) and len(dict[key]) > 0 +@@ -110,11 +121,14 @@ def createLibretroConfig(generator, system, controllers, metadata, guns, wheels, + systemConfig = system.config + renderConfig = system.renderconfig + systemCore = system.config['core'] ++ # Get value from ES settings ++ swapButtons = '"false"' if getInvertButtonsValue() else '"true"' + + # Basic configuration + retroarchConfig['quit_press_twice'] = 'false' # not aligned behavior on other emus + retroarchConfig['menu_show_restart_retroarch'] = 'false' # this option messes everything up on Batocera if ever clicked + retroarchConfig['menu_show_load_content_animation'] = 'false' # hide popup when starting a game ++ retroarchConfig['menu_swap_ok_cancel_buttons'] = swapButtons # Set the correct value to match ES confirm /cancel inputs + + retroarchConfig['video_driver'] = '"' + gfxBackend + '"' # needed for the ozone menu + # Set Vulkan diff --git a/package/batocera/core/batocera-configgen/0002-add-tate-mode-Mikhailzrick.patch b/package/batocera/core/batocera-configgen/0002-add-tate-mode-Mikhailzrick.patch new file mode 100644 index 00000000000..385553f6157 --- /dev/null +++ b/package/batocera/core/batocera-configgen/0002-add-tate-mode-Mikhailzrick.patch @@ -0,0 +1,61 @@ +--- a/configgen/generators/libretro/libretroConfig.py 2024-04-12 02:03:40.836960712 +0000 ++++ b/configgen/generators/libretro/libretroConfig.py 2024-05-09 19:08:23.036133015 +0000 +@@ -562,6 +563,58 @@ + controller, pad = controller_list[i - 1] + if (pad.guid in valid_n64_controller_guids and pad.configName in valid_n64_controller_names) or (system.isOptSet(f'{option}-controller{i}') and system.config[f'{option}-controller{i}'] != 'retropad'): + update_n64_controller_config(i) ++ ++ ## TATE mode remap for handhelds ++ if system.config['core'] in ['fbneo', 'mame']: ++ path = Path(rom) ++ folder_name = path.parent.name ++ ++ handhelds = { ++ ('19000000010000000100000000010000', 'Deeplay-keys'): { # rg35xx/h ++ 'rotation': 'left', ++ 'remap': { ++ 'stk_r_x+': '18', 'stk_r_x-': '19', 'stk_r_y+': '17', 'stk_r_y-': '16', ++ 'btn_a': '0', 'btn_b': '1', 'btn_x': '8', 'btn_y': '-1', ++ } ++ }, ++ ('19000000010000000100000000010000', 'odroidgo2 joypad'): { # rg28xx ++ 'rotation': 'left', ++ 'remap': { ++ 'btn_down': '7', 'btn_left': '5', 'btn_right': '4', 'btn_up': '6', ++ 'btn_start': '0', 'btn_select': '8', 'btn_l2': '1', 'btn_r': '2', ++ 'btn_r2': '3', 'btn_a': '-1', 'btn_b': '-1', 'btn_x': '-1', 'btn_y': '-1', ++ } ++ }, ++ ('030003f05e0400008e02000014010000', 'Xbox 360 Controller'): { # TrimUI ++ 'rotation': 'left', ++ 'remap': { ++ 'stk_r_x+': '18', 'stk_r_x-': '19', 'stk_r_y+': '17', 'stk_r_y-': '16', ++ 'btn_a': '0', 'btn_b': '1', 'btn_x': '8', 'btn_y': '-1', ++ } ++ }, ++ } ++ ++ def update_handheld_config(guid, name): ++ if (guid, name) in handhelds: ++ settings = handhelds[(guid, name)] ++ # set display rotation ++ if settings['rotation'] == 'left': ++ if (system.config['core'] == 'fbneo'): ++ coreSettings.save('fbneo-vertical-mode', '"' + 'TATE alternate' + '"') ++ elif (system.config['core'] == 'mame'): ++ coreSettings.save('mame_rotation_mode', '"' + 'tate-rol' + '"') ++ elif settings['rotation'] == 'right': ++ if (system.config['core'] == 'fbneo'): ++ coreSettings.save('fbneo-vertical-mode', '"' + 'TATE' + '"') ++ elif (system.config['core'] == 'mame'): ++ coreSettings.save('mame_rotation_mode', '"' + 'tate-ror' + '"') ++ # remap inputs ++ for btn, value in settings['remap'].items(): ++ retroarchConfig[f'input_player1_{btn}'] = value ++ ++ controller, pad = sorted(controllers.items())[0] ++ if (system.isOptSet(f"{systemCore}-hhtate") and system.config[f"{systemCore}-hhtate"] == "True" or folder_name == "tate"): ++ update_handheld_config(pad.guid, pad.configName) + + ## PORTS + ## Quake diff --git a/package/batocera/core/batocera-system/Config.in b/package/batocera/core/batocera-system/Config.in index 62104bce742..26d95894f3b 100644 --- a/package/batocera/core/batocera-system/Config.in +++ b/package/batocera/core/batocera-system/Config.in @@ -166,6 +166,7 @@ config BR2_PACKAGE_BATOCERA_SYSTEM select BR2_PACKAGE_RNG_TOOLS if !BR2_PACKAGE_BATOCERA_TARGET_RK3128 # system entropy. Currently disabled for RK3128 due to high CPU impact select BR2_PACKAGE_BATOCERA_EMULATIONSTATION # emulationstation select BR2_PACKAGE_ES_THEME_ART_BOOK_NEXT # emulationstation theme + select BR2_PACKAGE_ES_THEME_CARBON # emulationstation theme select BR2_PACKAGE_ES_BACKGROUND_MUSICS # emulationstation musics select BR2_PACKAGE_BATOCERA_ES_SYSTEM # emulation station es_systems.cfg generator + default roms select BR2_PACKAGE_BATOCERA_CONFIGGEN # emulation station external command launcher @@ -480,7 +481,7 @@ config BR2_TARGET_BATOCERA_IMAGES_DEFINITIONS default "allwinner/h5/tritium-h5 allwinner/h5/orangepi-pc2" if BR2_PACKAGE_BATOCERA_TARGET_H5 default "allwinner/h6/orangepi-3-lts allwinner/h6/orangepi-3 allwinner/h6/orangepi-one-plus" if BR2_PACKAGE_BATOCERA_TARGET_H6 default "allwinner/h616/orangepi-zero2 allwinner/h616/orangepi-zero3 allwinner/h616/x96-mate" if BR2_PACKAGE_BATOCERA_TARGET_H616 - default "allwinner/h700/rg35xx-plus" if BR2_PACKAGE_BATOCERA_TARGET_H700 + default "allwinner/h700/rg35xx-plus allwinner/h700/rg28xx" if BR2_PACKAGE_BATOCERA_TARGET_H700 default "allwinner/a133/trimui-smart-pro" if BR2_PACKAGE_BATOCERA_TARGET_A133 default "amlogic/s812" if BR2_PACKAGE_BATOCERA_TARGET_S812 default "samsung/exynos5422/odroidxu4" if BR2_PACKAGE_BATOCERA_TARGET_XU4 @@ -785,7 +786,7 @@ config BR2_PACKAGE_BATOCERA_ARCADE_SYSTEMS bool "batocera.linux arcade emulators packages selection" # Final Burn Alpha - select BR2_PACKAGE_LIBRETRO_FBALPHA if BR2_PACKAGE_BATOCERA_TARGET_BCM2835 + select BR2_PACKAGE_LIBRETRO_FBALPHA if BR2_PACKAGE_BATOCERA_TARGET_BCM2835 || BR2_PACKAGE_BATOCERA_TARGET_H700 || BR2_PACKAGE_BATOCERA_TARGET_A133 select BR2_PACKAGE_PIFBA if BR2_PACKAGE_BATOCERA_TARGET_BCM2835 # Final Burn NEO @@ -840,7 +841,7 @@ config BR2_PACKAGE_BATOCERA_HANDHELD_SYSTEMS select BR2_PACKAGE_LIBRETRO_DESMUME if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY select BR2_PACKAGE_LIBRETRO_MELONDS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || (BR2_aarch64 && BR2_PACKAGE_BATOCERA_GLES3) - select BR2_PACKAGE_LIBRETRO_MELONDS_DS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_BCM2711 || BR2_PACKAGE_BATOCERA_TARGET_BCM2712 + select BR2_PACKAGE_LIBRETRO_MELONDS_DS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_BCM2711 || BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || BR2_PACKAGE_BATOCERA_TARGET_A133 || BR2_PACKAGE_BATOCERA_TARGET_H700 select BR2_PACKAGE_DRASTIC if BR2_PACKAGE_BATOCERA_RPI_MESA3D || \ BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || \ @@ -855,7 +856,8 @@ config BR2_PACKAGE_BATOCERA_HANDHELD_SYSTEMS BR2_PACKAGE_BATOCERA_TARGET_A133 || \ BR2_PACKAGE_BATOCERA_TARGET_H6 - select BR2_PACKAGE_MELONDS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_BCM2712 + select BR2_PACKAGE_MELONDS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_BCM2712 #|| BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || BR2_PACKAGE_BATOCERA_TARGET_A133 || BR2_PACKAGE_BATOCERA_TARGET_H700 + # 3DS select BR2_PACKAGE_LEMONADE if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY @@ -994,7 +996,7 @@ config BR2_PACKAGE_BATOCERA_PORTS_SYSTEMS select BR2_PACKAGE_LIBRETRO_BOOM3 if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_BCM2712 # OpenLara (Tomb Raider) - select BR2_PACKAGE_LIBRETRO_OPENLARA if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY + select BR2_PACKAGE_LIBRETRO_OPENLARA if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || BR2_PACKAGE_BATOCERA_TARGET_H700 || BR2_PACKAGE_BATOCERA_TARGET_A133 # Quake 3 select BR2_PACKAGE_IOQUAKE3 if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && \ @@ -1226,7 +1228,9 @@ config BR2_PACKAGE_BATOCERA_CONSOLE_SYSTEMS BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || \ BR2_PACKAGE_BATOCERA_TARGET_S922X || \ BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 || \ - BR2_PACKAGE_BATOCERA_TARGET_RK3588 + BR2_PACKAGE_BATOCERA_TARGET_RK3588 || \ + BR2_PACKAGE_BATOCERA_TARGET_H700 || \ + BR2_PACKAGE_BATOCERA_TARGET_A133 select BR2_PACKAGE_BIGPEMU if BR2_PACKAGE_BATOCERA_WINE @@ -1254,20 +1258,20 @@ config BR2_PACKAGE_BATOCERA_CONSOLE_SYSTEMS # Sega 8-bit/16-range (Mark III / Master System, Game Gear, Genesis / Megadrive, SegaCD / MegaCD, 32X) select BR2_PACKAGE_LIBRETRO_PICODRIVE # ALL select BR2_PACKAGE_LIBRETRO_GENESISPLUSGX # ALL - select BR2_PACKAGE_LIBRETRO_GENESISPLUSGX_WIDE if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY + select BR2_PACKAGE_LIBRETRO_GENESISPLUSGX_WIDE if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY || BR2_PACKAGE_BATOCERA_TARGET_H700 || BR2_PACKAGE_BATOCERA_TARGET_A133 select BR2_PACKAGE_LIBRETRO_BLASTEM if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY select BR2_PACKAGE_LIBRETRO_SMSPLUS_GX # ALL select BR2_PACKAGE_LIBRETRO_GEARSYSTEM # ALL # Atari 2600 select BR2_PACKAGE_LIBRETRO_STELLA # ALL - select BR2_PACKAGE_LIBRETRO_STELLA2014 if BR2_PACKAGE_BATOCERA_TARGET_BCM2835 + select BR2_PACKAGE_LIBRETRO_STELLA2014 if BR2_PACKAGE_BATOCERA_TARGET_BCM2835 #|| BR2_PACKAGE_BATOCERA_TARGET_H700 || BR2_PACKAGE_BATOCERA_TARGET_A133 # Atari 5200 select BR2_PACKAGE_LIBRETRO_A5200 # ALL # NEC PC-Engine / TurboGrafx / SuperGrafx range - select BR2_PACKAGE_LIBRETRO_BEETLE_PCE if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY + select BR2_PACKAGE_LIBRETRO_BEETLE_PCE if BR2_PACKAGE_BATOCERA_TARGET_X86_ANY || BR2_PACKAGE_BATOCERA_TARGET_H700 || BR2_PACKAGE_BATOCERA_TARGET_A133 select BR2_PACKAGE_LIBRETRO_BEETLE_PCE_FAST # ALL select BR2_PACKAGE_LIBRETRO_BEETLE_SUPERGRAFX # ALL @@ -1291,7 +1295,9 @@ config BR2_PACKAGE_BATOCERA_CONSOLE_SYSTEMS BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 || \ BR2_PACKAGE_BATOCERA_TARGET_BCM2711 || \ BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || \ - BR2_PACKAGE_BATOCERA_TARGET_RK3288 + BR2_PACKAGE_BATOCERA_TARGET_RK3288 || \ + BR2_PACKAGE_BATOCERA_TARGET_H700 || \ + BR2_PACKAGE_BATOCERA_TARGET_A133 # Super Nintendo / Super Famicom select BR2_PACKAGE_LIBRETRO_SNES9X if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 @@ -1303,7 +1309,9 @@ config BR2_PACKAGE_BATOCERA_CONSOLE_SYSTEMS BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || \ BR2_PACKAGE_BATOCERA_TARGET_RK3588 || \ BR2_PACKAGE_BATOCERA_TARGET_S922X || \ - BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 + BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 || \ + BR2_PACKAGE_BATOCERA_TARGET_A133 || \ + BR2_PACKAGE_BATOCERA_TARGET_H700 select BR2_PACKAGE_LIBRETRO_BSNES_HD if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY select BR2_PACKAGE_LIBRETRO_MESENS if BR2_PACKAGE_BATOCERA_TARGET_X86_64_ANY || \ @@ -1311,7 +1319,9 @@ config BR2_PACKAGE_BATOCERA_CONSOLE_SYSTEMS BR2_PACKAGE_BATOCERA_TARGET_BCM2712 || \ BR2_PACKAGE_BATOCERA_TARGET_RK3588 || \ BR2_PACKAGE_BATOCERA_TARGET_RK3399 || \ - BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 + BR2_PACKAGE_BATOCERA_TARGET_A3GEN2 || \ + BR2_PACKAGE_BATOCERA_TARGET_A133 || \ + BR2_PACKAGE_BATOCERA_TARGET_H700 # Atari 7800 select BR2_PACKAGE_LIBRETRO_PROSYSTEM # ALL diff --git a/package/batocera/emulationstation/batocera-es-system/es_features.yml b/package/batocera/emulationstation/batocera-es-system/es_features.yml index 70cedf8ee79..9b7c2503596 100644 --- a/package/batocera/emulationstation/batocera-es-system/es_features.yml +++ b/package/batocera/emulationstation/batocera-es-system/es_features.yml @@ -1619,6 +1619,12 @@ libretro: "2": 2 "3": 3 "4": 4 + fbneo-hhtate: + prompt: HANDHELD TATE MODE + description: Rotates the display and remaps inputs for device to be used sideways. + choices: + "Off": disabled + "On": enabled fbneo-lightgun-hide-crosshair: group: LIGHT GUN prompt: SHOW LIGHT GUN CROSSHAIRS @@ -2551,6 +2557,12 @@ libretro: "Neo Geo CD Pad": "neocd" "Twin Stick with Triggers": "twinstick" "Rotated 4-Way Stick (Q*Bert)": "qbert" + mame-hhtate: + prompt: HANDHELD TATE MODE + description: Rotates the display and remaps inputs for device to be used sideways. + choices: + "Off": disabled + "On": enabled hiscoreplugin: group: ADVANCED OPTIONS prompt: HIGH SCORE PLUGIN diff --git a/package/batocera/emulators/retroarch/libretro/libretro-openlara/libretro-openlara.mk b/package/batocera/emulators/retroarch/libretro/libretro-openlara/libretro-openlara.mk index 60d0a192c1c..057f4eb8202 100644 --- a/package/batocera/emulators/retroarch/libretro/libretro-openlara/libretro-openlara.mk +++ b/package/batocera/emulators/retroarch/libretro/libretro-openlara/libretro-openlara.mk @@ -23,7 +23,7 @@ ifneq ($(BR2_PACKAGE_BATOCERA_TARGET_X86_ANY),y) endif define LIBRETRO_OPENLARA_BUILD_CMDS - $(TARGET_CONFIGURE_OPTS) $(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" \ + $(TARGET_CONFIGURE_OPTS) $(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" LDFLAGS="-lmali" \ -C $(@D)/src/platform/libretro -f Makefile $(LIBRETRO_OPENLARA_EXTRA_ARGS) \ platform="$(LIBRETRO_OPENLARA_PLATFORM)" endef diff --git a/package/batocera/emulators/retroarch/libretro/libretro-stella2014/libretro-stella2014.mk b/package/batocera/emulators/retroarch/libretro/libretro-stella2014/libretro-stella2014.mk index 3611957725f..bb754397e71 100644 --- a/package/batocera/emulators/retroarch/libretro/libretro-stella2014/libretro-stella2014.mk +++ b/package/batocera/emulators/retroarch/libretro/libretro-stella2014/libretro-stella2014.mk @@ -14,6 +14,11 @@ ifeq ($(BR2_PACKAGE_BATOCERA_TARGET_BCM2835),y) LIBRETRO_STELLA2014_PLATFORM = rpi1 endif +ifeq ($(BR2_PACKAGE_BATOCERA_TARGET_A133)$(BR2_PACKAGE_BATOCERA_TARGET_H700),y) +LIBRETRO_STELLA2014_PLATFORM = h700 +endif + + define LIBRETRO_STELLA2014_BUILD_CMDS $(TARGET_CONFIGURE_OPTS) $(MAKE) CXX="$(TARGET_CXX)" CC="$(TARGET_CC)" -C \ $(@D)/ -f Makefile platform="$(LIBRETRO_STELLA2014_PLATFORM)" \