Skip to content

Commit

Permalink
L4T/Ayn: upstream changes from 5.x
Browse files Browse the repository at this point in the history
Lakka 5.x Switch changes (#1853)
Lakka v5.x switchroot 5.1.2 (#1871)
Fix Switch Issue's in upstream 5.x (#1888)
Minor Switch Changes (#1893)
Lakka v5.x switch 3 (#1895)
Lakka v5.x switch 4 (#1898)
L4T: Xorg-server: Fix build issue (#1924)
Switch: remove ra patch
Lakka v5.x switch 6 (#1926)
Cleanups, More LibreELEC Stuff, more permission fixes, Misc switch stuff. (#1930)
Switch: U-Boot: bump version to 2024-NX02 (#1946)

L4T/Ayn post-upstreaming fixes
- retroarch_joypad_autoconfig: remove spaces from file names
- retroarch: remove Switch specific patch merged upstream
- libXv: move to L4T packages folder (package removed in upstream)
- bring some packages from v5.x to L4T packages
- ffmpeg: remove vulkan
- remove stella core from Switch build (missing C++ headers)
- Ayn/Odin: use proper kernel arg to not hide kernel messages in console
- connman: add wpa_supplicant support back
  • Loading branch information
GavinDarkglider authored and ToKe79 committed May 21, 2024
1 parent 4d302c9 commit 600e246
Show file tree
Hide file tree
Showing 224 changed files with 64,738 additions and 1,426 deletions.
1 change: 1 addition & 0 deletions packages/audio/pulseaudio-configs/package.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
PKG_NAME="pulseaudio-configs"
PKG_VERSION="1.1"
PKG_LICENSE="GPL"
PKG_DEPENDS_TARGET="alsa-plugins pulseaudio"
PKG_LONGDESC="Standard configs for pulseaudio"
Expand Down
6 changes: 4 additions & 2 deletions packages/audio/pulseaudio-configs/pulse/client.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@

; default-sink =
; default-source =
; default-server =
default-server = unix:/tmp/pulse-server
; default-dbus-server =

; autospawn = yes
autospawn = no
; daemon-binary = /usr/bin/pulseaudio
; extra-arguments = --log-target=syslog

Expand All @@ -33,3 +33,5 @@

; auto-connect-localhost = no
; auto-connect-display = no

enable-memfd = yes
3 changes: 2 additions & 1 deletion packages/audio/pulseaudio-configs/pulse/default.pa
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,11 @@ load-module module-bluetooth-discover
.endif

### Load several protocols
load-module module-dbus-protocol
.ifexists module-esound-protocol-unix.so
load-module module-esound-protocol-unix
.endif
load-module module-native-protocol-unix
load-module module-native-protocol-unix auth-group=audio socket=/tmp/pulse-server

### Network access (may be configured with paprefs, so leave this commented
### here if you plan to use paprefs)
Expand Down
4 changes: 2 additions & 2 deletions packages/devel/libcec/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)

PKG_NAME="libcec"
PKG_VERSION="4.0.7"
PKG_SHA256="bcd92c376993a5721d346edcc09eb17289451f9156b1d1d113c9663c2046315a"
PKG_VERSION="6.0.2"
PKG_SHA256="090696d7a4fb772d7acebbb06f91ab92e025531c7c91824046b9e4e71ecb3377"
PKG_LICENSE="GPL"
PKG_SITE="http://libcec.pulse-eight.com/"
PKG_URL="https://github.com/Pulse-Eight/libcec/archive/libcec-${PKG_VERSION}.tar.gz"
Expand Down
6 changes: 2 additions & 4 deletions packages/graphics/libdrm/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,8 @@ listcontains "${GRAPHIC_DRIVERS}" "freedreno" &&
listcontains "${GRAPHIC_DRIVERS}" "etnaviv" &&
PKG_MESON_OPTS_TARGET+=" -Detnaviv=enabled" || PKG_MESON_OPTS_TARGET+=" -Detnaviv=disabled"

if [ "${DISTRO}" = "Lakka" ]; then
listcontains "${GRAPHIC_DRIVERS}" "nouveau" &&
PKG_MESON_OPTS_TARGET="${PKG_MESON_OPTS_TARGET//-Dnouveau=disabled/-Dnouveau=enabled}"
fi
listcontains "${GRAPHIC_DRIVERS}" "nouveau" &&
PKG_MESON_OPTS_TARGET="${PKG_MESON_OPTS_TARGET//-Dnouveau=disabled/-Dnouveau=enabled}"

post_makeinstall_target() {
# Remove all test programs installed by install-test-programs=true except modetest
Expand Down
6 changes: 3 additions & 3 deletions packages/lakka/lakka_tools/joycond/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ PKG_NAME="joycond"
PKG_DEPENDS_TARGET="toolchain cmake:host libevdev systemd"
PKG_SITE="https://github.com/DanielOgorchock/joycond"
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
PKG_VERSION="031f04311a912514cea9deb020512ee6d7063398"
PKG_SHA256="c2681b1f7723acf0e51e318be3194202e3a77627c78aa39e0a70797d0155dcba"
PKG_URL="https://gitlab.com/switchroot/userspace/joycond/-/archive/c48187fcdacda1b139297e4944a149125e0800b2/joycond-c48187fcdacda1b139297e4944a149125e0800b2.tar.gz"
PKG_VERSION="c83539a8995040e8daf6912dab32a11082e75acf"
PKG_SHA256="10b043f226e49b17f1025ded37257ca096ed9fac5f22bbe91cd12cd6e7882835"
PKG_URL="https://gitlab.com/switchroot/userspace/joycond/-/archive/linux/joycond-linux.tar.gz"
else
PKG_VERSION="2d3f553060291f1bfee2e49fc2ca4a768b289df8"
PKG_SHA256="34ba2a4ffd35f2b2bbebd8ce47d17f2238d991bc6262653d0617b28f864e4b63"
Expand Down
4 changes: 4 additions & 0 deletions packages/lakka/lakka_tools/wii-u-gc-adapter/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@ makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp wii-u-gc-adapter ${INSTALL}/usr/bin/
}

post_install() {
enable_service wii-u-gc-adapter.service
}
2 changes: 2 additions & 0 deletions packages/lakka/libretro_cores/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ elif [ "${PROJECT}" = "Generic" -a "${ARCH}" = "i386" ]; then
EXCLUDE_LIBRETRO_CORES+=" fake_08 openlara"
elif [ "${PROJECT}" = "Ayn" -a "${DEVICE}" = "Odin" ]; then
EXCLUDE_LIBRETRO_CORES+=" lr_moonlight"
elif [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
EXCLUDE_LIBRETRO_CORES+=" stella"
fi

# disable cores that are only for specific targets
Expand Down
5 changes: 5 additions & 0 deletions packages/lakka/libretro_cores/ppsspp/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ PKG_CMAKE_OPTS_TARGET="-DLIBRETRO=ON \
-DUSE_DISCORD=OFF \
-DUSE_MINIUPNPC=OFF"

# for future compatibility - in case other platforms will use system ffmpeg
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
PKG_CMAKE_OPTS_TARGET=${PKG_CMAKE_OPTS_TARGET//-DUSE_SYSTEM_FFMPEG=ON/-DUSE_SYSTEM_FFMPEG=OFF}
fi

if [ "${OPENGL_SUPPORT}" = "yes" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL}"
fi
Expand Down
2 changes: 1 addition & 1 deletion packages/lakka/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ if [ "${DEVICE}" != "Switch" -a "${DEVICE}" != "RPiZero-GPiCase" -a "${DEVICE}"
PKG_DEPENDS_TARGET+=" xbox360_controllers_shutdown"
fi

if [ "${CEC_FRAMEWORK_SUPPORT}" = yes ]; then
if [ "${CEC_FRAMEWORK_SUPPORT}" = yes -a ! "${PROJECT}" = "L4T" ]; then
PKG_DEPENDS_TARGET+=" cec_mini_kb"
fi
14 changes: 6 additions & 8 deletions packages/lakka/retroarch_base/retroarch/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -133,12 +133,12 @@ if [ "${PROJECT}" = "L4T" ]; then
fi
fi

if [ "${LAKKA_NIGHTLY}" = yes ]; then
if [ "${LAKKA_NIGHTLY}" = "yes" ]; then
PKG_MAKE_OPTS_TARGET+=" HAVE_LAKKA_NIGHTLY=1"
fi

if [ "${LAKKA_DEVBUILD}" = yes ]; then
elif [ "${LAKKA_DEVBUILD}" = "yes" ]; then
PKG_MAKE_OPTS_TARGET+=" HAVE_LAKKA_DEVBUILD=1"
elif [ -n "${LAKKA_CANARY_PATH}" ]; then
PKG_MAKE_OPTS_TARGET+=" HAVE_LAKKA_CANARY=\"${LAKKA_CANARY_PATH}\""
fi

pre_configure_target() {
Expand Down Expand Up @@ -233,7 +233,8 @@ makeinstall_target() {
echo 'audio_driver = "alsathread"' >> ${INSTALL}/etc/retroarch.cfg
echo 'audio_filter_dir = "/usr/share/audio_filters"' >> ${INSTALL}/etc/retroarch.cfg

if [ "${DEVICE}" = "Exynos" ]; then # workaround the 55fps bug
if [ "${PROJECT}" = "Samsung" -a "${DEVICE}" = "Exynos" ]; then
# workaround the 55fps bug
echo 'audio_out_rate = "44100"' >> ${INSTALL}/etc/retroarch.cfg
fi

Expand Down Expand Up @@ -337,9 +338,6 @@ makeinstall_target() {
sed -i -e 's|^menu_driver =.*|menu_driver = "ozone"|' ${INSTALL}/etc/retroarch.cfg

if [ ! "${PROJECT}" = "Ayn" -a ! "${DEVICE}" = "Odin" ]; then
#Set Default Joycon index to Combined Joycons.
echo 'input_player1_joypad_index = "2"' >> ${INSTALL}/etc/retroarch.cfg

#Set Joypad as joypad with analog
echo 'input_libretro_device_p1 = "5"' >> ${INSTALL}/etc/retroarch.cfg
else
Expand Down
12 changes: 0 additions & 12 deletions packages/lakka/retroarch_base/retroarch/scripts/retroarch-config
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,3 @@ for i in 5 4 3 2 1 0; do [ -e /dev/snd/pcmC${i}D0p ] && export ALSA_CARD=$i; don

echo "ALSA_CARD=\"$ALSA_CARD\"" > /run/libreelec/retroarch.conf
echo "LD_LIBRARY_PATH=\"/usr/lib:/tmp/cores\"" >> /run/libreelec/retroarch.conf

# WAR: Do to everything running as root, udev doesnt properly hide L/R joycon on 3 out of 4 revisions nintendo switch
# which makes the combined controller index 2, but on Nintendo Switch Lite, on first boot we need to change this to 1
# or built in gamepad needs user intervention to be used.

SERIAL_PREFIX=$(cat /sys/firmware/devicetree/base/serial-number)
SERIAL_PREFIX=${SERIAL_PREFIX:0:3}

if [ ${SERIAL_PREFIX} = "NXV" -a ! -f /storage/.config/retroarch/retroarch.cfg ]; then
cp /etc/retroarch.cfg /storage/.config/retroarch/retroarch.cfg
sed -i -e 's|input_player1_joypad_index = \"2\"|input_player1_joypad_index = \"0\"|' /storage/.config/retroarch/retroarch.cfg
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
input_driver = "udev"
input_device = "Nintendo Switch Left Joy-Con Test"

input_vendor_id = "1406"
input_product_id = "8198"

input_b_btn = "9"
input_y_btn = "7"
input_select_btn = "5"
input_start_btn = "0"
input_up_axis = "+0"
input_down_axis = "-0"
input_left_axis = "-1"
input_right_axis = "+1"
input_a_btn = "8"
input_x_btn = "10"
input_l_btn = "2"
input_r_btn = "4"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
input_driver = "udev"
input_device = "Nintendo Switch Lite Gamepad"
input_vendor_id = "1406"
input_product_id = "61731"
input_b_btn = "0"
input_y_btn = "3"
input_select_btn = "9"
input_start_btn = "10"
input_up_btn = "14"
input_down_btn = "15"
input_left_btn = "16"
input_right_btn = "17"
input_a_btn = "1"
input_x_btn = "2"
input_l_btn = "5"
input_r_btn = "6"
input_l2_btn = "7"
input_r2_btn = "8"
input_l3_btn = "12"
input_r3_btn = "13"
input_l_x_plus_axis = "+0"
input_l_x_minus_axis = "-0"
input_l_y_plus_axis = "+1"
input_l_y_minus_axis = "-1"
input_r_x_plus_axis = "+2"
input_r_x_minus_axis = "-2"
input_r_y_plus_axis = "+3"
input_r_y_minus_axis = "-3"
input_gun_trigger_mbtn = "1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
input_driver = "udev"
input_device = "Nintendo Switch Right Joy-Con"

input_vendor_id = "1406"
input_product_id = "8199"

input_b_btn = "1"
input_y_btn = "0"
input_select_btn = "9"
input_start_btn = "8"
input_up_axis = "-0"
input_down_axis = "+0"
input_left_axis = "+1"
input_right_axis = "-1"
input_a_btn = "2"
input_x_btn = "3"
input_l_btn = "4"
input_r_btn = "6"
11 changes: 8 additions & 3 deletions packages/linux/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,21 @@ case "${LINUX}" in
;;
L4T)
if [ -z "${L4T_KERNEL_VERSION}" ]; then
echo "${PROJECT}: ${KERNEL} - you must set L4T_KERNEL_VERSION in projects/${PROJECT}/device/${DEVICE}/options"
echo -n "${DEVICE:-${PROJECT}}: ${KERNEL} - you must set L4T_KERNEL_VERSION in projects/${PROJECT}/"
if [ -z "${DEVICE}" ]; then
echo "options"
else
echo "device/${DEVICE}/options"
fi
exit 1
fi
PKG_VERSION=${DEVICE}-${L4T_KERNEL_VERSION}
PKG_VERSION=${DEVICE:-${PROJECT}}-${L4T_KERNEL_VERSION}
PKG_URL="l4t-kernel-sources"
GET_HANDLER_SUPPORT="l4t-kernel-sources"
PKG_PATCH_DIRS="${PROJECT} ${PROJECT}/${DEVICE}"
PKG_SOURCE_NAME="${PKG_NAME}-${PKG_VERSION}.tar.gz"
#Need to find a better way to do this for l4t platforms!
PKG_SHA256=$L4T_COMBINED_KERNEL_SHA256
PKG_SHA256=${L4T_COMBINED_KERNEL_SHA256}
;;
ayn-odin)
PKG_SHA256="9aa25bf492928bc7a4542e87d28919c9ac36d27c"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,10 @@ PKG_BUILD_FLAGS="+lto"

PKG_IS_ADDON="embedded"
PKG_ADDON_TYPE="kodi.peripheral"

post_install() {
if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
# Set UDEV controller driver as active
sed -i -e 's|<default>0</default>|<default>1</default>|' ${INSTALL}/usr/share/kodi/addons/peripheral.joystick/resources/settings.xml
fi
}
6 changes: 6 additions & 0 deletions packages/mediacenter/kodi/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ PKG_SITE="http://www.kodi.tv"
PKG_URL="https://github.com/xbmc/xbmc/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain JsonSchemaBuilder:host TexturePacker:host Python3 zlib systemd lzo pcre swig:host libass curl fontconfig fribidi tinyxml tinyxml2 libjpeg-turbo freetype libcdio taglib libxml2 libxslt rapidjson sqlite ffmpeg crossguid libdvdnav libfmt lirc libfstrcmp flatbuffers:host flatbuffers libudfread spdlog"
PKG_DEPENDS_UNPACK="commons-lang3 commons-text groovy"

if [ "${PROJECT}" = "L4T" -a "${DEVICE}" = "Switch" ]; then
# Not really sure why u-power was removed, this is required to get battery statistics in kodi.
PKG_DEPENDS_TARGET+=" upower"
fi

PKG_DEPENDS_HOST="toolchain"
PKG_LONGDESC="A free and open source cross-platform media player."
PKG_BUILD_FLAGS="+speed"
Expand Down
28 changes: 8 additions & 20 deletions packages/multimedia/ffmpeg/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ case "${PROJECT}" in
PKG_FFMPEG_RPI="--disable-mmal --enable-sand"
PKG_PATCH_DIRS+=" rpi"
;;
L4T)
PKG_DEPENDS_TARGET+=" tegra-bsp:host"
PKG_PATCH_DIRS+=" L4T"
PKG_FFMPEG_NVV4L2="--enable-nvv4l2"
EXTRA_CFLAGS="-I${SYSROOT_PREFIX}/usr/src/jetson_multimedia_api/include"
;;
*)
PKG_PATCH_DIRS+=" v4l2-request v4l2-drmprime"
case "${PROJECT}" in
Expand All @@ -49,7 +55,7 @@ get_graphicdrivers

PKG_FFMPEG_HWACCEL="--enable-hwaccels"

if [ "${V4L2_SUPPORT}" = "yes" ]; then
if [ "${V4L2_SUPPORT}" = "yes" -a ! "${DEVICE}" = "Switch" ]; then
PKG_DEPENDS_TARGET+=" libdrm"
PKG_NEED_UNPACK+=" $(get_pkg_directory libdrm)"
PKG_FFMPEG_V4L2="--enable-v4l2_m2m --enable-libdrm"
Expand All @@ -68,7 +74,7 @@ if [ "${V4L2_SUPPORT}" = "yes" ]; then
PKG_FFMPEG_V4L2+=" --disable-libudev --disable-v4l2-request"
fi
else
PKG_FFMPEG_V4L2="--disable-v4l2_m2m --disable-libudev --disable-v4l2-request"
: #PKG_FFMPEG_V4L2="--disable-v4l2_m2m --disable-libudev --disable-v4l2-request"
fi

if [ "${VAAPI_SUPPORT}" = "yes" ]; then
Expand Down Expand Up @@ -99,17 +105,6 @@ else
PKG_FFMPEG_DEBUG="--disable-debug --enable-stripping"
fi

#Re-enable when patches are rebased on newer version of ffmpeg,for now we use old version.

if [ "${PROJECT}" = "L4T" ]; then
PKG_DEPENDS_TARGET+=" tegra-bsp:host"
PKG_PATCH_DIRS+=" L4T"
PKG_FFMPEG_NVV4L2="--enable-nvv4l2"
EXTRA_CFLAGS="-I${SYSROOT_PREFIX}/usr/src/jetson_multimedia_api/include"
else
PKG_FFMPEG_NVV4L2=""
fi

if target_has_feature neon; then
PKG_FFMPEG_FPU="--enable-neon"
else
Expand All @@ -128,13 +123,6 @@ else
PKG_FFMPEG_AV1="--disable-libdav1d"
fi

if [ "${DISTRO}" = "Lakka" -a "${VULKAN_SUPPORT}" = yes ]; then
PKG_DEPENDS_TARGET+=" ${VULKAN}"
PKG_FFMPEG_VULKAN="--enable-vulkan"
else
PKG_FFMPEG_VULKAN="--disable-vulkan"
fi

pre_configure_target() {
cd ${PKG_BUILD}
rm -rf .${TARGET_NAME}
Expand Down
Loading

0 comments on commit 600e246

Please sign in to comment.