Not enough RAM to hold temp copy of .swu image. Does swupdate_handler_v2 allow the user to leverage the 'stream' feature of swupdate? #548
Replies: 1 comment
-
The swupdate v2 handler does not currently support streaming the downloaded .swu presumably related to the network IPC thread of swupdate started by swupdate's stream_interface.c here when it gets a REQ_INSTALL command via the IPC and sets stream_wkup to true
There is currently no config that enables doing a raw write of the download to the flash, similar to swupdate's copy|rawcopy handlers. Addressing 2gb limit of CPIO used by .swu format is on the backlog and may involve using a custom solution apart from use of swupdate.
One would need to write a DU agent custom handler that downloads the .swu chunks and talks with swupdate's IPC streaming. More research/prototyping would be required to work out the details of the streaming integration (e.g. it's unclear if verified chunks from a network stream can be passed to swupdate and they will be written to the appropriate byte range of the target location, or the entire .swu would need to be written to a file and then the install is streamed--it seems like the latter at first glance)
One can do this by writing a custom adu content(step) handler (or a script handler if using the shell is not a concern).
streaming support is on the backlog (which may or may not involve swupdate re: 2gb cpio limit) and would try to leverage stream feature of delivery optimization downloads, but there is currently no timeline for this work. |
Beta Was this translation helpful? Give feedback.
-
The current project I am working on is an embedded linux system, using an ADU instance to manage our updates.
Our current plan is to leverage the swupdate_handler_v2 to drive these updates, but the current iteration of our device doesn't have enough RAM to hold a temp copy of the .swu image.
I have been looking over the READMEs here, trying to figure out if the swupdate_handler_v2 supports the swupdate feature: "Streaming mode without temporary copies of artifacts". If that's the case then we may be able to avoid writing the firmware file into flash (if that's even possible).
My core questions are:
i. can the ADU be configured to write the download file to flash?
ii. what steps would we have to take to create custom extensions to leverage this stream feature? Would it be possible to make the Download() step of the
contentHandler
do nothing, and then modify the install steps to instead leverage swupdate's stream feature?iii. are there plans to support this stream feature in the future?
Beta Was this translation helpful? Give feedback.
All reactions