Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 21 additions & 3 deletions distributions/ROCKNIX/config/functions
Original file line number Diff line number Diff line change
Expand Up @@ -282,10 +282,28 @@ if [ "\${saved_entry}" ]; then
else
set timeout=-1
fi
EOF

cat << EOF

set abl_known=
if fdtdump --prop model --set abl_model; then
set default="abl"
set timeout=2
EOF

xmlstarlet sel -t -m "//rocknix/${DEVICE}/file[@full]" \
-v "@full" -n "${CONFIGXML}" 2>/dev/null | while IFS= read -r FULL; do
cat << EOF
if [ "\${abl_model}" = "${FULL}" ]; then set abl_known=1; fi
EOF
done

cat << EOF
if [ -n "\${abl_known}" ]; then
set default="abl"
set timeout=2
else
set abl_model=
fi
fi

if [ x"\${feature_menuentry_id}" = xy ]; then
Expand Down Expand Up @@ -314,7 +332,7 @@ if [ "\${saved_entry}" = "${SHORT}" ]; then set rotation=$(((360 - ROT * 90) % 3
EOF
done

xmlstarlet sel -t -m "//rocknix/${DEVICE}/file[@rotation]" \
xmlstarlet sel -t -m "//rocknix/${DEVICE}/file[@rotation and @full]" \
-v "concat(@full, '|', @rotation)" -n "${CONFIGXML}" 2>/dev/null | while IFS='|' read -r FULL ROT; do
cat << EOF
if [ "\${abl_model}" = "${FULL}" ]; then set rotation=$(((360 - ROT * 90) % 360)); fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ steam_prepare_storage_and_vdf() {
steam_load_es_thunk_settings() {
GAME=$(echo "${1}" | sed "s#^/.*/##")
PLATFORM=$(echo "${2}" | sed "s#^/.*/##")
ASOUND_LIB=$(get_setting asound_host_library "${PLATFORM}" "${GAME}")
ASOUND_LIB=${ASOUND_LIB:-0}
DRM_LIB=$(get_setting drm_host_library "${PLATFORM}" "${GAME}")
DRM_LIB=${DRM_LIB:-0}
VULKAN_LIB=$(get_setting vulkan_host_library "${PLATFORM}" "${GAME}")
VULKAN_LIB=${VULKAN_LIB:-0}
WAYLAND_LIB=$(get_setting wayland_client_host_library "${PLATFORM}" "${GAME}")
WAYLAND_LIB=${WAYLAND_LIB:-0}
GL_LIB=$(get_setting gl_host_library "${PLATFORM}" "${GAME}")
GL_LIB=${GL_LIB:-0}
LSFG_ENABLE=$(get_setting lsfg_enable "${PLATFORM}" "${GAME}")
LSFG_ENABLE=${LSFG_ENABLE:-0}
LSFG_MULTIPLIER=$(get_setting lsfg_multiplier "${PLATFORM}" "${GAME}")
Expand Down Expand Up @@ -62,26 +52,6 @@ steam_apply_lsfg_settings() {
fi
}

steam_write_fex_config_json() {
local tmp
tmp=$(mktemp)
jq \
--arg asound "$ASOUND_LIB" \
--arg drm "$DRM_LIB" \
--arg vulkan "$VULKAN_LIB" \
--arg wayland "$WAYLAND_LIB" \
--arg gl "$GL_LIB" \
'.ThunksDB |= {
asound: ($asound | tonumber),
drm: ($drm | tonumber),
Vulkan: ($vulkan | tonumber),
WaylandClient: ($wayland | tonumber),
GL: ($gl | tonumber)
}' \
/storage/.config/fex-emu/Config.json >"$tmp" &&
mv "$tmp" /storage/.config/fex-emu/Config.json
}

steam_set_cpu_affinity() {
local cores
cores=$(get_setting "cores" "${PLATFORM}" "${GAME}")
Expand All @@ -98,11 +68,6 @@ steam_debug_print() {
echo "GAME set to: ${GAME}"
echo "PLATFORM set to: ${PLATFORM}"
echo "CPU CORES set to: ${EMUPERF}"
echo "ASOUND HOST LIB set to: ${ASOUND_LIB}"
echo "DRM HOST LIB set to: ${DRM_LIB}"
echo "VULKAN HOST LIB set to: ${VULKAN_LIB}"
echo "WAYLAND HOST LIB set to: ${WAYLAND_LIB}"
echo "GL HOST LIB set to: ${GL_LIB}"
echo "LSFG ENABLE set to: ${LSFG_ENABLE}"
echo "LSFG MULTIPLIER set to: ${LSFG_MULTIPLIER}"
echo "LSFG FLOW SCALE set to: ${LSFG_FLOW_SCALE}"
Expand Down Expand Up @@ -188,7 +153,7 @@ steam_launch_bigpicture() {
GAMESCOPE_MODE_SAVE_FILE="${gamescope_mode_file}" GAMESCOPE_FAKE_OUTPUT_MM=508x286 \
env -u WAYLAND_DISPLAY LD_LIBRARY_PATH=/storage/.local/share/Steam/lib/aarch64-linux-gnu/ ${EMUPERF} \
gamescope $PREFER_OUTPUT -W "$W" -H "$H" -r "$REFRESH_HZ" --xwayland-count 2 --mangoapp --backend drm --force-orientation "${force_orientation}" -e -- \
/storage/.local/share/Steam/steamrtarm64/steam -steamdeck -steamos3 -gamepadui -noverifyfiles -nobootstrapupdate -skipinitialbootstrap -norepairfiles -noshaders ${game_uri:+"$game_uri"}
/storage/.local/share/Steam/steamrtarm64/steam -deckard -steamos3 -gamepadui -noverifyfiles -nobootstrapupdate -skipinitialbootstrap -norepairfiles -noshaders ${game_uri:+"$game_uri"}
systemctl start essway
exit 0
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ set_kill set "gamescope steam FEX"
steam_ensure_fex_config_template
steam_prepare_storage_and_vdf
steam_load_es_thunk_settings "$@"
steam_write_fex_config_json
steam_apply_lsfg_settings
steam_apply_fps_limit
steam_set_cpu_affinity
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ set_kill set "-9 FEX"
steam_ensure_fex_config_template
steam_prepare_storage_and_vdf
steam_load_es_thunk_settings "$@"
steam_write_fex_config_json
steam_apply_lsfg_settings
steam_apply_fps_limit
steam_set_cpu_affinity
Expand Down
2 changes: 1 addition & 1 deletion projects/ROCKNIX/packages/graphics/SDL2/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PKG_SITE="https://www.libsdl.org/"
PKG_URL="https://www.libsdl.org/release/SDL2-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain alsa-lib systemd dbus pulseaudio libdrm SDL2:host libX11:host"
PKG_LONGDESC="Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware."
PKG_DEPENDS_HOST="toolchain:host distutilscross:host"
PKG_DEPENDS_HOST="toolchain:host"

if [ ! "${OPENGL_SUPPORT}" = "no" ]; then
PKG_DEPENDS_TARGET+=" ${OPENGL} glu"
Expand Down
2 changes: 1 addition & 1 deletion projects/ROCKNIX/packages/graphics/SDL3/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ PKG_SITE="https://www.libsdl.org/"
PKG_URL="https://www.libsdl.org/release/SDL3-${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain alsa-lib systemd dbus pulseaudio pipewire libdrm libusb"
PKG_LONGDESC="Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware."
PKG_DEPENDS_HOST="toolchain:host distutilscross:host"
PKG_DEPENDS_HOST="toolchain:host"

PKG_TOOLCHAIN="cmake"

Expand Down
5 changes: 3 additions & 2 deletions projects/ROCKNIX/packages/graphics/lsfg-vk/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pre_configure_host() {
-DLSFGVK_BUILD_CLI=OFF \
-DLSFGVK_INSTALL_DEVELOP=OFF \
-DLSFGVK_INSTALL_XDG_FILES=OFF \
-DLSFGVK_LAYER_LIBRARY_PATH=/usr/lib/liblsfg-vk-layer.so"
-DLSFGVK_LAYER_LIBRARY_PATH=/usr/lib/liblsfg-vk-layer-x86.so"
}

makeinstall_target() {
Expand All @@ -45,7 +45,8 @@ makeinstall_target() {
${INSTALL}/usr/lib/pressure-vessel/overrides/share/vulkan/implicit_layer.d

mkdir -p ${INSTALL}/usr/share/fex-emu
cp -a ${TOOLCHAIN}/lib/liblsfg-vk-layer.so ${INSTALL}/usr/share/fex-emu
cp -a ${TOOLCHAIN}/lib/liblsfg-vk-layer.so ${INSTALL}/usr/share/fex-emu/liblsfg-vk-layer-x86.so
cp -a ${TOOLCHAIN}/share/vulkan/implicit_layer.d/VkLayer_LSFGVK_frame_generation.json ${INSTALL}/usr/share/fex-emu/VkLayer_LSFGVK_frame_generation-x86.json
}


17 changes: 0 additions & 17 deletions projects/ROCKNIX/packages/python/devel/distutilscross/package.mk

This file was deleted.

This file was deleted.

2 changes: 1 addition & 1 deletion projects/ROCKNIX/packages/sysutils/i2c-tools/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ PKG_SHA256="1f899e43603184fac32f34d72498fc737952dbc9c97a8dd9467fadfdf4600cf9"
PKG_LICENSE="GPL"
PKG_SITE="https://i2c.wiki.kernel.org/index.php/I2C_Tools"
PKG_URL="https://www.kernel.org/pub/software/utils/i2c-tools/${PKG_NAME}-${PKG_VERSION}.tar.xz"
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
PKG_DEPENDS_TARGET="toolchain Python3"
PKG_LONGDESC="A heterogeneous set of I2C tools for Linux."
PKG_BUILD_FLAGS="-sysroot"

Expand Down
17 changes: 4 additions & 13 deletions projects/ROCKNIX/packages/tools/pyFDT/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,10 @@ PKG_SHA256="f70b1008ea78a2a46429d2f3b06a2a71f2bfd59a5e13000c2f3f2a957b57ea9b"
PKG_LICENSE="Apache-2.0"
PKG_SITE="https://github.com/molejar/${PKG_NAME}"
PKG_URL="${PKG_SITE}/archive/refs/tags/${PKG_VERSION}.zip"
PKG_DEPENDS_TARGET="Python3"
PKG_DEPENDS_TARGET="toolchain Python3 setuptools:host"
PKG_LONGDESC="This python module is usable for manipulation with Device Tree Data and primary was created for imxsb tool"
PKG_TOOLCHAIN="manual"
PKG_TOOLCHAIN="python"

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

make_target() {
python3 setup.py build
}

makeinstall_target() {
python3 setup.py install --root=${INSTALL} --prefix=/usr
post_makeinstall_target() {
python_remove_source
}
19 changes: 3 additions & 16 deletions projects/ROCKNIX/packages/tools/pyudev/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,10 @@ PKG_VERSION="5e00141"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/pyudev/pyudev"
PKG_URL="https://github.com/pyudev/pyudev/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
PKG_DEPENDS_TARGET="toolchain Python3 setuptools:host"
PKG_LONGDESC="pyudev is a LGPL licenced, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux."

pre_make_target() {
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
export LDFLAGS="${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib"
export LDSHARED="${CC} -shared"
}

make_target() {
python3 setup.py build
}

makeinstall_target() {
python3 setup.py install --root=${INSTALL} --prefix=/usr
}
PKG_TOOLCHAIN="python"

post_makeinstall_target() {
find ${INSTALL}/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";"
python_remove_source
}
21 changes: 3 additions & 18 deletions projects/ROCKNIX/packages/tools/six/package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,10 @@ PKG_VERSION="02c3bca"
PKG_LICENSE="OSS"
PKG_SITE="https://github.com/benjaminp/six"
PKG_URL="${PKG_SITE}/archive/${PKG_VERSION}.tar.gz"
PKG_DEPENDS_TARGET="toolchain Python3 distutilscross:host"
PKG_DEPENDS_TARGET="toolchain Python3 setuptools:host"
PKG_LONGDESC="Python 2 and 3 compatibility library "
PKG_TOOLCHAIN="manual"

pre_make_target() {
export PYTHONXCPREFIX="${SYSROOT_PREFIX}/usr"
export LDFLAGS="${LDFLAGS} -L${SYSROOT_PREFIX}/usr/lib -L${SYSROOT_PREFIX}/lib"
export LDSHARED="${CC} -shared"
}

make_target() {
python3 setup.py build
# python3 setup.py build --cross-compile
}

makeinstall_target() {
python3 setup.py install --root=${INSTALL} --prefix=/usr
}
PKG_TOOLCHAIN="python"

post_makeinstall_target() {
find ${INSTALL}/usr/lib/python*/site-packages/ -name "*.py" -exec rm -rf {} ";"
python_remove_source
}
Original file line number Diff line number Diff line change
Expand Up @@ -337,26 +337,6 @@
<choice name="arm64" value="arm64" />
<choice name="x86" value="x86" />
</feature>
<feature name="asound host library">
<choice name="off" value="0" />
<choice name="on" value="1" />
</feature>
<feature name="drm host library">
<choice name="off" value="0" />
<choice name="on" value="1" />
</feature>
<feature name="vulkan host library">
<choice name="off" value="0" />
<choice name="on" value="1" />
</feature>
<feature name="wayland client host library">
<choice name="off" value="0" />
<choice name="on" value="1" />
</feature>
<feature name="gl host library">
<choice name="off" value="0" />
<choice name="on" value="1" />
</feature>
<feature name="lsfg enable">
<choice name="off" value="0" />
<choice name="on" value="1" />
Expand Down
Loading
Loading