ar71xx: add user-space support for the Tube2H board
Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@41650 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
143efc77cd
commit
93ece31bfb
5 changed files with 46 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
# Copyright (C) 2011 OpenWrt.org
|
||||
#
|
||||
|
||||
. /lib/functions/system.sh
|
||||
. /lib/ar71xx.sh
|
||||
|
||||
PART_NAME=firmware
|
||||
|
@ -106,6 +107,29 @@ platform_do_upgrade_compex() {
|
|||
fi
|
||||
}
|
||||
|
||||
alfa_check_image() {
|
||||
local magic_long="$(get_magic_long "$1")"
|
||||
local fw_part_size=$(mtd_get_part_size firmware)
|
||||
|
||||
case "$magic_long" in
|
||||
"27051956")
|
||||
[ "$fw_part_size" != "16318464" ] && {
|
||||
echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes"
|
||||
return 1
|
||||
}
|
||||
;;
|
||||
|
||||
"68737173")
|
||||
[ "$fw_part_size" != "7929856" ] && {
|
||||
echo "Invalid image magic \"$magic_long\" for $fw_part_size bytes"
|
||||
return 1
|
||||
}
|
||||
;;
|
||||
esac
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
platform_check_image() {
|
||||
local board=$(ar71xx_board_name)
|
||||
local magic="$(get_magic_word "$1")"
|
||||
|
@ -293,6 +317,12 @@ platform_check_image() {
|
|||
|
||||
return 0
|
||||
;;
|
||||
|
||||
tube2h)
|
||||
alfa_check_image "$1" && return 0
|
||||
return 1
|
||||
;;
|
||||
|
||||
uap-pro)
|
||||
[ "$magic_long" != "19852003" ] && {
|
||||
echo "Invalid image type."
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue