Merge pull request #2499 from edemirkan/mainline-3566

Merge branch 'dev' into mainline-3566
This commit is contained in:
Alex 2023-12-05 10:18:26 -07:00 committed by GitHub
commit a4b15b216d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 99 additions and 48 deletions

View file

@ -1879,7 +1879,7 @@ add_system_dir() {
then
mkdir -p "${ESTMP}"
fi
cat <<EOF >>${ESTMP}/${DISTRO}-system-dirs.conf
cat <<EOF >>${ESTMP}/system-dirs.conf
d ${1} 0777 root root - -
EOF
}

View file

@ -5,10 +5,8 @@
. /etc/profile
PORTPLATFORM=$(tr -d '\0' </sys/firmware/devicetree/base/model 2>/dev/null)
if [[ "${UI_SERVICE}" =~ weston.service ]]; then
case ${PORTPLATFORM} in
case ${QUIRK_DEVICE} in
"Hardkernel ODROID-GO-Ultra"|"Powkiddy RGB10 MAX 3"|"Hardkernel ODROID-N2*")
#Fixing ports on S922X, exclude FNA games
for port in /storage/roms/ports/*.sh; do

View file

@ -66,7 +66,7 @@ else
fi
#Make sure permissions are correct in the PortMaster folder
chmod 755 /storage/roms/ports/PortMaster/* -R
chmod 755 /storage/roms/ports/* -R
#Start PortMaster
@LIBEGL@

View file

@ -23,9 +23,8 @@ SDLDBUSERFILE="/storage/.config/SDL-GameControllerDB/gamecontrollerdb.txt"
clibs="/usr/lib/compat/"
raloc="/usr/bin"
raconf="--config /storage/.config/retroarch/retroarch.cfg"
pdevice=$(tr -d '\0' </sys/firmware/devicetree/base/model 2>/dev/null)
case ${pdevice} in
case "${QUIRK_DEVICE}" in
"Anbernic RG552")
profile="rg552"
lres="N"

View file

@ -20,7 +20,7 @@
################################################################################
PKG_NAME="gambatte-lr"
PKG_VERSION="327137ec04d514b6c06c30c8b1d0b5da4267af6c"
PKG_VERSION="9b232311f4f462a5dc26187b511ea361d30c5959"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPLv2"

View file

@ -1,7 +1,6 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2021-present 351ELEC (https://github.com/351ELEC)
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
# Copyright (C) 2023-present brooksytech (https://github.com/brookstech)
PKG_NAME="gzdoom-sa"
PKG_VERSION="d05ea1965ad1f070859806a3a67aaf5ea6c46234"

View file

@ -0,0 +1,12 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# Copyright (C) 2023-present - The JELOS Project (https://github.com/JustEnoughLinuxOS)
PKG_NAME="libwebp"
PKG_VERSION="89c5b917463c07bfb5b6390b81d258c49d5fe8c6"
PKG_LICENSE="BSD"
PKG_SITE="https://github.com/webmproject/libwebp"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_HOST="toolchain:host"
PKG_DEPENDS_TARGET="toolchain"
PKG_LONGDESC="WebP codec is a library to encode and decode images in WebP format."
PKG_TOOLCHAIN="cmake"

View file

@ -97,16 +97,18 @@ else
fi
### Migration part 2
for GAMES in /storage/games-internal /storage/games-external
do
COUNT=$(find ${GAMES}/roms 2>/dev/null| wc -l)
if [ "${COUNT}" -lt 10 ]
then
mkdir -p "${GAMES}/roms" 2>/dev/null
mv "${GAMES}/"* "${GAMES}/roms/" 2>/dev/null
fi
done
systemctl restart jelos-automount
if [ ! -e "/storage/.migrated_games2" ]
then
for GAMES in /storage/games-internal /storage/games-external
do
if [ ! -d "${GAMES}/roms" ]
then
mkdir -p "${GAMES}/roms" 2>/dev/null
fi
mv "${GAMES}"/* "${GAMES}/roms/"
done
touch /storage/.migrated_games2
fi
### 20231129 - Don't default to performance.
EPP=$(get_setting system.power.epp)
@ -133,18 +135,4 @@ then
set_setting system.merged.storage 0
fi
### 20231129 - Don't default to performance.
EPP=$(get_setting system.power.epp)
if [ -z "${EPP}" ] || \
[ "${EPP}" = "performance" ]
then
EPP="balance_performance"
set_setting system.power.epp ${EPP}
fi
### 20231130 - Replace smb.conf for new overlay mechanism.
cp -f /usr/config/smb.conf /storage/.config
### Items below this line should not be removed.
tocon "Update complete, rebooting..."
reboot
systemctl restart jelos-automount

View file

@ -9,12 +9,6 @@
UPDATE_ROOT="/storage/.update"
MOUNT_GAMES=$(get_setting system.automount)
GAMES_DEVICE=$(get_setting system.gamesdevice)
MS_ENABLED=$(get_setting system.merged.storage)
MS_DEVICE=$(get_setting system.merged.device)
### Default to the external storage device.
MOUNT_PATH="/storage/games-external"
MS_PATH="/storage/roms"
function unmount() {
@ -26,6 +20,14 @@ function start_ms() {
### Entrypoint will be either games card found (external), or not found (internal).
MOUNT_PATH="/storage/games-${1}"
MS_DEVICE=$(get_setting system.merged.device)
### If the merge target isn't defined and we have an external microsd, we should use the external card by default.
if [ -z "${MS_DEVICE}" ] && \
[ "${1}" = "external" ]
then
set_setting system.merged.device external
fi
### Determine if internal or external is the primary target by configuration.
case ${MS_DEVICE} in
internal)
@ -38,8 +40,9 @@ function start_ms() {
;;
esac
MS_ENABLED=$(get_setting system.merged.storage)
if [ -e "/storage/.ms_unsupported" ] || \
[ "${MS_ENABLED}" = 0 ]
[ ! "${MS_ENABLED}" = 1 ]
then
log $0 "Executing bind mount of ${MOUNT_PATH} to ${MS_PATH}"
mount --bind ${MOUNT_PATH}/roms ${MS_PATH}
@ -88,7 +91,11 @@ then
fi
function create_game_dirs() {
systemd-tmpfiles --create /usr/lib/tmpfiles.d/JELOS-system-dirs.conf >/dev/null 2>&1 ||:
### We don't want systemd to manage this or the directories could be created in the wrong location.
if [ -e "/usr/config/system-dirs.conf" ]
then
systemd-tmpfiles --create /usr/config/system-dirs.conf >/dev/null 2>&1 ||:
fi
}
function load_modules() {
@ -104,7 +111,7 @@ function load_modules() {
}
function mount_games() {
local MOUNT_PATH="/storage/games-external"
MOUNT_PATH="/storage/games-external"
FSTYPE=$(blkid -o export ${1} | awk 'BEGIN {FS="="} /TYPE/ {print $2}')
case ${FSTYPE} in
ext4)
@ -171,7 +178,9 @@ function find_games() {
# Assume this is an android boot device and ignore it.
continue
fi
if [ -e "${DEV}" ] && \
ISMOUNTED="$(grep "${DEV}" /proc/mounts) >/dev/null 2>&1"
if [ ! "$?" = 0 ] && \
[ -e "${DEV}" ] && \
[ ! -e "/storage/.please_resize_me" ]
then
GAMES_DEVICE=${DEV}
@ -182,6 +191,13 @@ function find_games() {
fi
done
log $0 "Could not find external card to mount, assume internal."
MS_DEVICE=$(get_setting system.merged.device)
### If the merge target isn't defined and we do not have an external microsd, we should use the internal card by default.
if [ -z "${MS_DEVICE}" ]
then
set_setting system.merged.device internal
fi
start_ms internal
create_game_dirs
exit 0

View file

@ -15,7 +15,7 @@ case "${1}" in
"ALL")
systemctl stop ${UI_SERVICE}
cd /
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' \) -delete
find /storage -mindepth 1 \( ! -regex '^/storage/.update.*' -a ! -regex '^/storage/roms.*' -a ! -regex '^/storage/games-*' \) -delete
mkdir /storage/.config/
sync
systemctl reboot

View file

@ -0,0 +1,36 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
LOGFILE="/var/log/migrate.log"
read -p "WARNING: This tool can cause data loss... Make sure you have a backup before proceeding... Press control-c now to cancel, or any other key to continue..."
for GAMES in /storage/games-internal /storage/games-external
do
echo "Working on ${GAMES}..."
if [ ! -d "${GAMES}/roms" ]
then
echo "Making ${GAMES}/roms..."
mkdir -p "${GAMES}/roms" >>${LOGFILE} 2>&1 1|>>${LOGFILE}
fi
for DIR in $(find "${GAMES}/" -type d -maxdepth 1 -mindepth 1 2>/dev/null)
do
TARGET_DIR=$(basename ${DIR})
echo "Working on ${DIR}..."
if [[ "${DIR}" =~ roms$ ]]
then
continue
fi
if [ ! -d "${GAMES}/roms/${TARGET_DIR}" ]
then
echo "Making ${GAMES}/roms/${TARGET_DIR}..."
mkdir -p "${GAMES}/roms/${TARGET_DIR}" >>${LOGFILE} 2>&1
fi
mv "${DIR}"/* "${GAMES}/roms/${TARGET_DIR}" >>${LOGFILE} 2>&1
rsync -av --remove-source-files "${DIR}"/* "${GAMES}/roms/${TARGET_DIR}" >>${LOGFILE} 2>&1
done
echo "Clean empties in ${GAMES}..."
find "${GAMES}" -type d -empty -delete >>${LOGFILE} 2>&1 1|>>${LOGFILE}
echo "Your games have been migrated, however you will need to manually clean up stale directories. Please reboot your system now by running the `reboot` command."
done

View file

@ -927,6 +927,7 @@ function set_gambatte() {
local COLORIZATION=$(game_setting renderer.colorization)
local TWB1_COLORIZATION=$(game_setting renderer.twb1_colorization)
local TWB2_COLORIZATION=$(game_setting renderer.twb2_colorization)
local TWB3_COLORIZATION=$(game_setting renderer.twb3_colorization)
local PIXELSHIFT1_COLORIZATION=$(game_setting renderer.pixelshift1_colorization)
if [ -n "${COLORIZATION}" ]
@ -946,6 +947,7 @@ function set_gambatte() {
echo 'gambatte_gb_internal_palette = "'${COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_1 = "'${TWB1_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_2 = "'${TWB2_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_twb64_3 = "'${TWB3_COLORIZATION}'"' >> ${GAMBATTECONF}
echo 'gambatte_gb_palette_pixelshift_1 = "'${PIXELSHIFT1_COLORIZATION}'"' >> ${GAMBATTECONF}
;;
esac

View file

@ -44,6 +44,7 @@ then
fi
### Start the automount service
tocon "Starting storage services..."
systemctl start jelos-automount
### Run common start scripts

View file

@ -3,7 +3,7 @@
# Copyright (C) 2023 JELOS (https://github.com/JustEnoughLinuxOS)
PKG_NAME="emulationstation"
PKG_VERSION="adc7cb5"
PKG_VERSION="b305f698cd37307c0c037b1ceb5166395b3c524b"
PKG_GIT_CLONE_BRANCH="main"
PKG_REV="1"
PKG_ARCH="any"

View file

@ -1227,8 +1227,8 @@ makeinstall_target() {
mkdir -p ${INSTALL}/usr/config/emulationstation
cp -f ${ESTMP}/es_systems.cfg ${INSTALL}/usr/config/emulationstation
mkdir -p ${INSTALL}/usr/lib/tmpfiles.d
cp -f ${ESTMP}/${DISTRO}-system-dirs.conf ${INSTALL}/usr/lib/tmpfiles.d
### Automount should handle this.
cp -f ${ESTMP}/system-dirs.conf ${INSTALL}/usr/config
mkdir -p ${INSTALL}/usr/bin
cp ${PKG_DIR}/scripts/mkcontroller ${INSTALL}/usr/bin