Skip to content

Commit

Permalink
[xiaomi] Fix install TAR-image
Browse files Browse the repository at this point in the history
  • Loading branch information
remittor committed Jan 4, 2024
1 parent 14e989e commit 6b545bd
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=facinstall
PKG_VERSION:=1.2
PKG_RELEASE:=20231212
PKG_VERSION:=1.3
PKG_RELEASE:=20240104

PKG_MAINTAINER:=remittor <[email protected]>
PKG_LICENSE:=MIT
Expand Down
2 changes: 1 addition & 1 deletion files/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ fi_check_tar() {
if [ -z "$tar_file" ]; then
tar_file=$FI_IMAGE
fi
magic=$( fi_get_hexdump_at 0 4 "$tar_file" )
magic=$( fi_get_hexdump_at 0 8 "$tar_file" )
if [ "$magic" != $FI_MAGIC_SYSUPG ]; then
fierr "incorrect TAR-image!"
return 1
Expand Down
9 changes: 9 additions & 0 deletions files/xiaomi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,15 @@ fi_platform_check_image() {
return 0
fi

if [ "$FI_IMAGE_MAGIC" = "$FI_MAGIC_SYSUPG" ]; then
fi_check_tar $FI_IMAGE || return 1
if [ "$FI_HOOK_TARSYSUPG" = "true" ]; then
FI_LOGMODE=2
filog "Detect sysupgrade TAR-image"
return 0
fi
fi

fierr "Incorrect image header"
return 1
}

0 comments on commit 6b545bd

Please sign in to comment.