From e963669eeed617e060e4a0c1531da36b718fa3b4 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 18 Sep 2023 14:00:59 +0800 Subject: [PATCH] update 2023-09-18 14:00:59 --- luci-app-amlogic/Makefile | 2 +- .../root/usr/sbin/openwrt-update-allwinner | 21 +++++++++----- .../root/usr/sbin/openwrt-update-rockchip | 28 +++++++++++++++++++ 3 files changed, 43 insertions(+), 8 deletions(-) diff --git a/luci-app-amlogic/Makefile b/luci-app-amlogic/Makefile index 45b748fe..65a3c998 100644 --- a/luci-app-amlogic/Makefile +++ b/luci-app-amlogic/Makefile @@ -16,7 +16,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=luci-app-amlogic -PKG_VERSION:=3.1.197 +PKG_VERSION:=3.1.198 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 License diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner b/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner index 92397a13..4e98408b 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-allwinner @@ -19,15 +19,22 @@ AUTO_MAINLINE_UBOOT=${2} BACKUP_RESTORE_CONFIG=${3} # Current FDT file -if [ -f /boot/uEnv.txt ]; then +if [[ -f "/boot/uEnv.txt" ]]; then source /boot/uEnv.txt 2>/dev/null - CURRENT_FDTFILE=$(basename $FDT) -fi -if [ -n "$CURRENT_FDTFILE" ]; then - MYDTB_FDTFILE="$CURRENT_FDTFILE" -else - MYDTB_FDTFILE="sun50i-h6-vplus-cloud.dtb" + MYDTB_FDTFILE=$(basename $FDT) +elif [[ -f "/boot/armbianEnv.txt" ]]; then + source /boot/armbianEnv.txt 2>/dev/null + MYDTB_FDTFILE="$(basename $fdtfile)" +elif [[ -f "/etc/flippy-openwrt-release" ]]; then + source /etc/flippy-openwrt-release 2>/dev/null + MYDTB_FDTFILE="${FDTFILE}" fi + +[[ -z "${MYDTB_FDTFILE}" ]] && { + echo "Invalid FDTFILE: [ ${MYDTB_FDTFILE} ]" + exit 1 +} + # Current device model MYDEVICE_NAME=$(cat /proc/device-tree/model | tr -d '\000') if [[ -z "${MYDEVICE_NAME}" ]]; then diff --git a/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip b/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip index e7cfbd04..b2ee1ef8 100755 --- a/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip +++ b/luci-app-amlogic/root/usr/sbin/openwrt-update-rockchip @@ -97,6 +97,13 @@ elif [[ "$(echo ${MYDEVICE_NAME} | grep "Ariaboard Photonicat")" != "" ]]; then MYDTB_FDTFILE="rk3568-photonicat.dtb" fi SOC="photonicat" +elif [[ "$(echo ${MYDEVICE_NAME} | grep "Watermelon Pi")" != "" ]]; then + if [ -n "${CURRENT_FDTFILE}" ]; then + MYDTB_FDTFILE="${CURRENT_FDTFILE}" + else + MYDTB_FDTFILE="rk3568-watermelon-pi.dtb" + fi + SOC="watermelon-pi" elif [[ "$(echo ${MYDEVICE_NAME} | grep "Radxa ROCK 5B")" != "" ]]; then if [ -n "${CURRENT_FDTFILE}" ]; then MYDTB_FDTFILE="${CURRENT_FDTFILE}" @@ -104,6 +111,13 @@ elif [[ "$(echo ${MYDEVICE_NAME} | grep "Radxa ROCK 5B")" != "" ]]; then MYDTB_FDTFILE="rk3588-rock-5b.dtb" fi SOC="rock5b" +elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OWL H88K-V3")" != "" ]]; then + if [ -n "${CURRENT_FDTFILE}" ]; then + MYDTB_FDTFILE="${CURRENT_FDTFILE}" + else + MYDTB_FDTFILE="rk3588-hinlink-h88k-v3.dtb" + fi + SOC="h88k-v3" elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OWL H88K")" != "" ]]; then if [ -n "${CURRENT_FDTFILE}" ]; then MYDTB_FDTFILE="${CURRENT_FDTFILE}" @@ -111,10 +125,24 @@ elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OWL H88K")" != "" ]]; then MYDTB_FDTFILE="rk3588-hinlink-h88k.dtb" fi SOC="ak88/h88k" +elif [[ -f "/etc/flippy-openwrt-release" ]]; then + source /etc/flippy-openwrt-release 2>/dev/null + if [ -n "${CURRENT_FDTFILE}" ]; then + MYDTB_FDTFILE="${CURRENT_FDTFILE}" + else + MYDTB_FDTFILE="${FDTFILE}" + fi + SOC="${SOC}" else echo "Unknown device: [ ${MYDEVICE_NAME} ], Not supported." exit 1 fi + +[[ -z "${MYDTB_FDTFILE}" || -z "${SOC}" ]] && { + echo "Invalid FDTFILE or SOC: [ ${MYDTB_FDTFILE} / ${SOC} ]" + exit 1 +} + echo -e "Current device: ${MYDEVICE_NAME} [ ${SOC} ]" sleep 3