OpenWrt之网页升级固件提示出错

硬件:无涯MT7688
固件:openwrt-ramips-mt7688-HiWooya7688-squashfs-sysupgrade.bin

通过网页升级固件时提示
The uploaded image file does not contain a supported format. Make sure that you choose the generic image format for your platform.
在这里插入图片描述

解决:
根据网页提示的出错信息找不到问题点在哪,网页上点Flash image按钮,系统调用的是sysupgrade命令进行固件烧写,那么我们就ssh进入后台输入指令烧写查看具体出错信息。
1.ssh登陆到后台
2.使用WinSCP将固件拷到 /tmp 目录下
3.

cd /tmpcd /tmp
sysupgrade openwrt-ramips-mt7688-HiWooya7688-squashfs-sysupgrade.bin

错误提示

Sysupgrade is not yet supported on hiwooya7688.
Image check 'platform_check_image' failed.

4.定位问题点
从出错信息中可以看出是在 ‘platform_check_image’ 这里出错了,即核对固件没有通过,那我们就去找这个字段是在哪里执行的,然后查看上下文信息,找出出错原因

root@lyndon:/tmp# find / -type f|xargs grep "platform_check_image"
/lib/upgrade/platform.sh:platform_check_image() {

找到出错位置在/lib/upgrade/platform.sh文件中
阅读脚本找到

echo "Sysupgrade is not yet supported on $board."

这就发现了原来是脚本中没有添加 hiwooya7688 这个板子的型号,导致产生不支持此板子的固件升级的错误信息

root@lyndon:/lib/upgrade# vim platform.sh

在型号列表中添加

hiwooya7688 | \

就可以升级成功了。
5.编译时将版本信息加入

vim /work/openwrt-hiwooya/target/linux/ramips/base-files/lib/upgrade/platform.sh

6.编译生成固件

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Li-Yongjun

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值