SangYoun Kwak [Tue, 11 Jun 2024 10:44:44 +0000 (19:44 +0900)]
ss_bsdiff: Add casting for explicit conversion
Since there were implicit conversion from off_t to uint64_t, which
caused by the compariton between off_t type variables and uint64_t type
varaibles.
It causes warning about the comparison between unmatched types thus the
off_t value will be casted implicitly to uint64_t if this warning is
ignored.
To suppress this warning and preserve the behavior of the original code,
explicit type casting to uint64_t is added.
Change-Id: Ieb6c0e073986e2cf0ef686307b2cfe894d84f27d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Tue, 11 Jun 2024 09:19:00 +0000 (18:19 +0900)]
ss_bsdiff: Fix uninitialized use of a variable
There were two pointer variables for the memory map(mmap) address:
* input_file_ptr
* output_file_ptr
If mmap function fails, control flow goes to "exit" lable and munmap the
mapped addresses.
Previously, the declaration of output_file_ptr was placed after the mmap
of input_file_ptr. In this situation, if mmap fails, program tries to
unmap the both input_file_ptr and output_file_ptr but output_file_ptr is
not declared yet.
To fix this issue, declarations of these variables are moved to 'before
the first mmap'.
Change-Id: I721cfaaf269c02868de7e868e2e73ea64698abe7
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Tue, 11 Jun 2024 08:41:02 +0000 (17:41 +0900)]
ss_bsdiff: Fix printf format for uint64_t
The printf format for uint64_t was "%ld", so it is fixed with "PRIu64",
which can be used for uint64_t portably.
Change-Id: I78643cf92e45eeb3ca87b01e1e3be682d63e2391
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Mon, 10 Jun 2024 09:18:02 +0000 (18:18 +0900)]
Modify not to use libdivsufsort if profile is tv
There are no package named libdivsufsort in tv profile environment.
Thus, it is required to not use libdivsufsort if the profile is tv.
(ss_bsdiff is not used in tv profile so libdivsufsort is not mandatory)
To not use libdivsufsort, dummy functions are added.
Change-Id: Iad7c8432f0c35473d07df1659c3a35fcabe595df
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Mon, 10 Jun 2024 07:34:53 +0000 (16:34 +0900)]
common: Remove 'sudo' from shell script
Since the delta-creating scripts are executed with root privilege, sudo
is unnecessary.
Change-Id: Ic108d8bb3fcd0ab3ed41cfdca57d41d1ed6325d1
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Antoni [Wed, 22 May 2024 14:21:36 +0000 (16:21 +0200)]
Allow building deltas with boot image only (no rootfs)
update-info-builder.py was extended for more verbose logging
Change-Id: I4ea0be05bbf281fff1e503cd008aa8c2b50fc62d
Antoni [Wed, 3 Apr 2024 14:02:31 +0000 (16:02 +0200)]
Add a new file (update-progress-info.ini) to archive
This file is needed for upgrade progress reporting in DELTA_IMAGE type
deltas.
Change-Id: Ibb4cfe904ce43b17da39c8a6e21961e70b33cae7
Mateusz Mościcki [Fri, 10 May 2024 13:55:08 +0000 (13:55 +0000)]
Merge "Add copy-blockdev to delta.tar" into tizen
SangYoun Kwak [Tue, 23 Apr 2024 02:32:20 +0000 (11:32 +0900)]
Modify bsdiff to be built during gbs build
Since bsdiff(executable name is ss_bsdiff) is required to make delta
image, CMakeLists.txt and .spec files are modified to make it to be
built during the gbs build.
ss_bsdiff is installed under /upgrade-tools/mk_delta/common/bin.
Change-Id: Ib7fda42c8677f5ebb9d892b87c90fc5e25ae2370
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Wed, 8 May 2024 11:21:33 +0000 (20:21 +0900)]
Modify script for ks to set delta name properly
To make delta image name properly, source image version and destination
image version are retrieved.
Also informations like device(like rpi4) and architectures are retrieved
from parameter for the delta image name.
Change-Id: If16b8c30d6f9ff317044e0e12656b692350b5b25
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Tue, 30 Apr 2024 07:44:20 +0000 (07:44 +0000)]
Revert "Modify bsdiff to be built during gbs build"
This reverts commit
652c9a8e4c96fb93d006574aba8c23ad34c9f93b.
Reason for revert: Since the libdivsufsort is not usable, to prevent build error, revert this commit.
Change-Id: Ic0043000c8297c4a9f9bb4115dac8e8e54add018
SangYoun Kwak [Wed, 24 Apr 2024 06:54:50 +0000 (15:54 +0900)]
scripts: Add a script to generate delta for .ks runscript
To generate delta image in the image-building sequence(using .ks),
a script to prepare and generate delta image is added.
Change-Id: Icc51af99a4ef912fef9160fdc9075396177ce2c8
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
Jacek Kryszyn [Wed, 24 Apr 2024 07:25:04 +0000 (09:25 +0200)]
Add copy-blockdev 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: I58eefebdd2c8eb38217a2a012c0820c593a55147
SangYoun Kwak [Tue, 23 Apr 2024 02:36:51 +0000 (11:36 +0900)]
Fix CreatePatch.py to use ss_bsdiff in the common/bin
In the python script CreatePatch.py, ss_bsdiff is checked whether it is
exist in the /usr/local/bin/ss_bsdiff or not.
If not exist, then it checks if it exists under "../../common/bin".
Script makes new path using statement below:
> os.path.join("../../common/bin", "/usr/local/bin/ss_bsdiff")
But the return value of the function above is not
> "../../common/bin/usr/local/bin/ss_bsdiff"
but
> "/usr/local/bin/ss_bsdiff"
so the script is just checking about "/usr/local/bin/ss_bsdiff" twice.
To fix it, a variable DIFF_UTIL_NAME is added to store the name of the
diff util and check if it exist under "../../common/bin" if
/usr/local/bin/ss_bsdiff is not exist.
Change-Id: I138b54b7dc77a47130435e9034f594b99afa35aa
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Tue, 23 Apr 2024 02:32:20 +0000 (11:32 +0900)]
Modify bsdiff to be built during gbs build
Since bsdiff(executable name is ss_bsdiff) is required to make delta
image, CMakeLists.txt and .spec files are modified to make it to be
built during the gbs build.
ss_bsdiff is installed under /upgrade-tools/mk_delta/common/bin.
Change-Id: I58b52b85282bac775e03ac1222081d1f4dcb9732
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Fri, 19 Apr 2024 10:30:58 +0000 (19:30 +0900)]
common: Modify package checking code to use 'which'
Since apt is not a default package of python, shutil.which is used to
increase portability.
Change-Id: I1745f065f0772bffdafd90ea50daf4d67d6338af
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Fri, 19 Apr 2024 09:38:50 +0000 (18:38 +0900)]
common: Remove 'sudo' from shell scripts
Since the delta-creating scripts are executed with root privilege, sudo
is unnecessary.
Change-Id: I9e612b06db62fca82af419980dc76232328f9bff
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
SangYoun Kwak [Wed, 17 Apr 2024 09:37:22 +0000 (18:37 +0900)]
Add executable mode to directory-setup.sh
Change-Id: I51be9cc3c5f8892476f6da631c6542564cac77a4
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
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>
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
Marek Pikuła [Mon, 25 Mar 2024 09:07:43 +0000 (10:07 +0100)]
CI: Disable 7 to 8 build
Change-Id: Ief785cb7b35ded7fab0ddac609cd075f449d5862
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
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>
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>
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
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>
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>
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>
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>
Mateusz Mościcki [Thu, 29 Feb 2024 15:04:56 +0000 (15:04 +0000)]
Merge "Separate delta configurations to separate repos" into tizen
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
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
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
Mateusz Moscicki [Wed, 31 Jan 2024 15:01:13 +0000 (16:01 +0100)]
scripts: Add support to delta without hal.img
Change-Id: Icccdbfccb548457b7f24e8b5962e3299d4412ee9
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>
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>
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>
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
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
Mateusz Moscicki [Mon, 16 Jan 2023 16:03:28 +0000 (17:03 +0100)]
Fix variable name
Change-Id: I18b5f8272529529e6f9d0fab8eb03b1f3690739d
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
Antoni Adaszkiewicz [Tue, 10 Jan 2023 09:39:20 +0000 (10:39 +0100)]
CreatePatch.py: Inform more explicitly about missing utilities
Change-Id: I82d23e08d8af38388a7223ec02a732a02ba3eaf2
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
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
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
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
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
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
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
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
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
Antoni Adaszkiewicz [Fri, 30 Sep 2022 12:33:22 +0000 (14:33 +0200)]
CreatePatch.py: Rewrite command line argument parsing
Change-Id: Ie229c96b8ee0019adf01acfd008d074e2fefcd49
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
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>
Karol Lewandowski [Thu, 17 Nov 2022 11:30:54 +0000 (11:30 +0000)]
Merge "CreatePatch.py: Drop legacy "VERBATIM" mechanism" into tizen
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
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
Antoni Adaszkiewicz [Thu, 29 Sep 2022 10:47:13 +0000 (12:47 +0200)]
CreatePatch.py: Drop legacy "VERBATIM" mechanism
Change-Id: I2def77d974733fa8708b3e806abc0c70aa2b7ae4
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
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
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
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
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
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
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
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
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
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
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
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>
Mateusz Moscicki [Wed, 27 Jul 2022 10:43:20 +0000 (12:43 +0200)]
Add update-verifier
Change-Id: Id074d36297145e07f68d49be8f51feafcc726d5a
Antoni [Mon, 18 Jul 2022 15:08:46 +0000 (17:08 +0200)]
Remove unused Apply_Container_Delta() function from CreatePatch.py
Change-Id: Id8ad395399ba6b631cf1ad2ecb3ce8b201b95e43
Antoni [Mon, 18 Jul 2022 11:42:35 +0000 (13:42 +0200)]
Fix ensure_dir_exists() function behaviour and exception handling
Change-Id: I98b5a184714d34784068e840a1bb2636458a752f
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
Antoni [Mon, 18 Jul 2022 11:39:35 +0000 (13:39 +0200)]
Fix inconsistent code formating and indentations in CreatePatch.py
Change-Id: I7634bd462dd8b875c816540b3ca0720cde93b2ab
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
Antoni [Fri, 15 Jul 2022 13:15:25 +0000 (15:15 +0200)]
Remove bare excepts in CreatePatch.py
Change-Id: I78c7a4d88057f21eaf5fb708a94c0a7378a0b742
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
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
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
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
Mateusz Moscicki [Fri, 3 Jun 2022 14:49:43 +0000 (16:49 +0200)]
Add upgrade-apply
Change-Id: Idd1a48cf89a17bb74351672094cc1f471a2e973e
Mateusz Moscicki [Fri, 27 May 2022 15:15:33 +0000 (17:15 +0200)]
Fix rootfs mount for metadata extraction
Change-Id: I63e1203ba98fa1513bb3c3b731cb15f1210d8922
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
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
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
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
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
Karol Lewandowski [Mon, 4 Apr 2022 15:37:44 +0000 (17:37 +0200)]
Add new upgrade scripts to delta
Change-Id: Ica6839d9340820cae70369046618869c22322779
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
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
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
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
Karol Lewandowski [Fri, 31 Dec 2021 10:01:59 +0000 (11:01 +0100)]
Pack important files at beginning of the archive
Change-Id: I4c538610d9a61e98a70977de7578b0311f82e1d7
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
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>
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
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
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
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