platform/core/system/initrd-fota.git
21 months agoMount hal partition during RW-Upgrade 42/278742/1 accepted/tizen/unified/20220726.012304 submit/tizen/20220725.143901
Mateusz Moscicki [Mon, 25 Jul 2022 13:40:06 +0000 (15:40 +0200)]
Mount hal partition during RW-Upgrade

Not mounting hal partition results in not mounting inform partition, and
this makes it impossible to change the reboot parameter.

Change-Id: Ia72423392606a9986f55045e7cfb4c4adbfcbb4a

21 months agoMount hal partition as read-only 37/278737/2
Mateusz Moscicki [Mon, 25 Jul 2022 12:50:27 +0000 (14:50 +0200)]
Mount hal partition as read-only

We don't want the data on this partition to change so that it can be
upgraded with DELTA_IMAGE upgrade.

Change-Id: I87487d345e48f0545361924ecc69788ade462649

21 months agoRename veritytool package to verity-tools 18/278318/1 accepted/tizen/unified/20220720.034145 submit/tizen/20220719.050530
Hyotaek Shim [Tue, 19 Jul 2022 04:50:07 +0000 (13:50 +0900)]
Rename veritytool package to verity-tools

Change-Id: Ie178da798d1ef7829f19980b46aac990382023eb
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
22 months agoAdd '-l' option to blkid for optimization 36/276136/1 accepted/tizen/unified/20220701.055243 submit/tizen/20220630.103030
SangYoun Kwak [Fri, 10 Jun 2022 04:25:20 +0000 (13:25 +0900)]
Add '-l' option to blkid for optimization

Change-Id: Ibd6c82033e57e6e87df35390c0d1da914329b5be
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
23 months agoRun systemd directly 87/274887/1
Mateusz Moscicki [Wed, 11 May 2022 10:05:18 +0000 (12:05 +0200)]
Run systemd directly

It may be that /sbin/init is a symbolic link to systemd-bootchart which
does not support the --unit option. In this case, the system will not
boot. Therefore it is necessary to run systemd directly.

Change-Id: I49b56c245ad8ffb7e42620787a3c4183180fd42f

2 years agoMove partitions restore to the initrd-recovery package 88/274388/1
Mateusz Moscicki [Tue, 26 Apr 2022 14:26:53 +0000 (16:26 +0200)]
Move partitions restore to the initrd-recovery package

Change-Id: Ia4ff4ba87f4a48e294f3baec76ec28857806d685

2 years agoMove bow-restore to a separate package 87/274387/1
Mateusz Moscicki [Tue, 26 Apr 2022 14:04:17 +0000 (16:04 +0200)]
Move bow-restore to a separate package

Change-Id: I6898d19f61c5e0282b0de87d8fbcfb42bdbdd682

2 years agoRemove support for BTRFS 86/274386/1
Mateusz Moscicki [Mon, 25 Apr 2022 14:27:35 +0000 (16:27 +0200)]
Remove support for BTRFS

Change-Id: Ibe03cda03f8494b17b37b3d6f6c7f165f021e34d

2 years agoMerge branch 'tizen_6.5' into tizen 00/272000/1
Mateusz Moscicki [Fri, 4 Mar 2022 10:40:45 +0000 (11:40 +0100)]
Merge branch 'tizen_6.5' into tizen

Change-Id: I4435a06c7ee2ea62fd2ab8e5db0418a3e138a4e7

2 years agoPrint booting information in /proc/cmdline, change function name 61/271961/1
SangYoun Kwak [Thu, 3 Mar 2022 08:28:42 +0000 (17:28 +0900)]
Print booting information in /proc/cmdline, change function name

print example
: [fota-init.sh][Info] Initrd-fota booting (/proc/cmdline bootmode=fota partition_ab=a root=/dev/mmcblk1p60)

Change-Id: Ic37dbced7ae60fb5922ca15d8e2aee04a97db70d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoPrint booting information in /proc/cmdline, change function name 29/271929/2
SangYoun Kwak [Thu, 3 Mar 2022 08:28:42 +0000 (17:28 +0900)]
Print booting information in /proc/cmdline, change function name

print example
: [fota-init.sh][Info] Initrd-fota booting (/proc/cmdline bootmode=fota partition_ab=a root=/dev/mmcblk1p60)

Change-Id: Ic37dbced7ae60fb5922ca15d8e2aee04a97db70d
Signed-off-by: SangYoun Kwak <sy.kwak@samsung.com>
2 years agoSet UPGRADE_SUCCESS to commit data in case of A/B upgrade 05/271805/1
Mateusz Moscicki [Tue, 1 Mar 2022 14:21:37 +0000 (15:21 +0100)]
Set UPGRADE_SUCCESS to commit data in case of A/B upgrade

Change-Id: I44116fee97e75fd15d7c9438923c34ec4ecd5f84

2 years agoMerge remote-tracking branch 'origin/tizen_6.5' into tizen 69/271469/1 accepted/tizen/unified/20220222.034426 submit/tizen/20220221.170321
Mateusz Moscicki [Mon, 21 Feb 2022 16:26:16 +0000 (17:26 +0100)]
Merge remote-tracking branch 'origin/tizen_6.5' into tizen

Change-Id: I2a575f0c1bda904d43abba76ebfdc026f16988dc

2 years agoAdd support for rootfs with dm-verity 31/270431/3 accepted/tizen/6.5/unified/20220222.132753 submit/tizen_6.5/20220221.170828
Mateusz Moscicki [Wed, 2 Feb 2022 13:46:19 +0000 (14:46 +0100)]
Add support for rootfs with dm-verity

Change-Id: I549bae94aeedfd979d1086f26ed43bc7fc7f0bcc

2 years agoMount the appropriate A/B partition in fus_rw-init.sh 18/268418/2 accepted/tizen/6.5/unified/20211231.161227 submit/tizen_6.5/20211224.120416 submit/tizen_6.5/20211229.171734
Mateusz Moscicki [Wed, 22 Dec 2021 11:13:45 +0000 (12:13 +0100)]
Mount the appropriate A/B partition in fus_rw-init.sh

Change-Id: I5ade77b5f5bb48be9703ff67cbf9d3d4d79b1143

2 years agoSkip RO Update if an A/B Upgrade has been detected 70/268270/3
Mateusz Moscicki [Fri, 17 Dec 2021 15:24:59 +0000 (16:24 +0100)]
Skip RO Update if an A/B Upgrade has been detected

Change-Id: Ie9f52fa4a207ab7dbf43a248ee87ac5505b94267

2 years agoMerge branch 'tizen' into tizen_6.5 75/267775/1 accepted/tizen/6.5/unified/20211212.212902 submit/tizen_6.5/20211209.154403
Mateusz Moscicki [Thu, 9 Dec 2021 14:04:30 +0000 (15:04 +0100)]
Merge branch 'tizen' into tizen_6.5

Change-Id: Id7307e0f9cc34bc236772959972bc1dfac085ac8

2 years agoChange the FAKE_ROOT to the /run/upgrade-sysroot 80/267680/1 accepted/tizen/unified/20211213.133541 accepted/tizen/unified/20211231.161351 submit/tizen/20211209.154145 submit/tizen/20211230.132434
Mateusz Moscicki [Tue, 7 Dec 2021 11:20:02 +0000 (12:20 +0100)]
Change the FAKE_ROOT to the /run/upgrade-sysroot

Change-Id: If374220e9c9b59d97ae678811253f53a1c873207

2 years agoMerge branch 'tizen' into tizen_6.5 62/267262/1 accepted/tizen/6.5/unified/20211201.221709 submit/tizen_6.5/20211130.134151
Mateusz Moscicki [Tue, 30 Nov 2021 12:49:27 +0000 (13:49 +0100)]
Merge branch 'tizen' into tizen_6.5

Change-Id: Ia9b79dc0b3d553f7743d64f795c48651a2f1ce20

2 years agoDifferentiates how HAL partition is threaded depending on whether it's A/B update... 91/266991/2 accepted/tizen/unified/20211130.125542 submit/tizen/20211129.232451
Mateusz Moscicki [Tue, 23 Nov 2021 15:36:32 +0000 (16:36 +0100)]
Differentiates how HAL partition is threaded depending on whether it's A/B update or not

For A/B upgrades the HAL partition is expected to be present in both the
A and B variants. However for non-A/B upgrades, the HAL partition must
be included in the checpoint and restore mechanism.

Change-Id: I2e1bd146d0de96a9d4f59667832eb1f1bf1c1cfa

2 years agoJump to ramdisk if there is A/B Update 93/265793/4 accepted/tizen/unified/20211123.143832 submit/tizen/20211116.140204 submit/tizen/20211119.125959
Mateusz Moscicki [Thu, 28 Oct 2021 15:02:03 +0000 (17:02 +0200)]
Jump to ramdisk if there is A/B Update

Change-Id: If703bc3ab5efce19d5c8d101a6bae58f90af2d63

2 years agoRemove unnecessary dependency, Requires: dbus-libs 86/265886/1 accepted/tizen/6.5/unified/20211109.041734 submit/tizen_6.5/20211108.033656
Hyotaek Shim [Thu, 7 Oct 2021 01:08:39 +0000 (10:08 +0900)]
Remove unnecessary dependency, Requires: dbus-libs

Change-Id: I59fa1a22c2d98567284b06883213964a146a161d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit f5fa22cd5897cd54f0d60305c8e895bf85782375)

2 years agoRemove unnecessary dependency, Requires: dbus-libs 05/265005/3 accepted/tizen/unified/20211108.181424 submit/tizen/20211103.072537 submit/tizen/20211104.092607 submit/tizen_base/20211104.091630
Hyotaek Shim [Thu, 7 Oct 2021 01:08:39 +0000 (10:08 +0900)]
Remove unnecessary dependency, Requires: dbus-libs

Change-Id: I59fa1a22c2d98567284b06883213964a146a161d
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
2 years agoAdd support for checkpoint & restore on hal partition. 67/264467/2 accepted/tizen/6.5/unified/20211028.114820 accepted/tizen/unified/20210926.235754 submit/tizen/20210924.144745 submit/tizen_6.5/20211028.162501 tizen_6.5.m2_release
Ernest Borowski [Wed, 22 Sep 2021 17:19:58 +0000 (17:19 +0000)]
Add support for checkpoint & restore on  hal partition.

This change is required to support updating /hal partition upgrade
during fota.

Change-Id: I3dfeb490907711813273cf0261f530ba15d1eeec
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agoMerge "Fix coverity issues - resource leak, checked_return" into tizen accepted/tizen/unified/20210903.143004 submit/tizen/20210827.155605
Karol Lewandowski [Fri, 27 Aug 2021 15:55:20 +0000 (15:55 +0000)]
Merge "Fix coverity issues - resource leak, checked_return" into tizen

2 years agoFix coverity issues - resource leak, checked_return 97/263197/1
Mateusz Moscicki [Fri, 27 Aug 2021 09:48:33 +0000 (11:48 +0200)]
Fix coverity issues - resource leak, checked_return

Change-Id: I7acfb211ae205e0bff33f8ac01d746621beec1bc

2 years agoMerge "change restore mechanism on btrfs filesystem." into tizen accepted/tizen/unified/20210829.234849 submit/tizen/20210826.114923 submit/tizen/20210827.084901
Karol Lewandowski [Thu, 26 Aug 2021 11:03:50 +0000 (11:03 +0000)]
Merge "change restore mechanism on btrfs filesystem." into tizen

2 years agochange restore mechanism on btrfs filesystem. 83/262783/4
Ernest Borowski [Thu, 19 Aug 2021 20:35:55 +0000 (20:35 +0000)]
change restore mechanism on btrfs filesystem.

Use subvolumes instead of cp to restore files, this will speedup
restore and reduce local memory requirements.

After update system will have ROOTFS subvolume located at root volume.
/ -- root volume
/ROOTFS -- subvolume with actual data.

ROOTFS subvolume is set as default one, so it will be transparent to
system after update because mount will mount it at /.

Change-Id: Ie2d47962bab01537fdcbe1430dff3e3465fb7c09
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agoMount hal partion when you update RW partition 70/262870/3 accepted/tizen/unified/20210824.123732 submit/tizen/20210823.144901
INSUN PYO [Mon, 23 Aug 2021 01:31:20 +0000 (10:31 +0900)]
Mount hal partion when you update RW partition

Some unit, mnt-inform.mount, requires /hal partition.

Change-Id: Ifb7d3619d8d2fbb8113508812a2f5be9c928a0c6

2 years agoAdd support for btrfs snapshot in RO update. 01/260801/13 submit/tizen/20210817.140154
Ernest Borowski [Wed, 30 Jun 2021 12:26:38 +0000 (12:26 +0000)]
Add support for btrfs snapshot in RO update.

Checkpoint & restore mechanism prevents data loss during RO update
caused by e.g. power loss.

Change-Id: If9e649731da550120db3daaeb7ec21f3c56a76d4
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
2 years agoAdd test to automatically validate checkpoint & restore 50/261950/1
Mateusz Moscicki [Fri, 2 Jul 2021 14:55:52 +0000 (16:55 +0200)]
Add test to automatically validate checkpoint & restore

To enable validation, create the appropriate file with content "INIT" on
inform partition before executing the system upgrade:

/mnt/inform/restart-progress-rw - to validate C&R during RW update
/mnt/inform/restart-progress-ro - to validate C&R during RO update

eg.:
    echo INIT > /mnt/inform/restart-progress-ro

Note:
    For RW update validation it is needed to set smack label:

    chsmack -a _ /mnt/inform/restart-progress-rw

During the upgrade, the progress_restart script will keep track of the
upgrade progress and when it increases by a set value, it will perform a
system reset.

Once all restarts are done, the upgrade should be successful.

Change-Id: Id10eb03b7aeaa28c598891ae39a455a4dbf5273e

2 years agoAdd checkpoint & restore 49/261949/1
Mateusz Moscicki [Tue, 29 Jun 2021 12:05:47 +0000 (14:05 +0200)]
Add checkpoint & restore

To protect the system upgrade process in case of power failure, the
checkpoint & restore mechanism is used.

Algorithm:

  1. If there is any checkpoint on partition, the data is restored,
     because it means the previous upgrade attempt failed.
  2. When mounting a partition, a data checkpoint is created.
  3. The update is proceeding as before.
  4. If the update is successful, the data is commited.

Change-Id: I26dac82c629d7d71b31a3dafcc5b8e8b6887c8d2

2 years agofota-init.sh: improve logging: 70/257570/4 accepted/tizen/unified/20210526.051946 submit/tizen/20210514.153447
Ernest Borowski [Tue, 27 Apr 2021 16:46:31 +0000 (16:46 +0000)]
fota-init.sh: improve logging:

- Add log helper function which can log to stdout and file

logging format:
[script-name][tag]actual_log
currently supported tag formats: [Error] [Info]

Change-Id: I89dd70a4a83356fb5cfd0787773a1f656e80ed09
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
3 years agoFix fota-init.sh script: 68/257568/1
Ernest Borowski [Tue, 27 Apr 2021 12:12:25 +0000 (12:12 +0000)]
Fix fota-init.sh script:

- Add missing ""
- Fix spelling in log messages
- Improve error handling
- Other script improvements
- Ensure that rm -rf newer expands to /*

Change-Id: I6c6a863886ec42e4affcd6ab7f41af01db9d4e6a
Signed-off-by: Ernest Borowski <e.borowski@samsung.com>
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>
5 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