From patchwork Wed Mar 20 10:32:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adithya Balakumar X-Patchwork-Id: 13597718 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4931C54E67 for ; Wed, 20 Mar 2024 10:32:01 +0000 (UTC) Received: from mo-csw.securemx.jp (mo-csw.securemx.jp [210.130.202.135]) by mx.groups.io with SMTP id smtpd.web10.40301.1710930712155523519 for ; Wed, 20 Mar 2024 03:31:53 -0700 Authentication-Results: mx.groups.io; dkim=none (message not signed); spf=pass (domain: toshiba-tsip.com, ip: 210.130.202.135, mailfrom: adithya.balakumar@toshiba-tsip.com) Received: by mo-csw.securemx.jp (mx-mo-csw1801) id 42KAVnuA1405195; Wed, 20 Mar 2024 19:31:49 +0900 X-Iguazu-Qid: 2yAaAnXldsbUTqygAl X-Iguazu-QSIG: v=2; s=0; t=1710930708; q=2yAaAnXldsbUTqygAl; m=CUrmNeHbEoq1CrMBnKRuRmlLqptv7q2UFYP8e4nvoDs= Received: from imx2-a.toshiba.co.jp (imx2-a.toshiba.co.jp [106.186.93.35]) by relay.securemx.jp (mx-mr1800) id 42KAVmOA1294782 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 20 Mar 2024 19:31:48 +0900 From: Adithya Balakumar To: cip-dev@lists.cip-project.org, jan.kiszka@siemens.com Cc: shivanand.kunijadar@toshiba-tsip.com, sai.sathujoda@toshiba-tsip.com, dinesh.kumar@toshiba-tsip.com, adithya.balakumar@toshiba-tsip.com, kazuhiro3.hayashi@toshiba.co.jp Subject: [isar-cip-core][RFC v2 0/4] Integrate Delta Update with rdiff_image and delta handler Date: Wed, 20 Mar 2024 16:02:25 +0530 X-TSB-HOP2: ON Message-Id: <20240320103229.1078738-1-Adithya.Balakumar@toshiba-tsip.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-OriginalArrivalTime: 20 Mar 2024 10:31:46.0490 (UTC) FILETIME=[CF3359A0:01DA7AB1] List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Wed, 20 Mar 2024 10:32:01 -0000 X-Groupsio-URL: https://lists.cip-project.org/g/cip-dev/message/15379 These series of patches enable the support for delta update for the root file system with swupdate's rdiff_image and delta handler(zchunk). For now, I send this as an RFC, as this needs to be reviewed by a broader audience. A couple notes about the implementation: - In this patchset, Delta update is only supported for the root file system. - The newly added delta-update.bbclass handles the creation of the delta update artifacts. - The update handler type i.e rdiff_image or delta handler is set in the variable "DELTA_UPDATE_TYPE" in the newly added swupdate.yml file along some variables required for each handler. - The creation of delta artifact for the rdiff_image handler requires a reference image (against which the delta is computed). Currently the reference artifact file (.squashfs/.verity) is passed to the build system by path to the file from the project's root directory in the variable DELTA_RDIFF_REF_IMAGE in the swupdate.yml file. Changes in v2: - Removed zchunk support for bookworm (due to use of backports). Currently zchunk based update only supported in Sid. - Removed delta-update.yml file. Related variables have default values and can be set in manually swupdate.yml file. - Using .squashfs file (.verity file in the case of Secure boot) for rdiff delta creation instead of .wic file. - rdiff is set as default for delta update type, the build system looks for the v1 artifact in a default path (image-v1/). - Created a separate template file for sw-description of delta update. - Renamed delta_update.bbclass to delta-update.bbclass. Adithya Balakumar (4): swupdate-handler-roundrobin: Increase revision for Delta Handler support Add Delta update support with rdiff_image and delta handler swupdate.bbclass: Generate swu for delta updates doc/README.swupdate.md: Update steps to test Delta software Update classes/delta-update.bbclass | 107 ++++++++++++++++++ classes/swupdate.bbclass | 32 +++++- conf/layer.conf | 2 +- doc/README.swupdate.md | 59 ++++++++++ kas/opt/swupdate.yml | 5 + .../images/swu/sw-description-delta.tmpl | 39 +++++++ .../swupdate-handler-roundrobin_0.1.bb | 2 +- 7 files changed, 243 insertions(+), 3 deletions(-) create mode 100644 classes/delta-update.bbclass create mode 100644 recipes-core/images/swu/sw-description-delta.tmpl