platform/core/system/upgrade-tools.git
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>
3 years agoRead SMACK capability only once
Kichan Kwon [Thu, 2 Jul 2020 03:35:36 +0000 (12:35 +0900)]
Read SMACK capability only once

- chsmack_attr tries to read all capabilities
  though some capabilities aren't SMACK attribute
- security.capability is raw binary having NULL byte,
  so attr prints warning message
  - warning: command substitution: ignored null byte in input
- It doesn't cause the problem on making delta,
  but chsmack_attr will read only SMACK capability
  to remove meaningless message

Change-Id: Ibb06ad73cfe4d04c26d84e6669f5bdfc1559ec43
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoModify signed file structure
Kichan Kwon [Wed, 3 Jun 2020 06:29:33 +0000 (15:29 +0900)]
Modify signed file structure

- Add delta size
- Magic number : TOTA_SIGNED -> TOTA_SIGNED_V1

Change-Id: Ide8067a7d7968d8493beacbd48f54294f6efb3b3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoSign with PKCS file instead of raw key/cert
Kichan Kwon [Tue, 2 Jun 2020 11:34:06 +0000 (20:34 +0900)]
Sign with PKCS file instead of raw key/cert

- delta-generation argument is changed
  - delta-generation.sh TOTA_UPG_PATH TARGET SIGN_PKCS_FILE SIGN_PKCS_PASSWORD

Change-Id: Ifcf092f4df87638ea31ea5d96aa3aeb90990ece2
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoIntroduce package signing
Kichan Kwon [Mon, 1 Jun 2020 05:22:29 +0000 (14:22 +0900)]
Introduce package signing

- To sign delta, you can call delta-generation like this
  - delta-generation.sh TOTA_UPG_PATH TARGET SIGN_KEY SIGN_CERT

Change-Id: I783d2f081dbb81618a278d1673d451fa16cf05f4
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoMerge "Add release version to delta file" into tizen
Jeon Sang-Heon [Tue, 26 May 2020 09:06:33 +0000 (09:06 +0000)]
Merge "Add release version to delta file" into tizen

4 years agoCompress system.7z without Delta method
Kichan Kwon [Mon, 11 May 2020 11:22:12 +0000 (20:22 +0900)]
Compress system.7z without Delta method

- p7zip compresses file with some kinds of methods
  including Delta method
- However, extracting the file compressed by Delta method
  is failed because the version of libtota's lzma-sdk is
  too old(9.20)
- With "-mf=off" option, we can compress with only LZMA method
  which old lzma-sdk supports

- NOTICE
  - Compression ratio is slightly decreased
  - If you want to use Delta method, please update lzma-sdk
    to 15.05 or higher and port libtota

Change-Id: Ib33eec082b7b15c10f3127c8d0c4d558b8c5aa1d
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoFix typo
Kichan Kwon [Wed, 6 May 2020 05:59:39 +0000 (14:59 +0900)]
Fix typo

Change-Id: Ieded567e648f774b6fcf90f9a05e674466503c11
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoAdd release version to delta file
Jeon Sang-Heon [Mon, 20 Apr 2020 05:55:24 +0000 (14:55 +0900)]
Add release version to delta file

Change-Id: I381d00af0a4cbcfee60d423177a5fabd328de6ee
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoRemove the specific logic for dzImage
Kichan Kwon [Mon, 15 Jul 2019 02:49:24 +0000 (11:49 +0900)]
Remove the specific logic for dzImage

Change-Id: I9f9a5874be3b83e3b67ff08d7f8f09395bfa7e89
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoMerge some patches for ARTIK
Kichan Kwon [Mon, 8 Jan 2018 11:03:49 +0000 (20:03 +0900)]
Merge some patches for ARTIK

- Update ARTIK ramdisk as PRE_UA
- Include pre-script if exist

Change-Id: I4143a981b9bb80b2531bfa033700c836e51da3ca

6 years agoMerge commit 'tizen_4.0' into tizen
Sunmin Lee [Fri, 9 Feb 2018 06:09:54 +0000 (15:09 +0900)]
Merge commit 'tizen_4.0' into tizen

Change-Id: I2013f26cb53ef7164170ea9d67b41a8a37e94c64

6 years agotw2: revise delta name and add recovery kernel
Sunmin Lee [Thu, 21 Dec 2017 07:27:37 +0000 (16:27 +0900)]
tw2: revise delta name and add recovery kernel

Change-Id: I8058842bcd08b344b53acd4dd829a7c10dbb3a5c
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agomk_delta: extract file for update
Sunmin Lee [Mon, 18 Dec 2017 07:10:26 +0000 (16:10 +0900)]
mk_delta: extract file for update

Some binaries used for update are required to be extracted
from new image and appended to update package (delta.tar).
Extract these file from known image and path, whether those
images are listed in config file or not.

Change-Id: I31e52b0eb651827b55cd5653828e462335e8ca35
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoUse valid label which is available in all targets
Sunmin Lee [Tue, 14 Nov 2017 00:11:43 +0000 (09:11 +0900)]
Use valid label which is available in all targets

Because RPi3 and ARTIK target don't set partition name, it is invalid
in RPi3's config file. Change it to filesystem label which is
available in RPi3 and ARTIK target.
In addition, all reference targets are using partition/filesystem
name in lowercase. So use it as a default.

Change-Id: I49da6831b8663118af698f4e0733a8cba8d972b8
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMerge branch 'tizen' into tizen_4.0
Sunmin Lee [Tue, 19 Dec 2017 00:08:19 +0000 (09:08 +0900)]
Merge branch 'tizen' into tizen_4.0

Change-Id: Ic18bec6aeb90d8d44f563abe0697994c746595fa

6 years agoNew update type: PRE_UA
Sunmin Lee [Thu, 9 Nov 2017 12:00:30 +0000 (21:00 +0900)]
New update type: PRE_UA

Separate update type:
FULL_IMG)
 Generate update package with full image whether the image was
 in old image or not
PRE_UA)
 Special case of FULL_IMG - this image will be flashed by update
 -trigger in advance of update agent (UA)

Change-Id: I923a7f34adf4516587a2d40c9b8405eb127a77a2
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd ARTIK530_710 target
Kichan Kwon [Wed, 1 Nov 2017 11:25:16 +0000 (20:25 +0900)]
Add ARTIK530_710 target

- TODO : add routine for ramdisk(-recovery)

- Temporarily, make the EXCLUDED update type
  - Just (un)tar image and don't make delta
  - To extract delta.ua from ramdisk2

Change-Id: I9a342865a0e883343c04b3de3907dbd30d7372f1
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoCleanup previous residues for delta generating automation
Sunmin Lee [Wed, 8 Nov 2017 06:33:46 +0000 (15:33 +0900)]
Cleanup previous residues for delta generating automation

If delta generation is aborted during work, some remained
data could cause aborting at next work.
So before generate delta, cleanup them first.

Change-Id: I790fcab3d03a2a55156278b1716ffa32e730e904
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoTW1: Update recovery kernel
Sunmin Lee [Thu, 2 Nov 2017 09:54:16 +0000 (18:54 +0900)]
TW1: Update recovery kernel

Recovery kernel was introduced in Tizen 4.0.
This image also needs to be updated.

Change-Id: I5b52c77c4e23049c5a003c022eb8d4d737077a96
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoSupport specifying target for multi device env.
Sunmin Lee [Thu, 2 Nov 2017 00:42:27 +0000 (09:42 +0900)]
Support specifying target for multi device env.

Make upgrade-automation script use serial option of sdb
in order to support multi device connected environment.

Change-Id: Iebc5ae247df97e4f27feccb3a339addb6ded6261
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoBinary sameness is not an error
Sunmin Lee [Wed, 25 Oct 2017 10:19:45 +0000 (19:19 +0900)]
Binary sameness is not an error

It is not an error that some binary in both images are same
while generate delta.
It should be just skipped, not be aborted.

Change-Id: I49d179a148634247981cee8a2cbc8f50b4436c5b
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoIntegrate input config files
Kichan Kwon [Thu, 26 Oct 2017 02:31:33 +0000 (11:31 +0900)]
Integrate input config files

Change-Id: I69a90f0861f27418dc9500a963762d5018706811
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoUpdate type EXTRA is not suppoerted yet
Sunmin Lee [Tue, 17 Oct 2017 11:25:56 +0000 (20:25 +0900)]
Update type EXTRA is not suppoerted yet

EXTRA update for recovery is not fully supported yet.
Disable this option.

Change-Id: I14e7810bb7784600a28ed2ad87adf2187059c6ea
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMerge "Add TW2 target" into tizen
Sunmin Lee [Tue, 24 Oct 2017 10:57:04 +0000 (10:57 +0000)]
Merge "Add TW2 target" into tizen

6 years agoRemove experimental code and add fix for symlinks
shirsh.kumar [Wed, 20 Sep 2017 10:26:41 +0000 (15:56 +0530)]
Remove experimental code and add fix for symlinks

Change-Id: Ifca98ae5fd8449f3f2a7e0aa012fcb099e1b6680
Signed-off-by: shirsh.kumar <shirsh.kumar@samsung.com>
6 years agoAdd TW2 target
Sunmin Lee [Tue, 17 Oct 2017 11:22:45 +0000 (20:22 +0900)]
Add TW2 target

Change-Id: If3ce8b985df611feb0acbc40c6e2a5f8ed9bbbd3
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd README
Sunmin Lee [Mon, 25 Sep 2017 02:08:56 +0000 (11:08 +0900)]
Add README

Change-Id: I0a23aaba0bef99eafe5fec961dde97f61d772346
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoupgrade-automation.sh: get update package directly
Sunmin Lee [Fri, 8 Sep 2017 00:04:47 +0000 (09:04 +0900)]
upgrade-automation.sh: get update package directly

Simplify the interface of upgrade automation script
to use update pacakge (delta.tar) directly rather than find it.

Change-Id: Id997275659e427d88f41de77783f6bf544316ed8
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoDetach meaningless "-d" option from sdb
Kichan Kwon [Wed, 20 Sep 2017 08:19:09 +0000 (17:19 +0900)]
Detach meaningless "-d" option from sdb

- "-d" option is used for selecting target device
- Therefore, we don't have to use it without argument
- Moreover, it can be occur error when the target device
  is connected with ethernet

Change-Id: Ieef57be3fff4b765ad05f772b5c23d7dac90a356
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
6 years agoUpdate package with some binaries extracted from image
Sunmin Lee [Mon, 4 Sep 2017 03:30:09 +0000 (12:30 +0900)]
Update package with some binaries extracted from image

Some binaries which is necessary for upgrade have to be extracted
from image of new version. This patch implements file extracting
function for this reason.

Change-Id: Iecf9598e169bb307d7ec5c02e6deea3ae7d1714b
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd automated upgrade script tool
Sunmin Lee [Mon, 28 Aug 2017 02:55:13 +0000 (11:55 +0900)]
Add automated upgrade script tool

This patch provides a script for automated upgrade.
- upgrade-automation.sh: script for automated upgrade test with device

Change-Id: I84add57261f2d10d13fdc35f9fccd5ed29899cec
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd automated delta generation script
Sunmin Lee [Mon, 28 Aug 2017 02:55:13 +0000 (11:55 +0900)]
Add automated delta generation script

This patch provides a script for automated delta generation.

Change-Id: I688a1af6c0779cb1d75acf46bffb58c3dab92d4b
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoFULL_IMG delta in case of missing in old_tar
Sunmin Lee [Fri, 25 Aug 2017 01:11:37 +0000 (10:11 +0900)]
FULL_IMG delta in case of missing in old_tar

Until tizen 3.0, ramdisk images had not been supported.
It causes that the upg cannot generate delta of ramdisks
because they are missing.

This patch supports FULL_IMG in case of not in old_tar
just includes full image as raw data which can be used
at client.

Change-Id: I0d89e86dbac363300ac5f7eb4dcd6e849ecd5fa1
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoCreate delta.tar with delta.ua in it
Sunmin Lee [Thu, 25 May 2017 06:03:43 +0000 (15:03 +0900)]
Create delta.tar with delta.ua in it

delta.ua should be included into delta package (delta.tar), too.
It would be extracted from RAMDISK2 of new binary.

Change-Id: Icb8b89b61ad3095b62bace19875e1ab6c2965115
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoUnify UPG bin directory
Sunmin Lee [Wed, 23 Aug 2017 09:18:16 +0000 (18:18 +0900)]
Unify UPG bin directory

Most of bin scripts in each target is same.
There is no reason of separating bin directory at each target.
This patch integrates these scripts to common bin diretory.

Change-Id: Icf7597a25a196f43666683c0de5fb7b9dfc3d977
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoInitial codes of tota-upg
Sunmin Lee [Fri, 14 Jul 2017 05:34:38 +0000 (14:34 +0900)]
Initial codes of tota-upg

Change-Id: I5bef4311c1ceb5a91d836f4aed9aefd7d7c0f5af

6 years agoInitial empty repository
Tizen Infrastructure [Mon, 3 Jul 2017 03:47:08 +0000 (03:47 +0000)]
Initial empty repository