update 2023-02-10 20:37:09

This commit is contained in:
github-actions[bot]
2023-02-10 20:37:09 +08:00
parent e3ded870c1
commit 60844e4f5d
10 changed files with 48 additions and 36 deletions

View File

@@ -16,7 +16,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-amlogic
PKG_VERSION:=3.1.155
PKG_VERSION:=3.1.159
PKG_RELEASE:=1
PKG_LICENSE:=GPL-2.0 License

View File

@@ -15,7 +15,7 @@ end
b = Map("amlogic")
b.title = translate("Plugin Settings")
local des_content = translate("You can customize the github.com download repository of OpenWrt files and kernels in [Online Download Update].")
local des_content = des_content .. "<br />" .. translate("Tips: The amlogic SoC (E.g: s905d) and mainline version of the kernel (E.g: 5.10) will automatically match the current openwrt firmware.")
local des_content = des_content .. "<br />" .. translate("Tip: The same files as the current OpenWrt system's BOARD (such as rock5b) and kernel (such as 5.10) will be downloaded.")
b.description = des_content
o = b:section(NamedSection, "config", "amlogic")

View File

@@ -332,8 +332,8 @@ msgstr "配置来源"
msgid "You can customize the github.com download repository of OpenWrt files and kernels in [Online Download Update]."
msgstr "您可以自定义 [在线下载和更新] 中 OpenWrt 固件和内核的 github.com 下载仓库。"
msgid "Tips: The amlogic SoC (E.g: s905d) and mainline version of the kernel (E.g: 5.10) will automatically match the current openwrt firmware."
msgstr "提示OpenWrt 固件的型号s905d和内核的主线版本5.10)将根据当前固件自动适配。"
msgid "Tip: The same files as the current OpenWrt system's BOARD (such as rock5b) and kernel (such as 5.10) will be downloaded."
msgstr "提示:将下载与当前 OpenWrt 系统的 BOARDrock5b和内核5.10)相同的文件。"
msgid "Download repository of OpenWrt:"
msgstr "OpenWrt 固件的下载仓库:"

View File

@@ -307,7 +307,8 @@ update_kernel() {
echo -e "(3/3) Unpacking [ modules-${kernel_name}.tar.gz ] done."
# Delete kernel tmpfiles
rm -f ${P4_PATH}/*-${kernel_name}.tar.gz ${P4_PATH}/sha256sums
rm -f ${P4_PATH}/*-${kernel_name}.tar.gz
rm -f ${P4_PATH}/sha256sums
sync && echo ""
}
@@ -336,7 +337,6 @@ update_uboot() {
# Update release file
sed -i "s|^KERNEL_VERSION=.*|KERNEL_VERSION='${kernel_name}'|g" ${release_file} 2>/dev/null
sed -i "s|^K510=.*|K510='${K510}'|g" ${release_file} 2>/dev/null
# Update banner file
sed -i "s| Kernel.*| Kernel: ${kernel_name}|g" /etc/banner 2>/dev/null

View File

@@ -421,7 +421,7 @@ config mount
option enabled '1'
option enabled_fsck '0'
option fstype 'vfat'
EOF
(
cd etc/rc.d
@@ -583,7 +583,7 @@ cat >uEnv.txt <<EOF
LINUX=/zImage
INITRD=/uInitrd
# Example:
# Example:
# FDT=/dtb/allwinner/sun50i-h6-vplus-cloud.dtb
# FDT=/dtb/allwinner/sun50i-h6-vplus-cloud-2ghz.dtb
FDT=/dtb/allwinner/${MYDTB_FDTFILE}
@@ -600,6 +600,7 @@ umount -f ${P1} ${P2} 2>/dev/null
losetup -D 2>/dev/null
rmdir ${P1} ${P2} 2>/dev/null
rm -f ${IMG_NAME} 2>/dev/null
rm -f sha256sums 2>/dev/null
sync
echo "Successfully updated, automatic restarting..."

View File

@@ -837,6 +837,7 @@ umount -f ${P1} ${P2} 2>/dev/null
losetup -D 2>/dev/null
rm -rf ${P1} ${P2} 2>/dev/null
rm -f ${IMG_NAME} 2>/dev/null
rm -f sha256sums 2>/dev/null
sync
wait

View File

@@ -69,28 +69,28 @@ esac
function get_docker_root {
local data_root
if [[ -f /etc/config/dockerd ]];then
data_root=$(uci get dockerd.globals.data_root)
if [[ -f /etc/config/dockerd ]]; then
data_root=$(uci get dockerd.globals.data_root)
fi
if [[ -z "${data_root}" ]] && [[ -f /etc/docker/daemon.json ]]; then
data_root=$(jq -r '."data-root"' /etc/docker/daemon.json)
data_root=$(jq -r '."data-root"' /etc/docker/daemon.json)
fi
echo "$data_root"
}
DOCKER_ROOT=$(get_docker_root)
if [[ -z "${WORK_DIR}" ]];then
if [[ -z "${WORK_DIR}" ]]; then
WORK_DIR="/mnt/${DISK_NAME}${PART_PRESTR}4/"
fi
if [[ ! -d "${WORK_DIR}" ]];then
if [[ ! -d "${WORK_DIR}" ]]; then
echo "the work directory is not exists. [ ${WORK_DIR} ]"
exit 1
fi
cd "${WORK_DIR}"
if [[ -d "/tmp/upload" ]] && [[ -f "/tmp/upload/*img*" ]];then
mv -f /tmp/upload/*img* .
if [[ $? -ne 0 ]];then
if [[ -d "/tmp/upload" ]] && [[ -f "/tmp/upload/*img*" ]]; then
mv -f /tmp/upload/*img* .
if [[ $? -ne 0 ]]; then
echo "move file failed."
exit 1
fi
@@ -160,7 +160,7 @@ else
echo -ne "Whether to backup and restore the current config files? y/n [y]\b\b"
read yn
case $yn in
n* | N*) BR_FLAG=0;;
n* | N*) BR_FLAG=0 ;;
esac
fi
@@ -214,14 +214,14 @@ fi
# fix loopdev issue in kernel 5.19
function fix_loopdev() {
local parentdev=${1##*/}
if [ ! -d /sys/block/${parentdev} ];then
if [ ! -d /sys/block/${parentdev} ]; then
return
fi
subdevs=$(lsblk -l -o NAME | grep -E "^${parentdev}.+\$")
for subdev in $subdevs; do
if [ ! -d /sys/block/${parentdev}/${subdev} ];then
if [ ! -d /sys/block/${parentdev}/${subdev} ]; then
return
elif [ -b /dev/${sub_dev} ];then
elif [ -b /dev/${sub_dev} ]; then
continue
fi
source /sys/block/${parentdev}/${subdev}/uevent
@@ -592,7 +592,7 @@ mv /tmp/grub.cfg.prev ./EFI/BOOT/
echo "Modify efi configuration ... "
cd /boot/efi/EFI/BOOT
cat > grub.cfg <<EOF
cat >grub.cfg <<EOF
echo "search fs_uuid ${NEW_ROOT_UUID} ..."
search.fs_uuid ${NEW_ROOT_UUID} root
echo "root=\$root"
@@ -604,7 +604,7 @@ EOF
echo "Modify boot configuration ... "
cd ${NEW_ROOT_MOUNTPOINT}/boot/grub2
cat > grub.cfg <<EOF
cat >grub.cfg <<EOF
insmod gzio
insmod part_gpt
insmod zstd
@@ -630,6 +630,7 @@ umount -f ${P1} ${P2} 2>/dev/null
losetup -D 2>/dev/null
rm -rf ${P1} ${P2} 2>/dev/null
rm -f ${IMG_NAME} 2>/dev/null
rm -f sha256sums 2>/dev/null
sync
wait

View File

@@ -55,6 +55,13 @@ elif [[ "$(echo ${MYDEVICE_NAME} | grep "FastRhino R68S")" != "" ]]; then
MYDTB_FDTFILE="rk3568-fastrhino-r68s.dtb"
fi
SOC="r68s"
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OPC-H66K Board")" != "" ]]; then
if [ -n "${CURRENT_FDTFILE}" ]; then
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
else
MYDTB_FDTFILE="rk3568-opc-h66k.dtb"
fi
SOC="h66k"
elif [[ "$(echo ${MYDEVICE_NAME} | grep "HINLINK OPC-H68K Board")" != "" ]]; then
if [ -n "${CURRENT_FDTFILE}" ]; then
MYDTB_FDTFILE="${CURRENT_FDTFILE}"
@@ -475,7 +482,7 @@ config mount
option enabled '1'
option enabled_fsck '0'
option fstype 'ext4'
EOF
(
cd etc/rc.d
@@ -633,12 +640,12 @@ sed -e '/rootdev=/d' -i armbianEnv.txt
sed -e '/rootfstype=/d' -i armbianEnv.txt
sed -e '/rootflags=/d' -i armbianEnv.txt
case $SOC in
l1pro|beikeyun)
echo "fdtfile=/dtb/rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
;;
*)
echo "fdtfile=rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
;;
l1pro | beikeyun)
echo "fdtfile=/dtb/rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
;;
*)
echo "fdtfile=rockchip/${MYDTB_FDTFILE}" >>armbianEnv.txt
;;
esac
cat >>armbianEnv.txt <<EOF
rootdev=UUID=${NEW_ROOT_UUID}
@@ -654,6 +661,7 @@ umount -f ${P1} ${P2} 2>/dev/null
losetup -D 2>/dev/null
rmdir ${P1} ${P2} 2>/dev/null
rm -f ${IMG_NAME} 2>/dev/null
rm -f sha256sums 2>/dev/null
sync
echo "Successfully updated, automatic restarting..."

View File

@@ -84,14 +84,15 @@ if [[ -s "${AMLOGIC_SOC_FILE}" ]]; then
source "${AMLOGIC_SOC_FILE}" 2>/dev/null
PLATFORM="${PLATFORM}"
SOC="${SOC}"
BOARD="${BOARD}"
else
tolog "${AMLOGIC_SOC_FILE} file is missing!" "1"
fi
if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" || -z "${SOC}" ]]; then
tolog "Missing [ PLATFORM ] value in ${AMLOGIC_SOC_FILE} file." "1"
if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" || -z "${SOC}" || -z "${BOARD}" ]]; then
tolog "Missing [ PLATFORM / SOC / BOARD ] value in ${AMLOGIC_SOC_FILE} file." "1"
fi
tolog "PLATFORM: [ ${PLATFORM} ], SOC: [ ${SOC} ], Use in [ ${EMMC_NAME} ]"
tolog "PLATFORM: [ ${PLATFORM} ], Box: [ ${SOC}_${BOARD} ], Use in [ ${EMMC_NAME} ]"
sleep 2
# 01. Query local version information
@@ -134,7 +135,7 @@ if [[ "${server_firmware_url}" == http* ]]; then
server_firmware_url="${server_firmware_url#*com\/}"
fi
firmware_download_url="https:.*${releases_tag_keywords}.*_${SOC}_.*${main_line_version}.*${firmware_suffix}"
firmware_download_url="https:.*${releases_tag_keywords}.*_${BOARD}_.*${main_line_version}.*${firmware_suffix}"
firmware_sha256sums_download_url="https:.*${releases_tag_keywords}.*sha256sums"
# 02. Check Updated
@@ -201,7 +202,7 @@ download_firmware() {
firmware_releases_path="$(cat ${github_api_openwrt} | sed -n "${download_firmware_line}p" | grep "browser_download_url" | grep -o "${firmware_download_url}" | head -n 1)"
# Download to local rename
firmware_download_name="openwrt_${SOC}_k${main_line_version}_github${firmware_suffix}"
firmware_download_name="openwrt_${SOC}_${BOARD}_k${main_line_version}_github${firmware_suffix}"
# The name in the github.com releases
firmware_download_oldname="${firmware_releases_path##*/}"
firmware_download_oldname="${firmware_download_oldname//%2B/+}"

View File

@@ -21,13 +21,13 @@ define Download/geoip
HASH:=38e200a655c3e401dde6a438e79d493c3dbdd224e104a5158bef01f78ad4a151
endef
GEOSITE_VER:=20230208103804
GEOSITE_VER:=20230210014344
GEOSITE_FILE:=dlc.dat.$(GEOSITE_VER)
define Download/geosite
URL:=https://github.com/v2fly/domain-list-community/releases/download/$(GEOSITE_VER)/
URL_FILE:=dlc.dat
FILE:=$(GEOSITE_FILE)
HASH:=479fe1557bf873a2951483315eb75d769e7e74e4523fd130c6762b30b7c49a2c
HASH:=4a435a0f6e86cf58ac71853ac349f1fbd3f46307e42b906921cba62fff0e108a
endef
define Package/v2ray-geodata/template