硬件:无涯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.编译生成固件