Root filesystem update module - extend by additional payload files

lukip
Thu, 24 Nov 2022 17:54:37 +0000
General Discussions

Hello,
I hope this is the rigth place for my question.

I have already integrated mender dual rootfs update mechanism on a custom board, but now I need additional files in the payload. Since this is not possible with a rootfs-image, I thought I’d use the rootfs-image-v2 update module.
I should note that I have an UBIFS filesystem where it is not possible to simply cat the payload into the inactive partition, but rather have to use ubiupdatevol tool. The problem I have now is that this tool only accepts a pipe when specifying the payload size. Unfortunately I couldn’t find a way to get the size of the first file in the payload.

Alternatively, I skipped the Download state so that the payload gets extracted to the filesystem. This works, but takes about 2.5 times of the built-in rootfs update. I looked into the mender client code to see how they do it, and if I understood correctly, it also passes to the ubiupdatevol utility the size of the file it got from reading the 0000/data.tar.gz archive. So the information is there.
Is there any possibility to retrieve this information in an update module too?

Any help is much appreciated!
Kind regards

3 posts - 2 participants