Merge branch 'dev' into ogu
This commit is contained in:
commit
505f8ab973
11 changed files with 186 additions and 6 deletions
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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,15 @@ do
|
|||
cp -f /usr/config/${BOX}.${BOX}rc /storage/.config/
|
||||
fi
|
||||
done
|
||||
|
||||
# Configure default contrast saturation and hue values
|
||||
for PROPERTY in brightness contrast saturation hue
|
||||
do
|
||||
MYVAL=$(get_setting display.${PROPERTY})
|
||||
if [ -z "${MYVAL}" ]
|
||||
then
|
||||
DEFVAL=$(drm_tool list | sed -n '/Connector: 133/,$p' | awk '/'${PROPERTY}'/ {print $5}')
|
||||
echo "Set default for ${PROPERTY}" >>${LOG}
|
||||
set_setting display.${PROPERTY} ${DEFVAL}
|
||||
fi
|
||||
done
|
||||
|
|
102
packages/jelos/sources/scripts/display
Executable file
102
packages/jelos/sources/scripts/display
Executable 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
|
|
@ -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"
|
||||
|
|
|
@ -22,3 +22,14 @@ if [ -e "/sys/class/backlight/${BRIGHTNESS_DEVICE}/brightness" ]
|
|||
then
|
||||
printf "%.0f" $(echo "${BRIGHTNESS}") > /sys/class/backlight/${BRIGHTNESS_DEVICE}/brightness
|
||||
fi
|
||||
|
||||
# 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
|
|
@ -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
|
||||
|
|
21
packages/sysutils/drm_tool/package.mk
Normal file
21
packages/sysutils/drm_tool/package.mk
Normal 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
|
||||
}
|
20
packages/sysutils/drm_tool/patches/001-strip-flags.patch
Normal file
20
packages/sysutils/drm_tool/patches/001-strip-flags.patch
Normal 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)
|
|
@ -3,14 +3,14 @@
|
|||
# Copyright (C) 2020-present Fewtarius
|
||||
|
||||
PKG_NAME="emulationstation"
|
||||
PKG_VERSION="182c86c29e6242fcc7b22f26dcb46c7c1bf824f5"
|
||||
PKG_VERSION="7fe201c"
|
||||
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"
|
||||
|
|
|
@ -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"
|
||||
|
|
Loading…
Reference in a new issue