BC5-MM、CSR867x的DFU更新流程之二:dfu文件转bin文件

.dfu文件转.bin文件

BC5-MM、CSR867x的DFU更新流程之一: DFU(.dfu)文件制作常用指令及DFU文件内容中,我们解析了制作DFU文件(.dfu)的常用指令;

但.dfu文件的更新只适用于<=ADK3.5版本,从ADK4.0开始改为使用.bin文件形式;

原因是:

For ADK3.5 OTA, the OTA(IMAGE) on Android/IOS phone that  needs to use DFU file.
[The APK file is old version, this version is only to support DFU file.]
For ADK v4.0, the OTA(IMAGE) on Android/IOS phone that  needs to use BIN file.

如何把.dfu文件转换为bin文件

这里需引入一个叫.udp的文件(自行创建即可);

以下是一个正常使用的.udp文件实现,我们命名为 upgrade_partition.upd(后续转换时会使用到):

# ADK upgrade requires an empty signature appended to the end of the file.
add_empty_signature
# Set the upgrade version and previous version(s)
# that are compatible to upgrade from. The minor
# version can be '*' to act as a wildcard.
upgrade_version 2.1
compatible_upgrade 0.*
compatible_upgrade 1.*
compatible_upgrade 2.*
# Set the ps config version and previous version(s)
# that are compatible to upgrade from
ps_config_version 2
ps_prev_config_version 0
ps_prev_config_version 1
# list all partition starting from index 0 including partition type
# <partition number> <partition type> <full path filename>
# DFU file with file system
0 1 upgrade_partition_dfu.xuv

重点只需关注最后面的“# DFU file with file system”部分,其他部分可以直接抄。

因“# DFU file with file system”部分需我们基于实际进行调整,如当前实现的第一个0表示partition 0(Partiton index 标识从index 0开始) ;而第二个1 表示类型,一般DFU升级时,类型设置的都是1;

官方描述:

 从.dfu 文件转换为.bin文件,需3个步骤:

第1步:使用XUV2BIN 指令,把.dfu文件转换为.xuv文件;

Note:在.udp文件最后,定义的就是转换后的upgrade_partition_dfu.xuv 设置;

XUV2BIN -e upgrade_file.dfu upgrade_partition_dfu.xuv

第2步:使用UpgradeFileGen 指令,把.udp文件也转换为.xuv文件

 UpgradeFileGen upgrade_partition.upd upgrade_file.xuv

第3步:使用XUV2BIN指令,把.udp文件转换出来的.xuv文件,转换为.bin文件;

注意这里使用的是“-d”

XUV2BIN -d upgrade_file.xuv upgrade_file.bin

到此,bin文件生成,可用于>=ADK4.0 升级;操作以上指令前,需先cd 到ADK4.x等ADK的tools/bin文件夹下

后续文章将提供完整的 “从DFU 制作到bin文件生成”bat档实现;

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值