X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fopenwrt.git;a=blobdiff_plain;f=target%2Flinux%2Fbcm53xx%2Fbase-files%2Flib%2Fupgrade%2Fplatform.sh;h=06451f17fd91a50e4ab4d358200347b94afbaeb7;hp=1f778c72b6892b9accace01be00e11dcd11bf907;hb=3267ce750e491ba0290ec3a9a5e3b4dceadd47a5;hpb=438dcbfe74a6da1a8949d8fb785092d934499b60 diff --git a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh index 1f778c72b6..06451f17fd 100644 --- a/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh +++ b/target/linux/bcm53xx/base-files/lib/upgrade/platform.sh @@ -8,10 +8,6 @@ get_magic_long_at() { dd if="$1" skip=$2 bs=1 count=4 2>/dev/null | hexdump -v -e '1/1 "%02x"' } -platform_machine() { - cat /proc/device-tree/compatible | tr '\0' '\t' | cut -f 1 -} - platform_flash_type() { # On NAND devices "rootfs" is UBI volume, so won't be find in /proc/mtd grep -q "\"rootfs\"" /proc/mtd && { @@ -23,7 +19,7 @@ platform_flash_type() { } platform_expected_image() { - local machine=$(platform_machine) + local machine=$(board_name) case "$machine" in "dlink,dir-885l") echo "seama wrgac42_dlink.2015_dir885l"; return;; @@ -278,11 +274,11 @@ platform_pre_upgrade() { platform_trx_from_chk_cmd() { local header_len=$((0x$(get_magic_long_at "$1" 4))) - echo -n dd bs=$header_len skip=1 + echo -n dd skip=$header_len iflag=skip_bytes } platform_trx_from_cybertan_cmd() { - echo -n dd bs=32 skip=1 + echo -n dd skip=32 iflag=skip_bytes } platform_img_from_safeloader() {