rdiff error when applying binary patch

377 views
Skip to first unread message

N C Aravindan

unread,
Apr 21, 2021, 5:46:35 AM4/21/21
to swupdate
Hi
I have two terminal-server images created using yocto for RaspberryPi-3 platform.
The second image contains an additional package (nano text editor).

I created a delta file using rdiff signature <basefile> <signaturefile> and rdiff delta <signaturefile> <targetfile> <deltafile >commands. The size of the delta file is around 10MB.

Next i created a .swu file containing sw-description and the delta file.

When i run swupdate -i <filename>.swu, i get the following message in an endless loop:

[fill_inbuffer] : No rdiff chunk input to consume.
[drain_outbuffer] : Draining 65536 bytes from rdiff output buffer.
[rdiff_stats] : [post] avail_in=16141 avail_out=65536 result=BLOCKED
[rdiff_stats] : [pre] avail_in=16141 avail_out=65536 result=BLOCKED

rdiff_image and rdiff_file are present under registered handlers and the initial cpio scan (which happens at the beginning when we run swupdate -i ) is correctly able to recognize the delta file.

I am able to fully swap images using the same setup (with a different .swu containing the image), but facing the above error when i try to add a binary delta file.

Any help is appreciated.

Regards
Aravindan NC

Christian Storm

unread,
Apr 21, 2021, 9:06:47 AM4/21/21
to swupdate
Hi,
Can you prepare and share reproduction steps for the artifacts (just
with dummy contents) so to debug it? Would help a lot...


Kind regards,
Christian

--
Dr. Christian Storm
Siemens AG, Technology, T RDA IOT SES-DE
Otto-Hahn-Ring 6, 81739 München, Germany

N C Aravindan

unread,
Apr 22, 2021, 7:34:25 AM4/22/21
to swupdate
Hi

I have attached the contents of the .swu used and the script i used to generate it. The conv. thread allows me to upload only photos some reason, so attached everything as pics.

For changing full image, .swu contains - 

sw-description (see full_image_sw-description below) 
emmcsetup.lua (see emmcsetup and _contd below)
terminal-server-image-with-nano.ext4.gz

For delta update, .swu contains - 

sw-description (see delta_sw-description below)
emmcsetup.lua (same)
nano.rdiff.delta (generated using rdiff command)

Script used to generate .swu - generate_swu.sh (see generate_swu below)

I got all these steps from the internet. Do let me know if I'm missing anything.

***************************************************************************************

For building the base terminal-server-image (i use .wic image for the rpi) - 

- Cloned meta-swupdate (dunfell), meta-swupdate-boards (terminal-server)
- Added those to bblayers.conf
- In local.conf, added :
CONF_VERSION = "1"
RPI_USE_U_Boot = "1"
IMAGE_FSTYPES = "wic.bz2 ext4.gz"
PREFERRED_PROVIDER_u-boot-fw-utils = "libubootenv"

KERNEL_IMAGETYPE = "uImage"
IMAGE_INSTALL_append = " kernel-image kernel-modules"
WKS_FILES_raspberrypi3 = "ts-raspberrypi.wks"

bitbake terminal-server-image


For binary delta creation - 
Say the above generated image is <image1>
<image2> is built after adding IMAGE_INSTALL_append = " nano"

rdiff signature <image1>.rootfs.wic signature_file
rdiff delta signature_file <image2>.rootfs.wic nano.rdiff.delta

***************************************************************************************
full_image_sw-description :
full_image_sw-description.JPG
emmcsetup :
emmcsetup_1.JPG
emmcsetup_contd : 
emmcsetup_2.JPG
delta_sw-description : 
delta_sw-description.JPG
generate_swu :
generate_swu.JPG

Kind regards,
Aravindan NC

Islam Othman

unread,
May 2, 2024, 7:27:23 AM5/2/24
to swupdate

Did you reach to a solution for this issue as I'm facing the same one right now and can't get out of the loop.
Reply all
Reply to author
Forward
0 new messages