Skip to content

Commit

Permalink
20240528
Browse files Browse the repository at this point in the history
* Changed H700 "overclock" to default to 1.5GHz
* Changed S12popualateShare to default to KNULLI version
* Added initial RK3128 support (Powkiddy A12/A13, PS5000, PS7000)
  • Loading branch information
acmeplus committed May 29, 2024
1 parent 726a060 commit d8b8662
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -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
"none")
do_overclock 1512000
;;
"turbo")
do_overclock 1416000
;;
"high")
do_overclock 1296000
;;
"medium")
do_overclock 1200000
;;
"low")
do_overclock 720000
;;
"powersave")
do_overclock 480000
;;
*)
# default
do_overclock 1512000
;;
esac
fi

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ then
# 480000 720000 1032000 1104000 1200000 1296000 1416000 1512000

case "${OVALUE}" in
"extreme")
"none")
do_overclock 1512000
;;
"turbo")
Expand All @@ -25,11 +25,11 @@ then
"high")
do_overclock 1296000
;;
"none")
"medium")
do_overclock 1200000
;;
"low")
do_overclock 1032000
do_overclock 720000
;;
"powersave")
do_overclock 480000
Expand Down
1 change: 1 addition & 0 deletions board/batocera/fsoverlay/etc/init.d/S12populateshare
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ for FILE in music bios extractions kodi library saves screenshots splash \
system/.config/lirc/lircd.conf \
system/configs/emulationstation/es_input.cfg \
system/configs/emulationstation/es_settings.cfg \
system/configs/emulationstation/about.info \
system/.kodi \
system/configs/amiberry \
system/configs/amiberry/whdboot \
Expand Down
24 changes: 24 additions & 0 deletions board/batocera/rockchip/rk3128/fsoverlay/etc/init.d/rcK
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions board/batocera/rockchip/rk3128/fsoverlay/etc/init.d/rcS
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/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

# 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions configs/batocera-rk3128.board
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,20 @@ BR2_PACKAGE_LIBCEC=y
BR2_PACKAGE_INPUT_EVENT_DAEMON=y
BR2_PACKAGE_LIBSODIUM=y
#BR2_PACKAGE_MOONLIGHT_EMBEDDED=n

# ADB
BR2_PACKAGE_ANDROID_TOOLS=y
BR2_PACKAGE_ANDROID_TOOLS_ADBD=y

# SDL1
BR2_PACKAGE_SDL=y
BR2_PACKAGE_SDL_FBCON=y
BR2_PACKAGE_SDL_GFX=y
BR2_PACKAGE_SDL_IMAGE=y
BR2_PACKAGE_SDL_IMAGE_BMP=y
BR2_PACKAGE_SDL_IMAGE_JPEG=y
BR2_PACKAGE_SDL_IMAGE_PNG=y
BR2_PACKAGE_SDL_SOUND=y
BR2_PACKAGE_SDL_TTF=y
BR2_PACKAGE_SDL12_COMPAT=y

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
--- a/configgen/generators/libretro/libretroConfig.py
+++ b/configgen/generators/libretro/libretroConfig.py
@@ -14,12 +14,23 @@ from PIL import Image, ImageOps
--- a/configgen/generators/libretro/libretroConfig.py 2024-05-29 02:34:53.563715544 +0000
+++ b/configgen/generators/libretro/libretroConfig.py 2024-05-29 02:36:09.387623908 +0000
@@ -14,12 +14,23 @@
import utils.bezels as bezelsUtil
import utils.videoMode as videoMode
import controllersConfig
Expand Down
6 changes: 3 additions & 3 deletions package/batocera/core/batocera-system/Config.in
Original file line number Diff line number Diff line change
Expand Up @@ -286,10 +286,10 @@ config BR2_PACKAGE_BATOCERA_SYSTEM
select BR2_PACKAGE_WIIMOTES_RULES if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 # wiimotes
select BR2_PACKAGE_WIIMOTE_3RDPARTY if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 # some non official wiimotes
select BR2_PACKAGE_XWIIMOTE if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 # a tool to analye wiimote events (mainly to debug, but helps and is funny)
select BR2_PACKAGE_BATOCERA_GUNS if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326
select BR2_PACKAGE_BATOCERA_GUNS if !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 && !BR2_PACKAGE_BATOCERA_TARGET_RK3128
select BR2_PACKAGE_BATOCERA_WHEEL_CALIBRATOR
select BR2_PACKAGE_NEW_LG4FF if !BR2_PACKAGE_BATOCERA_TARGET_RK3326 && !BR2_PACKAGE_BATOCERA_TARGET_XU4 && !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 # Improved Linux module driver for Logitech driving wheels (the lg4ff is disabled in kernels)
select BR2_PACKAGE_HID_NX if !BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4 && !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 # updated nintendo switch controller driver, requires kernel > 4.4
select BR2_PACKAGE_NEW_LG4FF if !BR2_PACKAGE_BATOCERA_TARGET_RK3326 && !BR2_PACKAGE_BATOCERA_TARGET_XU4 && !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 && !BR2_PACKAGE_BATOCERA_TARGET_RK3128 # Improved Linux module driver for Logitech driving wheels (the lg4ff is disabled in kernels)
select BR2_PACKAGE_HID_NX if !BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_4 && !BR2_PACKAGE_BATOCERA_TARGET_BCM2835 && !BR2_PACKAGE_BATOCERA_TARGET_RK3326 && !BR2_PACKAGE_BATOCERA_TARGET_RK3128 # updated nintendo switch controller driver, requires kernel > 4.4
select BR2_PACKAGE_JOYCOND if BR2_PACKAGE_HID_NX # nintendo switch joycon daemon (requires hid-nx)
select BR2_PACKAGE_JAMMASD

Expand Down

0 comments on commit d8b8662

Please sign in to comment.