Merge pull request #880 from fewtarius/dev

Rebrand 351files (fileman), bump kernel to 6.1.2, misc cleanup.
This commit is contained in:
fewtarius 2022-12-31 16:28:55 -05:00 committed by GitHub
commit 5ca4b08cb2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 3318 additions and 5843 deletions

View file

@ -2071,81 +2071,3 @@ Mempak switch =
Rumblepak switch =
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
; ODROID Go Advance Gamepad
[odroidgo2_joypad]
plugged = True
mouse = False
AnalogDeadzone = 0,0
AnalogPeak = 32768,32768
DPad R = button(11)
DPad L = button(10)
DPad D = button(9)
DPad U = button(8)
Start = button(17)
Z Trig = button(12)
B Button = button(3)
A Button = button(0)
C Button R = button(15)
C Button L = button(2)
C Button D = button(1)
C Button U = button(14)
R Trig = button(5)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
; RG351P Gamepad
[OpenSimHardware OSH PB Controller]
plugged = True
mouse = False
AnalogDeadzone = 0,0
AnalogPeak = 32768,32768
DPad R = hat(0 Right)
DPad L = hat(0 Left)
DPad D = hat(0 Down)
DPad U = hat(0 Up)
Start = button(6)
Z Trig = button(9)
B Button = button(3)
A Button = button(1)
C Button R = button(11)
C Button L = button(2)
C Button D = button(0)
C Button U = button(10)
R Trig = button(5)
L Trig = button(4)
Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0+,0-)
Y Axis = axis(1+,1-)
; RG552 Gamepad
[retrogame_joypad]
plugged = True
mouse = False
AnalogDeadzone = 0,0
AnalogPeak = 32768,32768
DPad R = button(16)
DPad L = button(15)
DPad D = button(14)
DPad U = button(13)
Start = button(9)
Z Trig = button(4)
B Button = button(3)
A Button = button(0)
C Button R = axis(2+)
C Button L = axis(2-)
C Button D = axis(3+)
C Button U = axis(3-)
R Trig = button(5)
L Trig = button(6)
Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)

View file

@ -1,4 +1,4 @@
; RG552 Gamepad - default.ini
; Handheld Gamepad - default.ini
[retrogame_joypad]
plugged = True
mouse = False
@ -22,4 +22,4 @@ Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
Y Axis = axis(1-,1+)

View file

@ -1,4 +1,4 @@
; RG552 Gamepad - zlswap.ini
; Handheld Gamepad - zlswap.ini
[retrogame_joypad]
plugged = True
mouse = False
@ -22,4 +22,4 @@ Mempak switch =
Rumblepak switch =
# Analog axis configuration mappings
X Axis = axis(0-,0+)
Y Axis = axis(1-,1+)
Y Axis = axis(1-,1+)

View file

@ -1,34 +0,0 @@
--- a/Makefile
+++ b/Makefile
@@ -345,6 +345,31 @@
LDFLAGS += -static-libgcc -static-libstdc++
#######################################
+# (armv8 a35, hard point, neon based) ###
+# PlayStation Classic
+else ifeq ($(platform), rg552)
+ TARGET := $(TARGET_NAME)_libretro.so
+ fpic := -fPIC
+ LDFLAGS := -shared -Wl,--version-script=link.T -Wl,--no-undefined
+ CFLAGS += -O2 \
+ -fuse-linker-plugin \
+ -fdata-sections -ffunction-sections -Wl,--gc-sections \
+ -fno-stack-protector -fno-ident -fomit-frame-pointer \
+ -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
+ -fno-unwind-tables -fno-asynchronous-unwind-tables -fno-unroll-loops \
+ -fmerge-all-constants -fno-math-errno \
+ #-marm -mtune=cortex-a53 -mfpu=neon-fp-armv8 -mfloat-abi=hard
+ CXXFLAGS += $(CFLAGS)
+ CPPFLAGS += $(CFLAGS)
+ ASFLAGS += $(CFLAGS)
+ HAVE_NEON = 1
+ CFLAGS += -march=armv8-a
+ LDFLAGS += -static-libgcc
+ CFLAGS += -DDEFAULT_CFG_NAME="\"/storage/.config/game/configs/atari800.cfg\""
+#######################################
+
+
+
# emscripten
else ifeq ($(platform), emscripten)
TARGET := $(TARGET_NAME)_libretro_emscripten.bc

View file

@ -1,29 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present 351ELEC (https://github.com/351elec)
# Copyright (C) 2022-present Fewtarius
PKG_NAME="351files"
PKG_VERSION="a7bb75dafca5c3f8e50e0f456b7ec249a69e1346"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/Tardigrade-nx/351Files"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain SDL2 SDL2_image SDL2_gfx SDL2_ttf"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="A Single panel file Manager tailored for Anbernic 351 devices: RG351V/MP and RG351P/M. Can be easily adapted to any Linux-based device."
PKG_PATCH_DIRS="${DEVICE}"
make_target() {
make DEVICE=${DEVICE^^} RES_PATH=/usr/share/351files/res START_PATH=/storage/roms SDL2_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config CC=$CXX
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/share/351files
cp 351Files ${INSTALL}/usr/bin/
cp -rf res ${INSTALL}/usr/share/351files/
chmod 0755 ${INSTALL}/usr/bin/351Files
}

View file

@ -1,66 +0,0 @@
diff --git a/Makefile b/Makefile
index 7b9afa5..bd964f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,6 @@
TARGET = 351Files
+# DEVICE ?= HANDHELD
# DEVICE ?= RG351P
# DEVICE ?= RG351V
# DEVICE ?= RGB10
diff --git a/src/def.h b/src/def.h
index 92d1a01..db4fec4 100644
--- a/src/def.h
+++ b/src/def.h
@@ -85,6 +85,22 @@
#define KEYBOARD_MARGIN 8
#define KEYBOARD_KEY_SPACING 4
+// Parameters for handheld
+#elif defined(DEVICE_HANDHELD)
+ #define SCREEN_WIDTH 1920
+ #define SCREEN_HEIGHT 1080
+ #define HARDWARE_ACCELERATION 0
+ #define FULLSCREEN 1
+ #define FONT_NAME "NotoSans-Regular.ttf"
+ #define FONT_NAME_MONO "NotoSansMono-Regular.ttf"
+ #define FONT_SIZE 48
+ #define LINE_HEIGHT 72
+ #define ICON_SIZE 58
+ #define MARGIN_X 24
+ #define KEYBOARD_MARGIN 19
+ #define KEYBOARD_KEY_SPACING 10
+ #define KEYBOARD_SYMBOL_SIZE 58
+
// Paramaters for desktop PC
#else
#define SCREEN_WIDTH 640
@@ -124,7 +139,26 @@
#define VIEWER_SCROLL_SPEED 20
// Button events
-#if defined(DEVICE_RG351P)
+#if defined(DEVICE_HANDHELD)
+ #define BUTTON_PRESSED_UP event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_UP
+ #define BUTTON_PRESSED_DOWN event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_DOWN
+ #define BUTTON_PRESSED_LEFT event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_LEFT
+ #define BUTTON_PRESSED_RIGHT event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_RIGHT
+ #define BUTTON_PRESSED_PAGEUP event.type == SDL_JOYBUTTONDOWN && (event.jbutton.button == 4 || event.jbutton.button == 6)
+ #define BUTTON_PRESSED_PAGEDOWN event.type == SDL_JOYBUTTONDOWN && (event.jbutton.button == 5 || event.jbutton.button == 7)
+ #define BUTTON_PRESSED_VALIDATE event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 1
+ #define BUTTON_PRESSED_BACK event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 0
+ #define BUTTON_PRESSED_MENU_CONTEXT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 3
+ #define BUTTON_PRESSED_SELECT event.type == SDL_JOYBUTTONDOWN && event.jbutton.button == 2
+ #define BUTTON_HELD_UP SDL_JoystickGetButton(g_joystick, 13)
+ #define BUTTON_HELD_DOWN SDL_JoystickGetButton(g_joystick, 14)
+ #define BUTTON_HELD_LEFT SDL_JoystickGetButton(g_joystick, 15)
+ #define BUTTON_HELD_RIGHT SDL_JoystickGetButton(g_joystick, 16)
+ #define BUTTON_HELD_PAGEUP SDL_JoystickGetButton(g_joystick, 4) || SDL_JoystickGetButton(g_joystick, 6)
+ #define BUTTON_HELD_PAGEDOWN SDL_JoystickGetButton(g_joystick, 5) || SDL_JoystickGetButton(g_joystick, 7)
+ #define BUTTON_HELD_SELECT SDL_JoystickGetButton(g_joystick, 3)
+ #define BUTTON_HELD_VALIDATE SDL_JoystickGetButton(g_joystick, 1)
+#elif defined(DEVICE_RG351P)
#define BUTTON_PRESSED_UP event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_UP
#define BUTTON_PRESSED_DOWN event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_DOWN
#define BUTTON_PRESSED_LEFT event.type == SDL_JOYHATMOTION && event.jhat.value == SDL_HAT_LEFT

View file

@ -0,0 +1,28 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2021-present 351ELEC (https://github.com/351elec)
# Copyright (C) 2022-present Fewtarius
PKG_NAME="fileman"
PKG_VERSION="8eff443"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/JustEnoughLinuxOS/fileman"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain SDL2 SDL2_image SDL2_gfx SDL2_ttf"
PKG_PRIORITY="optional"
PKG_SECTION="tools"
PKG_SHORTDESC="A Single panel file Manager."
PKG_PATCH_DIRS="${DEVICE}"
make_target() {
make DEVICE=${DEVICE^^} RES_PATH=/usr/share/fileman/res START_PATH=/storage/roms SDL2_CONFIG=${SYSROOT_PREFIX}/usr/bin/sdl2-config CC=$CXX
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
mkdir -p ${INSTALL}/usr/share/fileman
cp fileman ${INSTALL}/usr/bin/
cp -rf res ${INSTALL}/usr/share/fileman/
chmod 0755 ${INSTALL}/usr/bin/fileman
}

View file

@ -4,7 +4,7 @@
PKG_NAME="linux"
PKG_LICENSE="GPL"
PKG_VERSION="6.1"
PKG_VERSION="6.1.2"
PKG_URL="https://www.kernel.org/pub/linux/kernel/v6.x/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_SITE="http://www.kernel.org"
PKG_DEPENDS_HOST="ccache:host rsync:host openssl:host"

File diff suppressed because it is too large Load diff

View file

@ -29,6 +29,7 @@ post_makeinstall_target() {
x86_64)
rm -f ${INSTALL}/usr/config/modules/*32bit*
rm -f ${INSTALL}/usr/config/modules/*Master*
rm -f ${INSTALL}/usr/config/modules/*351Files*
;;
*)
rm -f ${INSTALL}/usr/config/modules/Install*

View file

@ -5,6 +5,6 @@
# Copyright (C) 2020-present Fewtarius
. /etc/profile
jslisten set "killall 351Files"
jslisten set "killall FileMan"
351Files
fileman

View file

@ -2,13 +2,13 @@
<gameList>
<game>
<path>./351Files.sh</path>
<name>351Files</name>
<path>./fileman.sh</path>
<name>fileman</name>
<desc>Single panel file manager</desc>
<developer>Tardigrade</developer>
<developer>Tardigrade and JELOS</developer>
<publisher>JELOS</publisher>
<rating>1.0</rating>
<releasedate>2021</releasedate>
<releasedate>2022</releasedate>
<genre>Script</genre>
<thumbnail>./downloaded_images/filemanager-thumb.png</thumbnail>
<image>./downloaded_images/filemanager.png</image>

View file

@ -20,8 +20,8 @@ makeinstall_target() {
cp ${PKG_DIR}/sources/scripts/fancontrol ${INSTALL}/usr/bin
cp ${PKG_DIR}/sources/scripts/headphone_sense ${INSTALL}/usr/bin
cp ${PKG_DIR}/sources/scripts/system_utils ${INSTALL}/usr/bin
cp ${PKG_DIR}/sources/scripts/volume_sense ${INSTALL}/usr/bin
cp ${PKG_DIR}/sources/scripts/internalwifi ${INSTALL}/usr/bin
cp ${PKG_DIR}/sources/scripts/volume_sense ${INSTALL}/usr/bin
if [ -d "${PKG_DIR}/sources/devices/${DEVICE}" ]
then
cp ${PKG_DIR}/sources/devices/${DEVICE}/* ${INSTALL}/usr/bin

View file

@ -11,13 +11,6 @@ else
nohup systemctl stop fancontrol &
fi
if [ "${DEVICE_POWER_LED}" == "true" ]
then
nohup systemctl start battery &
else
nohup systemctl stop battery &
fi
if [ "${DEVICE_FAKE_JACKSENSE}" == "true" ]
then
nohup systemctl start headphones &

View file

@ -1,57 +0,0 @@
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2020-present Fewtarius
# Simple script to watch the battery capacity and
# turn the power LED red when it reaches 25%
. /etc/profile
function set_led() {
case $1 in
red)
echo out >/sys/class/gpio/gpio${DEVICE_LED}/direction
echo 1 >/sys/class/gpio/gpio${DEVICE_LED}/value
;;
green)
echo out >/sys/class/gpio/gpio${DEVICE_LED}/direction
echo 0 >/sys/class/gpio/gpio${DEVICE_LED}/value
;;
yellow)
echo in >/sys/class/gpio/gpio${DEVICE_LED}/direction
;;
esac
}
while true
do
CAP=$(cat /sys/class/power_supply/battery/capacity)
STAT=$(cat /sys/class/power_supply/battery/status)
if [ ${STAT} == "Discharging" ]
then
if (( ${CAP} <= 10 ))
then
for ctr in $(seq 1 1 5)
do
set_led yellow
sleep .5
set_led red
sleep .5
done
continue
elif (( ${CAP} <= 20 ))
then
set_led red
elif (( ${CAP} <= 30 ))
then
set_led yellow
else
set_led green
fi
elif (( ${CAP} >= 95 ))
then
set_led green
fi
sleep 15
done

View file

@ -11,7 +11,7 @@ set -o pipefail
LOG="/var/log/$(basename "$0").log"
### Summary
# This script listens to volume keys on the RG351MP and adjusts volume
# This script listens to volume keys and adjusts volume
# Fn + Volume up/down will adjust brightness
###
@ -94,9 +94,7 @@ get_devices
mkcontroller 2>/dev/null ||:
# Logic:
# - Listen to both:
# - 'rg351' events to get volume keys (not part of the joystick api)
# - 'joystick' events - as the V's 'fn' key is mapped to the joystick
# - Listen to any input device events to get volume keys (not part of the joystick api)
# - Switch statement keeps high level cases to only 'volume' and 'V function key'
# this is to avoid processing for other events or creating a lot of cases as this will be called
# for all button pushes

View file

@ -28,7 +28,7 @@
GRAPHIC_DRIVERS="crocus i915 iris r300 r600 radeonsi vmware virtio"
# additional packages to install
ADDITIONAL_PACKAGES=" emulators gamesupport 351files"
ADDITIONAL_PACKAGES=" emulators gamesupport fileman"
# additional Firmware to use (dvb-firmware, misc-firmware, wlan-firmware)
# Space separated list is supported,

View file

@ -51,8 +51,8 @@ then
# If DEVICE_ROOT is defined, take additional clean steps to ensure everything is built
# properly for all devices including the root device.
PKG_CLEAN="${PKG_CLEAN} mupen64plus-nx mupen64plus flycast_libretro dosbox-pure pcsx_rearmed pcsx_rearmed \
gpsp raze amiberry lzdoom PPSSPPSDL gzdoom mupen64plussa-core mupen64plussa-input-sdl 351files \
PKG_CLEAN="${PKG_CLEAN} mupen64plus-nx mupen64plus flycast_libretro dosbox-pure \
gpsp raze lzdoom PPSSPPSDL gzdoom mupen64plussa-core mupen64plussa-input-sdl \
gamecontrollerdb duckstationsa moonlight"
fi