diff --git a/packages/audio/alsa-lib/config/modprobe.d/alsa-base.conf b/packages/audio/alsa-lib/config/modprobe.d/alsa-base.conf deleted file mode 100644 index cda548814..000000000 --- a/packages/audio/alsa-lib/config/modprobe.d/alsa-base.conf +++ /dev/null @@ -1,5 +0,0 @@ -alias snd-card-0 snd-usb-audio -alias snd-card-1 snd-hda-intel - -options snd-usb-audio index=0 -options snd-hda-intel index=1,2 diff --git a/packages/audio/alsa-lib/config/modprobe.d/disable-spdif-for-hd-audio.conf b/packages/audio/alsa-lib/config/modprobe.d/disable-spdif-for-hd-audio.conf deleted file mode 100644 index 245345d41..000000000 --- a/packages/audio/alsa-lib/config/modprobe.d/disable-spdif-for-hd-audio.conf +++ /dev/null @@ -1,16 +0,0 @@ -# INTEL HBR WORKAROUND FOR DTS-MA & Dolby TrueHD PLAYBACK - -# Uncomment the following lines to disable any S/PDIF out to deliver -# bitstreamed audio on Intel builds. This is a rough workaround for -# users that have both S/PDIF and HDMI audio outputs on their motherboard -# or motherboard+discrete graphics combo. - -# EVEN IF YOU ARE NOT USING THE S/PDIF OUTPUT -# but still have one, you will need to uncomment the lines below ! - -# after uncommenting these lines, you must reboot for these settings to take effect - -# blacklist snd_hda_codec_realtek -# blacklist snd_hda_codec_sigmatel -# blacklist snd_hda_codec_cirrus - diff --git a/packages/audio/alsa-lib/modprobe.d/alsa-base.conf b/packages/audio/alsa-lib/modprobe.d/alsa-base.conf index 258e706e1..d5e932538 100644 --- a/packages/audio/alsa-lib/modprobe.d/alsa-base.conf +++ b/packages/audio/alsa-lib/modprobe.d/alsa-base.conf @@ -9,14 +9,14 @@ options saa7134-alsa index=-2 options snd-atiixp-modem index=-2 options snd-intel8x0m index=-2 options snd-via82xx-modem index=-2 -options snd-usb-audio index=-2 options snd-usb-usx2y index=-2 options snd-usb-caiaq index=-2 options snd-cmipci mpu_port=0x330 fm_port=0x388 # Some Toshiba laptops might require this # options snd-hda-intel model=toshiba -options snd-hda-intel model=auto + +options snd-hda-intel model=auto index=1,2 # RG552 shouldn't grab index 0 options dw_hdmi_i2s_audio index=1 diff --git a/packages/audio/alsa-lib/package.mk b/packages/audio/alsa-lib/package.mk index 581d00ff1..8a455bd80 100644 --- a/packages/audio/alsa-lib/package.mk +++ b/packages/audio/alsa-lib/package.mk @@ -28,9 +28,3 @@ post_configure_target() { sed -i 's/.*PKGLIBDIR.*/#define PKGLIBDIR ""/' include/config.h } -post_makeinstall_target() { - rm -rf ${INSTALL}/usr/bin - - mkdir -p ${INSTALL}/usr/config - cp -PR ${PKG_DIR}/config/modprobe.d ${INSTALL}/usr/config -} diff --git a/packages/compress/zlib/package.mk b/packages/compress/zlib/package.mk index f39e64dee..e39750cc5 100644 --- a/packages/compress/zlib/package.mk +++ b/packages/compress/zlib/package.mk @@ -2,8 +2,7 @@ # Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv) PKG_NAME="zlib" -PKG_VERSION="1.2.11" -PKG_SHA256="4ff941449631ace0d4d203e3483be9dbc9da454084111f97ea0a2114e19bf066" +PKG_VERSION="1.2.12" PKG_LICENSE="OSS" PKG_SITE="http://www.zlib.net" PKG_URL="http://zlib.net/${PKG_NAME}-${PKG_VERSION}.tar.xz" diff --git a/packages/games/emulators/PPSSPPSDL/package.mk b/packages/games/emulators/PPSSPPSDL/package.mk index b51bf1de0..4a7950d35 100644 --- a/packages/games/emulators/PPSSPPSDL/package.mk +++ b/packages/games/emulators/PPSSPPSDL/package.mk @@ -37,7 +37,7 @@ then PKG_DEPENDS_TARGET+=" vulkan-loader vulkan-headers" PKG_CMAKE_OPTS_TARGET+=" -DUSE_VULKAN_DISPLAY_KHR=ON \ -DVULKAN=ON \ - -DUSING_X11_VULKAN=ON" + -DUSING_X11_VULKAN=OFF" fi PKG_CMAKE_OPTS_TARGET+="${PKG_CMAKE_OPTS_TARGET} \ diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk index f57f5e093..6210eb856 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-audio-sdl/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-audio-sdl" PKG_VERSION="df0770215f743f70244b09978c123a0a8b2a7d9d" PKG_SHA256="2d6da3935cfdca9ca19065ec1cd95a17ec8d53ba4995b043cd6a5ace3be49775" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-audio-sdl" PKG_URL="https://github.com/mupen64plus/mupen64plus-audio-sdl/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk index 4b8cb5656..89d2d3b6c 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-core/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-core" PKG_VERSION="f29984331b20de47fd1c2de776018fa40f50bac5" PKG_SHA256="2f53976ede7982e2e8d36a41721afca79109bda3f23c712953246b8d8d7313b6" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-core" PKG_URL="https://github.com/mupen64plus/mupen64plus-core/archive/${PKG_VERSION}.tar.gz" @@ -19,14 +19,13 @@ fi if [ "${OPENGLES_SUPPORT}" = yes ]; then PKG_DEPENDS_TARGET+=" ${OPENGLES}" - PKG_MAKE_OPTS_TARGET+="USE_GLES=1" fi make_target() { case ${ARCH} in arm|aarch64) export HOST_CPU=aarch64 - export USE_GLES=1 + export VC=0 export CROSS_COMPILE="${TARGET_PREFIX}" BINUTILS="$(get_build_dir binutils)/.aarch64-libreelec-linux-gnueabi" ;; @@ -34,8 +33,9 @@ make_target() { export SDL_CFLAGS="-I${SYSROOT_PREFIX}/usr/include/SDL2 -D_REENTRANT" export SDL_LDLIBS="-lSDL2_net -lSDL2" + export USE_GLES=1 export V=1 - export VC=0 + export OSD=0 make -C projects/unix clean make -C projects/unix all ${PKG_MAKE_OPTS_TARGET} } diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk index 7d55dbcc2..850d91bae 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-input-sdl/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-input-sdl" PKG_VERSION="9cbe63f8e80f4dfc6dcdd8408b51358d248a050e" PKG_SHA256="8c4c22dfb5b478b60a0059a38f7c0e2d01e9e9da65385340e0aa32b876cdc065" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-input-sdl" PKG_URL="https://github.com/mupen64plus/mupen64plus-input-sdl/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk index e4fbeef84..79a0b88d6 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-rsp-hle/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-rsp-hle" PKG_VERSION="aa0ea78030d3c2b80184a35bbb36909fd7a28e70" PKG_SHA256="94acfd45c9b6974bde6ee38e9df60979cb906cec89efd37642be6f20f3737841" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-rsp-hle" PKG_URL="https://github.com/mupen64plus/mupen64plus-rsp-hle/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk index 54770997b..f8c54ecf9 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-ui-console/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-ui-console" PKG_VERSION="42546ab00b23a8052b9c974882628912609990c2" PKG_SHA256="210324e4ab3445e7891d999780106db0c2c96857b31a723eda61847ac0fdd745" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-ui-console" PKG_URL="https://github.com/mupen64plus/mupen64plus-ui-console/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk index a2e35f5c2..bed4c9879 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-video-glide64mk2/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-video-glide64mk2" PKG_VERSION="79809753e83180e6bbc3b5b3dc65120fef3e7a43" PKG_SHA256="124cf056bed1534a95aee363cf7682095bfe8ef9580461fc26be834b8749ac04" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-video-glide64mk2" PKG_URL="https://github.com/mupen64plus/mupen64plus-video-glide64mk2/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-video-gliden64/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-video-gliden64/package.mk index a82dcf1c6..007d6be7f 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-video-gliden64/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-video-gliden64/package.mk @@ -3,7 +3,7 @@ PKG_NAME="mupen64plussa-video-gliden64" PKG_VERSION="2973f5351b6326ca588b60521522df34ed7a426e" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/gonetz/GLideN64" PKG_URL="${PKG_SITE}.git" diff --git a/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk b/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk index 20257ce9b..fdba0926e 100644 --- a/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk +++ b/packages/games/emulators/mupen64plussa/mupen64plussa-video-rice/package.mk @@ -4,7 +4,7 @@ PKG_NAME="mupen64plussa-video-rice" PKG_VERSION="51582f9e62082f2937a17ac3acfaab08cb7f46ef" PKG_SHA256="e72f1c865cb4f7fff4691eaccbdd23c26638e3e2205ee7bceca9e3a33ada6e73" -PKG_ARCH="any" +PKG_ARCH="aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/mupen64plus/mupen64plus-video-rice" PKG_URL="https://github.com/mupen64plus/mupen64plus-video-rice/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/libretro/flycast_libretro/package.mk b/packages/games/libretro/flycast_libretro/package.mk index 3dd6c2064..753c154cd 100644 --- a/packages/games/libretro/flycast_libretro/package.mk +++ b/packages/games/libretro/flycast_libretro/package.mk @@ -23,6 +23,7 @@ PKG_NAME="flycast_libretro" PKG_VERSION="4c293f306bc16a265c2d768af5d0cea138426054" PKG_SHA256="7ce0bd97b095907fd4960c771364c549a54547877b5128af42c73a9257fbec6b" PKG_LICENSE="GPLv2" +PKG_ARCH="aarch64" PKG_SITE="https://github.com/libretro/flycast" PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" PKG_DEPENDS_TARGET="toolchain" diff --git a/packages/games/libretro/gpsp/package.mk b/packages/games/libretro/gpsp/package.mk index 135372388..bbd31373c 100644 --- a/packages/games/libretro/gpsp/package.mk +++ b/packages/games/libretro/gpsp/package.mk @@ -24,7 +24,7 @@ PKG_NAME="gpsp" PKG_VERSION="81649a2c8075201bb823cce8fdf16a31c92a3b6c" PKG_SHA256="c1131811760dd78cbb8621b5845b4402a0801690facc77d4e8ea1292384bcd1b" PKG_REV="1" -PKG_ARCH="any" +PKG_ARCH="arm aarch64" PKG_LICENSE="GPLv2" PKG_SITE="https://github.com/libretro/gpsp" PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz" diff --git a/packages/games/libretro/handy/package.mk b/packages/games/libretro/handy/package.mk index 9df3c5a83..ca9fc3d22 100644 --- a/packages/games/libretro/handy/package.mk +++ b/packages/games/libretro/handy/package.mk @@ -35,11 +35,15 @@ PKG_IS_ADDON="no" PKG_TOOLCHAIN="make" PKG_AUTORECONF="no" -if [ ${ARCH} = "aarch64" ]; then - PKG_MAKE_OPTS_TARGET=" platform=emuelec" -else - PKG_MAKE_OPTS_TARGET=" platform=classic_armv8_a35" -fi +case ${ARCH} in + aarch64) + PKG_MAKE_OPTS_TARGET=" platform=emuelec" + ;; + arm) + PKG_MAKE_OPTS_TARGET=" platform=classic_armv8_a35" + ;; +esac + makeinstall_target() { mkdir -p $INSTALL/usr/lib/libretro diff --git a/packages/games/libretro/melonds/package.mk b/packages/games/libretro/melonds/package.mk index cf588ec27..d664b2d7a 100644 --- a/packages/games/libretro/melonds/package.mk +++ b/packages/games/libretro/melonds/package.mk @@ -26,14 +26,15 @@ pre_make_target() { cd ${PKG_BUILD} rm CMakeLists.txt - - if [[ "${DEVICE}" =~ RG351 ]] - then - PKG_MAKE_OPTS_TARGET=" platform=odroidgoa" - elif [[ "${DEVICE}" =~ RG552 ]] - then - PKG_MAKE_OPTS_TARGET=" platform=RK3399" - fi + + case ${DEVICE} in + RG351P|RG351V|RG351MP) + PKG_MAKE_OPTS_TARGET=" platform=odroidgoa" + ;; + RG552) + PKG_MAKE_OPTS_TARGET=" platform=RK3399" + ;; + esac } makeinstall_target() { diff --git a/packages/games/libretro/mgba/package.mk b/packages/games/libretro/mgba/package.mk index 41475b663..d689804eb 100644 --- a/packages/games/libretro/mgba/package.mk +++ b/packages/games/libretro/mgba/package.mk @@ -40,11 +40,17 @@ PKG_USE_CMAKE="no" make_target() { cd $PKG_BUILD - if [[ "$ARCH" =~ "arm" ]]; then - make -f Makefile.libretro platform=unix-armv HAVE_NEON=1 - else - make -f Makefile.libretro platform=goadvance - fi + case ${ARCH} in + arm) + make -f Makefile.libretro platform=unix-armv HAVE_NEON=1 + ;; + aarch64) + make -f Makefile.libretro platform=goadvance + ;; + *) + make -f Makefile.libretro + ;; + esac } makeinstall_target() { diff --git a/packages/jelos/config/system/configs/all/autoconf.cfg b/packages/jelos/config/system/configs/all/autoconf.cfg deleted file mode 100644 index 92edc5548..000000000 --- a/packages/jelos/config/system/configs/all/autoconf.cfg +++ /dev/null @@ -1 +0,0 @@ -8bitdo_hack = "0" diff --git a/packages/jelos/config/system/configs/all/bluetooth.cfg b/packages/jelos/config/system/configs/all/bluetooth.cfg deleted file mode 100644 index 709f97348..000000000 --- a/packages/jelos/config/system/configs/all/bluetooth.cfg +++ /dev/null @@ -1 +0,0 @@ -connect_mode="default" diff --git a/packages/jelos/sources/scripts/setsettings.sh b/packages/jelos/sources/scripts/setsettings.sh index 3207f130f..31b93bbbe 100755 --- a/packages/jelos/sources/scripts/setsettings.sh +++ b/packages/jelos/sources/scripts/setsettings.sh @@ -385,7 +385,7 @@ if [ "${EES}" == "false" ] || [ "${EES}" == "none" ] || [ "${EES}" == "0" ]; the else echo "video_shader = \"${EES}\"" >> ${RAAPPENDCONF} echo 'video_shader_enable = "true"' >> ${RAAPPENDCONF} - echo "--set-shader /usr/share/common-shaders/${EES}" + echo "--set-shader /storage/shaders/${EES}" fi ## Filterset diff --git a/projects/PC/packages/sleep/package.mk b/packages/sysutils/sleep/package.mk similarity index 100% rename from projects/PC/packages/sleep/package.mk rename to packages/sysutils/sleep/package.mk diff --git a/projects/PC/packages/sleep/sources/sleep.conf b/packages/sysutils/sleep/sources/sleep.conf similarity index 100% rename from projects/PC/packages/sleep/sources/sleep.conf rename to packages/sysutils/sleep/sources/sleep.conf diff --git a/projects/Rockchip/packages/sleep/sources/sleep.sh b/packages/sysutils/sleep/sources/sleep.sh similarity index 100% rename from projects/Rockchip/packages/sleep/sources/sleep.sh rename to packages/sysutils/sleep/sources/sleep.sh diff --git a/projects/Rockchip/packages/system-utils/package.mk b/packages/sysutils/system-utils/package.mk similarity index 100% rename from projects/Rockchip/packages/system-utils/package.mk rename to packages/sysutils/system-utils/package.mk diff --git a/projects/Rockchip/packages/system-utils/sources/autostart/RG351MP b/packages/sysutils/system-utils/sources/autostart/RG351MP similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/autostart/RG351MP rename to packages/sysutils/system-utils/sources/autostart/RG351MP diff --git a/projects/Rockchip/packages/system-utils/sources/autostart/RG351P/002-overclock b/packages/sysutils/system-utils/sources/autostart/RG351P/002-overclock similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/autostart/RG351P/002-overclock rename to packages/sysutils/system-utils/sources/autostart/RG351P/002-overclock diff --git a/projects/Rockchip/packages/system-utils/sources/autostart/RG351V b/packages/sysutils/system-utils/sources/autostart/RG351V similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/autostart/RG351V rename to packages/sysutils/system-utils/sources/autostart/RG351V diff --git a/projects/Rockchip/packages/system-utils/sources/autostart/RG552/002-overclock b/packages/sysutils/system-utils/sources/autostart/RG552/002-overclock similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/autostart/RG552/002-overclock rename to packages/sysutils/system-utils/sources/autostart/RG552/002-overclock diff --git a/projects/PC/packages/system-utils/sources/autostart/common/008-deviceutils b/packages/sysutils/system-utils/sources/autostart/common/008-deviceutils similarity index 100% rename from projects/PC/packages/system-utils/sources/autostart/common/008-deviceutils rename to packages/sysutils/system-utils/sources/autostart/common/008-deviceutils diff --git a/projects/PC/packages/system-utils/sources/config/fancontrol.conf b/packages/sysutils/system-utils/sources/config/fancontrol.conf similarity index 100% rename from projects/PC/packages/system-utils/sources/config/fancontrol.conf rename to packages/sysutils/system-utils/sources/config/fancontrol.conf diff --git a/projects/Rockchip/packages/system-utils/sources/devices/RG552/overclock b/packages/sysutils/system-utils/sources/devices/RG552/overclock similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/devices/RG552/overclock rename to packages/sysutils/system-utils/sources/devices/RG552/overclock diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/battery b/packages/sysutils/system-utils/sources/scripts/battery similarity index 100% rename from projects/Rockchip/packages/system-utils/sources/scripts/battery rename to packages/sysutils/system-utils/sources/scripts/battery diff --git a/projects/PC/packages/system-utils/sources/scripts/fancontrol b/packages/sysutils/system-utils/sources/scripts/fancontrol similarity index 100% rename from projects/PC/packages/system-utils/sources/scripts/fancontrol rename to packages/sysutils/system-utils/sources/scripts/fancontrol diff --git a/projects/PC/packages/system-utils/sources/scripts/headphone_sense b/packages/sysutils/system-utils/sources/scripts/headphone_sense similarity index 100% rename from projects/PC/packages/system-utils/sources/scripts/headphone_sense rename to packages/sysutils/system-utils/sources/scripts/headphone_sense diff --git a/projects/PC/packages/system-utils/sources/scripts/internalwifi b/packages/sysutils/system-utils/sources/scripts/internalwifi similarity index 100% rename from projects/PC/packages/system-utils/sources/scripts/internalwifi rename to packages/sysutils/system-utils/sources/scripts/internalwifi diff --git a/projects/PC/packages/system-utils/sources/scripts/system_utils b/packages/sysutils/system-utils/sources/scripts/system_utils similarity index 100% rename from projects/PC/packages/system-utils/sources/scripts/system_utils rename to packages/sysutils/system-utils/sources/scripts/system_utils diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/volume_sense b/packages/sysutils/system-utils/sources/scripts/volume_sense similarity index 79% rename from projects/Rockchip/packages/system-utils/sources/scripts/volume_sense rename to packages/sysutils/system-utils/sources/scripts/volume_sense index 6e55e37b8..f037ad73b 100755 --- a/projects/Rockchip/packages/system-utils/sources/scripts/volume_sense +++ b/packages/sysutils/system-utils/sources/scripts/volume_sense @@ -8,6 +8,8 @@ set -e set -o pipefail +LOG="/var/log/$(basename "$0").log" + ### Summary # This script listens to volume keys on the RG351MP and adjusts volume # Fn + Volume up/down will adjust brightness @@ -18,9 +20,9 @@ set -o pipefail # type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1 # type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1 -DEVICE="${DEVICE_VOLUME_DEV}" # Device for volume key events +#DEVICE="${DEVICE_VOLUME_DEV}" # Device for volume key events -CONTROLLER_DEVICE="${DEVICE_CONTROLLER_DEV}" # Joystick events (for Fn key) +#CONTROLLER_DEVICE="${DEVICE_CONTROLLER_DEV}" # Joystick events (for Fn key) VOL_EVENT='*(KEY_VOLUME*, value *' # This matches all volume events @@ -44,6 +46,19 @@ BRIGHTNESS_REPEAT_MOD=4 FUNC_PRESSED=no CONTROLLER_DISCONNECTED="*error reading: No such device" +DEVICE_DISCONNECTED="*error reading: No such device" + +# Detect input devices automatically +for DEV in /dev/input/ev* +do + unset SUPPORTS + SUPPORTS=$(udevadm info ${DEV} | awk '/ID_INPUT_KEYBOARD=|ID_INPUT_JOYSTICK=/ {print $2}') + if [ -n "${SUPPORTS}" ] + then + DEVICE=$(udevadm info ${DEV} | awk 'BEGIN {FS="="} /DEVNAME=/ {print $2}') + INPUT_DEVICES+=("${DEVICE}") + fi +done # Logic: # - Listen to both: @@ -54,24 +69,21 @@ CONTROLLER_DISCONNECTED="*error reading: No such device" # for all button pushes # - Using 'read' means the loop is idle when no button is pressed -# Wait for controller in case of restart, etc -while true; do -sleep 1 -if [[ ! -e "${CONTROLLER_DEVICE}" ]]; then - continue -else - break -fi +( -done -( - evtest "${DEVICE}" & - evtest "${CONTROLLER_DEVICE}" 2>&1 & - wait + for INPUT_DEVICE in ${INPUT_DEVICES[@]} + do + evtest "${INPUT_DEVICE}" 2>&1 & + done + wait ) | while read line; do case $line in (${CONTROLLER_DISCONNECTED}) - echo "Reloading due to controller reattach..." + echo "Reloading due to ${CONTROLLER_DEVICE} reattach..." >${LOG} 2>&1 + exit 0 + ;; + (${DEVICE_DISCONNECTED}) + echo "Reloading due to ${DEVICE} reattach..." >${LOG} 2>&1 exit 0 ;; (${VOL_EVENT}) @@ -95,7 +107,7 @@ done DOWN="-" REPEAT_MOD=${VOLUME_REPEAT_MOD} fi - + REPEAT_NUM=$(( ${REPEAT_NUM} + 1 )) # This isn't time to evaluate repeat so just skip @@ -116,7 +128,7 @@ done fi ;; - (${V_FUNC_KEY_EVENT}) + (${V_FUNC_KEY_EVENT}) # We don't care about 'Fn' key repeats - continue if [[ "$line" == ${REPEAT_PRESS} ]]; then diff --git a/projects/PC/packages/system-utils/system.d/battery.service b/packages/sysutils/system-utils/system.d/battery.service similarity index 100% rename from projects/PC/packages/system-utils/system.d/battery.service rename to packages/sysutils/system-utils/system.d/battery.service diff --git a/projects/PC/packages/system-utils/system.d/fancontrol.service b/packages/sysutils/system-utils/system.d/fancontrol.service similarity index 100% rename from projects/PC/packages/system-utils/system.d/fancontrol.service rename to packages/sysutils/system-utils/system.d/fancontrol.service diff --git a/projects/PC/packages/system-utils/system.d/headphones.service b/packages/sysutils/system-utils/system.d/headphones.service similarity index 100% rename from projects/PC/packages/system-utils/system.d/headphones.service rename to packages/sysutils/system-utils/system.d/headphones.service diff --git a/projects/PC/packages/system-utils/system.d/volume.service b/packages/sysutils/system-utils/system.d/volume.service similarity index 100% rename from projects/PC/packages/system-utils/system.d/volume.service rename to packages/sysutils/system-utils/system.d/volume.service diff --git a/packages/sysutils/systemd/scripts/userconfig-setup b/packages/sysutils/systemd/scripts/userconfig-setup index f0d6b3df3..c0f94554e 100755 --- a/packages/sysutils/systemd/scripts/userconfig-setup +++ b/packages/sysutils/systemd/scripts/userconfig-setup @@ -37,6 +37,8 @@ then ### Link the ES splash to the distribution splash rm -f /storage/.config/emulationstation/resources/logo.png ln -sf /usr/config/splash/splash.png /storage/.config/emulationstation/resources/logo.png + + mkdir -p /storage/.config/modprobe.d fi if [ ! -e "/storage/.cache/ld.so.cache" ] diff --git a/packages/tools/installer/package.mk b/packages/tools/installer/package.mk index dc0516be0..c33630564 100644 --- a/packages/tools/installer/package.mk +++ b/packages/tools/installer/package.mk @@ -14,6 +14,7 @@ post_install() { mkdir -p ${INSTALL}/usr/bin cp ${PKG_DIR}/scripts/installer ${INSTALL}/usr/bin sed -e "s/@DISTRONAME@/${DISTRONAME}/g" \ + -e "s/@EXTRA_CMDLINE@/${EXTRA_CMDLINE}/g" \ -i ${INSTALL}/usr/bin/installer mkdir -p ${INSTALL}/etc diff --git a/packages/tools/installer/scripts/installer b/packages/tools/installer/scripts/installer index 98802aef4..b1aff27d0 100755 --- a/packages/tools/installer/scripts/installer +++ b/packages/tools/installer/scripts/installer @@ -276,7 +276,7 @@ PROMPT 0 LABEL linux KERNEL /KERNEL - APPEND boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE $SYSLINUX_PARAMETERS quiet + APPEND boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE $SYSLINUX_PARAMETERS @EXTRA_CMDLINE@ EOF cat << EOF > $TMPDIR/part1/EFI/BOOT/grub.cfg @@ -285,7 +285,7 @@ set default="${DISTRO}" menuentry "${DISTRO}" { search --set -f /KERNEL - linux /KERNEL boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE quiet + linux /KERNEL boot=UUID=$UUID_SYSTEM disk=UUID=$UUID_STORAGE @EXTRA_CMDLINE@ } EOF diff --git a/packages/wayland/weston/config/kiosk.ini b/packages/wayland/weston/config/kiosk.ini new file mode 100644 index 000000000..36465a731 --- /dev/null +++ b/packages/wayland/weston/config/kiosk.ini @@ -0,0 +1,18 @@ +[core] +idle-time=0 +shell=kiosk-shell.so + +[terminal] +font-size=16 + +[shell] +background-image=/usr/config/splash/splash.png +background-type=scale-crop +background-color=0x00000000 +clock-format=minutes-24h +locking=false + +[autolaunch] +path=/usr/bin/start_es.sh +icon=/usr/config/emulationstation/resources/window_icon_24.png +watch=true diff --git a/packages/wayland/weston/config/weston.ini b/packages/wayland/weston/config/weston.ini index 81fe2a925..1d3b82582 100644 --- a/packages/wayland/weston/config/weston.ini +++ b/packages/wayland/weston/config/weston.ini @@ -5,7 +5,7 @@ idle-time=0 font-size=16 [shell] -background-image=/usr/share/weston/libreelec-wallpaper-2160.png +background-image=/usr/config/splash/splash.png background-type=scale-crop background-color=0x00000000 clock-format=minutes-24h diff --git a/packages/wayland/weston/package.mk b/packages/wayland/weston/package.mk index 95600b313..5b64c6d08 100644 --- a/packages/wayland/weston/package.mk +++ b/packages/wayland/weston/package.mk @@ -57,8 +57,7 @@ post_makeinstall_target() { cp ${PKG_DIR}/scripts/weston-config ${INSTALL}/usr/lib/weston mkdir -p ${INSTALL}/usr/share/weston - cp ${PKG_DIR}/config/weston.ini ${INSTALL}/usr/share/weston - find_file_path "splash/splash.png" && cp ${FOUND_PATH} ${INSTALL}/usr/share/weston/libreelec-wallpaper-2160.png + cp ${PKG_DIR}/config/*ini ${INSTALL}/usr/share/weston safe_remove ${INSTALL}/usr/share/wayland-sessions } diff --git a/projects/PC/devices/handheld/device.config b/projects/PC/devices/handheld/device.config index cafcefe11..58fa1eee4 100644 --- a/projects/PC/devices/handheld/device.config +++ b/projects/PC/devices/handheld/device.config @@ -1,10 +1,6 @@ DEVICE_VOLUMECTL=true DEVICE_AUDIO_MIXER="PCM" -DEVICE_VOLUME_DEV="/dev/input/event4" - -### Do all of this better -DEVICE_VOL_MODIFIER="BTN_SELECT" -DEVICE_CONTROLLER_DEV="/dev/input/event14" +DEVICE_VOL_MODIFIER="ABS_RZ" DEVICE_BRIGHTNESS="100" diff --git a/projects/PC/packages/sleep/sources/sleep.sh b/projects/PC/packages/sleep/sources/sleep.sh deleted file mode 100755 index 260a9663f..000000000 --- a/projects/PC/packages/sleep/sources/sleep.sh +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: GPL-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -case $1 in - pre) - - if [ "${DEVICE_FAKE_JACKSENSE}" == "true" ] - then - nohup systemctl stop headphones & - fi - - if [ "${DEVICE_VOLUMECTL}" == "true" ] - then - nohup systemctl stop volume & - fi - - alsactl store -f /storage/.config/asound.state - - touch /run/.last_sleep_time - - ;; - post) - alsactl restore -f /storage/.config/asound.state - - if [ "${DEVICE_FAKE_JACKSENSE}" == "true" ] - then - nohup systemctl start headphones & - fi - - if [ "${DEVICE_VOLUMECTL}" == "true" ] - then - nohup systemctl start volume & - fi - - if [ "$(get_setting wifi.enabled)" == "1" ] - then - nohup wifictl reconnect & - fi - - DEVICE_VOLUME=$(get_setting "audio.volume" 2>/dev/null) - amixer set "${DEVICE_AUDIO_MIXER}" ${DEVICE_VOLUME}% 2>&1 >/dev/null - - ### Call the brightness script to set to the last saved value. - /usr/lib/autostart/common/006-brightness - ;; -esac diff --git a/projects/PC/packages/system-utils/package.mk b/projects/PC/packages/system-utils/package.mk deleted file mode 100644 index 57d78a884..000000000 --- a/projects/PC/packages/system-utils/package.mk +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (C) 2021-present Fewtarius - -PKG_NAME="system-utils" -PKG_VERSION="" -PKG_SHA256="" -PKG_ARCH="any" -PKG_LICENSE="mix" -PKG_DEPENDS_TARGET="toolchain sleep" -PKG_SITE="" -PKG_URL="" -PKG_LONGDESC="Support scripts for Generic devices" -PKG_TOOLCHAIN="manual" - -makeinstall_target() { - - mkdir -p ${INSTALL}/usr/lib/autostart/common - cp ${PKG_DIR}/sources/autostart/common/* ${INSTALL}/usr/lib/autostart/common - - mkdir -p ${INSTALL}/usr/bin - #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 - chmod 0755 ${INSTALL}/usr/bin/* - - #mkdir -p ${INSTALL}/usr/config - #cp ${PKG_DIR}/sources/config/fancontrol.conf ${INSTALL}/usr/config/fancontrol.conf.sample -} diff --git a/projects/PC/packages/system-utils/sources/scripts/volume_sense b/projects/PC/packages/system-utils/sources/scripts/volume_sense deleted file mode 100755 index b3cdb48d5..000000000 --- a/projects/PC/packages/system-utils/sources/scripts/volume_sense +++ /dev/null @@ -1,136 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2021-present Fewtarius -# 2021-present pkegg - -. /etc/profile - -set -e -set -o pipefail - -### Summary -# This script listens to volume keys on the RG351MP and adjusts volume -# Fn + Volume up/down will adjust brightness -### - - -# Event examples for reference -# type 1 (EV_KEY), code 114 (KEY_VOLUMEDOWN), value 1 -# type 1 (EV_KEY), code 115 (KEY_VOLUMEUP), value 1 - -DEVICE="${DEVICE_VOLUME_DEV}" # Device for volume key events - -CONTROLLER_DEVICE="${DEVICE_CONTROLLER_DEV}" # Joystick events (for Fn key) - -VOL_EVENT='*(KEY_VOLUME*, value *' # This matches all volume events - -VOL_UP='*UP), value *' # Differentiate 'up' volume event -VOL_DOWN='*DOWN), value *' #Differentiate 'down' volume event - -V_FUNC_KEY_EVENT='*('${DEVICE_VOL_MODIFIER}'), value *' - -# Matches if a button was pressed (1), released (0) or held down (2) -PRESS='*value 1' -RELEASE='*value 0' -REPEAT_PRESS="* value 2" - -# Volume repeat -VOLUME_REPEAT_MOD=4 - -# Brightness repeat -BRIGHTNESS_REPEAT_MOD=4 - -# Variable to keep track of Fn being currently pressed -FUNC_PRESSED=no - -CONTROLLER_DISCONNECTED="*error reading: No such device" - -# 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 -# - 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 -# - Using 'read' means the loop is idle when no button is pressed - -# Wait for controller in case of restart, etc -while true; do -sleep 1 -if [[ ! -e "${CONTROLLER_DEVICE}" ]]; then - continue -else - break -fi - -done -( - evtest "${DEVICE}" & - evtest "${CONTROLLER_DEVICE}" 2>&1 & - wait -) | while read line; do - case $line in - (${CONTROLLER_DISCONNECTED}) - echo "Reloading due to controller reattach..." - exit 0 - ;; - (${VOL_EVENT}) - - # We don't care when you 'let go' ('release') the volume button - if [[ "$line" == ${RELEASE} ]]; then - REPEAT_NUM=0 - continue - fi - - # Setup for 'brightness' if Fn pressed - if [[ "${FUNC_PRESSED}" == "yes" ]]; then - COMMAND=/usr/bin/brightness - UP="up" - DOWN="down" - REPEAT_MOD=${BRIGHTNESS_REPEAT_MOD} - # Default to 'volume' if Fn is not pressed - else - COMMAND="/usr/bin/system_utils vol" - UP="+" - DOWN="-" - REPEAT_MOD=${VOLUME_REPEAT_MOD} - fi - - REPEAT_NUM=$(( ${REPEAT_NUM} + 1 )) - - # This isn't time to evaluate repeat so just skip - if [[ "$line" == ${REPEAT_PRESS} && $(( ${REPEAT_NUM} % ${REPEAT_MOD} )) != "0" ]]; then - continue - fi - - INCREMENT_AMOUNT=5 - if [[ "${REPEAT_NUM}" -gt "20" ]]; then - INCREMENT_AMOUNT=10 - fi - # Run the commands to adjust volume/brightness - if [[ "${line}" == ${VOL_UP} ]]; then - ${COMMAND} ${UP} ${INCREMENT_AMOUNT} > /dev/null - elif [[ "${line}" == ${VOL_DOWN} ]]; then - ${COMMAND} ${DOWN} ${INCREMENT_AMOUNT} > /dev/null - fi - ;; - - (${V_FUNC_KEY_EVENT}) - - # We don't care about 'Fn' key repeats - continue - if [[ "$line" == ${REPEAT_PRESS} ]]; then - continue - fi - - #Reset the number of repeats when Fn is pressed/release - # as repeat speed is different between volume/brightness - REPEAT_NUM=0 - - if [[ "${line}" == ${PRESS} ]]; then - FUNC_PRESSED=yes - elif [[ "${line}" == ${RELEASE} ]]; then - FUNC_PRESSED=no - fi - ;; - esac -done diff --git a/projects/Rockchip/devices/RG351MP/device.config b/projects/Rockchip/devices/RG351MP/device.config index e094c00a4..211f6672a 100644 --- a/projects/Rockchip/devices/RG351MP/device.config +++ b/projects/Rockchip/devices/RG351MP/device.config @@ -6,9 +6,7 @@ DEVICE_FAKE_JACKSENSE=true DEVICE_VOLUMECTL=true DEVICE_POWER_LED=true DEVICE_AUDIO_MIXER="Playback" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-rg351-keys-event" DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-rk817-sound-event" -DEVICE_CONTROLLER_DEV="/dev/input/event2" DEVICE_BRIGHTNESS="70" SPLASH_LOADER="imagemagick" UI_SERVICE="systemctl start emustation.service" diff --git a/projects/Rockchip/devices/RG351P/device.config b/projects/Rockchip/devices/RG351P/device.config index 0a6bcaad1..b63706429 100644 --- a/projects/Rockchip/devices/RG351P/device.config +++ b/projects/Rockchip/devices/RG351P/device.config @@ -6,9 +6,7 @@ DEVICE_FAKE_JACKSENSE=true DEVICE_VOLUMECTL=true DEVICE_POWER_LED=true DEVICE_AUDIO_MIXER="Playback" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-rg351-keys-event" DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-rk817-sound-event" -DEVICE_CONTROLLER_DEV="/dev/input/event2" DEVICE_BRIGHTNESS="70" SPLASH_LOADER="imagemagick" UI_SERVICE="systemctl start emustation.service" diff --git a/projects/Rockchip/devices/RG351V/device.config b/projects/Rockchip/devices/RG351V/device.config index 5de89fa14..f586328ac 100644 --- a/projects/Rockchip/devices/RG351V/device.config +++ b/projects/Rockchip/devices/RG351V/device.config @@ -6,9 +6,7 @@ DEVICE_FAKE_JACKSENSE=true DEVICE_VOLUMECTL=true DEVICE_POWER_LED=true DEVICE_AUDIO_MIXER="Playback" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-rg351-keys-event" DEVICE_HEADPHONE_DEV="/dev/input/by-path/platform-rk817-sound-event" -DEVICE_CONTROLLER_DEV="/dev/input/event3" DEVICE_BRIGHTNESS="70" SPLASH_LOADER="imagemagick" UI_SERVICE="systemctl start emustation.service" diff --git a/projects/Rockchip/devices/RG353P/device.config b/projects/Rockchip/devices/RG353P/device.config index 3371ac496..a49bf074f 100644 --- a/projects/Rockchip/devices/RG353P/device.config +++ b/projects/Rockchip/devices/RG353P/device.config @@ -6,8 +6,6 @@ DEVICE_FAKE_JACKSENSE=false DEVICE_VOLUMECTL=true DEVICE_POWER_LED=false DEVICE_AUDIO_MIXER="Master" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-gpio-keys-event" -DEVICE_CONTROLLER_DEV="/dev/input/by-path/platform-singleadc-joypad-event-joystick" #DEVICE_HEADPHONE_DEV="" DEVICE_BRIGHTNESS="30" SPLASH_LOADER="imagemagick" diff --git a/projects/Rockchip/devices/RG503/device.config b/projects/Rockchip/devices/RG503/device.config index 435699d2a..ed3d50a2c 100644 --- a/projects/Rockchip/devices/RG503/device.config +++ b/projects/Rockchip/devices/RG503/device.config @@ -6,8 +6,6 @@ DEVICE_FAKE_JACKSENSE=false DEVICE_VOLUMECTL=true DEVICE_POWER_LED=false DEVICE_AUDIO_MIXER="Master" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-gpio-keys-event" -DEVICE_CONTROLLER_DEV="/dev/input/by-path/platform-singleadc-joypad-event-joystick" #DEVICE_HEADPHONE_DEV="" DEVICE_BRIGHTNESS="75" SPLASH_LOADER="imagemagick" diff --git a/projects/Rockchip/devices/RG552/device.config b/projects/Rockchip/devices/RG552/device.config index a4cd1c9e2..a0903894a 100644 --- a/projects/Rockchip/devices/RG552/device.config +++ b/projects/Rockchip/devices/RG552/device.config @@ -5,8 +5,6 @@ DEVICE_HAS_FAN=true DEVICE_FAKE_JACKSENSE=false DEVICE_VOLUMECTL=true DEVICE_AUDIO_MIXER="DAC" -DEVICE_VOLUME_DEV="/dev/input/by-path/platform-volume-keys-event" -DEVICE_CONTROLLER_DEV="/dev/input/by-path/platform-singleadc-joypad-event-joystick" DEVICE_BRIGHTNESS="50" SPLASH_LOADER="plymouth" UI_SERVICE="systemctl start emustation.service" diff --git a/projects/Rockchip/packages/sleep/package.mk b/projects/Rockchip/packages/sleep/package.mk deleted file mode 100644 index 445ec89b7..000000000 --- a/projects/Rockchip/packages/sleep/package.mk +++ /dev/null @@ -1,19 +0,0 @@ -PKG_NAME="sleep" -PKG_VERSION="" -PKG_SHA256="" -PKG_ARCH="any" -PKG_LICENSE="OSS" -PKG_DEPENDS_TARGET="systemd" -PKG_SITE="" -PKG_URL="" -PKG_LONGDESC="Sleep configuration" -PKG_TOOLCHAIN="manual" - -makeinstall_target() { - mkdir -p $INSTALL/usr/config/sleep.conf.d - cp sleep.conf $INSTALL/usr/config/sleep.conf.d/sleep.conf - - mkdir -p $INSTALL/usr/lib/systemd/system-sleep/ - cp sleep.sh $INSTALL/usr/lib/systemd/system-sleep/sleep - chmod +x $INSTALL/usr/lib/systemd/system-sleep/sleep -} diff --git a/projects/Rockchip/packages/sleep/sources/sleep.conf b/projects/Rockchip/packages/sleep/sources/sleep.conf deleted file mode 100644 index 2d6a0969a..000000000 --- a/projects/Rockchip/packages/sleep/sources/sleep.conf +++ /dev/null @@ -1,25 +0,0 @@ -# This file is part of systemd. -# -# systemd is free software; you can redistribute it and/or modify it -# under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 2.1 of the License, or -# (at your option) any later version. -# -# Entries in this file show the compile time defaults. -# You can change settings by editing this file. -# Defaults can be restored by simply deleting this file. -# -# See systemd-sleep.conf(5) for details - -[Sleep] -AllowSuspend=yes -#AllowHibernation=yes -#AllowSuspendThenHibernate=yes -#AllowHybridSleep=yes -#SuspendMode=suspend -SuspendState=mem standby freeze -#HibernateMode=platform shutdown -#HibernateState=disk -#HybridSleepMode=suspend platform shutdown -#HybridSleepState=disk -#HibernateDelaySec=180min \ No newline at end of file diff --git a/projects/Rockchip/packages/system-utils/sources/autostart/common/008-deviceutils b/projects/Rockchip/packages/system-utils/sources/autostart/common/008-deviceutils deleted file mode 100755 index 8433a671b..000000000 --- a/projects/Rockchip/packages/system-utils/sources/autostart/common/008-deviceutils +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -if [ "${DEVICE_HAS_FAN}" == "true" ] -then - nohup systemctl start fancontrol & -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 & -else - nohup systemctl stop headphones & -fi - -if [ "${DEVICE_VOLUMECTL}" == "true" ] -then - nohup systemctl start volume & -else - nohup systemctl stop volume & -fi diff --git a/projects/Rockchip/packages/system-utils/sources/config/fancontrol.conf b/projects/Rockchip/packages/system-utils/sources/config/fancontrol.conf deleted file mode 100644 index 557b24cc0..000000000 --- a/projects/Rockchip/packages/system-utils/sources/config/fancontrol.conf +++ /dev/null @@ -1,22 +0,0 @@ -# To enable custom fan control, set the cooling profile to custom, or run -# set_setting cooling.profile custom -# -# Set to true or export it as a variable if you want debug output. -# To test: -# -# systemctl stop fancontrol -# /usr/bin/fancontrol -# -# To re-enable: -# -# systemctl start fancontrol - -# Disable debugging by default -DEBUG=false - -## Fan speeds range from off (0) to full (255). -## Define a speed for each temperature that you define. Order matters. -SPEEDS=(255 127 85 0) - -## Temperatures, 75000=75C. Map each to a speed above. -TEMPS=(75000 65000 55000 0) diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/fancontrol b/projects/Rockchip/packages/system-utils/sources/scripts/fancontrol deleted file mode 100755 index f5ad06a1d..000000000 --- a/projects/Rockchip/packages/system-utils/sources/scripts/fancontrol +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -DEBUG=false -COOLING_PROFILE=$(get_setting "cooling.profile") -FAN_PWM="${DEVICE_PWM_FAN}" - -$DEBUG && echo "Setting profile to ${COOLING_PROFILE}" - -if [ -e "/storage/.config/fancontrol.conf" ] && [ "${COOLING_PROFILE}" = "custom" ] -then - $DEBUG && echo "Loading configuration file" 2>/dev/null - source /storage/.config/fancontrol.conf - if [ ! $? = 0 ] - then - WARN="Custom fan profile could not be loaded, defaulting to quiet." - $DEBUG && echo "${WARN}" - logger -t fancontrol "${WARN}" - COOLING_PROFILE="quiet" - set_setting cooling.profile quiet - fi -fi - - -if [ ! "${COOLING_PROFILE}" = "custom" ] -then - if [ "${COOLING_PROFILE}" = "aggressive" ] - then - SPEEDS=(255 225 195) - TEMPS=(55000 45000 0) - elif [ "${COOLING_PROFILE}" = "moderate" ] - then - SPEEDS=(255 190 125 85) - TEMPS=(65000 55000 45000 0) - else - # Quiet. - SPEEDS=(255 127 85 0) - TEMPS=(75000 65000 55000 0) - fi -fi - -while true -do - INDEX=0 - CPU_TEMP=$(printf "%.0f" $(cat /sys/devices/virtual/thermal/thermal_zone*/temp | awk '{ total += $1; count++ } END { print total/count }')) - $DEBUG && echo "CPU TEMP: ${CPU_TEMP}" 2>/dev/null - for TEMP in "${TEMPS[@]}" - do - $DEBUG && echo "INDEX: ${INDEX}" 2>/dev/null - $DEBUG && echo "CHK: ${TEMP}" 2>/dev/null - if (( "${CPU_TEMP}" > "${TEMP}" )) - then - $DEBUG && echo "Setting PWM FAN to ${SPEEDS[${INDEX}]} (${TEMP})" 2>/dev/null - echo ${SPEEDS[${INDEX}]} >${FAN_PWM} - break - fi - INDEX=$(( $INDEX + 1 )) - done - sleep 2 - $DEBUG && echo "Loop" 2>/dev/null -done diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/headphone_sense b/projects/Rockchip/packages/system-utils/sources/scripts/headphone_sense deleted file mode 100755 index b9ed3cc0e..000000000 --- a/projects/Rockchip/packages/system-utils/sources/scripts/headphone_sense +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert) - -# Source predefined functions and variables -. /etc/profile - -# Switch to headphones if we have them already connected at boot -GPIO=$(cat /sys/class/gpio/gpio${DEVICE_JACK}/value) -[[ "$GPIO" == "0" ]] && set_setting "audio.device" "headphone" || set_setting "audio.device" "speakers" - -if [ -e "/storage/.config/system/configs/system.cfg" ]; then -/usr/bin/system_utils setaudio $(get_setting "audio.device") -/usr/bin/system_utils vol $(get_setting "audio.volume") -fi - -# Headphone sensing -DEVICE="${DEVICE_HEADPHONE_DEV}" - -HP_ON='*(SW_HEADPHONE_INSERT), value 0*' -HP_OFF='*(SW_HEADPHONE_INSERT), value 1*' - -evtest "${DEVICE}" | while read line; do - case $line in - (${HP_ON}) - amixer cset name='Playback Path' HP - set_setting "audio.device" "headphone" - ;; - (${HP_OFF}) - amixer cset name='Playback Path' SPK - set_setting "audio.device" "speakers" - ;; - esac -done diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/internalwifi b/projects/Rockchip/packages/system-utils/sources/scripts/internalwifi deleted file mode 100755 index 0ce29ca44..000000000 --- a/projects/Rockchip/packages/system-utils/sources/scripts/internalwifi +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash -# SPDX-License-Identifier: Apache-2.0 -# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius) - -. /etc/profile - -if [ -z "${DEVICE_INTERNAL_WIFI}" ] || [ "${DEVICE_INTERNAL_WIFI}" = false ] -then - exit 0 -fi - -case $1 in - disable) - connmanctl disable wifi - rmmod ${DEVICE_WIFI_MODULE} - echo 0 >/sys/class/gpio/gpio${DEVICE_WIFI}/value - set_setting internal.wifi 0 - ;; - enable) - echo 1 >/sys/class/gpio/gpio${DEVICE_WIFI}/value - modprobe ${DEVICE_WIFI_MODULE} - connmanctl enable wifi - set_setting internal.wifi 1 - ;; -esac - -systemctl restart connman diff --git a/projects/Rockchip/packages/system-utils/sources/scripts/system_utils b/projects/Rockchip/packages/system-utils/sources/scripts/system_utils deleted file mode 100755 index 1821d108e..000000000 --- a/projects/Rockchip/packages/system-utils/sources/scripts/system_utils +++ /dev/null @@ -1,87 +0,0 @@ -#!/bin/bash - -# SPDX-License-Identifier: GPL-2.0-or-later -# Copyright (C) 2020-present Shanti Gilbert (https://github.com/shantigilbert) - -# THESE NEEDS TO BE CLEANED UP, MAYBE WITH CASE OR FUNCTIONS - -# Source predefined functions and variables -. /etc/profile - -if [ "${1}" == "toggleaudio" ];then -# Toggle audio output -CURRENTAUDIO=$(get_setting "audio.device") - case "${CURRENTAUDIO}" in - "headphone") - echo "setting speakers" - amixer cset name='Playback Path' SPK - set_setting "audio.device" "speakers" - ;; - "auto"|"speakers"|*) - echo "setting headphones" - amixer cset name='Playback Path' HP - set_setting "audio.device" "headphone" - ;; - esac -fi - -if [ "${1}" == "setaudio" ];then -# Set audio output second parameter is either headphones or speakers - case "${2}" in - "headphone") - echo "setting headphones" - amixer cset name='Playback Path' HP - set_setting "audio.device" "headphone" - ;; - "auto"|"speakers"|*) - echo "setting speakers" - amixer cset name='Playback Path' SPK - set_setting "audio.device" "speakers" - ;; - esac -fi - -if [ "${1}" == "vol" ];then -VOLSTEP=1 -if [ -n "${3}" ]; then - VOLSTEP="${3}" -fi - -CURRENTVOL=$(get_setting "audio.volume") -MAXVOL=100 -MINVOL=0 - if [ "${2}" == "+" ]; then - STEPVOL=$(($CURRENTVOL+$VOLSTEP)) - elif [ "${2}" == "-" ]; then - STEPVOL=$(($CURRENTVOL-$VOLSTEP)) - else - STEPVOL=${2} - fi - [ "$STEPVOL" -ge "$MAXVOL" ] && STEPVOL="$MAXVOL" - [ "$STEPVOL" -le "$MINVOL" ] && STEPVOL="$MINVOL" - amixer set "${DEVICE_AUDIO_MIXER}" ${STEPVOL}% - alsactl store -f /storage/.config/asound.state - set_setting "audio.volume" ${STEPVOL} - fi - -if [ "${1}" == "bright" ]; then -STEPS="5" -BRIGHTNESS_DEV="$(ls /sys/class/backlight)" -CURRENTBRIGHT=$(cat /sys/class/backlight/${BRIGHTNESS_DEV}/brightness) -MAXBRIGHT="100" #$(cat /sys/class/backlight/${BRIGHTNESS_DEV}/max_brightness) -MINBRIGHT="2" - if [ "${2}" == "+" ]; then - STEPBRIGHT=$(($CURRENTBRIGHT+$STEPS)) - elif [ "${2}" == "-" ]; then - STEPBRIGHT=$(($CURRENTBRIGHT-$STEPS)) - else - STEPBRIGHT=${2} - fi - [ "$STEPBRIGHT" -ge "$MAXBRIGHT" ] && STEPBRIGHT="$MAXBRIGHT" - [ "$STEPBRIGHT" -le "$MINBRIGHT" ] && STEPBRIGHT="$MINBRIGHT" - #echo "Setting bright to $STEPBRIGHT" - echo "${STEPBRIGHT}" > /sys/class/backlight/${BRIGHTNESS_DEV}/brightness - set_setting "system.brightness" $(cat /sys/class/backlight/${BRIGHTNESS_DEV}/brightness) -fi - - diff --git a/projects/Rockchip/packages/system-utils/system.d/battery.service b/projects/Rockchip/packages/system-utils/system.d/battery.service deleted file mode 100644 index 84667b7c0..000000000 --- a/projects/Rockchip/packages/system-utils/system.d/battery.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=RG351 Low Power monitor -ConditionPathExists=/sys/class/power_supply/battery/capacity -Before=jelos.target - -[Service] -Environment=HOME=/storage -EnvironmentFile=/etc/profile -ExecStart=/usr/bin/battery -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/projects/Rockchip/packages/system-utils/system.d/fancontrol.service b/projects/Rockchip/packages/system-utils/system.d/fancontrol.service deleted file mode 100644 index e18831c8c..000000000 --- a/projects/Rockchip/packages/system-utils/system.d/fancontrol.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Simple Fan Control Service -ConditionPathExists=/sys/class/hwmon/hwmon0/pwm1 -Before=jelos.target - -[Service] -Environment=HOME=/storage -EnvironmentFile=/etc/profile -ExecStart=/usr/bin/fancontrol -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/projects/Rockchip/packages/system-utils/system.d/headphones.service b/projects/Rockchip/packages/system-utils/system.d/headphones.service deleted file mode 100644 index c399a76c7..000000000 --- a/projects/Rockchip/packages/system-utils/system.d/headphones.service +++ /dev/null @@ -1,12 +0,0 @@ -[Unit] -Description=Headphone Sense -Before=jelos.target - -[Service] -Environment=HOME=/storage -EnvironmentFile=/etc/profile -ExecStart=/usr/bin/headphone_sense -Restart=on-failure - -[Install] -WantedBy=multi-user.target diff --git a/projects/Rockchip/packages/system-utils/system.d/volume.service b/projects/Rockchip/packages/system-utils/system.d/volume.service deleted file mode 100644 index d3e30ea6c..000000000 --- a/projects/Rockchip/packages/system-utils/system.d/volume.service +++ /dev/null @@ -1,15 +0,0 @@ -[Unit] -Description=Volume button service -After=headphones.service -Before=jelos.target -StartLimitIntervalSec=0 - -[Service] -Environment=HOME=/storage -EnvironmentFile=/etc/profile -ExecStart=/usr/bin/volume_sense -Restart=always -RestartSec=1 - -[Install] -WantedBy=multi-user.target diff --git a/scripts/build_distro b/scripts/build_distro index 8a9561081..844f54720 100755 --- a/scripts/build_distro +++ b/scripts/build_distro @@ -62,17 +62,20 @@ fi PKG_CLEAN="${PKG_CLEAN} system-utils plymouth-lite initramfs busybox linux grub u-boot SDL2 modules \ emulationstation retroarch lib32 splash jelos" -if [ -d "build.${DISTRO}-${DEVICE_ROOT}.${ARCH}/initramfs" ] +if [ ! -n "${DIRTY}" ] then - rm -rf build.${DISTRO}-${DEVICE_ROOT}.${ARCH}/initramfs -fi + if [ -d "build.${DISTRO}-${DEVICE_ROOT}.${ARCH}/initramfs" ] + then + rm -rf build.${DISTRO}-${DEVICE_ROOT}.${ARCH}/initramfs + fi -# Clean a few packages to ensure the build date and version are updated -for package in ${PKG_CLEAN} -do - echo "Clean: ${package}" - ./scripts/clean ${package} -done + # Clean a few packages to ensure the build date and version are updated + for package in ${PKG_CLEAN} + do + echo "Clean: ${package}" + ./scripts/clean ${package} + done +fi # Clean out old builds before starting the new one. echo "Prune old releases: ${DISTRO}-${DEVICE}.${ARCH}-*" diff --git a/scripts/mkimage b/scripts/mkimage index 8db2eaa6a..c7722d9cc 100755 --- a/scripts/mkimage +++ b/scripts/mkimage @@ -323,6 +323,13 @@ fi sha256sum $(basename "${DISK}").gz > $(basename "${DISK}").gz.sha256 ) +if [ -n "${JELOS_SSH_KEYS_FILE}" ] || \ + [ -n "${JELOS_WIFI_SSID}" ] || \ + [ -n "${JELOS_WIFI_KEY}" ] +then + echo "image: CONTAINS SENSITIVE DATA, DO NOT DISTRIBUTE." +fi + # cleanup cleanup exit