mirror of
https://github.com/kenzok8/openwrt-packages.git
synced 2025-01-09 03:58:26 +08:00
update 2023-09-22 02:01:09
This commit is contained in:
parent
968f54aac2
commit
d3c28407a3
@ -16,7 +16,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=luci-app-amlogic
|
PKG_NAME:=luci-app-amlogic
|
||||||
PKG_VERSION:=3.1.199
|
PKG_VERSION:=3.1.200
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_LICENSE:=GPL-2.0 License
|
PKG_LICENSE:=GPL-2.0 License
|
||||||
|
@ -24,126 +24,147 @@ if [ -f /boot/armbianEnv.txt ]; then
|
|||||||
CURRENT_FDTFILE=$(basename ${fdtfile})
|
CURRENT_FDTFILE=$(basename ${fdtfile})
|
||||||
fi
|
fi
|
||||||
MYDEVICE_NAME=$(cat /proc/device-tree/model | tr -d '\000')
|
MYDEVICE_NAME=$(cat /proc/device-tree/model | tr -d '\000')
|
||||||
if [[ -z "${MYDEVICE_NAME}" ]]; then
|
case $MYDEVICE_NAME in
|
||||||
echo "The device name is empty and cannot be recognized."
|
"")
|
||||||
exit 1
|
echo "The device name is empty and cannot be recognized."
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Chainedbox L1 Pro")" != "" ]]; then
|
exit 1
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
;;
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
|
||||||
else
|
"Chainedbox L1 Pro")
|
||||||
MYDTB_FDTFILE="rk3328-l1pro-1296mhz.dtb"
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
fi
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
SOC="l1pro"
|
else
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "BeikeYun")" != "" ]]; then
|
MYDTB_FDTFILE="rk3328-l1pro-1296mhz.dtb"
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
fi
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
SOC="l1pro"
|
||||||
else
|
;;
|
||||||
MYDTB_FDTFILE="rk3328-beikeyun-1296mhz.dtb"
|
"BeikeYun")
|
||||||
fi
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
SOC="beikeyun"
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Radxa CM3 RPI CM4 IO")" != "" ]]; then
|
else
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
MYDTB_FDTFILE="rk3328-beikeyun-1296mhz.dtb"
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
fi
|
||||||
else
|
SOC="beikeyun"
|
||||||
MYDTB_FDTFILE="rk3566-radxa-cm3-rpi-cm4-io.dtb"
|
;;
|
||||||
fi
|
"Radxa CM3 RPI CM4 IO")
|
||||||
SOC="radxa-cm3-rpi-cm4-io"
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "FastRhino R66S")" != "" ]]; then
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
else
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
MYDTB_FDTFILE="rk3566-radxa-cm3-rpi-cm4-io.dtb"
|
||||||
else
|
fi
|
||||||
MYDTB_FDTFILE="rk3568-fastrhino-r66s.dtb"
|
SOC="radxa-cm3-rpi-cm4-io"
|
||||||
fi
|
;;
|
||||||
SOC="r66s"
|
"FastRhino R66S")
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "FastRhino R68S")" != "" ]]; then
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
else
|
||||||
else
|
MYDTB_FDTFILE="rk3568-fastrhino-r66s.dtb"
|
||||||
MYDTB_FDTFILE="rk3568-fastrhino-r68s.dtb"
|
fi
|
||||||
fi
|
SOC="r66s"
|
||||||
SOC="r68s"
|
;;
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OPC-H66K Board")" != "" || "$(echo ${MYDEVICE_NAME} | grep "Hlink H66K")" != "" ]]; then
|
"FastRhino R68S")
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
else
|
else
|
||||||
MYDTB_FDTFILE="rk3568-hlink-h66k.dtb"
|
MYDTB_FDTFILE="rk3568-fastrhino-r68s.dtb"
|
||||||
fi
|
fi
|
||||||
SOC="h66k"
|
SOC="r68s"
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OPC-H68K Board")" != "" || "$(echo ${MYDEVICE_NAME} | grep "Hlink H68K")" != "" ]]; then
|
;;
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
"HINLINK OPC-H66K Board"|"Hlink H66K")
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-opc-h66k.dtb" ];then
|
||||||
else
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
MYDTB_FDTFILE="rk3568-hlink-h68k.dtb"
|
else
|
||||||
fi
|
MYDTB_FDTFILE="rk3568-hlink-h66k.dtb"
|
||||||
SOC="h68k"
|
fi
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OPC-H69K Board")" != "" || "$(echo ${MYDEVICE_NAME} | grep "Hlink H69K")" != "" ]]; then
|
SOC="h66k"
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
;;
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
"HINLINK OPC-H68K Board")
|
||||||
else
|
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-opc-h68k.dtb" ];then
|
||||||
MYDTB_FDTFILE="rk3568-hlink-h69k.dtb"
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
fi
|
else
|
||||||
SOC="h69k"
|
MYDTB_FDTFILE="rk3568-hlink-h68k.dtb"
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Radxa E25")" != "" ]]; then
|
fi
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
SOC="h68k"
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
;;
|
||||||
else
|
"HINLINK OPC-H69K Board")
|
||||||
MYDTB_FDTFILE="rk3568-radxa-e25.dtb"
|
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-opc-h69k.dtb" ];then
|
||||||
fi
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
SOC="e25"
|
else
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Ariaboard Photonicat")" != "" ]]; then
|
MYDTB_FDTFILE="rk3568-hlink-h69k.dtb"
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
fi
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
SOC="h69k"
|
||||||
else
|
;;
|
||||||
MYDTB_FDTFILE="rk3568-photonicat.dtb"
|
"Radxa E25")
|
||||||
fi
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
SOC="photonicat"
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Watermelon Pi")" != "" ]]; then
|
else
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
MYDTB_FDTFILE="rk3568-radxa-e25.dtb"
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
fi
|
||||||
else
|
SOC="e25"
|
||||||
MYDTB_FDTFILE="rk3568-watermelon-pi.dtb"
|
;;
|
||||||
fi
|
"Ariaboard Photonicat")
|
||||||
SOC="watermelon-pi"
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Radxa ROCK 5B")" != "" ]]; then
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
else
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
MYDTB_FDTFILE="rk3568-photonicat.dtb"
|
||||||
else
|
fi
|
||||||
MYDTB_FDTFILE="rk3588-rock-5b.dtb"
|
SOC="photonicat"
|
||||||
fi
|
;;
|
||||||
SOC="rock5b"
|
"Watermelon Pi")
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OWL H88K-V3")" != "" || "$(echo ${MYDEVICE_NAME} | grep "Hlink H88K-V3")" != "" ]]; then
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
else
|
||||||
else
|
MYDTB_FDTFILE="rk3568-watermelon-pi.dtb"
|
||||||
MYDTB_FDTFILE="rk3588-hlink-h88k-v3.dtb"
|
fi
|
||||||
fi
|
SOC="watermelon-pi"
|
||||||
SOC="h88k-v3"
|
;;
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OWL H88K")" != "" || "$(echo ${MYDEVICE_NAME} | grep "Hlink H88K")" != "" ]]; then
|
"Radxa ROCK 5B")
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
else
|
else
|
||||||
MYDTB_FDTFILE="rk3588-hlink-h88k.dtb"
|
MYDTB_FDTFILE="rk3588-rock-5b.dtb"
|
||||||
fi
|
fi
|
||||||
SOC="ak88/h88k"
|
SOC="rock5b"
|
||||||
elif [[ "$(echo ${MYDEVICE_NAME} | grep "Hlink H28K")" != "" ]]; then
|
;;
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
"HINLINK OWL H88K-V3"|"Hlink H88K-V3")
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-hinlink-h88k-v3.dtb" ];then
|
||||||
else
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
MYDTB_FDTFILE="rk3528-hlink-h28k.dtb"
|
else
|
||||||
fi
|
MYDTB_FDTFILE="rk3588-hlink-h88k-v3.dtb"
|
||||||
SOC="h28k"
|
fi
|
||||||
elif [[ -f "/etc/flippy-openwrt-release" ]]; then
|
SOC="h88k-v3"
|
||||||
source /etc/flippy-openwrt-release 2>/dev/null
|
;;
|
||||||
if [ -n "${CURRENT_FDTFILE}" ]; then
|
"HINLINK OWL H88K"|"Hlink H88K")
|
||||||
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
if [ -n "${CURRENT_FDTFILE}" ] && [ "${CURRENT_FDTFILE}" != "rk3568-hinlink-h88k.dtb" ];then
|
||||||
else
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
MYDTB_FDTFILE="${FDTFILE}"
|
else
|
||||||
fi
|
MYDTB_FDTFILE="rk3588-hlink-h88k.dtb"
|
||||||
SOC="${SOC}"
|
fi
|
||||||
else
|
SOC="ak88/h88k"
|
||||||
echo "Unknown device: [ ${MYDEVICE_NAME} ], Not supported."
|
;;
|
||||||
exit 1
|
"Hlink H28K")
|
||||||
fi
|
if [ -n "${CURRENT_FDTFILE}" ]; then
|
||||||
|
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
|
||||||
|
else
|
||||||
|
MYDTB_FDTFILE="rk3528-hlink-h28k.dtb"
|
||||||
|
fi
|
||||||
|
SOC="h28k"
|
||||||
|
;;
|
||||||
|
*) #default
|
||||||
|
if [ -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
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
[[ -z "${MYDTB_FDTFILE}" || -z "${SOC}" ]] && {
|
[[ -z "${MYDTB_FDTFILE}" || -z "${SOC}" ]] && {
|
||||||
echo "Invalid FDTFILE or SOC: [ ${MYDTB_FDTFILE} / ${SOC} ]"
|
echo "Invalid FDTFILE or SOC: [ ${MYDTB_FDTFILE} / ${SOC} ]"
|
||||||
@ -678,6 +699,8 @@ echo "Start copy data from ${P2} to /boot ..."
|
|||||||
cd /boot
|
cd /boot
|
||||||
echo -n "backup armbianEnv.txt ..."
|
echo -n "backup armbianEnv.txt ..."
|
||||||
cp armbianEnv.txt /tmp/
|
cp armbianEnv.txt /tmp/
|
||||||
|
echo -n "backup current dtb file ..."
|
||||||
|
cp -v dtb/rockchip/${CURRENT_FDTFILE} /tmp/
|
||||||
echo -n "remove old boot files ..."
|
echo -n "remove old boot files ..."
|
||||||
rm -rf *
|
rm -rf *
|
||||||
echo "done"
|
echo "done"
|
||||||
@ -697,18 +720,25 @@ sed -e '/rootfstype=/d' -i armbianEnv.txt
|
|||||||
sed -e '/rootflags=/d' -i armbianEnv.txt
|
sed -e '/rootflags=/d' -i armbianEnv.txt
|
||||||
case $SOC in
|
case $SOC in
|
||||||
l1pro | beikeyun)
|
l1pro | beikeyun)
|
||||||
echo "fdtfile=/dtb/rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
|
echo "fdtfile=/dtb/rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "fdtfile=rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
|
echo "fdtfile=rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
cat >>armbianEnv.txt <<EOF
|
cat >>armbianEnv.txt <<EOF
|
||||||
rootdev=UUID=${NEW_ROOT_UUID}
|
rootdev=UUID=${NEW_ROOT_UUID}
|
||||||
rootfstype=btrfs
|
rootfstype=btrfs
|
||||||
rootflags=compress=zstd:${ZSTD_LEVEL}
|
rootflags=compress=zstd:${ZSTD_LEVEL}
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
# 如果新的dtb文件不存在,则用旧的代替
|
||||||
|
if [ ! -f "dtb/rockchip/${MYDTB_FDTFILE}" ];then
|
||||||
|
echo "The new dtb file does not exist, replace it with the old one."
|
||||||
|
cp -v /tmp/${CURRENT_FDTFILE} dtb/rockchip/${MYDTB_FDTFILE}
|
||||||
|
fi
|
||||||
sync
|
sync
|
||||||
|
|
||||||
echo "done"
|
echo "done"
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user