简体   繁体   中英

SWUpdate ERROR : feature 'archive' required

I am attempting to use SWUpdate to update my device kernel and device tree. However I am getting the error ERROR: feature 'archive' required . I have been told to configure SWUpdate to include archive then build it. To do this I run bitbake -c menuconfig swupdate . This creates a .config file which I use as a defconfig .

I have my bitbake file swupdate_%.bbappend which places this into the build

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
SRC_URI += "file://defconfig"
DEPENDS += " libarchive zstd"

My question is how do I properly configure and compile the SWUpdate recipe to include the archive library?

If I run bitbake -c menuconfig swupdate and enable ZSTD, archive, and SystemD followed by bitbake swupdate I get errors that zstd , archive and systemd headers cannot be found. Edit 1: This is resolved by adding DEPENDS += " libarchive zstd systemd" to the bitbake file. This then breaks my overall build. So it seems my real issue is I cannot properly get the defconfig into my image.

I found many repos on GitHub and I copied their folder structure and used their bitbake files to inspire my own. However when I get to building I get the error mentioned above. Can anyone point me in the right direction? I am willing to share more if needed.

Edit 2: I removed the defconfig from here and my project. I found that SWUpdate supports the function bitbake -c diffconfig swupdate . After making my changes I get an output file /build-fb/tmp/work/cortexa7t2hf-neon-poky-linux-gnueabi/swupdate/2021.11-r0/fragment.cfg with the contents

CONFIG_SYSTEMD=y
CONFIG_ZSTD=y
CONFIG_ARCHIVE=y
CONFIG_LOCALE=y

I added this to my defconfig and built my image. Same issue.

Edit 3: I want to show how I build my image.

source setup-environment build-fb/
bitbake -c cleanall mainapplication-dev
bitbake mainapplication-dev

I take the image generated and program my SD card. Then I run

bitbake -c cleanall smg-image-swu
bitbake smg-image-swu

This creates my .swu file which I place onto the device using FileZilla. I then run swupdate -v -i smg-image-swu-imx6ull14x14evk.swu and get the following output:

root@imx6ull14x14evk:~# swupdate -v -i smg-image-swu-imx6ull14x14evk.swu
Swupdate v2021.11.0

Licensed under GPLv2. See source distribution for detailed copyright notices.

[INFO ] : SWUPDATE running :  [main] : Running on smg-mx6 Revision 1.0
[INFO ] : SWUPDATE running :  [print_registered_handlers] : Registered handlers:
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     dummy
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     flash
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     lua
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     raw
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rawfile
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     rawcopy
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     shellscript
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     preinstall
[INFO ] : SWUPDATE running :  [print_registered_handlers] :     postinstall
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/swupdateprog
[TRACE] : SWUPDATE running :  [network_initializer] : Main loop daemon
[TRACE] : SWUPDATE running :  [listener_create] : creating socket at /tmp/sockinstctrl
[TRACE] : SWUPDATE running :  [network_thread] : Incoming network request: processing...
[INFO ] : SWUPDATE started :  Software Update started !
[TRACE] : SWUPDATE running :  [network_initializer] : Software update started
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] : Found file
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   filename sw-description
[TRACE] : SWUPDATE running :  [extract_file_to_tmp] :   size 384
[TRACE] : SWUPDATE running :  [get_common_fields] : Version 0.1.0
[TRACE] : SWUPDATE running :  [parse_hw_compatibility] : Accepted Hw Revision : 1.0
[TRACE] : SWUPDATE running :  [_parse_files] : Found compressed File: evccapplication-dev-imx6ull14x14evk.tar.gz --> / (/dev/update)
[TRACE] : SWUPDATE running :  [_parse_scripts] : Found Script: update.sh
[ERROR] : SWUPDATE failed [0] ERROR : feature 'archive' required for 'evccapplication-dev-imx6ull14x14evk.tar.gz' in sw-description is absent!
[ERROR] : SWUPDATE failed [0] ERROR : Compatible SW not found
[ERROR] : SWUPDATE failed [1] Image invalid or corrupted. Not installing ...
[TRACE] : SWUPDATE running :  [network_initializer] : Main thread sleep again !
[INFO ] : No SWUPDATE running :  Waiting for requests...
[INFO ] : SWUPDATE running :  [endupdate] : Swupdate *failed* !

The solution to this is to edit the above bbappend file to

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
SRC_URI += "file://defconfig"
DEPENDS += " libarchive zstd"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM