0
0
mirror of https://github.com/libretro/Lakka-LibreELEC.git synced 2025-03-15 10:28:20 +00:00

Latest Lakka Switch Patches (#1600)

* Update kernel Config/patches for CEC support

* Add base CEC support to dock-hotplug, and make so support can be disabled via uenv.txt

* Add working libcec package for L4T, and enable CEC support in packages.

* Fix pulseaudio-alsa routing

This fixes using other audio backends(Alsathread, Alsa, TinyAlsa) in retroarch via dock or bluetooth.

* Downgrade GCC in L4T builds

This fixes issues revolving around undefined symbol: __aarch64_ldadd4_acq_rel issue with gcc 10

* Fix updater for switch builds
Only tested working with tar archives.

* Edit retroarch default settings for the switch.

* Fix pulseaudio changing sink volume issues.
This commit is contained in:
GavinDarkglider
2022-02-21 01:10:20 -08:00
committed by Tomáš Kelemen (vudiq)
parent 800557a248
commit 57ab31843d
20 changed files with 525 additions and 129 deletions
packages
lakka/retroarch_base/retroarch
sysutils/busybox/scripts
projects/L4T

@ -314,8 +314,9 @@ check_is_compatible() {
update_file() {
if [ -f "$UPDATE_DIR/$2" -a -f "$3" ]; then
mount -o remount,rw /flash
if [ ! "$NX_BOOT" = "yes" ]; then
mount -o remount,rw /flash
fi
rm -f "$3"
StartProgress percent "Updating $1... " "$3" $(stat -t "$UPDATE_DIR/$2" | awk '{print $2}')
# use dd here with conv=fsync so that all writes are non-buffered
@ -326,8 +327,10 @@ update_file() {
StopProgress
# loopback file needs writable /flash all the time
if [ "${disk%%=*}" != "FILE" ]; then
mount -o remount,ro /flash
if [ ! "$NX_BOOT" = "yes" ]; then
if [ "${disk%%=*}" != "FILE" ]; then
mount -o remount,ro /flash
fi
fi
sync
fi
@ -587,7 +590,7 @@ mount_storage() {
wakeonlan
if [ "$NX_BOOT" = "yes" ]; then
if [ "$NX_BOOT" = "yes" ]; then
DISTRO=${IMAGE_SYSTEM%'/'*}
mkdir -p /flash/$DISTRO/storage
mount --bind /flash/$DISTRO/storage /storage
@ -744,7 +747,12 @@ check_update() {
tar -xf "$UPDATE_TAR" -C $UPDATE_DIR/.tmp 1>/dev/null 2>/tmp/tarresult.txt || TARRESULT="1"
if [ "${TARRESULT}" -eq "0" ]; then
mv $UPDATE_DIR/.tmp/*/target/* $UPDATE_DIR &>/dev/null
if [ "$NX_BOOT" = "yes" ]; then
mv $UPDATE_DIR/.tmp/* $UPDATE_DIR &>/dev/null
UPDATE_DIR=${UPDATE_TAR%.*}
else
mv $UPDATE_DIR/.tmp/*/target/* $UPDATE_DIR &>/dev/null
fi
sync
StopProgress "done"
else
@ -826,12 +834,25 @@ check_update() {
fi
sync
if [ ! "$NX_BOOT" = "yes" ]; then
if [ ! -b "/$IMAGE_KERNEL" -a ! -f "/flash/$IMAGE_KERNEL" ] || [ ! -f "/flash/$IMAGE_SYSTEM" ]; then
echo "Missing (target) ${IMAGE_KERNEL} or ${IMAGE_SYSTEM}!"
do_cleanup
StartProgress countdown "Normal startup in 30s... " 30 "NOW"
return 0
fi
else
if [ ! -f "/flash/$IMAGE_KERNEL" ] || [ ! -f "/flash/$IMAGE_SYSTEM" ]; then
echo "Missing (target) ${IMAGE_KERNEL} or ${IMAGE_SYSTEM}!"
do_cleanup
StartProgress countdown "Normal startup in 30s... " 30 "NOW"
return 0
fi
fi
if [ ! -b "/$IMAGE_KERNEL" -a ! -f "/flash/$IMAGE_KERNEL" ] || [ ! -f "/flash/$IMAGE_SYSTEM" ]; then
echo "Missing (target) ${IMAGE_KERNEL} or ${IMAGE_SYSTEM}!"
do_cleanup
StartProgress countdown "Normal startup in 30s... " 30 "NOW"
return 0
if [ "$NX_BOOT" = "yes" ]; then
UPDATE_KERNEL=$IMAGE_KERNEL
UPDATE_SYSTEM=$IMAGE_SYSTEM
fi
if [ ! -f "$UPDATE_DIR/$UPDATE_KERNEL" -o ! -f "$UPDATE_DIR/$UPDATE_SYSTEM" ]; then
@ -842,7 +863,7 @@ check_update() {
fi
# check md5 sums if .nocheck doesn't exist
if [ ! -f "$UPDATE_ROOT/.nocheck" ]; then
if [ ! -f "$UPDATE_ROOT/.nocheck" -a ! "$NX_BOOT" = "yes" ]; then
if [ -f "$UPDATE_DIR/${UPDATE_KERNEL}.md5" -a -f "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" ]; then
# *.md5 size-check
if [ ! -s "$UPDATE_DIR/${UPDATE_KERNEL}.md5" -o ! -s "$UPDATE_DIR/${UPDATE_SYSTEM}.md5" ]; then
@ -988,7 +1009,7 @@ for arg in $(cat /proc/cmdline); do
SYSTEM_IMAGE=*)
IMAGE_SYSTEM="${arg#*=}"
[ "${IMAGE_SYSTEM:0:1}" = "/" ] && IMAGE_SYSTEM="${IMAGE_SYSTEM:1}"
;;
;;
boot=*)
boot="${arg#*=}"
case $boot in