From 85d5e6a30b6bff0d258e70133e21d940a757b0d1 Mon Sep 17 00:00:00 2001 From: Antoni Date: Wed, 7 Feb 2024 15:07:49 +0100 Subject: [PATCH] Add default configuration for rpi4 Delta configuration in now separated from upgrade-tools. This rpi4 configuration is copied from platform/core/system/upgrade-tools (commit 3be0390b1b8632f97a3c33ce26ce02dd77748e94). Change-Id: Iff78e44128c95cadaf4a13f8263323b151492a88 --- README.md | 26 ++++++++++++++++++++++++ packaging/upgrade-tools-generic.manifest | 5 +++++ packaging/upgrade-tools-generic.spec | 12 +++++++++++ rpi4/cfg/delta.cfg | 8 ++++++++ 4 files changed, 51 insertions(+) create mode 100644 README.md create mode 100644 packaging/upgrade-tools-generic.manifest create mode 100644 packaging/upgrade-tools-generic.spec create mode 100644 rpi4/cfg/delta.cfg diff --git a/README.md b/README.md new file mode 100644 index 0000000..ff5daf8 --- /dev/null +++ b/README.md @@ -0,0 +1,26 @@ +## Upgrade tools generic plugin +This is a template configuration repository for generic rpi4 devices to be used in delta generation. +Docker image used for generating deltas can automatically clone and checkout a repository containing +configuration files, so there is no need to manually copy them (to configure which repository is used +for that, please refer to `platform/core/system/upgrade-tools`). + +When creating your own configuration repository, keep the same file tree structure as here. This means +that if you want to add a new device in your repository, place its configuration in `/cfg/delta.cfg`. + +### `delta.cfg` structure +Custom configuration files should follow the structure of `delta.cfg` file in this repository. +Each line describes a partition, and should have 6 columns in following order: +* Filesystem label +* name of binary file in an archive containing OS image (ex. boot.img) from base image +* name of binary file in an archive containing OS image (ex. boot.img) from image to upgrade to +* Update type. This is a sting containing two options separated by `:`. Supported options: + * First part: + * `FULL_IMAGE` + * `DELTA_IMAGE` + * Second Part: + * `BEFORE_BOOT_FOTA` + * `AT_BOOT_FOTA` + + Example full update type string: `FULL_IMAGE:BEFORE_BOOT_FOTA`. +* Block deivce +* Block offset diff --git a/packaging/upgrade-tools-generic.manifest b/packaging/upgrade-tools-generic.manifest new file mode 100644 index 0000000..97e8c31 --- /dev/null +++ b/packaging/upgrade-tools-generic.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/upgrade-tools-generic.spec b/packaging/upgrade-tools-generic.spec new file mode 100644 index 0000000..dd089fa --- /dev/null +++ b/packaging/upgrade-tools-generic.spec @@ -0,0 +1,12 @@ +Name: upgrade-tools-generic +Version: 1.0.0 +Release: 0 +License: Apache-2.0 +Summary: Template generic config for delta building +Group: Development/System +Source0: %{name}-%{version}.tar.gz + +Source1001: %{name}.manifest + +%description +This is a dummy package \ No newline at end of file diff --git a/rpi4/cfg/delta.cfg b/rpi4/cfg/delta.cfg new file mode 100644 index 0000000..09380e1 --- /dev/null +++ b/rpi4/cfg/delta.cfg @@ -0,0 +1,8 @@ +# Configuration for generation of delta +# Filesystem label, bin name (in tar), delta name, update type, blk dev, blk offset +BOOT boot.img boot.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p1 0 +hal hal.img hal.img DELTA_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p10 0 +modules modules.img modules.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p6 0 +rootfs rootfs.img rootfs.img DELTA_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p2 0 +ramdisk ramdisk.img ramdisk.img FULL_IMAGE:AT_BOOT_FOTA /dev/mmcblk0p7 0 +ramdisk-recovery ramdisk-recovery.img ramdisk-recovery.img FULL_IMAGE:BEFORE_BOOT_FOTA /dev/mmcblk0p8 0 -- 2.34.1