All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adithya Balakumar <Adithya.Balakumar@toshiba-tsip.com>
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,
	kazuhiro3.hayashi@toshiba.co.jp
Subject: [isar-cip-core][RFC v1 6/6] doc/README.swupdate.md: Update steps to test Delta software Update
Date: Thu,  7 Mar 2024 13:16:12 +0530	[thread overview]
Message-ID: <20240307074612.1996609-7-Adithya.Balakumar@toshiba-tsip.com> (raw)
In-Reply-To: <20240307074612.1996609-1-Adithya.Balakumar@toshiba-tsip.com>

This change includes steps to verify Delta Software Update with
rdiff_image and delta handler

Signed-off-by: Adithya Balakumar <Adithya.Balakumar@toshiba-tsip.com>
---
 doc/README.swupdate.md | 95 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 95 insertions(+)

diff --git a/doc/README.swupdate.md b/doc/README.swupdate.md
index cf1bcfb..4003243 100644
--- a/doc/README.swupdate.md
+++ b/doc/README.swupdate.md
@@ -324,6 +324,101 @@ user variables:
 
 
 ```
+# Building and testing the CIP Core image for Delta Software Update
+
+Set up `kas-container` as described in the [top-level README](../README.md), and then proceed with the following steps.
+
+First build an image using the following command:
+```
+host$ ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml:kas/opt/rt.yml
+```
+Currently, Delta Software Update is supported only for root file system.
+Now, to verify a delta update, build an image with some modifications to the root file system (ex: Add additional packages).
+For this example, add the packages vim and nano (since the packages are not already included in the base image) to the image. This can be done by modifying the `recipes-core/images/cip-core-image.bb` file as shown below.
+```
+diff --git a/recipes-core/images/cip-core-image.bb b/recipes-core/images/cip-core-image.bb
+index 0ec7220..f61ce23 100644
+--- a/recipes-core/images/cip-core-image.bb
++++ b/recipes-core/images/cip-core-image.bb
+@@ -14,6 +14,7 @@ inherit image
+ ISAR_RELEASE_CMD = "git -C ${LAYERDIR_cip-core} describe --tags --dirty --always --match 'v[0-9].[0-9]*'"
+ DESCRIPTION = "CIP Core image"
+
++IMAGE_PREINSTALL += "vim nano"
+ IMAGE_INSTALL += "customizations"
+
+ CIP_IMAGE_OPTIONS ?= ""
+```
+## Delta Software Update using rdiff_image handler
+
+Creating a delta update file for rdiff_image handler requires a reference image (against which the delta is computed). In this case, the image built in the previous section can be used as the reference image.
+Copy the reference image to the project directory. And set the variable `DELTA_RDIFF_REF_IMAGE` with the path to the reference image and set the variable `DELTA_UPDATE_TYPE` to `rdiff`.
+
+```
+header:
+  version: 14
+
+local_conf_header:
+  delta-update: |
+    IMAGE_CLASSES:append = " delta_update"
+    DELTA_UPDATE_TYPE = "rdiff"
+    DELTA_ZCK_URL = ""
+    DELTA_RDIFF_REF_IMAGE = "path/to/image/from/project/root/directory.wic"
+
+```
+Run the below command to build the image with the modification as shown above and with the root file system modification as described in previous section.
+```
+KAS_BUILD_DIR=image2 ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml:kas/opt/delta-update.yml
+```
+Run the below command to start first image
+```
+host$ DISTRO_RELEASE=bookworm SWUPDATE_BOOT=y ./start-qemu.sh amd64
+```
+Copy `cip-core-image-cip-core-bookworm-qemu-amd64-delta.swu` file from `image2/tmp/deploy/images/qemu-amd64/` folder into the running system:
+```
+host$ cd image2/tmp/deploy/images/qemu-amd64/
+host$ scp -P 22222 ./cip-core-image-cip-core-bookworm-qemu-amd64-delta.swu root@localhost:
+```
+
+### Delta Software Update Verification
+
+Follow the steps mentioned in the section [SWUpdate verification](#swupdate-verification) for verification.
+
+Since our target was to update the root file system by adding a few packages (vim and nano in this example), Check if the packages are available after the update by running either the `vim` command or `nano` command.
+
+## Delta Software Update using delta handler
+
+For Delta update with zchunk, set the variable `DELTA_ZCK_URL` with the URL of the zck file that is hosted in a http server and set the variable `DELTA_UPDATE_TYPE` to `zchunk`.
+```
+header:
+  version: 14
+
+local_conf_header:
+  delta-update: |
+    IMAGE_CLASSES:append = " delta_update"
+    DELTA_UPDATE_TYPE = "zchunk"
+    DELTA_ZCK_URL = "<zck file url>"
+    DELTA_RDIFF_REF_IMAGE = ""
+
+```
+Run the below command to build the image with the modification as shown above and with the root file system modification as described in previous section.
+```
+KAS_BUILD_DIR=image2 ./kas-container build kas-cip.yml:kas/board/qemu-amd64.yml:kas/opt/ebg-swu.yml:kas/opt/delta-update.yml
+```
+Run the below command to start first image
+```
+host$ DISTRO_RELEASE=bookworm SWUPDATE_BOOT=y ./start-qemu.sh amd64
+```
+Copy `cip-core-image-cip-core-bookworm-qemu-amd64-delta.swu` file from `image2/tmp/deploy/images/qemu-amd64/` folder into the running system:
+```
+host$ cd image2/tmp/deploy/images/qemu-amd64/
+host$ scp -P 22222 ./cip-core-image-cip-core-bookworm-qemu-amd64-delta.swu root@localhost:
+```
+The `cip-core-image-cip-core-bookworm-qemu-amd64.zck` file must be hosted in a server.
+
+### Delta Software Update Verification
+
+Follow the steps mentioned in the section [Delta Software Update Verification](#delta-software-update-verification) for verification.
 
 # Building and testing the CIP Core image for BBB
 
-- 
2.39.2




  parent reply	other threads:[~2024-03-07  7:46 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07  7:46 [isar-cip-core][RFC v1 0/6] Integrate Delta Update with rdiff_image and delta handler Adithya Balakumar
2024-03-07  7:46 ` [isar-cip-core][RFC v1 1/6] conf: Use bookworm backports for enabling delta handler in swupdate Adithya Balakumar
2024-03-08 10:28   ` MOESSBAUER, Felix
2024-03-08 11:35   ` Jan Kiszka
2024-03-14  7:55     ` [cip-dev] " Gylstorff Quirin
2024-03-18  5:02       ` Adithya.Balakumar
2024-03-18  9:31         ` Gylstorff Quirin
2024-03-07  7:46 ` [isar-cip-core][RFC v1 2/6] swupdate-handler-roundrobin: Increase revision for Delta Handler support Adithya Balakumar
2024-03-07  7:46 ` [isar-cip-core][RFC v1 3/6] swupdate: Enable Delta handler in swupdate Adithya Balakumar
2024-03-08 11:35   ` Jan Kiszka
2024-03-13  9:32     ` Adithya.Balakumar
2024-03-14  6:56     ` [cip-dev] " Gylstorff Quirin
2024-03-14  7:51       ` Adithya.Balakumar
2024-03-07  7:46 ` [isar-cip-core][RFC v1 4/6] Add Delta update support with rdiff_image and delta handler Adithya Balakumar
2024-03-08 10:52   ` MOESSBAUER, Felix
2024-03-08 16:43     ` Gylstorff Quirin
2024-03-13  6:11     ` Adithya.Balakumar
2024-03-13 17:19       ` Gylstorff Quirin
2024-03-18 10:28         ` MOESSBAUER, Felix
2024-03-08 11:44   ` Jan Kiszka
2024-03-13  9:20     ` Adithya.Balakumar
2024-03-13 12:29       ` Jan Kiszka
2024-03-14  7:16         ` [cip-dev] " Adithya.Balakumar
2024-03-18 11:45   ` Wang, Qi
2024-03-18 11:51   ` Wang, Qi
2024-03-07  7:46 ` [isar-cip-core][RFC v1 5/6] swupdate.bbclass: Generate swu for delta updates Adithya Balakumar
2024-03-08 10:56   ` MOESSBAUER, Felix
2024-03-13  7:03     ` Adithya.Balakumar
2024-03-13 17:15       ` [cip-dev] " Gylstorff Quirin
2024-03-14  7:41         ` Adithya.Balakumar
2024-03-14  9:26           ` Gylstorff Quirin
2024-03-15  6:45             ` Adithya.Balakumar
2024-03-15  8:42               ` Gylstorff Quirin
2024-03-18  4:59                 ` Adithya.Balakumar
2024-03-18  9:34                   ` Gylstorff Quirin
2024-03-18 10:09                     ` Adithya.Balakumar
2024-03-07  7:46 ` Adithya Balakumar [this message]
2024-03-08 11:47   ` [isar-cip-core][RFC v1 6/6] doc/README.swupdate.md: Update steps to test Delta software Update Jan Kiszka
2024-03-12 13:16   ` [cip-dev] " Gylstorff Quirin
2024-03-08 11:48 ` [isar-cip-core][RFC v1 0/6] Integrate Delta Update with rdiff_image and delta handler Jan Kiszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240307074612.1996609-7-Adithya.Balakumar@toshiba-tsip.com \
    --to=adithya.balakumar@toshiba-tsip.com \
    --cc=cip-dev@lists.cip-project.org \
    --cc=dinesh.kumar@toshiba-tsip.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kazuhiro3.hayashi@toshiba.co.jp \
    --cc=sai.sathujoda@toshiba-tsip.com \
    --cc=shivanand.kunijadar@toshiba-tsip.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.