Files
Arch-R/config/PanCho.ini
Douglas Teles 6e0e085eb8 gl4es GPU pipeline, ES display fixes, runtime hardening
GPU rendering:
- Panfrost driver working (6 root causes fixed)
- gl4es cross-compiled for aarch64 (GOA_CLONE=ON)
- ES switched to Desktop GL renderer (-DGL=ON, Renderer_GL21.cpp)
- Pipeline: ES (GL 2.1) → gl4es → GLES 2.0 → Panfrost (Mali-G31)

ES display (5 root causes fixed):
- SDL3 KMSDRM rebuild (ALARM ships without it)
- Autologin approach (systemd service can't get DRM master)
- MAJOR/MINOR version bug fix
- GL context restore after setIcon()
- Null safety for glGetString

New files:
- rebuild-es-sdcard.sh (quick SD card rebuild)
- config/PanCho.ini (18-panel selection)
- config/es_input.cfg (gpio-keys + adc-joystick)
- config/gamecontrollerdb.txt (SDL controller mappings)
- scripts/archr-hotkeys.py (volume, brightness, headphone)
- scripts/test-kmsdrm.py (KMSDRM diagnostic)
- bootloader/u-boot-r36s-working/ (fixed U-Boot)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 21:42:50 -03:00

256 lines
8.2 KiB
INI

odroidgoa-uboot-config
echo "begin pancho.ini (Arch R extended)"
# LogoCho
mw 0x01800800 0 0x1000
if load mmc 1:1 0x01800800 LogoCho.ini
then
echo "LogoCho.ini size is ${filesize}"
source 0x01800800
fi
#give user more time to choose boot
sleep 3
################################ Arch R PanCho ####################################
# Extended from original PanCho by R36S-Multiboot project
# Adds clone panel support via L1 (left shoulder) button
#
# R1 + button = Original R36S panels (Panel 0-5)
# L1 + button = Clone device panels (grouped by controller IC)
# R1 + Vol- = Lock panel selection permanently
#
# Panel data is saved to logo.env on boot partition (persistent)
###################################################################################
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# R1 (right shoulder) = Original R36S panels #
# _________________________________ #
# | | #
# | ORIGINAL R36S | #
# |_________________________________| #
# #
# Panel 1 Panel 5 #
# ^ (X) #
# Panel 4 < > Panel 2 (Y) (A) Panel 0 #
# v (B) #
# Panel 3 RGB20S #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# L1 (left shoulder) = Clone device panels #
# _________________________________ #
# | | #
# | CLONE DEVICES | #
# |_________________________________| #
# #
# Clone 1 (ST7703) R36 Max (720p) #
# ^ (X) #
# Clone 10 < > Clone 3 (Y) (A) RX6S #
# (ST7703v) (NV3051D) (B) #
# v Clone 9 #
# Clone 7 (JD9365DA) (NV3051D) #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# GPIO reference:
# DPAD: U=b12 R=b15 D=b13 L=b14
# Face: X=b7 A=b2 B=b5 Y=b6
# Shoulders: R1=c7 L1=c6
# Volume: Vol-=c1
# Functions
setenv SaveLogoEnv 'mw.b 0x2800800 0 0x1000; env export -t 0x2800800 PanelPathSlash; fatwrite mmc 1:1 0x2800800 logo.env ${filesize}'
setenv EnvSave "saveenv; run SaveLogoEnv"
# Init vars but dont save until a panel is chosen
if env exist PanChoInitialized
then
echo PanCho Previously initialized...
else
setenv PanelNum 4
setenv PanelPath "ScreenFiles/Panel ${PanelNum}"
setenv PanelPathSlash "ScreenFiles/Panel ${PanelNum}/"
setenv PanelSettingIsPermanent false
setenv PanChoInitialized true
fi
# Helper to set panel and save+poweroff
setenv SetPanel 'setenv PanelPath "ScreenFiles/${PanelName}"; setenv PanelPathSlash "ScreenFiles/${PanelName}/"; run EnvSave; sleep 3; poweroff'
# Re-init decision-making vars
setenv RunPanCho false
setenv RunPanChoClone false
if ${PanelSettingIsPermanent}
then
echo "Panel Setting Is Permanent... skipping PanCho"
sleep 3
else
# if pressing R1 (right shoulder)...
if gpio input c7
then
# ...and pressing Vol-
if gpio input c1
then
# Lock Panel Selection permanently
setenv PanelSettingIsPermanent true
run EnvSave
else
# RunPanCho (original panels)
setenv RunPanCho true
fi
fi
# if pressing L1 (left shoulder)...
if gpio input c6
then
# ...and pressing Vol-
if gpio input c1
then
# Unlock Panel Selection (reset permanent lock)
setenv PanelSettingIsPermanent false
run EnvSave
else
# RunPanChoClone (clone panels)
setenv RunPanChoClone true
fi
fi
fi
#=============================================================================
# ORIGINAL R36S PANELS (R1 + button)
#=============================================================================
if ${RunPanCho}
then
if gpio input b12
then
# Up = Panel 1
setenv PanelNum "1"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b15
then
# Right = Panel 2
setenv PanelNum "2"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b13
then
# Down = Panel 3
setenv PanelNum "3"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b14
then
# Left = Panel 4
setenv PanelNum "4"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b7
then
# X (north) = Panel 5
setenv PanelNum "5"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b2
then
# A (east) = Panel 0 (Original)
setenv PanelNum "0"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
elif gpio input b5
then
# B (south) = RGB20S
setenv PanelNum "RGB20S"
setenv PanelName "Panel ${PanelNum}"
run SetPanel
else
echo "R1 held but no panel button pressed"
fi
fi
#=============================================================================
# CLONE DEVICE PANELS (L1 + button)
#=============================================================================
# Clone panels grouped by controller IC type:
# Type A (ST7703): Clone Panel 1, 2, 5, 8 — 30MHz, hfp=150
# Type B (NV3051D): Clone Panel 3, 4, 6, 9 — 30MHz, hfp=46
# Type C (JD9365DA): Clone Panel 7 — 30MHz, hfp=188
# Type D (ST7703 var): Clone Panel 10 — 30MHz, hfp=120
# Type E (ST7703 720): R36 Max — 50MHz, 720x720
# RX6S: RX6S — NV3051D variant
#
# One representative per type. If your screen doesn't work with one,
# try the others — some clones within the same type may differ slightly.
#=============================================================================
if ${RunPanChoClone}
then
if gpio input b12
then
# Up = Clone Panel 1 (ST7703 — Type A)
setenv PanelName "Clone Panel 1"
run SetPanel
elif gpio input b15
then
# Right = Clone Panel 3 (NV3051D — Type B)
setenv PanelName "Clone Panel 3"
run SetPanel
elif gpio input b13
then
# Down = Clone Panel 7 (JD9365DA — Type C)
setenv PanelName "Clone Panel 7"
run SetPanel
elif gpio input b14
then
# Left = Clone Panel 10 (ST7703 variant — Type D)
setenv PanelName "Clone Panel 10"
run SetPanel
elif gpio input b7
then
# X (north) = R36 Max (ST7703 720p — Type E)
setenv PanelName "R36 Max"
run SetPanel
elif gpio input b2
then
# A (east) = RX6S (NV3051D variant)
setenv PanelName "RX6S"
run SetPanel
elif gpio input b5
then
# B (south) = Clone Panel 9 (NV3051D — Type B alt)
setenv PanelName "Clone Panel 9"
run SetPanel
elif gpio input b6
then
# Y (west) = Clone Panel 5 (ST7703 — Type A alt)
setenv PanelName "Clone Panel 5"
run SetPanel
else
echo "L1 held but no panel button pressed"
fi
fi
setenv Panel ${PanelNum}
echo "\${PanelNum} is ${PanelNum}"
echo "\${PanelPath} is ${PanelPath}"
echo "\${PanelPathSlash} is ${PanelPathSlash}"
echo "\${PanelSettingIsPermanent} is ${PanelSettingIsPermanent}"
echo "...and those vars should be persistant"
echo "end pancho.ini"