platform/core/system/initrd-fota.git
3 years agoAdd option to perform update on other filesystems. 81/254181/2
Ernest Borowski [Mon, 22 Feb 2021 16:42:37 +0000 (16:42 +0000)]
Add option to perform update on other filesystems.

Mount does not need -t option.
According to man pages it will automatically guess correct filesystem
based on blkid library, /etc/filesystems or procfs.

This change is needed because Tizen images uses other filesystems sych
as btrfs.

Change-Id: Ia26fed351c35cb14eb55d1e2c798dea35faed806
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
3 years agoRequest to terminate UI app after whole processes are finished 52/246952/1 accepted/tizen/unified/20201110.125001 submit/tizen/20201110.022441
Kichan Kwon [Thu, 5 Nov 2020 08:49:35 +0000 (17:49 +0900)]
Request to terminate UI app after whole processes are finished

- In current, UI app terminates when progress is 100%
  - It means only tota-ua is finished
- However, there are some post processes
  - e.g. dm-verity hash remaking
- To prevent black screen during post process,
  UI app will not be terminated until initrd-fota requests

Change-Id: I9e4ff181f17f9db76917fa765c092451412dfdba
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRemove restore passwd script 94/246494/1 accepted/tizen/unified/20201109.123536 submit/tizen/20201104.032152 submit/tizen/20201104.064230
Jeon Sang-Heon [Fri, 30 Oct 2020 14:12:51 +0000 (14:12 +0000)]
Remove restore passwd script

When doing OS upgrade, restoring passwd should not be worked at initrd fota.
It will be added to rw migration script, so removed it first.

Change-Id: Iaf7b04261810682b5b7da478ef3f0f8cc24706ca
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoCheck the result of hash remaking 36/246436/1
Kichan Kwon [Thu, 29 Oct 2020 01:43:57 +0000 (10:43 +0900)]
Check the result of hash remaking

Change-Id: I3b34d42570f712099aa7bafc641ef95fccd912c8
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRemake dm-verity hash table for updated rootfs 31/246031/2
Kichan Kwon [Thu, 22 Oct 2020 10:23:35 +0000 (19:23 +0900)]
Remake dm-verity hash table for updated rootfs

Change-Id: I1b22dcc1da3a0ac386007f71a076022a4ab623a3
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoEnter debug mode before RW mount 30/246030/1
Kichan Kwon [Wed, 14 Oct 2020 08:41:42 +0000 (17:41 +0900)]
Enter debug mode before RW mount

- Remounting modifies superblock
  - If dm-verity is applied, it causes kernel panic

Change-Id: I8c003dda95d1a926ad2fa6020b69cf3c51c99d06
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoUse /dev/console instead of specific port number 44/245544/1
Kichan Kwon [Mon, 12 Oct 2020 06:38:38 +0000 (15:38 +0900)]
Use /dev/console instead of specific port number

- Console-connected serial port number depends on device
- With using /dev/console, we don't have to care
  which port is connected
- Reference
  - https://github.com/torvalds/linux/blob/master/Documentation/admin-guide/serial-console.rst

Change-Id: Ia852951e1e24c6a1cacac279b719fa00c9f5d890
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoUpdate img-verifier usage 81/244781/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.115546 accepted/tizen/6.0/unified/hotfix/20201103.004117 accepted/tizen/unified/20200928.072838 submit/tizen/20200925.063159 submit/tizen_6.0/20201029.205104 submit/tizen_6.0_hotfix/20201102.192504 submit/tizen_6.0_hotfix/20201103.114804 tizen_6.0.m2_release
Kichan Kwon [Thu, 24 Sep 2020 07:03:38 +0000 (16:03 +0900)]
Update img-verifier usage

Change-Id: If7b797852ad8bffeed1fa6927784079ae6b7165f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoRename upg-verifier to img-verifier 89/242089/2 accepted/tizen/unified/20200828.121422 submit/tizen/20200826.021350 submit/tizen/20200826.021413 submit/tizen/20200828.071117
Kichan Kwon [Mon, 24 Aug 2020 05:41:09 +0000 (14:41 +0900)]
Rename upg-verifier to img-verifier

Change-Id: I83273a54f81e9b8609231f032cccead4682e2b0a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAllow only debug mode file made by root 38/237538/4 accepted/tizen/unified/20200706.010554 submit/tizen/20200703.061933
Kichan Kwon [Wed, 1 Jul 2020 06:46:57 +0000 (15:46 +0900)]
Allow only debug mode file made by root

Change-Id: I05f311815c6192199a3332a338c717db4e4bd92a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoProvide debug mode before RO update 03/235903/5
Kichan Kwon [Thu, 11 Jun 2020 02:15:46 +0000 (11:15 +0900)]
Provide debug mode before RO update

- Debug mode file : /opt/usr/.upgdebug_ro

Change-Id: Ief2c81df0bdeb8ac138c70fbc7ad55dbed40289b
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
3 years agoAdd default PATH variable to script 73/236773/1 accepted/tizen/unified/20200624.130211 submit/tizen/20200623.165859
Jeon Sang-Heon [Mon, 22 Jun 2020 13:01:02 +0000 (22:01 +0900)]
Add default PATH variable to script

- For security vulnerability, define default PATH variable to script

Change-Id: Idd18d39f6f51752c4e4bffdff2841a38921c3ab8
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoChange require libraries 39/236339/2
Jeon Sang-Heon [Tue, 16 Jun 2020 18:16:36 +0000 (03:16 +0900)]
Change require libraries

- Remove lib7zip.so, because it is not exist.
- Move libtota.so to tota-ua

Change-Id: I111400fc287979bf57fda3c9047bafd0b54249ce
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoFix lib path to support 64bit 17/236317/1 accepted/tizen/unified/20200616.170853 submit/tizen/20200616.181039
Jeon Sang-Heon [Tue, 16 Jun 2020 16:01:01 +0000 (01:01 +0900)]
Fix lib path to support 64bit

- Change hardcoded lib path(/usr/lib) to rpmlib macro({_libdir})
- Remove unused fota_gui_test

Change-Id: I5d0ea3539c1494ca998e009e4b1c11abc3b54b69
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
3 years agoEnable 64 bit 32/236232/1 accepted/tizen/unified/20200616.041010 submit/tizen/20200616.030922
Kunhoon Baik [Tue, 16 Jun 2020 01:22:37 +0000 (10:22 +0900)]
Enable 64 bit

Tizen will support 64 bit binary officially.
Initrd-Fota will be included to initrd-recovery partition.
Although initrd-recovery partition size is exceeded, Initrd-Fota will be applied

Change-Id: I44d194d1385a039d9cc4266e527447ec355c06a1

3 years agoPrevent unexpected fota dir removal 81/234981/1 accepted/tizen/unified/20200602.133127 submit/tizen/20200602.081629
Jeon Sang-Heon [Mon, 1 Jun 2020 08:45:15 +0000 (17:45 +0900)]
Prevent unexpected fota dir removal

- After RO upgrade was success, do not remove whole fota dir

Change-Id: I8539cec199b3f2586f02cd7b5045b0cfae8ed390
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoNo more check the number of partition from fstab 58/231558/1 accepted/tizen/unified/20200528.132850 submit/tizen/20200526.104742
Kichan Kwon [Wed, 22 Apr 2020 10:13:53 +0000 (19:13 +0900)]
No more check the number of partition from fstab

- No more partition information is updated to fstab
- FYI, mount path is fixed : /opt and /opt/usr

Change-Id: I5098ae587b5afd84add70e2ea912b352cfc81c9a
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
4 years agoAdd PATH variable to script 26/214226/1 accepted/tizen_5.5_unified accepted/tizen_5.5_unified_mobile_hotfix accepted/tizen_5.5_unified_wearable_hotfix tizen_5.5 tizen_5.5_mobile_hotfix tizen_5.5_tv tizen_5.5_wearable_hotfix accepted/tizen/5.5/unified/20191031.004250 accepted/tizen/5.5/unified/mobile/hotfix/20201027.090810 accepted/tizen/5.5/unified/wearable/hotfix/20201027.113424 accepted/tizen/unified/20191021.094651 submit/tizen/20190927.073401 submit/tizen/20191021.060145 submit/tizen_5.5/20191031.000010 submit/tizen_5.5_mobile_hotfix/20201026.185104 submit/tizen_5.5_wearable_hotfix/20201026.184304 tizen_5.5.m2_release
Jeon Sang-Heon [Thu, 19 Sep 2019 06:10:10 +0000 (15:10 +0900)]
Add PATH variable to script

Fixed security issue in restore-passwd.sh

Change-Id: I9a27b8407be5f741444a9e4916b6b94b27653167
Signed-off-by: Jeon Sang-Heon <sh95.jeon@samsung.com>
4 years agoRevert "Apply TZ_SYS_UPGRADE path to initrd scripts" 06/208506/2 accepted/tizen/unified/20190626.114504 submit/tizen/20190626.063141
Kichan Kwon [Tue, 25 Jun 2019 08:00:26 +0000 (17:00 +0900)]
Revert "Apply TZ_SYS_UPGRADE path to initrd scripts"

This reverts commit 24eccbbd98802c7d6ccab307b95b35ed62b4cbc8.

Change-Id: I1793aa1e4360a2e1038115446b9e6080dd89387f
Signed-off-by: Kichan Kwon <k_c.kwon@samsung.com>
5 years agoApply TZ_SYS_UPGRADE path to initrd scripts 67/185567/1 accepted/tizen_5.0_unified tizen_5.0 accepted/tizen/5.0/unified/20181102.020311 accepted/tizen/unified/20180806.075458 submit/tizen/20180801.085411 submit/tizen/20180803.005755 submit/tizen_5.0/20181101.000004
Sunmin Lee [Thu, 26 Jul 2018 01:02:25 +0000 (10:02 +0900)]
Apply TZ_SYS_UPGRADE path to initrd scripts

The new path config for upgrade is added so apply it.

Change-Id: I0af1caaa7173cb27423dfa7db70b765d72a1515d
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoRelease initrd-fota version 1.1.1 36/179336/1
Sunmin Lee [Wed, 16 May 2018 07:39:36 +0000 (16:39 +0900)]
Release initrd-fota version 1.1.1

Change-Id: I9ee7b7adbec9f39aaaf70978d3ea62697fe49be4

6 years agoAdd process for custom signature verifier 28/177028/1 accepted/tizen/unified/20180427.131025 submit/tizen/20180427.061142
Sunmin Lee [Tue, 24 Apr 2018 06:56:56 +0000 (15:56 +0900)]
Add process for custom signature verifier

If the custom signature verifier is included,
it would be executed before update.

Change-Id: Ic3e42b661856d9e6599ec2ef833aa1f30e95db01
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMerge branch 'tizen_4.0' into tizen 47/172247/1 accepted/tizen/unified/20180315.150755 submit/tizen/20180315.045201
Sunmin Lee [Fri, 9 Feb 2018 05:51:24 +0000 (14:51 +0900)]
Merge branch 'tizen_4.0' into tizen

Change-Id: I348ad56e03b7b97502261e30fda12626c94ce526

6 years agoRelease initrd-fota version 1.1.0 44/172244/1
Sunmin Lee [Fri, 9 Feb 2018 05:48:29 +0000 (14:48 +0900)]
Release initrd-fota version 1.1.0

Change-Id: Ia889465b7d2a9c099d009e57c6f85dc2c9d1e77b

6 years agorestore-passwd: overwrite passwd files with new ones 51/167051/1 accepted/tizen/4.0/unified/20180115.135643 submit/tizen_4.0/20180115.074644 tizen_4.0.IoT.p2_release
Sunmin Lee [Mon, 15 Jan 2018 05:16:31 +0000 (14:16 +0900)]
restore-passwd: overwrite passwd files with new ones

The usage of restore_backup_file was changed.
Add -f option to overwrite existing passwd files.

Change-Id: I1555b032587b9bffb2b2ac72770c0611fff0ad20
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agorestore-passwd.sh works in rootfs 81/164881/1 accepted/tizen/4.0/unified/20171222.062723 submit/tizen_4.0/20171221.103518
Sunmin Lee [Thu, 21 Dec 2017 09:56:54 +0000 (18:56 +0900)]
restore-passwd.sh works in rootfs

For some reason, restore-passwd.sh is required to be executed
in rootfs by chroot. This patch moves restore-passwd to rootfs.

Change-Id: I1c46a75af1e64788446a71c044e50afe7fa2feaf
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMerge passwd and shadow files with the old version files 31/161931/17 submit/tizen_4.0/20171221.050631
Hyotaek Shim [Tue, 28 Nov 2017 08:00:28 +0000 (17:00 +0900)]
Merge passwd and shadow files with the old version files

Change-Id: Ibd78b078187e84863402a311f043385a8478957b
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
6 years agoPatch for update scripts 37/164437/2 submit/sr/20171221.092955 submit/tizen_4.0/20171221.093123
Sunmin Lee [Thu, 9 Nov 2017 12:04:58 +0000 (21:04 +0900)]
Patch for update scripts

- Make part_tbl based on lowercase
- Use the same path for update (/opt/data/update)
- Change error code
- Remove delta after update succeeds

Change-Id: I7e4a193b184f7a00119f88c6add9848185c88014
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd required package 05/163005/1 accepted/tizen/4.0/unified/20171212.064831 submit/tizen_4.0/20171211.065239
Sunmin Lee [Thu, 7 Dec 2017 01:21:35 +0000 (10:21 +0900)]
Add required package

intird-fota requires initrd-recovery.
State this dependency.

Change-Id: I7dff2729daa2c6688e2e51686e91b7b0dca9957b
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMerge branch 'tizen_4.0' into tizen 67/159367/1 accepted/tizen/unified/20171109.124902 submit/tizen/20171109.022650
Sunmin Lee [Wed, 8 Nov 2017 10:33:59 +0000 (19:33 +0900)]
Merge branch 'tizen_4.0' into tizen

- Unify update parameter to fota
- Disable debugging mode for upgrade failure

Change-Id: I7b9f8026e6f092994576d69c0f94c2ca21f28479

6 years agoDisable debugging mode for upgrade failure 65/159365/1 accepted/tizen/4.0/unified/20171110.071342 submit/tizen_4.0/20171109.022626
Sunmin Lee [Wed, 8 Nov 2017 08:59:41 +0000 (17:59 +0900)]
Disable debugging mode for upgrade failure

The debugging mode for upgrade failure is not necessary anymore.

Change-Id: I242026e03f1f93bc9e9568fe0cf5217d91e74047
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoUnify update parameter to fota 59/158759/1
Sunmin Lee [Fri, 3 Nov 2017 01:18:27 +0000 (10:18 +0900)]
Unify update parameter to fota

It was decided that the "fota" is the update parameter for
all target.

Change-Id: I8d2d0034e5c71c76e037e6372572c614a971602c
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoRelease 1.0.0 31/157631/1 accepted/tizen/unified/20171031.055627 submit/tizen/20171027.093656 submit/tizen/20171027.100102
Sunmin Lee [Wed, 25 Oct 2017 07:47:42 +0000 (16:47 +0900)]
Release 1.0.0

initrd-fota for Tizen 4.0 is released

Change-Id: Ic0db9be348575929f2824b6fe0f2749a22e07291
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoEliminate partx dependency 60/156460/1 accepted/tizen/4.0/unified/20171019.082033 submit/tizen_4.0/20171018.130452 tizen_4.0.m2_release
Sunmin Lee [Wed, 18 Oct 2017 11:00:47 +0000 (20:00 +0900)]
Eliminate partx dependency

The blkid can covers all the operations in fota/fus_rw script.
Because partx is supposed to be dropped from initrd-recovery,
eliminate partx in initrd-fota, too.

Change-Id: I8c16ceab2e2a51ec666e4480a8f5a0eb2f827774
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoPatch for GUI in RO update 79/150279/4 accepted/tizen/4.0/unified/20171011.150236 submit/tizen_4.0/20171010.092649 submit/tizen_4.0/20171010.115426 tizen_4.0.IoT.p1_release
Sunmin Lee [Fri, 15 Sep 2017 03:07:02 +0000 (12:07 +0900)]
Patch for GUI in RO update

Set some env values for GUI and initiate it
in RO update step.
This patch enables GUI feature.

Change-Id: I184a9faf8c9750fbbb16952a64c00dba587e3086
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoAdd license text 03/151003/2 accepted/tizen/4.0/unified/20170920.081655 submit/tizen_4.0/20170919.101719
Sunmin Lee [Tue, 19 Sep 2017 09:51:07 +0000 (18:51 +0900)]
Add license text

Change-Id: I0800074f59193d6c8f35b55742dcede98c883359
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoRevert "MV passwd backup script to initrd-recovery" 70/146170/1 accepted/tizen/4.0/unified/20170904.143548 accepted/tizen/unified/20170828.163931 submit/tizen/20170825.073115 submit/tizen_4.0/20170830.025641 submit/tizen_4.0/20170901.015617
Sunmin Lee [Fri, 25 Aug 2017 07:25:10 +0000 (16:25 +0900)]
Revert "MV passwd backup script to initrd-recovery"

This reverts commit ca7a1bb9a486d7d7a34c70fc870598364443225d.

Change-Id: Id0b13bdd18a7b4f717f0fb79f240fe00f72339fa

6 years agoPatch for 2 partitions compatibility 84/144484/2 accepted/tizen/unified/20170824.050910 submit/tizen/20170823.081423
Sunmin Lee [Thu, 17 Aug 2017 02:38:09 +0000 (11:38 +0900)]
Patch for 2 partitions compatibility

At some target, there are only 2 partitions without user partition.
In this case, mount unused partition could cause abnormal operation.
This patch checks whether the target is 2 partition platform
by referring to fstab

Change-Id: I882ce9b74f44dacd73fa114ff83f6e9e6d1c4e40
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoRemove awk dependency 94/143594/3
Sunmin Lee [Thu, 10 Aug 2017 11:19:32 +0000 (20:19 +0900)]
Remove awk dependency

To be optimized, awk package got out of initrd-recovery.
So, make the same code using coreutil commands instead of awk.

Change-Id: I0273848348ebc5bb97c921a0af7b8c3a554c3066
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoMV passwd backup script to initrd-recovery 19/145219/1
Sunmin Lee [Mon, 21 Aug 2017 23:36:04 +0000 (08:36 +0900)]
MV passwd backup script to initrd-recovery

This script doesn't need to be rootfs.
Move this file to initrd-recovery.

Change-Id: Ia6e6a779df746317bbcf1938ef4d9b8b40c1dbf9
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoApply new copy mode for generting recovery partition image 35/143235/3
Kunhoon Baik [Wed, 9 Aug 2017 07:01:02 +0000 (16:01 +0900)]
Apply new copy mode for generting recovery partition image

Related to https://review.tizen.org/gerrit/143234,
The new copy mode is applied to fota list.

Change-Id: I3e889929a641630018052e884ead7bf29906c731

6 years agoMinor Fixes for supporting RPI3 12/143012/3
Kunhoon Baik [Tue, 8 Aug 2017 07:07:55 +0000 (16:07 +0900)]
Minor Fixes for supporting RPI3

a) upgrade-init
   : Tizen uses upgrade mode not fota mode in official binary.
   : We are supporting two modes for all reference targets - fota & upgrade
b) Minor debug feature
   : In generic(release mode), if upgrade is failed,
     system should be automatically aborted(rebooted) from recovery initrd
   : However, the shell will be created in debug mode.

Change-Id: Ic42aa9f938df74dfcedfb73beb45c9f1a9eda63c

6 years agoBLKID for PARTX not supported target 14/143414/2
Sunmin Lee [Wed, 9 Aug 2017 23:37:55 +0000 (08:37 +0900)]
BLKID for PARTX not supported target

In case of no partition name in some profile,
it can not get block device path properly.

BLKID, could be the substitution of PARTX.
BLKID would be used in case of some targets
that PARTX is not supported.

Change-Id: Ib98fb9358ef027e2673aaea3b5c7593a389d4d7d
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoPrepatch: restore passwd files 45/139045/7 accepted/tizen/4.0/unified/20170816.013025 accepted/tizen/4.0/unified/20170829.015911 accepted/tizen/unified/20170721.024542 submit/tizen/20170720.093148 submit/tizen_4.0/20170811.094300 submit/tizen_4.0/20170828.100004 submit/tizen_4.0/20170828.110004
Sunmin Lee [Mon, 17 Jul 2017 05:14:36 +0000 (14:14 +0900)]
Prepatch: restore passwd files

From Tizen 4.0, passwd files (/etc/{passwd,shadow,group,gshadow})
were moved to RW partition (/opt/etc).
Therefore, they needed to be recovered during update process.

Change-Id: I3ef0f525adf5b45b9ec77d047f16f5c572fe46ab
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoRW update: Systemd offline update 19/138819/6 accepted/tizen/unified/20170719.131747 submit/tizen/20170718.084230
Sunmin Lee [Wed, 12 Jul 2017 07:16:52 +0000 (16:16 +0900)]
RW update: Systemd offline update

This patch implements systemd based RW update
redirection.

Change-Id: I1123c46710eb75aa0841c1f7fa242c17ffa1d6b5
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoUpload initial initrd-fota 76/133676/8
Sunmin Lee [Tue, 13 Jun 2017 05:49:43 +0000 (14:49 +0900)]
Upload initial initrd-fota

Upload initial initrd-fota codes based on reference repository.

Change-Id: I2b5c78386e6a9e202eb450425b8273ea9750a82a
Signed-off-by: Sunmin Lee <sunm.lee@samsung.com>
6 years agoInitial empty repository master submit/trunk/20200602.081603
Tizen Infrastructure [Wed, 31 May 2017 03:21:23 +0000 (03:21 +0000)]
Initial empty repository