From 9271372f932f0ee4c8109a6130adba1322e978c8 Mon Sep 17 00:00:00 2001 From: kenzok8 Date: Sun, 26 Oct 2025 09:48:34 +0800 Subject: [PATCH] update 2025-10-26 09:48:34 --- gn/Makefile | 6 +++--- gn/src/out/last_commit_position.h | 4 ++-- luci-app-amlogic/Makefile | 2 +- .../share/amlogic/amlogic_check_firmware.sh | 21 ++++++++++++------- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/gn/Makefile b/gn/Makefile index b53aa2fca..4d81c97a4 100644 --- a/gn/Makefile +++ b/gn/Makefile @@ -9,9 +9,9 @@ PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL:=https://gn.googlesource.com/gn.git -PKG_SOURCE_DATE:=2025-10-12 -PKG_SOURCE_VERSION:=07d3c6f4dc290fae5ca6152ebcb37d6815c411ab -PKG_MIRROR_HASH:=f0832f29ea84e9458ae603bc556a2d39dbb3e6a65e5698e02ab753e8f90892b9 +PKG_SOURCE_DATE:=2025-10-26 +PKG_SOURCE_VERSION:=092f4f0d612e5982728c8b872c2e69cf3d04b21f +PKG_MIRROR_HASH:=2a1ed9aa462d96ec0d8ad50bea6f093b6262e853f3c27dc18c77c8e2fa5c5a40 PKG_LICENSE:=BSD 3-Clause PKG_LICENSE_FILES:=LICENSE diff --git a/gn/src/out/last_commit_position.h b/gn/src/out/last_commit_position.h index 7a3a1ad02..8d87e733a 100644 --- a/gn/src/out/last_commit_position.h +++ b/gn/src/out/last_commit_position.h @@ -3,7 +3,7 @@ #ifndef OUT_LAST_COMMIT_POSITION_H_ #define OUT_LAST_COMMIT_POSITION_H_ -#define LAST_COMMIT_POSITION_NUM 2288 -#define LAST_COMMIT_POSITION "2288 (07d3c6f4dc29)" +#define LAST_COMMIT_POSITION_NUM 2289 +#define LAST_COMMIT_POSITION "2289 (092f4f0d612e)" #endif // OUT_LAST_COMMIT_POSITION_H_ diff --git a/luci-app-amlogic/Makefile b/luci-app-amlogic/Makefile index e1a24ee76..54e87ce82 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.270 +PKG_VERSION:=3.1.271 PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 License diff --git a/luci-app-amlogic/root/usr/share/amlogic/amlogic_check_firmware.sh b/luci-app-amlogic/root/usr/share/amlogic/amlogic_check_firmware.sh index ba5374991..87cdadb3a 100755 --- a/luci-app-amlogic/root/usr/share/amlogic/amlogic_check_firmware.sh +++ b/luci-app-amlogic/root/usr/share/amlogic/amlogic_check_firmware.sh @@ -197,6 +197,7 @@ check_updated() { # Find the OpenWrt filename latest_url=$(echo "${li_block}" | grep -o "/[^\"]*_${BOARD}_.*k${main_line_version}\.[^\"']*${firmware_suffix}" | sort -urV | head -n 1 | xargs basename 2>/dev/null) tolog "02.03.02 OpenWrt file: ${latest_url}" + # Find the date of the latest update latest_updated_at=$(echo "${li_block}" | grep -o 'datetime="[^"]*"' | sed 's/datetime="//; s/"//') tolog "02.03.03 Latest updated at: ${latest_updated_at}" @@ -204,19 +205,23 @@ check_updated() { date_display_format="$(echo ${latest_updated_at} | tr 'T' '(' | tr 'Z' ')')" [[ -z "${latest_url}" || -z "${latest_updated_at}" ]] && tolog "02.03.04 The download URL or date is invalid." "1" + # Find the firmware sha256 value + latest_firmware_sha256="$(echo "${li_block}" | grep -o 'value="sha256:[^"]*' | sed 's/value="sha256://')" + tolog "02.03.05 Sha256: ${latest_firmware_sha256}" + # Check the firmware update code down_check_code="${latest_updated_at}.${main_line_version}" op_release_code="${FIRMWARE_DOWNLOAD_PATH}/.luci-app-amlogic/op_release_code" if [[ -s "${op_release_code}" ]]; then update_check_code="$(cat ${op_release_code} | xargs)" if [[ -n "${update_check_code}" && "${update_check_code}" == "${down_check_code}" ]]; then - tolog "02.03.05 Already the latest version, no need to update." "1" + tolog "02.03.06 Already the latest version, no need to update." "1" fi fi # Prompt to update if [[ -n "${latest_url}" ]]; then - tolog ' Latest updated: '${date_display_format}'' "1" + tolog ' Latest updated: '${date_display_format}'' "1" else tolog "02.04 No OpenWrt available, please use another kernel branch." "1" fi @@ -250,6 +255,9 @@ download_firmware() { firmware_download_oldname="${opfile_path//%2B/+}" latest_url="https://github.com/${server_firmware_url}/releases/download/${firmware_download_oldname}" + # Find the firmware sha256 value + releases_firmware_sha256sums="$(echo ${download_version} | awk -F'@' '{print $3}')" + # Download to OpenWrt file firmware_download_name="openwrt_${BOARD}_k${main_line_version}_github${firmware_suffix}" curl -fsSL "${latest_url}" -o "${FIRMWARE_DOWNLOAD_PATH}/${firmware_download_name}" @@ -259,14 +267,13 @@ download_firmware() { tolog "03.02 OpenWrt download failed." "1" fi - # Download sha256sums file - if curl -fsSL "${latest_url}.sha" -o "${FIRMWARE_DOWNLOAD_PATH}/sha256sums" 2>/dev/null; then - tolog "03.03 sha file downloaded successfully." + # Verify sha256sums if available + if [[ -n "${releases_firmware_sha256sums}" ]]; then + tolog "03.03 Perform sha256 checksum verification." # If there is a sha256sum file, compare it - releases_firmware_sha256sums="$(cat ${FIRMWARE_DOWNLOAD_PATH}/sha256sums | grep ${firmware_download_oldname##*/} | awk '{print $1}')" download_firmware_sha256sums="$(sha256sum ${FIRMWARE_DOWNLOAD_PATH}/${firmware_download_name} | awk '{print $1}')" - if [[ -n "${releases_firmware_sha256sums}" && "${releases_firmware_sha256sums}" != "${download_firmware_sha256sums}" ]]; then + if [[ "${releases_firmware_sha256sums}" != "${download_firmware_sha256sums}" ]]; then tolog "03.04 sha256sum verification mismatched." "1" else tolog "03.05 sha256sum verification succeeded."