Skip to content

Commit

Permalink
rockchip: fixed image check
Browse files Browse the repository at this point in the history
  • Loading branch information
srdgame committed Oct 12, 2024
1 parent fc3ce11 commit 92c0e2d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
5 changes: 0 additions & 5 deletions .config_tlink_r4x
Original file line number Diff line number Diff line change
Expand Up @@ -3826,11 +3826,8 @@ CONFIG_PACKAGE_MAC80211_MESH=y
# CONFIG_PACKAGE_kmod-rtl8812au-mw is not set
# CONFIG_PACKAGE_kmod-rtl8812cu is not set
# CONFIG_PACKAGE_kmod-rtl8821ae is not set
# CONFIG_PACKAGE_kmod-rtl8821cu is not set
# CONFIG_PACKAGE_kmod-rtl8822cu is not set
# CONFIG_PACKAGE_kmod-rtl8xxxu is not set
# CONFIG_PACKAGE_kmod-rtw88 is not set
# CONFIG_PACKAGE_kmod-rtw88-usb is not set
# CONFIG_PACKAGE_kmod-wil6210 is not set
# CONFIG_PACKAGE_kmod-wl12xx is not set
# CONFIG_PACKAGE_kmod-wl18xx is not set
Expand Down Expand Up @@ -5554,7 +5551,6 @@ CONFIG_PACKAGE_luci-app-firewall=y
# CONFIG_PACKAGE_luci-app-nextdns is not set
# CONFIG_PACKAGE_luci-app-nft-qos is not set
# CONFIG_PACKAGE_luci-app-nlbwmon is not set
# CONFIG_PACKAGE_luci-app-ntpc is not set
# CONFIG_PACKAGE_luci-app-nut is not set
# CONFIG_PACKAGE_luci-app-ocserv is not set
# CONFIG_PACKAGE_luci-app-olsr is not set
Expand Down Expand Up @@ -6383,7 +6379,6 @@ CONFIG_PACKAGE_ip-full=y
# CONFIG_PACKAGE_linuxptp is not set
# CONFIG_PACKAGE_ntp-keygen is not set
# CONFIG_PACKAGE_ntp-utils is not set
# CONFIG_PACKAGE_ntpclient is not set
# CONFIG_PACKAGE_ntpd is not set
# CONFIG_PACKAGE_ntpdate is not set
# end of Time Synchronization
Expand Down
2 changes: 1 addition & 1 deletion package/base-files/files/etc/build_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24.07.16
24.10.12
12 changes: 7 additions & 5 deletions target/linux/rockchip/armv8/base-files/lib/upgrade/platform.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
tlink_get_type_magic() {
# 0x4c0cc
local skip_base=311500
# 0x800943
local skip_base=8390979
local skip_offset=$(($skip_base))
local name_len=$2
get_image "$1" | dd bs=1 count=$name_len skip=$skip_offset 2>/dev/null | hexdump -v -n $name_len -e '/1 "%c"'
Expand All @@ -9,9 +9,11 @@ tlink_get_type_magic() {
tlink_check_image() {
local cur_name=$(board_name)
local name_len=${#cur_name}
local typemagic="$(tlink_get_type_magic "$1" $name_len)"
[ "${typemagic}" != "$(board_name)" ] && {
echo "Invalid image, bad type: $typemagic $(board_name)"
local name_len_s=$((name_len-7))
local cur_name_s=${cur_name:7}
local typemagic="$(tlink_get_type_magic "$1" $name_len_s)"
[ "${typemagic}"x != "${cur_name:7}"x ] && {
echo "Invalid image, bad type:${typemagic}!=${cur_name:7}."
return 1
}
return 0
Expand Down

0 comments on commit 92c0e2d

Please sign in to comment.