mirror of
https://github.com/kenzok8/openwrt-packages.git
synced 2025-01-08 11:37:36 +08:00
update 2023-09-18 14:00:59
This commit is contained in:
parent
4fff2250b4
commit
e963669eee
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user