Merge pull request #305 from fewtarius/dev

Fixes
This commit is contained in:
fewtarius 2022-08-02 19:39:14 -04:00 committed by GitHub
commit f18f6e8cc0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 61 additions and 9 deletions

View file

@ -156,9 +156,39 @@ mv wireguard-linux-compat-v1.0.20211208 wireguard-linux-compat
cp -rf wireguard-linux-compat wireguard-linux-compat.orig
# Make your changes to wireguard-linux-compat
mkdir ../../packages/network/wireguard-linux-compat/patches/RG503
mkdir -p ../../packages/network/wireguard-linux-compat/patches/RG503
# run from the sources dir
diff -rupN wireguard-linux-compat wireguard-linux-compat.orig ../../packages/network/wireguard-linux-compat/patches/RG503/mychanges.patch
diff -rupN wireguard-linux-compat wireguard-linux-compat.orig >../../packages/network/wireguard-linux-compat/patches/RG503/mychanges.patch
```
### Creating a patch for a package using git
If you are working with a git repository, building a patch for the distribution is simple. Rather than using `diff`, use `git diff`.
```
cd sources/emulationstation/emulationstation-098226b/
# Make your changes to EmulationStation
vim/emacs/vscode/notepad.exe
# Make the patch directory
mkdir -p ../../packages/ui/emulationstation/patches
# Run from the sources dir
git diff >../../packages/ui/emulationstation/patches/005-mypatch.patch
```
After patch is generated, one can rebuild an individual package, see section above. The build system will automatically pick up patch files from `patches` directory. For testing, one can either copy the built binary to the console or burn the whole image on SD card.
### Building an image with your patch
If you already have a build for your device made using the above process, it's simple to shortcut the build process and create an image to test your changes quickly using the process below.
```
# Update the package version for a new package, or apply your patch as above.
vim/emacs/vscode/notepad.exe
# Export the variables needed to complete your build, we'll assume you are building for the RG503, update the device to match your configuration.
export OS_VERSION=$(date +%Y%m%d) BUILD_DATE=$(date)
export PROJECT=Rockchip DEVICE=RG503 ARCH=aarch64
# Clean the package you are building.
./scripts/clean emulationstation
# Build the package.
./scripts/build emulationstation
# Install the package into the build root.
./scripts/install emulationstation
# Generate an image with your new package.
./scripts/image mkimage
```

View file

@ -28,11 +28,11 @@ PKG_BASEOS="plymouth-lite grep wget libjpeg-turbo util-linux xmlstarlet bluetool
PKG_UI="emulationstation"
PKG_EMUS="hatarisa openbor hypseus-singe moonlight duckstationsa pico-8 \
PKG_EMUS="hatarisa openbor hypseus-singe moonlight hypseus-singe pico-8 flycastsa \
scummvmsa PPSSPPSDL yabasanshiroSA vicesa mupen64plussa-audio-sdl \
mupen64plussa-input-sdl mupen64plussa-ui-console mupen64plussa-video-rice \
mupen64plussa-core mupen64plussa-rsp-hle mupen64plussa-video-glide64mk2 \
lzdoom gzdoom ecwolf amiberry raze flycastsa hypseus-singe"
lzdoom gzdoom ecwolf amiberry raze"
PKG_RETROARCH="retroarch retroarch-overlays retroarch-assets common-shaders glsl-shaders \
libretro-database core-info"
@ -71,6 +71,14 @@ then
PKG_COMPAT+=" lib32"
fi
### Emulators or cores for specific devices
case "${DEVICE}" in
RG552|RG503|RG353P)
PKG_EMUS+=" duckstationsa"
;;
esac
### Software specific to PC builds
if [ "${PROJECT}" == "PC" ]
then
PKG_BASEOS+=" installer"

View file

@ -1,6 +1,7 @@
#!/bin/bash
# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2020 Fewtarius (https://github.com/fewtarius)
# Copyright (C) 2022 kkoshelev (https://github.com/kkoshelev)
. /etc/profile
@ -27,6 +28,17 @@ fi
WIFICFG="/storage/.cache/connman/wifi.config"
# lists all wifi services in service=ssid format
list_wifi() {
connmanctl services | cut -b 5- | awk '/\S+.+\s+wifi/ {a=$0; sub(/\s+wifi_.*$/,"", a); b=$0; sub(a, "", b); sub(/\s+/, "", b); print b "=" a}' | sort | uniq
}
# Looksup connman service name based on ssid
# $1 - SSID to lookup
get_wifi_service() {
list_wifi | awk -v ssid="${1}" '{ split($0, a, "="); if (a[2]==ssid) print a[1] }'
}
set_powersave() {
ENABLED=$(get_setting wifi.powersave)
if [ "${ENABLED}" = "1" ]
@ -55,6 +67,7 @@ EOF
connmanctl enable wifi 2>/dev/null
set_powersave 2>/dev/null
connmanctl scan wifi 2>/dev/null
connmanctl connect $(get_wifi_service "${SSID}") 2>/dev/null
;;
"disable")
connmanctl disable wifi 2>/dev/null
@ -62,14 +75,18 @@ EOF
set_setting wifi.enabled 0
;;
"list")
connmanctl services | cut -b 5- | awk '/wifi/ {sub(/\s+wifi_.*$/,"",$0);print}' | sort | uniq
#connmanctl services | cut -b 5- | awk '/wifi/ {sub(/\s+wifi_.*$/,"",$0);print}' | sort | uniq
list_wifi | awk '{sub(/\S+=/,"",$0);print}'
;;
"scan")
connmanctl scan 2>/dev/null
;;
"scanlist")
set_wifi scan 2>/dev/null
set_wifi list 2>/dev/null
list_wifi | awk '{sub(/\S+=/,"",$0);print}'
;;
"service")
get_wifi_service "${SSID}"
;;
"setpowersave")
set_powersave 2>/dev/null

View file

@ -26,9 +26,6 @@ CPU_FREQ=("/sys/devices/system/cpu/cpufreq/policy0" "/sys/devices/system/cpu/cpu
GPU_FREQ="/sys/devices/platform/ff9a0000.gpu/devfreq/ff9a0000.gpu"
DMC_FREQ="/sys/devices/platform/dmc/devfreq/dmc"
# No Max Performance for the small cores
NO_MAX_PERF="/sys/devices/system/cpu/cpufreq/policy0"
# Affinity
SLOW_CORES="taskset -c 0-3"
FAST_CORES="taskset -c 4-5"