platform_check_image() {
local magic="$(get_magic_word "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board_name" in
"ZyXEL"*|"Compex WP54 family")
PART_NAME=linux
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
# u-boot
local magic="$(get_magic_word "$1")"
local magic_long="$(get_magic_long "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
all0315n | \
}
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
# Combined Image
ROOTFS_IMG="openwrt-au1000-au1500-root.fs"
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
6f70)
( get_image "$1" | tar -tf - $KERNEL_IMG >/dev/null && \
platform_check_image() {
local magic="$(get_magic_long "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
[ "$magic" != "27051956" ] && {
echo "Invalid image type."
PART_NAME=firmware
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
# .trx files
PART_NAME=linux
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
3600|3700|3800)
# 6348GW-11 boards use openwrt-96348GW-11-squashfs-cfe.bin files
local board=$(get_board_name)
local magic="$(get_magic_word "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
nsb3ast)
local magic="$(get_magic_word "$1")"
local magic_long="$(get_magic_long "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
laguna)
local kern_part_size=0x$(platform_find_part_size "$kernelpart")
local kern_length=0x$(dd if="$1" bs=2 skip=1 count=4 2>/dev/null)
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
avila | cambria )
PART_NAME=firmware
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
# uImage
local board=$(mpc85xx_board_name)
local magic="$(get_magic_long "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case $board in
tl-wdr4900-v1)
local board=$(ppc40x_board_name)
local magic="$(get_magic_word "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
kilauea | openrb | magicbox)
local board=$(ramips_board_name)
local magic="$(get_magic_long "$1")"
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$board" in
3g-6200n | \
}
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
eb48|eb63) return 0;;
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
48eb) return 0;;
}
platform_check_image() {
- [ "$ARGC" -gt 1 ] && return 1
+ [ "$#" -gt 1 ] && return 1
case "$(get_magic_word "$1")" in
eb48|eb63) return 0;;