3 # $(1): file to read magic from
4 # $(2): offset in bytes
6 dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -n 4 -e '1/1 "%02x"'
12 magic=$(get_magic_long "$1")
24 magic=$(get_magic_long_at "$1" 14)
25 [ "$magic" = "55324e44" ] && {
33 platform_check_image() {
34 [ "$#" -gt 1 ] && return 1
36 local file_type=$(brcm47xx_identify "$1")
41 echo "Invalid image type. Please use only .trx files"
47 # use default for platform_do_upgrade()