使用Yocto meta-swupdate层copy-handler时遇功能缺失错误求助
解决SWUpdate中copy-handler缺失导致的更新错误
我尝试通过SWUpdate将/etc/machine-id从一个分区复制到另一个分区,运行.swu更新时触发错误:
ERROR : feature 'copy' required for '' in sw-description is absent!
我推测需要修改Yocto中的swupdate_%.bbappend,但不确定要在DEPENDS中添加什么内容。已修改sw-description使用SWUpdate的copy-handler,配置如下:
scripts : ( { device = "/dev/mmcblk0p3"; type = "copy"; properties : { copyfrom = "/etc/machine-id"; type = "postinstall"; chain = "raw"; create-destination = "true"; } } );
更新日志信息:
[add_properties] : Found properties for : [add_properties_cb] : Property copyfrom: /etc/machine-id [add_properties_cb] : Property type: postinstall [add_properties_cb] : Property chain: raw [add_properties_cb] : Property create-destination: true [_parse_scripts] : Found Script: [_parse_bootloader] : Bootloader var: swupdateboot = /dev/mmcblk0p3 ERROR : feature 'copy' required for '' in sw-description is absent! ERROR : Compatible SW not found ERROR : Writing to IPC fails due to Broken pipe Image invalid or corrupted. Not installing ...
解决方案
- SWUpdate的copy-handler是可选编译模块,需在Yocto中启用该特性:
修改swupdate_%.bbappend,添加以下配置:
无需额外添加DEPENDS依赖,copy-handler是SWUpdate内置模块,由PACKAGECONFIG控制编译开关。PACKAGECONFIG:append = " copy" - 重新构建SWUpdate包及完整镜像,生成新的
.swu文件后重试更新。
额外检查
确认sw-description配置无误:type = "copy"是正确的handler类型,postinstall脚本类型配置符合需求,chain = "raw"表示复制完成后无需额外处理,与你的场景匹配。
内容的提问来源于stack exchange,提问作者André Ricardo
相关产品推荐
相关产品推荐

