platform/core/system/upgrade-tools.git
2 weeks agoAdd .spec to make this repository can be built by gbs 25/309925/1 accepted/tizen/unified/20240419.110853
SangYoun Kwak [Thu, 18 Apr 2024 07:14:59 +0000 (16:14 +0900)]
Add .spec to make this repository can be built by gbs

Change-Id: Idecf1f7e1bb22c157feb26c47154b5def9a0235d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
4 weeks agoFix casing mismatch in Dockerfile 04/309004/1
Antoni [Wed, 3 Apr 2024 14:06:11 +0000 (16:06 +0200)]
Fix casing mismatch in Dockerfile

This mismatch produced a warining during docker build.

Change-Id: I5a92a612516e59d3d4f7048af196b0187993acb5

5 weeks agoCI: Disable 7 to 8 build 27/308427/1
Marek Pikuła [Mon, 25 Mar 2024 09:07:43 +0000 (10:07 +0100)]
CI: Disable 7 to 8 build

Change-Id: Ief785cb7b35ded7fab0ddac609cd075f449d5862

7 weeks agoCI: Fix naming of platform images 57/307957/1
Marek Pikuła [Thu, 14 Mar 2024 15:11:35 +0000 (16:11 +0100)]
CI: Fix naming of platform images

Platform images (i.e., without boot image) don't provide information
about target. Up to this point, the image name for platform images was
lacking the target information, resulting in missing device model field
in the name (e.g., `IoT_Headless----platform--aarch64--...`). This
change sets the default `none` value for device model (resulting in
`IoT_Headless--none--platform--aarch64--...`).

Change-Id: Ie50624095a098bf34d7e1adc6364d7a000a79cd3

7 weeks agoCI: Fix cleanup workflow path 47/307847/1
Marek Pikuła [Wed, 13 Mar 2024 22:29:51 +0000 (23:29 +0100)]
CI: Fix cleanup workflow path

Change-Id: I2ef2de81385c85d482befd25d6514b877aaacac5
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
7 weeks agomass-delta-builder: Remove unused enum values 87/307687/2
SangYoun Kwak [Tue, 12 Mar 2024 07:57:39 +0000 (16:57 +0900)]
mass-delta-builder: Remove unused enum values

In the enum "DeltaType", there were values named "kernel", "system", but
they are not used. (DeltaType was checked only if it is "full" or not)
These unused enum values are removed.

Also their values are defined with 'enum.auto()' function instead of
integer value since it is better to distinguish enum elements when the
new element is added or element is removed.

Change-Id: I607c9358f6c03ae4a333d21705c0775d731b1b10
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
8 weeks agoUse release version instead of build.date in the delta file name 14/307514/1
Mateusz Moscicki [Fri, 8 Mar 2024 12:42:30 +0000 (13:42 +0100)]
Use release version instead of build.date in the delta file name

Change-Id: I9ccb90efaaf519ee4e7926562c9d3c77931c6a2c

8 weeks agoChange workflow scheduled time to more "random" minute 34/307134/1
Marek Pikuła [Tue, 5 Mar 2024 08:17:17 +0000 (09:17 +0100)]
Change workflow scheduled time to more "random" minute

According to GitHub documentation:

> The schedule event can be delayed during periods of high loads of
> GitHub Actions workflow runs. High load times include the start of
> every hour. If the load is sufficiently high enough, some queued jobs
> may be dropped. To decrease the chance of delay, schedule your
> workflow to run at a different time of the hour.

During initial tests it turned out that during peak hours the schedule
didn't execute.

Change-Id: Idcbaed6fc43cf517f616842b7ed7acc7886bea13
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2 months agoAdd mk_delta GitHub action and test workflow 86/307086/1
Marek Pikuła [Tue, 16 Jan 2024 16:21:28 +0000 (17:21 +0100)]
Add mk_delta GitHub action and test workflow

Change-Id: I0266a6442be27e3c444c20cfa4c7644d85750777
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2 months agoAdd Docker image build GitHub Workflow 85/307085/1
Marek Pikuła [Tue, 16 Jan 2024 13:31:37 +0000 (14:31 +0100)]
Add Docker image build GitHub Workflow

Change-Id: I376c5043dc3d70abcb13554f978fdd3212ca5acd
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2 months agoClean-up Dockerfile 84/307084/1
Marek Pikuła [Tue, 16 Jan 2024 13:15:39 +0000 (14:15 +0100)]
Clean-up Dockerfile

- use BART-provided base Ubuntu images
- use COPY instead of ADD (safer)
- decrease number of layers
- improve formatting

Change-Id: Ia9357f404bf2cd323db1df371ad7bdfe45ed461e
Signed-off-by: Marek Pikuła <m.pikula@partner.samsung.com>
2 months agoMerge "Separate delta configurations to separate repos" into tizen
Mateusz Mościcki [Thu, 29 Feb 2024 15:04:56 +0000 (15:04 +0000)]
Merge "Separate delta configurations to separate repos" into tizen

2 months agoSeparate delta configurations to separate repos 59/305859/4
Antoni [Wed, 7 Feb 2024 14:23:48 +0000 (15:23 +0100)]
Separate delta configurations to separate repos

Delta configuration files will now be downloaded during docker image
build. Two host env variables are used for this:
- DOCKER_CFG_GIT_CLONE_PATH
- DOCKER_CFG_GIT_BRANCH

Change-Id: Id4982ab167ea4e3fa0d23e98e918f978b7859801

2 months agoAdd resize-dynparts to delta.tar 81/305881/1
Jacek Kryszyn [Mon, 12 Feb 2024 14:58:39 +0000 (15:58 +0100)]
Add resize-dynparts to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: Ia6f9c2eae3bc6a42ee3d10c6b7ec4aa1528c55a1

2 months agoAdd blkid-print to delta.tar 61/305861/1
Mateusz Moscicki [Fri, 9 Feb 2024 12:10:53 +0000 (13:10 +0100)]
Add blkid-print to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: Ic73bd642a31b9402ec51fcbf1e87f6a13cdb9dfd

3 months agoscripts: Add support to delta without hal.img 52/305352/2
Mateusz Moscicki [Wed, 31 Jan 2024 15:01:13 +0000 (16:01 +0100)]
scripts: Add support to delta without hal.img

Change-Id: Icccdbfccb548457b7f24e8b5962e3299d4412ee9

6 months agoscripts: delta-generation: Update an usage about target 10/300610/2
Jaehoon Chung [Mon, 30 Oct 2023 00:33:29 +0000 (09:33 +0900)]
scripts: delta-generation: Update an usage about target

rpi3 and tw1 are deprecated. To notice a correct information, update an
usage about target.
Remove - rpi3, tw1
Add - rpi4

Change-Id: Ib1863fdb35dc06c8ca8fb2230bedb7732cf16158
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 months agoscripts: delta-generation: Check if there is a path 88/300588/3
Jaehoon Chung [Fri, 27 Oct 2023 11:18:26 +0000 (20:18 +0900)]
scripts: delta-generation: Check if there is a path

Check if there is a path. If there is no path, it will be exited.
Otherwise, all files are removed under current directory
It's a critical bug in this script.

Change-Id: Ie3537ead4152f265d97f65e966342183a9dcd1c2
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
6 months agoUpdate README file about Tizen Version 87/300587/1
Jaehoon Chung [Fri, 27 Oct 2023 09:38:01 +0000 (18:38 +0900)]
Update README file about Tizen Version

Officially, Tizen 7.5 doesn't exist. Tizen 8.0 is correct.
Update README file about Tizen Version.

Change-Id: I2290fbb9183a5dfee5be09b24ddb6b338c6dc242
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
15 months agoFix `touch` arguments 19/287019/2
Antoni Adaszkiewicz [Wed, 18 Jan 2023 11:28:05 +0000 (12:28 +0100)]
Fix `touch` arguments

Remove reference to legacy delta.ua and ensure *.inc files are in the
begining of delta.

Change-Id: I15a4267cdc36be23e8851d877affdd1282857b85

15 months agoAdd delta-verifier to delta.tar 11/286911/2
Mateusz Moscicki [Mon, 16 Jan 2023 16:05:27 +0000 (17:05 +0100)]
Add delta-verifier to delta.tar

So that the upgrade package provides the tools that are needed during
the upgrade and which may not be on the system.

Change-Id: I382e591ae7f6e80bcccb6021b9a52accbb03b51c

15 months agoFix variable name 10/286910/1
Mateusz Moscicki [Mon, 16 Jan 2023 16:03:28 +0000 (17:03 +0100)]
Fix variable name

Change-Id: I18b5f8272529529e6f9d0fab8eb03b1f3690739d

15 months agoMerge changes I82d23e08,I65d7976b into tizen
Mateusz Mościcki [Tue, 10 Jan 2023 10:25:34 +0000 (10:25 +0000)]
Merge changes I82d23e08,I65d7976b into tizen

* changes:
  CreatePatch.py: Inform more explicitly about missing utilities
  CreatePatch.py: Fix call to legacy version of ss_bsdiff

15 months agoCreatePatch.py: Inform more explicitly about missing utilities 95/286595/5
Antoni Adaszkiewicz [Tue, 10 Jan 2023 09:39:20 +0000 (10:39 +0100)]
CreatePatch.py: Inform more explicitly about missing utilities

Change-Id: I82d23e08d8af38388a7223ec02a732a02ba3eaf2

15 months agoCreatePatch.py: Fix call to legacy version of ss_bsdiff 15/286415/1
Antoni Adaszkiewicz [Thu, 5 Jan 2023 11:05:45 +0000 (12:05 +0100)]
CreatePatch.py: Fix call to legacy version of ss_bsdiff

Change-Id: I65d7976b92a9e64b8a26b3634d04e5814ca2645f

15 months agoEnsure files vital for upgrade are at the begining of full type delta 12/286412/1
Antoni Adaszkiewicz [Thu, 5 Jan 2023 09:27:35 +0000 (10:27 +0100)]
Ensure files vital for upgrade are at the begining of full type delta

Change-Id: Ib1cd9d03d22fb8e41a58242496edf5f5cb417d53

15 months agoAdd missing file to full type delta 16/286316/2
Antoni Adaszkiewicz [Tue, 3 Jan 2023 15:07:26 +0000 (16:07 +0100)]
Add missing file to full type delta

For upgrade scripts to work properly upgrade-apply-deltafs has to be
present in all deltas.

Change-Id: I7c95cbe0288f754b0b8ed7bd2b052ea00a3bffb6

16 months agoRemove LZMA support 93/285493/6
Mateusz Moscicki [Tue, 13 Dec 2022 13:28:57 +0000 (14:28 +0100)]
Remove LZMA support

For unification, in order not to support two different compression
algorithms, the LZMA algorithm was replaced by Brotli.

The difference in compression time is negligible:

    system.tar.br: 26082
    system.7z:     25480

Change-Id: Id707be53d7e53a50a6076ce92f70b6812c51de0e

16 months agoRemove unused ss_bspatch 92/285492/2
Mateusz Moscicki [Tue, 13 Dec 2022 13:24:28 +0000 (14:24 +0100)]
Remove unused ss_bspatch

To apply patches use upgrade-apply from platform/core/system/upgrade
repository.

Change-Id: I54f3eab07d345600e16b564db5d7028cf943a1bf

16 months agoChange update-info.ini file generation in "full" type deltas 92/285292/9
Antoni Adaszkiewicz [Thu, 8 Dec 2022 15:05:08 +0000 (16:05 +0100)]
Change update-info.ini file generation in "full" type deltas

This change will allow update-manager to update using "full" type
deltas.

Change-Id: I2e9d3ef702483d8b6ab48ba72e2fa908e27b00ac

17 months agoExtract upgrade-apply-deltafs binary form image during delta generation and append it 03/284603/9
Antoni Adaszkiewicz [Mon, 21 Nov 2022 13:35:17 +0000 (14:35 +0100)]
Extract upgrade-apply-deltafs binary form image during delta generation and append it
to the delta.

Change-Id: I438619f91250e72a45df21c16dadf8e98759762e

17 months agoEnsure that files vital for upgrade process are extracted from images even when parti... 33/283633/16
Antoni Adaszkiewicz [Mon, 31 Oct 2022 12:24:37 +0000 (13:24 +0100)]
Ensure that files vital for upgrade process are extracted from images even when partitions
where these files are located are not used for delta generation

Change-Id: I1c20c567f8cf5a70412640e8cc95bdbdb7212d7f

17 months agoAdd update-info-builder.py, used to generate update-info file. 29/283329/16
Antoni Adaszkiewicz [Mon, 17 Oct 2022 13:31:08 +0000 (15:31 +0200)]
Add update-info-builder.py, used to generate update-info file.
Use it in delta building scripts to generate file needed to verify it's compatibility
with upgraded device. Reduce the ammount of times same partition is mounted/unpacked
during delta generation.

Change-Id: I6fd4a820cded25588464d2f0279124c7727bc89d

17 months agoCreatePatch.py: Rewrite command line argument parsing 96/282396/15
Antoni Adaszkiewicz [Fri, 30 Sep 2022 12:33:22 +0000 (14:33 +0200)]
CreatePatch.py: Rewrite command line argument parsing

Change-Id: Ie229c96b8ee0019adf01acfd008d074e2fefcd49

17 months agoCreatePatch.py: Refactor code mainly responsible for generating DELTA_FS deltas,... 09/282309/14
Antoni Adaszkiewicz [Thu, 29 Sep 2022 10:43:06 +0000 (12:43 +0200)]
CreatePatch.py: Refactor code mainly responsible for generating DELTA_FS deltas, improve
readability, drop importing of unused modules, drop obsolete comments and commented-out code,
force python 3.0 or higher

Change-Id: I750d237b038cc6215aa0e9519c6893746bf6f011

17 months agoAdd mass-delta-builder 97/284697/5
Mateusz Moscicki [Wed, 23 Nov 2022 15:32:35 +0000 (16:32 +0100)]
Add mass-delta-builder

This tool is used to generate specific deltas depending on the
configuration.

Change-Id: Iee70a19f0c00a10a0620e6e0e10b71e9d2a3c333
Signed-off-by: Mateusz Moscicki <m.moscicki2@partner.samsung.com>
17 months agoMerge "CreatePatch.py: Drop legacy "VERBATIM" mechanism" into tizen
Karol Lewandowski [Thu, 17 Nov 2022 11:30:54 +0000 (11:30 +0000)]
Merge "CreatePatch.py: Drop legacy "VERBATIM" mechanism" into tizen

17 months agoMerge "Change DELTA_FS type deltas to be created with relative pathnames and remove...
Karol Lewandowski [Thu, 17 Nov 2022 11:30:48 +0000 (11:30 +0000)]
Merge "Change DELTA_FS type deltas to be created with relative pathnames and remove their dependency on /run/upgrade-sysroot directory" into tizen

17 months agoMerge "CreatePatch.py: Add support for hardlinks during delta generation." into tizen
Karol Lewandowski [Thu, 17 Nov 2022 11:30:38 +0000 (11:30 +0000)]
Merge "CreatePatch.py: Add support for hardlinks during delta generation." into tizen

19 months agoCreatePatch.py: Drop legacy "VERBATIM" mechanism 08/282308/1
Antoni Adaszkiewicz [Thu, 29 Sep 2022 10:47:13 +0000 (12:47 +0200)]
CreatePatch.py: Drop legacy "VERBATIM" mechanism

Change-Id: I2def77d974733fa8708b3e806abc0c70aa2b7ae4

19 months agoChange DELTA_FS type deltas to be created with relative pathnames and remove their... 97/280997/4
Antoni Adaszkiewicz [Tue, 6 Sep 2022 13:31:42 +0000 (15:31 +0200)]
Change DELTA_FS type deltas to be created with relative pathnames and remove their dependency on
/run/upgrade-sysroot directory

Change-Id: I58348748e5359047bd587a6a7cf34af570665940

19 months agoDrop unsupported targets 19/280819/1
Karol Lewandowski [Mon, 5 Sep 2022 10:50:03 +0000 (12:50 +0200)]
Drop unsupported targets

None of dropped targets are supported by current `upgrade` support
in initrd-recovery.  Due to this upgrade packages are no longer
installed on these targets.

Change-Id: Id0dde3f0503cfa92e4c18542879208aa101e4d98

20 months agoCreatePatch.py: Add support for hardlinks during delta generation. 22/280722/2
Antoni Adaszkiewicz [Mon, 29 Aug 2022 12:19:06 +0000 (14:19 +0200)]
CreatePatch.py: Add support for hardlinks during delta generation.

Change-Id: Ie3fd13d9557f36222d96c61db1ce4b54cb5e2d82

20 months agoMerge remote-tracking branch 'tota-upg/tizen' into tizen 58/280658/1
Karol Lewandowski [Thu, 1 Sep 2022 22:06:39 +0000 (00:06 +0200)]
Merge remote-tracking branch 'tota-upg/tizen' into tizen

Change-Id: I9d3882ab0928efbbf60519f20ea3a21187fcc10a

20 months agoMerge changes Id8ad3953,I98b5a184 into tizen tota-upg-tizen
Karol Lewandowski [Thu, 1 Sep 2022 22:04:20 +0000 (22:04 +0000)]
Merge changes Id8ad3953,I98b5a184 into tizen

* changes:
  Remove unused Apply_Container_Delta() function from CreatePatch.py
  Fix ensure_dir_exists() function behaviour and exception handling

20 months agoMerge changes I7634bd46,I6abeeca4,I78c7a4d8 into tizen
Karol Lewandowski [Thu, 1 Sep 2022 22:04:10 +0000 (22:04 +0000)]
Merge changes I7634bd46,I6abeeca4,I78c7a4d8 into tizen

* changes:
  Fix inconsistent code formating and indentations in CreatePatch.py
  Remove unnecessary difflines() function and unnecessary closing of files in CreatePatch.py
  Remove bare excepts in CreatePatch.py

20 months agoDrop unused delta.ua from image 02/280302/1
Karol Lewandowski [Fri, 26 Aug 2022 10:27:32 +0000 (12:27 +0200)]
Drop unused delta.ua from image

delta.ua is legacy style upgrade agent that is no longer supported.

Change-Id: Ib5c17736dc91643e05d90a0d40f3c69edea2bd75

20 months agoss_bsdiff: Change the search function 64/280164/3
Mateusz Moscicki [Wed, 24 Aug 2022 15:17:49 +0000 (17:17 +0200)]
ss_bsdiff: Change the search function

This commit uses the provided sa_search() function to look for patterns,
instead of using own implementation.

The change is inspired by:

    https://android.googlesource.com/platform/external/bsdiff/+/refs/heads/master/suffix_array_index.cc

Change-Id: I49b3c4dd12c11b81157e030851bb8e4e48d1f6b2

20 months agoAdd dockerfile to provide upgrade-tools in reproductible manner 62/280162/3
Karol Lewandowski [Wed, 24 Aug 2022 13:58:26 +0000 (15:58 +0200)]
Add dockerfile to provide upgrade-tools in reproductible manner

Build with:
./docker-build.sh

Run with:
docker run --rm -ti --privileged -v /dev:/dev -v /data:/data upgrade-tools:latest

Update volume (-v) mappings as needed. Note that --privileged and -v /dev:/dev are needed
for loop device mounting to work correctly. /data volume is just example how to transfer
tizen images into container and deltas - out of container.

Change-Id: I5bd09d446df32eda44dddffb9dcc5bee942cd427

20 months agoImport bsdiff from libtota 61/280161/1
Karol Lewandowski [Wed, 24 Aug 2022 13:12:17 +0000 (15:12 +0200)]
Import bsdiff from libtota

This commit import tools to generate binary deltas from libtota
commit 143447ad7 ("ss_bsdiff: Fix to speed up patch generation")

Change-Id: I3ef5abd6065b476ffbd682c92bf306edd9a2ea4f

20 months agoUpdate README after repository copy
Karol Lewandowski [Tue, 23 Aug 2022 12:00:14 +0000 (14:00 +0200)]
Update README after repository copy

Copied platform/core/system/tota-upg -> upgrade-tools, which
will handle delta generation from 7.5 onwards.

Change-Id: I0413f75b634cb3907cf787a521ae415e95d36be3

20 months agoModify upgrade-verifier to verify partitions with image files
SangYoun Kwak [Thu, 18 Aug 2022 01:58:05 +0000 (10:58 +0900)]
Modify upgrade-verifier to verify partitions with image files

Change-Id: I7d83092a65ff153e18dd498e40122d6787318094
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
21 months agoAdd update-verifier
Mateusz Moscicki [Wed, 27 Jul 2022 10:43:20 +0000 (12:43 +0200)]
Add update-verifier

Change-Id: Id074d36297145e07f68d49be8f51feafcc726d5a

21 months agoRemove unused Apply_Container_Delta() function from CreatePatch.py
Antoni [Mon, 18 Jul 2022 15:08:46 +0000 (17:08 +0200)]
Remove unused Apply_Container_Delta() function from CreatePatch.py

Change-Id: Id8ad395399ba6b631cf1ad2ecb3ce8b201b95e43

21 months agoFix ensure_dir_exists() function behaviour and exception handling
Antoni [Mon, 18 Jul 2022 11:42:35 +0000 (13:42 +0200)]
Fix ensure_dir_exists() function behaviour and exception handling

Change-Id: I98b5a184714d34784068e840a1bb2636458a752f

21 months agoDrop DELTA_FS image generation
Karol Lewandowski [Thu, 21 Jul 2022 12:48:20 +0000 (14:48 +0200)]
Drop DELTA_FS image generation

This commit changes all occurences of DELTA_FS with DELTA_IMAGE.
DELTA_FS is considered legacy and should not be used unless necessary.

Change-Id: I17dccac5ec532af2db0bb2e385c9871763956b38

21 months agoFix inconsistent code formating and indentations in CreatePatch.py
Antoni [Mon, 18 Jul 2022 11:39:35 +0000 (13:39 +0200)]
Fix inconsistent code formating and indentations in CreatePatch.py

Change-Id: I7634bd462dd8b875c816540b3ca0720cde93b2ab

21 months agoRemove unnecessary difflines() function and unnecessary closing of files in CreatePat...
Antoni [Mon, 18 Jul 2022 11:33:12 +0000 (13:33 +0200)]
Remove unnecessary difflines() function and unnecessary closing of files in CreatePatch.py

Change-Id: I6abeeca4ed203d0718ca04b51809220fafe11f56

21 months agoRemove bare excepts in CreatePatch.py
Antoni [Fri, 15 Jul 2022 13:15:25 +0000 (15:15 +0200)]
Remove bare excepts in CreatePatch.py

Change-Id: I78c7a4d88057f21eaf5fb708a94c0a7378a0b742

22 months agoSave a checksum of all files contained in delta archive
Mateusz Moscicki [Mon, 20 Jun 2022 11:28:31 +0000 (13:28 +0200)]
Save a checksum of all files contained in delta archive

Change-Id: I82563afd2ef30784ece716a7b9a090241a159b95

22 months agoUnifies the location of the result delta.tar file
Mateusz Moscicki [Mon, 20 Jun 2022 10:18:12 +0000 (12:18 +0200)]
Unifies the location of the result delta.tar file

Change-Id: I2089c6e6f10bb1c462f68efe58faa8bb49d32cef

22 months agoUse Date field from info.ini for old & new version string
Mateusz Moscicki [Thu, 9 Jun 2022 12:59:06 +0000 (14:59 +0200)]
Use Date field from info.ini for old & new version string

Change-Id: I79861a7d7f08166c191552a1c52b71256c51ecd6

22 months agoRename upgrade types:
Mateusz Moscicki [Thu, 9 Jun 2022 14:47:09 +0000 (16:47 +0200)]
Rename upgrade types:

Types now include information in the name about what the upgrade is
(FULL_IMAGE, DELTA_IMAGE) and when it is to be performed
(BEFORE_BOOT_FOTA, AT_BOOT_FOTA):

  PRE_UA    -> FULL_IMAGE:BEFORE_BOOT_FOTA
  FULL_IMG  -> FULL_IMAGE:AT_BOOT_FOTA
  DELTA_IMG -> DELTA_IMAGE:AT_BOOT_FOTA

Change-Id: I31343d64a37156d0ca4673b9150cdfeb97f99ff4

23 months agoAdd upgrade-apply
Mateusz Moscicki [Fri, 3 Jun 2022 14:49:43 +0000 (16:49 +0200)]
Add upgrade-apply

Change-Id: Idd1a48cf89a17bb74351672094cc1f471a2e973e

23 months agoFix rootfs mount for metadata extraction
Mateusz Moscicki [Fri, 27 May 2022 15:15:33 +0000 (17:15 +0200)]
Fix rootfs mount for metadata extraction

Change-Id: I63e1203ba98fa1513bb3c3b731cb15f1210d8922

23 months agoAdd script to generate full delta
Mateusz Moscicki [Thu, 26 May 2022 14:41:59 +0000 (16:41 +0200)]
Add script to generate full delta

To generate the full delta, pass the 'full' argument to the
delta-generation.sh:

    ./scripts/delta-generation.sh . device_XYZ full

Change-Id: Ic847f396455b97e07091bf01c62bfb21b5da7ea9

23 months agoSave the checksum and image size of PRE_UA images in the update.cfg
Mateusz Moscicki [Fri, 13 May 2022 09:37:48 +0000 (11:37 +0200)]
Save the checksum and image size of PRE_UA images in the update.cfg

Change-Id: If6338b6ac94ec8c327f0891ae50cc45ee4be4996

23 months agoUse arm64 as architecture string instead of aarch64
Karol Lewandowski [Wed, 11 May 2022 08:55:47 +0000 (10:55 +0200)]
Use arm64 as architecture string instead of aarch64

It's was requested to be consistent with arm32 naming.

Change-Id: I0939e70745bb88354cd47861f5ad0326a6a26971

23 months agoUse Release field from info.ini for old & new version string
Karol Lewandowski [Tue, 10 May 2022 10:56:16 +0000 (12:56 +0200)]
Use Release field from info.ini for old & new version string

Change-Id: I58f34834589787101cd740287954e5271e6e71d4

2 years agoAlways copy whole /usr/libexec/upgrade-support to delta tar
Karol Lewandowski [Mon, 4 Apr 2022 18:27:16 +0000 (20:27 +0200)]
Always copy whole /usr/libexec/upgrade-support to delta tar

Recently there have been quite a few changes with upgrade scripts,
with each change requiring in this repository _in additon_ to changes
in packages which provide such scripts (tota-ua).

This commit generalizes the script concept, allowing it for any
package to install needed scrips to /usr/libexec/upgrade-support whose
contents will be copied in verbatim to delta.tar.

Change-Id: Ia6baec1ab777da842c4ea5b87e83046cbaa0b8fd

2 years agoAdd new upgrade scripts to delta
Karol Lewandowski [Mon, 4 Apr 2022 15:37:44 +0000 (17:37 +0200)]
Add new upgrade scripts to delta

Change-Id: Ica6839d9340820cae70369046618869c22322779

2 years agoFix 'touch' in case there is no file with the given extension
Mateusz Moscicki [Tue, 22 Feb 2022 17:28:53 +0000 (18:28 +0100)]
Fix 'touch' in case there is no file with the given extension

Change-Id: I21ab3c2467ccaf62ab7d54ec704b7fb3825b0cbc

2 years agoAdd additional update scripts to delta.tar
Mateusz Moscicki [Tue, 15 Feb 2022 13:24:37 +0000 (14:24 +0100)]
Add additional update scripts to delta.tar

Scripts:

  upgrade-fota.sh
  upgrade-partial.sh
  upgrade-prepare-partitions.sh

must be supplied in delta.tar file to run their latest version.

Change-Id: I61772f1ec5bfdeb3e4cfadd2c784c448a66a3d69

2 years agoAdd support for DELTA_IMG_AB update type
Mateusz Moscicki [Mon, 14 Feb 2022 14:32:11 +0000 (15:32 +0100)]
Add support for DELTA_IMG_AB update type

DELTA_IMG_AB type is the same as DELTA_IMG except that the patch is
compressed with Brotli instead of LZMA. Due to the fact that Brotli
allows decompression with a small amount of RAM, this type is suitable
for patching large partition.

Change-Id: I3980bd395184855804c8f0c0bc5e64763023d10b

2 years agoEnsure metadata is generated for both delta_fs and delta_img
Karol Lewandowski [Thu, 30 Dec 2021 21:43:27 +0000 (22:43 +0100)]
Ensure metadata is generated for both delta_fs and delta_img

Change-Id: I910e76a88e2c732d3ea8e55f3ba24f4ccc594702

2 years agoPack important files at beginning of the archive
Karol Lewandowski [Fri, 31 Dec 2021 10:01:59 +0000 (11:01 +0100)]
Pack important files at beginning of the archive

Change-Id: I4c538610d9a61e98a70977de7578b0311f82e1d7

2 years agoGenerate delta in /run/upgrade-sysroot instead of /system
Karol Lewandowski [Wed, 8 Dec 2021 10:56:32 +0000 (11:56 +0100)]
Generate delta in /run/upgrade-sysroot instead of /system

Upgrade path is hardcoded and it's used by Update Agent.
In A/B case Update Agent is run in normal boot, requiring
for the /system path to be "reserved" - possibly causing
conflicts.

Change-Id: I044f0949b57ba7828c764b92f9418f1c4b2fa696

2 years agoAdd support for updating /hal partition on RPI 3|4.
Ernest Borowski [Wed, 22 Sep 2021 10:40:29 +0000 (10:40 +0000)]
Add support for updating /hal partition on RPI 3|4.

It can not be updated using full image because it is mounted during
normal boot mode, therefore is has to be DELTA_FS type.

Change-Id: Ib0e3d549ac57557bf31b15fab22b4f4315141897
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agoAdd rpi4-headless and rpi4-headed profiles
Karol Lewandowski [Fri, 27 Aug 2021 15:38:28 +0000 (17:38 +0200)]
Add rpi4-headless and rpi4-headed profiles

These profiles come with added update-info.ini metadata

Change-Id: I3ec1be54b66238adb8b9d5b85f87ab7cc449abfd

2 years agoAdd update-info.ini with metadata to the image
Karol Lewandowski [Fri, 27 Aug 2021 15:37:24 +0000 (17:37 +0200)]
Add update-info.ini with metadata to the image

Metadata is only added if it's provided in board configuration
file - cfg/update-info.ini.in.

Change-Id: I0bb45aceb8bb8a08b27494fcd21ffe40b13aa711

2 years agoRemoves entries from the final update.cfg file for which no image was generated.
Mateusz Moscicki [Fri, 4 Jun 2021 09:51:07 +0000 (11:51 +0200)]
Removes entries from the final update.cfg file for which no image was generated.

Until now, the update.cfg file has contained entries even when the
related image file was not generated due to lack of differences. For
example if there were no differences between Tizen versions for boot.img
then the image as not placed in delta.tar file, but in update.cfg the
entry associated with it remained.

This patch removes entries for which there is no corresponding image. In
case the resulting update.cfg (e.g. an update between the same
versions), the mk_delta.sh script will end with an error.

Change-Id: I61278a8f1efb69bd908b1dd1aae5ebf714963f6e

2 years agoMerge "Include boot and modules partitions update on RPI4 and RPI3" into tizen
Karol Lewandowski [Wed, 2 Jun 2021 11:19:30 +0000 (11:19 +0000)]
Merge "Include boot and modules partitions update on RPI4 and RPI3" into tizen

2 years agoMerge "Add RPI4 target" into tizen
Karol Lewandowski [Wed, 2 Jun 2021 11:19:21 +0000 (11:19 +0000)]
Merge "Add RPI4 target" into tizen

2 years agoInclude boot and modules partitions update on RPI4 and RPI3
Mateusz Moscicki [Tue, 1 Jun 2021 11:18:38 +0000 (13:18 +0200)]
Include boot and modules partitions update on RPI4 and RPI3

These partitions are updated as PRE_UA so that after a reboot the update
will run with the new kernel making it possible e.g. to use a new
filesystem.

Change-Id: I530bb685f5794f30c2605f5e394b86f01b0c10a8

2 years agoAdd RPI4 target
Mateusz Moscicki [Mon, 31 May 2021 11:14:45 +0000 (13:14 +0200)]
Add RPI4 target

Change-Id: I557bf7edf4890446c8e458bff5760339164d1dca

3 years agoRemove explicit filesystem argument to mount.
Ernest Borowski [Fri, 22 Jan 2021 13:55:28 +0000 (13:55 +0000)]
Remove explicit filesystem argument to mount.

This allows to use this scripts with other filesystems such as btrfs.

Change-Id: I0f145b13548296b35d3138a2a0afe88de890546e

3 years agoAdd TW3 target
Kichan Kwon [Tue, 6 Oct 2020 06:20:48 +0000 (15:20 +0900)]
Add TW3 target

Change-Id: I741ca0b707b6970361ed7302e27ad9db08d5ef60
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoFix typo at warning message
Jeon Sang-Heon [Fri, 30 Oct 2020 11:19:33 +0000 (11:19 +0000)]
Fix typo at warning message

aready -> already

Change-Id: I44fef23b15666262635bb12b2a64ef0d68fda739
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoRename pre script to setup script
Kichan Kwon [Thu, 17 Sep 2020 08:26:33 +0000 (17:26 +0900)]
Rename pre script to setup script

Change-Id: Icf264c91f278c8785bf44047e6346f7edfcb479d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoInclude pre script to recovery image if exists
Kichan Kwon [Wed, 16 Sep 2020 10:29:17 +0000 (19:29 +0900)]
Include pre script to recovery image if exists

Change-Id: I08ab160746db0272d44557eae9eb17abb106d49a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd recovery profile for ARTIK530_710
Kichan Kwon [Wed, 16 Sep 2020 08:56:21 +0000 (17:56 +0900)]
Add recovery profile for ARTIK530_710

Change-Id: I14bcedd6cf93492e886159de7ffea72ac2adb6b8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoMerge "Parse command options to allow empty PKCS password" into tizen
Kwon [Mon, 14 Sep 2020 06:51:30 +0000 (06:51 +0000)]
Merge "Parse command options to allow empty PKCS password" into tizen

3 years agoChange build information format
Jeon Sang-Heon [Mon, 31 Aug 2020 18:03:02 +0000 (18:03 +0000)]
Change build information format

- AS-IS : build_id.txt -> old=(old);'\n'new=(new);
- TO-BE : build_string.txt -> (old)@(new)

Change-Id: I79b3e39d459e9a24c3a60f8407c33df9876a2626
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoParse command options to allow empty PKCS password
Kichan Kwon [Fri, 28 Aug 2020 08:30:26 +0000 (17:30 +0900)]
Parse command options to allow empty PKCS password

- Somebody can make PKCS file without password
- But, shell script function can't distinguish
  between NULL argument and whitespace
- To distinguish, use command options and
  input password option if user wants

Change-Id: I5c37a705be4eef274222b4cebb8f3f353459cca7
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoFix bug while generating images
Jeon Sang-Heon [Wed, 26 Aug 2020 12:08:42 +0000 (12:08 +0000)]
Fix bug while generating images

- Fix ignoring last line if there is no new lines in config file
- Fix unexpected file compression by using asterisk

Change-Id: Ic6258eede8f131793063b66e0a3b8fc752ce7532
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoSign recovery image if you want
Kichan Kwon [Mon, 24 Aug 2020 06:51:17 +0000 (15:51 +0900)]
Sign recovery image if you want

- generate_package.sh TOTA_UPG_PATH TARGET SIGN_PKCS_FILE SIGN_PKCS_PASSWORD

Change-Id: I526a59aeff9ac478f735378d935e44f984d0e0dd
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoApply verifier patch
Kichan Kwon [Mon, 24 Aug 2020 06:15:34 +0000 (15:15 +0900)]
Apply verifier patch

- Rename magic number : TOTA -> IMG
- Rename signer : sign_upg -> sign_img

Change-Id: I2d86198f24970cb50b0ed542013ab11afe824fa5
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd recovery image generate tool
Jeon Sang-Heon [Thu, 16 Jul 2020 11:34:50 +0000 (11:34 +0000)]
Add recovery image generate tool

- Merge boot, platform, config to result
- Target image must be tar.gz format
- Config file name : recovery.cfg -> Filesystem label, bin name, blk dev
- Result file name : tizen-recovery.img

Change-Id: I1bd5fa4eac713e95e23d0efff11b96439633d988
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoFix bug that not including build_id.txt
Jeon Sang-Heon [Mon, 6 Jul 2020 20:39:44 +0000 (20:39 +0000)]
Fix bug that not including build_id.txt

Change-Id: I91bb7550b1ed63a726ed7df1201d5c878c80397c
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoChange version.txt to build_id.txt
Jeon Sang-Heon [Mon, 6 Jul 2020 13:47:04 +0000 (13:47 +0000)]
Change version.txt to build_id.txt

- Release version may not be unique, so change to read build id

Change-Id: Ibc74d24b79136e2dc23b8a833540b67cf7ce927d
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>