mirror of
				https://github.com/kenzok8/openwrt-packages.git
				synced 2025-10-30 07:50:37 +08:00 
			
		
		
		
	update 2025-10-29 20:39:44
This commit is contained in:
		| @ -8,12 +8,12 @@ | ||||
| include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=ddns-go | ||||
| PKG_VERSION:=6.13.0 | ||||
| PKG_VERSION:=6.13.1 | ||||
| PKG_RELEASE:=1 | ||||
|  | ||||
| PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz | ||||
| PKG_SOURCE_URL:=https://codeload.github.com/jeessy2/ddns-go/tar.gz/v$(PKG_VERSION)? | ||||
| PKG_HASH:=e1d2201d5b237ad55de8cfe3451705fc75a9deeb9765637cfe8c2c362216b4ba | ||||
| PKG_HASH:=3f71e243d93b19b9e08d1205a4e0868bf41cf70a18a029d1175a076ff8408169 | ||||
|  | ||||
| PKG_LICENSE:=MIT | ||||
| PKG_LICENSE_FILES:=LICENSE | ||||
|  | ||||
| @ -16,7 +16,7 @@ | ||||
| include $(TOPDIR)/rules.mk | ||||
|  | ||||
| PKG_NAME:=luci-app-amlogic | ||||
| PKG_VERSION:=3.1.273 | ||||
| PKG_VERSION:=3.1.276 | ||||
| PKG_RELEASE:=1 | ||||
|  | ||||
| PKG_LICENSE:=GPL-2.0 License | ||||
|  | ||||
| @ -1,15 +1,15 @@ | ||||
| --Remove the spaces in the string | ||||
| function trim(str) | ||||
| 	--return (string.gsub(str, "^%s*(.-)%s*$", "%1")) | ||||
| 	return (string.gsub(str, "%s+", "")) | ||||
|     --return (string.gsub(str, "^%s*(.-)%s*$", "%1")) | ||||
|     return (string.gsub(str, "%s+", "")) | ||||
| end | ||||
|  | ||||
| --Auto-complete node | ||||
| local check_config_amlogic = luci.sys.exec("uci get amlogic.@amlogic[0].amlogic_firmware_repo 2>/dev/null") or "" | ||||
| if (trim(check_config_amlogic) == "") then | ||||
| 	luci.sys.exec("uci delete amlogic.@amlogic[0] 2>/dev/null") | ||||
| 	luci.sys.exec("uci set amlogic.config='amlogic' 2>/dev/null") | ||||
| 	luci.sys.exec("uci commit amlogic 2>/dev/null") | ||||
|     luci.sys.exec("uci delete amlogic.@amlogic[0] 2>/dev/null") | ||||
|     luci.sys.exec("uci set amlogic.config='amlogic' 2>/dev/null") | ||||
|     luci.sys.exec("uci commit amlogic 2>/dev/null") | ||||
| end | ||||
|  | ||||
| b = Map("amlogic") | ||||
| @ -29,20 +29,20 @@ mydevice.default = "PLATFORM: " .. mydevice_platfrom | ||||
| mydevice.rmempty = false | ||||
|  | ||||
| --2.Set OpenWrt Firmware Repository | ||||
| firmware_repo = o:option(Value, "amlogic_firmware_repo", translate("Download repository of OpenWrt:")) | ||||
| firmware_repo.description = translate("Set the download repository of the OpenWrt files on github.com in [Online Download Update].") | ||||
| firmware_repo = o:option(Value, "amlogic_firmware_repo", translate("OpenWrt download repository:")) | ||||
| firmware_repo.description = translate("Set the OpenWrt files download repository on github.com in [Online Download Update].") | ||||
| firmware_repo.default = "https://github.com/breakingbadboy/OpenWrt" | ||||
| firmware_repo.rmempty = false | ||||
|  | ||||
| --3.Set OpenWrt Releases's Tag Keywords | ||||
| firmware_tag = o:option(Value, "amlogic_firmware_tag", translate("Keywords of Tags in Releases:")) | ||||
| firmware_tag.description = translate("Set the keywords of Tags in Releases of github.com in [Online Download Update].") | ||||
| firmware_tag = o:option(Value, "amlogic_firmware_tag", translate("OpenWrt download tags keyword:")) | ||||
| firmware_tag.description = translate("Set the OpenWrt files download tags keyword for github.com in [Online Download Update].") | ||||
| firmware_tag.default = "ARMv8" | ||||
| firmware_tag.rmempty = false | ||||
|  | ||||
| --4.Set OpenWrt Firmware Suffix | ||||
| firmware_suffix = o:option(Value, "amlogic_firmware_suffix", translate("Suffix of OpenWrt files:")) | ||||
| firmware_suffix.description = translate("Set the suffix of the OpenWrt in Releases of github.com in [Online Download Update].") | ||||
| firmware_suffix = o:option(Value, "amlogic_firmware_suffix", translate("OpenWrt files suffix:")) | ||||
| firmware_suffix.description = translate("Set the OpenWrt files download suffix for github.com in [Online Download Update].") | ||||
| firmware_suffix:value(".7z", translate(".7z")) | ||||
| firmware_suffix:value(".zip", translate(".zip")) | ||||
| firmware_suffix:value(".img.gz", translate(".img.gz")) | ||||
| @ -51,16 +51,76 @@ firmware_suffix.default = ".img.gz" | ||||
| firmware_suffix.rmempty = false | ||||
|  | ||||
| --5.Set OpenWrt Kernel DownLoad Path | ||||
| kernel_path = o:option(Value, "amlogic_kernel_path", translate("Download path of OpenWrt kernel:")) | ||||
| kernel_path.description = translate("Set the download path of the kernel in the github.com repository in [Online Download Update].") | ||||
| kernel_path = o:option(Value, "amlogic_kernel_path", translate("Kernel download repository:")) | ||||
| kernel_path.description = translate("Set the kernel files download repository on github.com in [Online Download Update].") | ||||
| kernel_path:value("https://github.com/breakingbadboy/OpenWrt") | ||||
| kernel_path:value("https://github.com/ophub/kernel") | ||||
| kernel_path.default = "https://github.com/breakingbadboy/OpenWrt" | ||||
| kernel_path.rmempty = false | ||||
|  | ||||
| --6.Set kernel version branch | ||||
| --6. Set OpenWrt Kernel Tags | ||||
| -- Read the currently SAVED value of the kernel path. | ||||
| local current_kernel_path = trim(luci.sys.exec("uci get amlogic.@amlogic[0].amlogic_kernel_path 2>/dev/null") or "") | ||||
| -- If it's not set yet, use its default value for the logic below. | ||||
| if current_kernel_path == "" then | ||||
|     current_kernel_path = kernel_path.default | ||||
| end | ||||
| -- Define the tag lists. | ||||
| -- The base list, available for all repositories. | ||||
| local known_tags = { | ||||
|     kernel_rk3588 = "kernel_rk3588 [Rockchip RK3588 Kernel]", | ||||
|     kernel_rk35xx = "kernel_rk35xx [Rockchip RK35xx Kernel]", | ||||
|     kernel_stable = "kernel_stable [Mainline Stable Kernel]", | ||||
| } | ||||
| -- Additional tags only available for the 'ophub/kernel' repository. | ||||
| local ophub_extra_tags = { | ||||
|     kernel_flippy = "kernel_flippy [Mainline Stable Kernel by Flippy]", | ||||
|     kernel_h6 = "kernel_h6 [Allwinner H6 Kernel]", | ||||
|     kernel_dev = "kernel_dev [Development Kernel]", | ||||
|     kernel_beta = "kernel_beta [Beta Kernel]", | ||||
| } | ||||
| -- Conditionally add the extra tags to the list. | ||||
| if (string.find(current_kernel_path, "ophub/kernel")) then | ||||
|     for value, display_name in pairs(ophub_extra_tags) do | ||||
|         known_tags[value] = display_name | ||||
|     end | ||||
| end | ||||
| -- Determine the default kernel tag based on existing config or system info. | ||||
| local kernel_tagsname | ||||
| local existing_tag = trim(luci.sys.exec("uci get amlogic.@amlogic[0].amlogic_kernel_tags 2>/dev/null") or "") | ||||
| if existing_tag ~= "" then | ||||
|     kernel_tagsname = existing_tag | ||||
| else | ||||
|     local kernel_release_info = trim(luci.sys.exec("uname -r 2>/dev/null")) or "" | ||||
|  | ||||
|     if (string.find(kernel_release_info, "-rk3588")) then | ||||
|         kernel_tagsname = "kernel_rk3588" | ||||
|     elseif (string.find(kernel_release_info, "-rk35xx")) then | ||||
|         kernel_tagsname = "kernel_rk35xx" | ||||
|     elseif (string.find(kernel_release_info, "-h6") or string.find(kernel_release_info, "-zicai")) then | ||||
|         kernel_tagsname = "kernel_h6" | ||||
|     else | ||||
|         kernel_tagsname = "kernel_stable" | ||||
|     end | ||||
| end | ||||
| -- Create the kernel tags option. | ||||
| kernel_tags = o:option(Value, "amlogic_kernel_tags", translate("Kernel download tags:")) | ||||
| kernel_tags.description = translate("Set the kernel files download tags on github.com in [Online Download Update].") | ||||
| -- Populate the dropdown with the known tags. | ||||
| for value, display_name in pairs(known_tags) do | ||||
|     kernel_tags:value(value, translate(display_name)) | ||||
| end | ||||
| -- Ensure the default tag is included in the options. | ||||
| if not known_tags[kernel_tagsname] then | ||||
|     kernel_tags:value(kernel_tagsname, kernel_tagsname) | ||||
| end | ||||
| -- Set the default and other properties. | ||||
| kernel_tags.default = kernel_tagsname | ||||
| kernel_tags.rmempty = false | ||||
|  | ||||
| --7.Set kernel version branch | ||||
| kernel_branch = o:option(Value, "amlogic_kernel_branch", translate("Set version branch:")) | ||||
| kernel_branch.description = translate("Set the version branch of the openwrt firmware and kernel selected in [Online Download Update].") | ||||
| kernel_branch.description = translate("Set the version branch of the OpenWrt files and kernel selected in [Online Download Update].") | ||||
| kernel_branch:value("5.4", translate("5.4")) | ||||
| kernel_branch:value("5.10", translate("5.10")) | ||||
| kernel_branch:value("5.15", translate("5.15")) | ||||
| @ -71,19 +131,19 @@ local default_kernel_branch = luci.sys.exec("uname -r | grep -oE '^[1-9].[0-9]{1 | ||||
| kernel_branch.default = trim(default_kernel_branch) | ||||
| kernel_branch.rmempty = false | ||||
|  | ||||
| --7.Restore configuration | ||||
| --8.Restore configuration | ||||
| firmware_config = o:option(Flag, "amlogic_firmware_config", translate("Keep config update:")) | ||||
| firmware_config.description = translate("Set whether to keep the current config during [Online Download Update] and [Manually Upload Update].") | ||||
| firmware_config.default = "1" | ||||
| firmware_config.rmempty = false | ||||
|  | ||||
| --8.Write bootloader | ||||
| --9.Write bootloader | ||||
| write_bootloader = o:option(Flag, "amlogic_write_bootloader", translate("Auto write bootloader:")) | ||||
| write_bootloader.description = translate("[Recommended choice] Set whether to auto write bootloader during install and update OpenWrt.") | ||||
| write_bootloader.default = "0" | ||||
| write_bootloader.rmempty = false | ||||
|  | ||||
| --9.Set the file system type of the shared partition | ||||
| --10.Set the file system type of the shared partition | ||||
| shared_fstype = o:option(ListValue, "amlogic_shared_fstype", translate("Set the file system type:")) | ||||
| shared_fstype.description = translate("[Default ext4] Set the file system type of the shared partition (/mnt/mmcblk*p4) when install OpenWrt.") | ||||
| shared_fstype:value("ext4", translate("ext4")) | ||||
|  | ||||
| @ -368,35 +368,62 @@ msgstr "您可以自定义 [在线下载和更新] 中 OpenWrt 固件和内核 | ||||
| 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 系统的 BOARD(如:rock5b)和内核(如:5.10)相同的文件。" | ||||
|  | ||||
| msgid "Download repository of OpenWrt:" | ||||
| msgstr "OpenWrt 固件的下载仓库:" | ||||
| msgid "OpenWrt download repository:" | ||||
| msgstr "OpenWrt 文件的下载仓库:" | ||||
|  | ||||
| msgid "Set the download repository of the OpenWrt files on github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 OpenWrt 固件的下载仓库。" | ||||
| msgid "Set the OpenWrt files download repository on github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 OpenWrt 文件的下载仓库。" | ||||
|  | ||||
| msgid "Keywords of Tags in Releases:" | ||||
| msgstr "Releases 里 Tags 的关键字:" | ||||
| msgid "OpenWrt download tags keyword:" | ||||
| msgstr "OpenWrt 下载标签关键字:" | ||||
|  | ||||
| msgid "Set the keywords of Tags in Releases of github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 Releases 里 Tags 的关键字。" | ||||
| msgid "Set the OpenWrt files download tags keyword for github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 OpenWrt 文件下载标签关键字。" | ||||
|  | ||||
| msgid "Suffix of OpenWrt files:" | ||||
| msgstr "OpenWrt 固件的后缀:" | ||||
| msgid "OpenWrt files suffix:" | ||||
| msgstr "OpenWrt 文件的后缀:" | ||||
|  | ||||
| msgid "Set the suffix of the OpenWrt in Releases of github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 Releases 里 OpenWrt 固件的后缀。" | ||||
| msgid "Set the OpenWrt files download suffix for github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的 OpenWrt 文件的后缀。" | ||||
|  | ||||
| msgid "Download path of OpenWrt kernel:" | ||||
| msgstr "OpenWrt 内核的下载路径:" | ||||
| msgid "Kernel download repository:" | ||||
| msgstr "内核的下载仓库:" | ||||
|  | ||||
| msgid "Set the download path of the kernel in the github.com repository in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 仓库里内核的下载路径。" | ||||
| msgid "Set the kernel files download repository on github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的内核文件下载仓库。" | ||||
|  | ||||
| msgid "Kernel download tags:" | ||||
| msgstr "内核的下载标签:" | ||||
|  | ||||
| msgid "Set the kernel files download tags on github.com in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 中 github.com 的内核文件下载标签。" | ||||
|  | ||||
| msgid "kernel_rk3588 [Rockchip RK3588 Kernel]" | ||||
| msgstr "kernel_rk3588 [Rockchip RK3588 内核]" | ||||
|  | ||||
| msgid "kernel_rk35xx [Rockchip RK35xx Kernel]" | ||||
| msgstr "kernel_rk35xx [Rockchip RK35xx 内核]" | ||||
|  | ||||
| msgid "kernel_stable [Mainline Stable Kernel]" | ||||
| msgstr "kernel_stable [主线稳定内核]" | ||||
|  | ||||
| msgid "kernel_flippy [Mainline Stable Kernel by Flippy]" | ||||
| msgstr "kernel_flippy [Flippy 的主线稳定内核]" | ||||
|  | ||||
| msgid "kernel_h6 [Allwinner H6 Kernel]" | ||||
| msgstr "kernel_h6 [Allwinner H6 内核]" | ||||
|  | ||||
| msgid "kernel_dev [Development Kernel]" | ||||
| msgstr "kernel_dev [开发版内核]" | ||||
|  | ||||
| msgid "kernel_beta [Beta Kernel]" | ||||
| msgstr "kernel_beta [测试版内核]" | ||||
|  | ||||
| msgid "Set version branch:" | ||||
| msgstr "设置版本分支:" | ||||
|  | ||||
| msgid "Set the version branch of the openwrt firmware and kernel selected in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 时 OpenWrt 固件与内核所选用的版本分支。" | ||||
| msgid "Set the version branch of the OpenWrt files and kernel selected in [Online Download Update]." | ||||
| msgstr "设置 [在线下载更新] 时 OpenWrt 文件与内核所选用的版本分支。" | ||||
|  | ||||
| msgid "Keep config update:" | ||||
| msgstr "保留配置更新:" | ||||
|  | ||||
| @ -5,6 +5,7 @@ config amlogic 'config' | ||||
| 	option amlogic_firmware_tag 'ARMv8' | ||||
| 	option amlogic_firmware_suffix '.img.gz' | ||||
| 	option amlogic_kernel_path 'https://github.com/breakingbadboy/OpenWrt' | ||||
| 	option amlogic_kernel_tags '' | ||||
| 	option amlogic_kernel_branch '' | ||||
| 	option amlogic_firmware_config '1' | ||||
| 	option amlogic_write_bootloader '0' | ||||
|  | ||||
| @ -93,13 +93,12 @@ FIRMWARE_DOWNLOAD_PATH="/mnt/${EMMC_NAME}${PARTITION_NAME}4" | ||||
| 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}" || -z "${BOARD}" ]]; then | ||||
|     tolog "Missing [ PLATFORM / SOC / BOARD ] value in ${AMLOGIC_SOC_FILE} file." "1" | ||||
| if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" || -z "${BOARD}" ]]; then | ||||
|     tolog "Missing [ PLATFORM / BOARD ] value in ${AMLOGIC_SOC_FILE} file." "1" | ||||
| fi | ||||
|  | ||||
| tolog "PLATFORM: [ ${PLATFORM} ], BOARD: [ ${BOARD} ], Use in [ ${EMMC_NAME} ]" | ||||
|  | ||||
| @ -91,16 +91,14 @@ KERNEL_DOWNLOAD_PATH="/mnt/${EMMC_NAME}${PARTITION_NAME}4" | ||||
| if [[ -s "${AMLOGIC_SOC_FILE}" ]]; then | ||||
|     source "${AMLOGIC_SOC_FILE}" 2>/dev/null | ||||
|     PLATFORM="${PLATFORM}" | ||||
|     SOC="${SOC}" | ||||
|     KERNEL_TAGS="${KERNEL_TAGS}" | ||||
| else | ||||
|     tolog "${AMLOGIC_SOC_FILE} file is missing!" "1" | ||||
| fi | ||||
| if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" || -z "${SOC}" ]]; then | ||||
| if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" ]]; then | ||||
|     tolog "Missing [ PLATFORM ] value in ${AMLOGIC_SOC_FILE} file." "1" | ||||
| fi | ||||
|  | ||||
| tolog "PLATFORM: [ ${PLATFORM} ], SOC: [ ${SOC} ], Use in [ ${EMMC_NAME} ]" | ||||
| tolog "PLATFORM: [ ${PLATFORM} ], Use in [ ${EMMC_NAME} ]" | ||||
| sleep 2 | ||||
|  | ||||
| # Step 1. Set the kernel query api | ||||
| @ -119,40 +117,48 @@ fi | ||||
| # Convert kernel repo to api format | ||||
| [[ "${kernel_repo}" =~ ^https: ]] && kernel_repo="$(echo ${kernel_repo} | awk -F'/' '{print $4"/"$5}')" | ||||
| kernel_api="https://github.com/${kernel_repo}" | ||||
| if [[ -n "${KERNEL_TAGS}" ]]; then | ||||
|     kernel_tag="${KERNEL_TAGS}" | ||||
| tolog "01.03 Kernel repo: ${kernel_repo}" | ||||
| # Get the current kernel uname | ||||
| kernel_uname="$(uname -r 2>/dev/null)" | ||||
| tolog "01.04 Current kernel uname: ${kernel_uname}" | ||||
|  | ||||
| # Get the kernel tag from uci config | ||||
| op_kernel_tags="$(uci get amlogic.config.amlogic_kernel_tags 2>/dev/null)" | ||||
| # Determine the kernel tag | ||||
| if [[ -n "${op_kernel_tags}" ]]; then | ||||
|     kernel_tag="${op_kernel_tags/kernel_/}" | ||||
| else | ||||
|     if [[ "${SOC}" == "rk3588" ]]; then | ||||
|     # Determine the kernel tag based on the current kernel uname | ||||
|     if [[ "${kernel_uname}" =~ -rk3588 ]]; then | ||||
|         kernel_tag="rk3588" | ||||
|     elif [[ "${SOC}" == "rk3528" ]]; then | ||||
|     elif [[ "${kernel_uname}" =~ -rk35xx ]]; then | ||||
|         kernel_tag="rk35xx" | ||||
|     elif [[ "${kernel_uname}" =~ -h6|-zicai ]]; then | ||||
|         kernel_tag="h6" | ||||
|     else | ||||
|         kernel_tag="stable" | ||||
|     fi | ||||
| fi | ||||
|  | ||||
| # Remove the kernel_ prefix | ||||
| kernel_tag="${kernel_tag/kernel_/}" | ||||
| # If the kernel tag is a number, it is converted to a stable branch | ||||
| [[ "${kernel_tag}" =~ ^[1-9]+ ]] && kernel_tag="stable" | ||||
|     # Save the kernel tag to uci config | ||||
|     uci set amlogic.config.amlogic_kernel_tags="kernel_${kernel_tag}" 2>/dev/null | ||||
|     uci commit amlogic 2>/dev/null | ||||
| fi | ||||
| tolog "01.05 Kernel tag: kernel_${kernel_tag}" | ||||
| sleep 2 | ||||
|  | ||||
| # Step 2: Check if there is the latest kernel version | ||||
| check_kernel() { | ||||
|     # 02. Query local version information | ||||
|     tolog "02. Start checking the kernel version." | ||||
|  | ||||
|     # 02.01 Query the current version | ||||
|     if [[ "${kernel_tag}" == "rk3588" || "${kernel_tag}" == "rk35xx" ]]; then | ||||
|         current_kernel_v=$(uname -r 2>/dev/null) | ||||
|     else | ||||
|         current_kernel_v=$(uname -r 2>/dev/null | grep -oE '^[1-9]\.[0-9]{1,2}\.[0-9]+') | ||||
|     fi | ||||
|     [[ -n "${current_kernel_v}" ]] || tolog "02.01 The current kernel version is not detected." "1" | ||||
|     tolog "02.01 current version: ${current_kernel_v}" | ||||
|     # 02.01 Get current kernel version | ||||
|     [[ ! "${kernel_tag}" =~ ^(rk3588|rk35xx)$ ]] && kernel_uname="$(echo "${kernel_uname}" | cut -d'-' -f1)" | ||||
|     [[ -n "${kernel_uname}" ]] || tolog "02.01 The current kernel version is not detected." "1" | ||||
|     tolog "02.01 current version: ${kernel_uname}" | ||||
|     sleep 2 | ||||
|  | ||||
|     # 02.02 Version comparison | ||||
|     main_line_version="$(echo ${current_kernel_v} | awk -F '.' '{print $1"."$2}')" | ||||
|     main_line_version="$(echo ${kernel_uname} | awk -F '.' '{print $1"."$2}')" | ||||
|  | ||||
|     # 02.03 Query the selected branch in the settings | ||||
|     server_kernel_branch="$(uci get amlogic.config.amlogic_kernel_branch 2>/dev/null | grep -oE '^[1-9].[0-9]{1,3}')" | ||||
| @ -178,7 +184,7 @@ check_kernel() { | ||||
|     )" | ||||
|     [[ -n "${latest_version}" ]] || tolog "02.03 No kernel available, please use another kernel branch." "1" | ||||
|  | ||||
|     tolog "02.04 current version: ${current_kernel_v}, Latest version: ${latest_version}" | ||||
|     tolog "02.04 current version: ${kernel_uname}, Latest version: ${latest_version}" | ||||
|     sleep 2 | ||||
|  | ||||
|     # Get the sha256 value of the latest version | ||||
| @ -190,7 +196,7 @@ check_kernel() { | ||||
|     )" | ||||
|     [[ -n "${latest_kernel_sha256}" ]] && tolog "02.05 Kernel sha256: ${latest_kernel_sha256}" | ||||
|  | ||||
|     if [[ "${latest_version}" == "${current_kernel_v}" ]]; then | ||||
|     if [[ "${latest_version}" == "${kernel_uname}" ]]; then | ||||
|         tolog "02.06 Already the latest version, no need to update." "1" | ||||
|         sleep 2 | ||||
|     else | ||||
|  | ||||
| @ -54,15 +54,14 @@ fi | ||||
| if [[ -s "${AMLOGIC_SOC_FILE}" ]]; then | ||||
|     source "${AMLOGIC_SOC_FILE}" 2>/dev/null | ||||
|     PLATFORM="${PLATFORM}" | ||||
|     SOC="${SOC}" | ||||
| else | ||||
|     tolog "${AMLOGIC_SOC_FILE} file is missing!" "1" | ||||
| fi | ||||
| if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" || -z "${SOC}" ]]; then | ||||
| if [[ -z "${PLATFORM}" || -z "$(echo "${support_platform[@]}" | grep -w "${PLATFORM}")" ]]; then | ||||
|     tolog "Missing [ PLATFORM ] value in ${AMLOGIC_SOC_FILE} file." "1" | ||||
| fi | ||||
|  | ||||
| tolog "PLATFORM: [ ${PLATFORM} ], SOC: [ ${SOC} ]" | ||||
| tolog "PLATFORM: [ ${PLATFORM} ]" | ||||
| sleep 2 | ||||
|  | ||||
| # 01. Query local version information | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 actions-user
					actions-user