Merge pull request #1235 from JustEnoughLinuxOS/dev

PR for release
This commit is contained in:
fewtarius 2023-04-01 10:34:40 -04:00 committed by GitHub
commit 18718eb2ee
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 445 additions and 13 deletions

View file

@ -1,6 +1,7 @@
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
# Copyright (C) 2023-present Fewtarius
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@ -19,11 +20,11 @@
################################################################################
PKG_NAME="dosbox-svn-lr"
PKG_VERSION="c23be7769518d753378307996de35e204d188c63"
PKG_VERSION="1b34215"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPLv2"
PKG_SITE="https://github.com/libretro/dosbox-svn"
PKG_SITE="https://github.com/JustEnoughLinuxOS/dosbox-svn"
PKG_URL="${PKG_SITE}.git"
PKG_GIT_CLONE_BRANCH="libretro"
PKG_DEPENDS_TARGET="toolchain SDL SDL_net retroarch"

View file

@ -47,11 +47,6 @@ pre_configure_target() {
}
makeinstall_target() {
case ${ARCH} in
arm|aarch64)
aarch64-linux-gnu-strip -s *.so
;;
esac
mkdir -p ${INSTALL}/usr/lib/libretro
cp mame*_libretro.so ${INSTALL}/usr/lib/libretro/
}

View file

@ -29,6 +29,7 @@ PKG_CMAKE_OPTS_TARGET=" -DUSE_SYSTEM_FFMPEG=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=Linux \
-DBUILD_SHARED_LIBS=OFF \
-DUSE_SYSTEM_LIBPNG=OFF \
-DANDROID=OFF \
-DWIN32=OFF \
-DAPPLE=OFF \

View file

@ -49,4 +49,9 @@ listcontains "${GRAPHIC_DRIVERS}" "etnaviv" &&
post_makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp -a ${PKG_BUILD}/.${TARGET_NAME}/tests/modetest/modetest ${INSTALL}/usr/bin/
for header in xf86drm.h xf86drmMode.h
do
sed -i "s#<drm.h>#<drm/drm.h>#g" ${SYSROOT_PREFIX}/usr/include/${header}
sed -i "s#<drm_mode.h#<drm/drm_mode.h>#g" ${SYSROOT_PREFIX}/usr/include/${header}
done
}

View file

@ -49,7 +49,7 @@ fi
if [ ! -z "${BASE_ONLY}" ]
then
PKG_DEPENDS_TARGET+=" ${PKG_BASEOS} ${PKG_TOOLS} ${PKG_UI}"
PKG_DEPENDS_TARGET+=" ${PKG_BASEOS} ${PKG_NETWORK} ${PKG_TOOLS} ${PKG_UI}"
else
PKG_DEPENDS_TARGET+=" ${PKG_BASEOS} ${PKG_NETWORK} ${PKG_TOOLS} ${PKG_UI} ${PKG_UI_TOOLS} ${PKG_COMPAT} ${PKG_MULTIMEDIA} ${PKG_SOFTWARE}"
fi

View file

@ -181,7 +181,7 @@ fi
### Force everyone to the stable repo
set_setting updates.branch stable
### Configure box86/64 defaulta
### Configure box86/64 defaults
for BOX in box86 box64
do
if [ ! -e "/storage/.config/${BOX}.${BOX}rc" ]
@ -189,3 +189,4 @@ do
cp -f /usr/config/${BOX}.${BOX}rc /storage/.config/
fi
done

View file

@ -0,0 +1,102 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius
. /etc/profile
# ARGS:
#
# 1 - property to adjust (gamma (brightness)/contrast/saturation/hue)
# 2 - up/down or a defined value
PROPERTY=${1}
NEWVAL=${2}
# Command usage:
# drm_tool set /dev/dri/card0 133 saturation value
# Define the basics
MIN=1
MAX=100
STEP=1
if [ ! -e /dev/dri/card0 ]
then
echo "ERROR: No display found."
exit 1
fi
log() {
$DEBUG && echo "Info: ${*}" >>/var/log/display.log
}
getValue() {
MYVAL=$(get_setting display.${1})
if [ -n "${MYVAL}" ]
then
if [ "${MYVAL}" > "${MAX}" ]
then
MYVAL=${MAX}
elif [ "${MYVAL}" < "${MIN}" ]
then
MYVAL=${MIN}
fi
echo ${MYVAL}
else
echo $(drm_tool list 2>/dev/null | sed -n '/Connector: 133/,$p' | awk '/'${1}'/ {print $5}')
fi
}
setValue() {
log "Set (${1}: ${2})"
drm_tool set /dev/dri/card0 133 ${1} ${2} 2>/dev/null
if [ $? = 0 ]
then
set_setting display.${1} ${2}
fi
}
stepUp() {
LASTVAL=$(getValue ${PROPERTY})
NEWVAL=$(expr ${LASTVAL} + 1)
log "Step up (${PROPERTY}: ${NEWVAL})"
setValue ${PROPERTY} ${NEWVAL}
}
stepDown() {
LASTVAL=$(getValue ${PROPERTY})
NEWVAL=$(expr ${LASTVAL} - 1)
log "Step down (${PROPERTY}: ${NEWVAL})"
setValue ${PROPERTY} ${NEWVAL}
}
restoreSettings() {
for PROPERTY in brightness contrast saturation hue
do
RESTVAL=$(getValue ${PROPERTY})
setValue ${PROPERTY} ${RESTVAL}
done
}
case ${NEWVAL} in
"up")
stepUp
;;
"down")
stepDown
;;
"restore")
restoreSettings
;;
*)
if [[ "${NEWVAL}" =~ ^[0-9] ]] && \
[ "${NEWVAL}" -le "${MAX}" ] && \
[ "${NEWVAL}" -ge "${MIN}" ]
then
setValue ${PROPERTY} ${NEWVAL}
else
echo "Error: Invalid value."
exit 1
fi
;;
esac

View file

@ -4,7 +4,7 @@
PKG_NAME="linux"
PKG_LICENSE="GPL"
PKG_VERSION="6.1.21"
PKG_VERSION="6.1.22"
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"

View file

@ -22,3 +22,4 @@ if [ -e "/sys/class/backlight/${BRIGHTNESS_DEVICE}/brightness" ]
then
printf "%.0f" $(echo "${BRIGHTNESS}") > /sys/class/backlight/${BRIGHTNESS_DEVICE}/brightness
fi

View file

@ -2,3 +2,12 @@ STATE=$(get_setting ssh.enabled)
SVC="sshd"
CONF="sshd.conf"
DAEMONS=("sshd")
# Prepare authorized keys if they exist
if [ ! -e "/storage/.ssh/authorized_keys" ] && \
[ -e "/usr/config/ssh/authorized_keys" ]
then
mkdir -p /storage/.ssh/
cp /usr/config/ssh/authorized_keys /storage/.ssh/authorized_keys
chmod 0610 /storage/.ssh/authorized_keys
fi

View file

@ -0,0 +1,16 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Configure default contrast saturation and hue values
for PROPERTY in brightness contrast saturation hue
do
MYVAL=$(get_setting display.${PROPERTY})
if [ -z "${MYVAL}" ]
then
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
fi
display ${PROPERTY} ${MYVAL}
done

View file

@ -0,0 +1,16 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Configure default contrast saturation and hue values
for PROPERTY in brightness contrast saturation hue
do
MYVAL=$(get_setting display.${PROPERTY})
if [ -z "${MYVAL}" ]
then
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
fi
display ${PROPERTY} ${MYVAL}
done

View file

@ -0,0 +1,16 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Configure default contrast saturation and hue values
for PROPERTY in brightness contrast saturation hue
do
MYVAL=$(get_setting display.${PROPERTY})
if [ -z "${MYVAL}" ]
then
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
fi
display ${PROPERTY} ${MYVAL}
done

View file

@ -0,0 +1,16 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Configure default contrast saturation and hue values
for PROPERTY in brightness contrast saturation hue
do
MYVAL=$(get_setting display.${PROPERTY})
if [ -z "${MYVAL}" ]
then
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
fi
display ${PROPERTY} ${MYVAL}
done

View file

@ -0,0 +1,11 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
cat <<EOF >/storage/.config/sleep.conf.d/sleep.conf
[Sleep]
AllowSuspend=yes
SuspendState=freeze
EOF

View file

@ -0,0 +1,39 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
cat <<EOF >/storage/.config/profile.d/001-deviceconfig
# Device Features
DEVICE_HAS_FAN=false
DEVICE_FAKE_JACKSENSE=false
DEVICE_VOLUMECTL=true
DEVICE_POWER_LED=false
DEVICE_AUDIO_MIXER="Master"
DEVICE_PLAYBACK_PATH_SPK="SPK"
DEVICE_PLAYBACK_PATH_HP="HP"
#DEVICE_HEADPHONE_DEV=""
DEVICE_BRIGHTNESS="128"
SPLASH_LOADER="imagemagick"
UI_SERVICE="emustation.service"
# Kernel Modules
DEVICE_INTERNAL_WIFI=true
DEVICE_WIFI_MODULE="8821cs"
# GPIOS
DEVICE_WIFI="0"
#DEVICE_LED=""
DEVICE_PWM_MOTOR="pwmchip1"
#DEVICE_PWM_FAN=""
#DEVICE_JACK=""
# FREQ governors
CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0")
GPU_FREQ="/sys/devices/platform/fde60000.gpu/devfreq/fde60000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# Volume Keys
DEVICE_KEY_VOLUMEDOWN=114
DEVICE_KEY_VOLUMEUP=115
DEVICE_VOL_MODIFIER="BTN_MODE"
EOF

View file

@ -0,0 +1,146 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
### Set a custom device so we don't clobber it.
set-audio set "CUSTOM (UNMANAGED)"
set-audio esset "Master"
cat <<EOF >/storage/.config/asound.conf
pcm.!default {
type plug
slave.pcm "softvol"
}
ctl.!default {
type hw
card 0
}
pcm.ddmix {
ipc_key 1024
type dmix
slave {
pcm "hw:0,0"
period_time 0
period_size 1024
buffer_size 4096
rate 44100
}
}
pcm.softvol {
type softvol
slave {
pcm "ddmix"
}
control {
name "Master"
card 0
}
}
EOF
if [ ! -e "/storage/.config/asound.state" ]
then
cat <<EOF >/storage/.config/asound.state
state.rockchiprk817co {
control.1 {
iface MIXER
name 'Playback Path'
value HP
comment {
access 'read write'
type ENUMERATED
count 1
item.0 OFF
item.1 RCV
item.2 SPK
item.3 HP
item.4 HP_NO_MIC
item.5 BT
item.6 SPK_HP
item.7 RING_SPK
item.8 RING_HP
item.9 RING_HP_NO_MIC
item.10 RING_SPK_HP
}
}
control.2 {
iface MIXER
name 'Capture MIC Path'
value 'MIC OFF'
comment {
access 'read write'
type ENUMERATED
count 1
item.0 'MIC OFF'
item.1 'Main Mic'
item.2 'Hands Free Mic'
item.3 'BT Sco Mic'
}
}
control.3 {
iface MIXER
name Master
value.0 109
value.1 109
comment {
access 'read write user'
type INTEGER
count 2
range '0 - 255'
tlv '0000000100000008ffffec1400000014'
dbmin -5100
dbmax 0
dbvalue.0 -2920
dbvalue.1 -2920
}
}
}
state.rockchiphdmi {
control.1 {
iface PCM
name 'Playback Channel Map'
value.0 0
value.1 0
value.2 0
value.3 0
value.4 0
value.5 0
value.6 0
value.7 0
comment {
access read
type INTEGER
count 8
range '0 - 36'
}
}
control.2 {
iface PCM
name ELD
value '0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
comment {
access 'read volatile'
type BYTES
count 128
}
}
control.3 {
iface PCM
name 'AUDIO MODE'
value 0
comment {
access 'read write volatile'
type INTEGER
count 1
range '0 - 2'
}
}
}
EOF
alsactl restore -f /storage/.config/asound.state
fi

View file

@ -0,0 +1,16 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2021-present Fewtarius (https://github.com/fewtarius)
. /etc/profile
# Configure default contrast saturation and hue values
for PROPERTY in brightness contrast saturation hue
do
MYVAL=$(get_setting display.${PROPERTY})
if [ -z "${MYVAL}" ]
then
MYVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
fi
display ${PROPERTY} ${MYVAL}
done

View file

@ -0,0 +1,21 @@
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2023-present Fewtarius
PKG_NAME="drm_tool"
PKG_VERSION="1cb5b10"
PKG_LICENSE="GPLv3"
PKG_SITE="https://github.com/NickCis/drm_tool"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="toolchain libdrm"
PKG_LONGDESC="A simple tool for getting drm info and setting properties."
pre_configure_target() {
export CFLAGS="${TARGET_CFLAGS} -D_FILE_OFFSET_BITS=64 -ldrm"
export LDFLAGS="${TARGET_LDFLAGS} -ldrm"
}
makeinstall_target() {
mkdir -p ${INSTALL}/usr/bin
cp drm_tool ${INSTALL}/usr/bin
}

View file

@ -0,0 +1,20 @@
diff --git a/Makefile b/Makefile
index 310b5dc..ceba9df 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,3 @@
-CC=gcc
-LD=gcc
RM=rm
INSTALL=install
@@ -10,9 +8,6 @@ OBJECTS=$(SRC_PATH)/drm_tool.o
SRC_PATH=src
-CFLAGS=-Wall -D_FILE_OFFSET_BITS=64 `pkg-config --cflags libdrm`
-LDFLAGS=`pkg-config --libs libdrm`
-
.PHONY: all
all: $(OUTPUT)

View file

@ -3,14 +3,14 @@
# Copyright (C) 2020-present Fewtarius
PKG_NAME="emulationstation"
PKG_VERSION="182c86c29e6242fcc7b22f26dcb46c7c1bf824f5"
PKG_VERSION="cd40e99"
PKG_GIT_CLONE_BRANCH="main"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="https://github.com/JustEnoughLinuxOS/emulationstation"
PKG_URL="${PKG_SITE}.git"
PKG_DEPENDS_TARGET="boost toolchain SDL2 freetype curl freeimage bash rapidjson SDL2_mixer fping p7zip alsa vlc splash"
PKG_DEPENDS_TARGET="boost toolchain SDL2 freetype curl freeimage bash rapidjson SDL2_mixer fping p7zip alsa vlc drm_tool splash"
PKG_NEED_UNPACK="busybox"
PKG_SHORTDESC="Emulationstation emulator frontend"
PKG_BUILD_FLAGS="-gold"

View file

@ -32,7 +32,7 @@
PARTITION_TABLE="gpt"
UBOOT_LABEL="uboot"
TRUST_LABEL="resource"
DEVICE_DTB=("rk3566-rg353p-linux" "rk3566-rg353v-linux" "rk3566-rg353m-linux" "rk3566-rg503-linux")
DEVICE_DTB=("rk3566-rg353p-linux" "rk3566-rg353v-linux" "rk3566-rg353m-linux" "rk3566-rg503-linux" "rk3566-rk2023-linux")
UBOOT_DTB="rk3566"
UBOOT_CONFIG="rk3568_defconfig"
PKG_SOC="rk356x"