# \[WP7605\]\[Partition\] Update each partition by executing FW update

**URL:** https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083
**Category:** Legato Application Framework
**Created:** [March 17, 2020, 12:53am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083 "2020-03-17T00:53:57Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)
#### Post date: [March 17, 2020, 12:53am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/1 "2020-03-17T00:53:58Z")

</div>

Q1:  
After updating legato Framework(ex. legato-19.02.cwe), does it change only “mtd14 lefwkro”?

Q2:  
After updating legato Application(.update), does it change only “mtd16 userapp”?

Q3:  
Does “mtd15 swirw” equivalent to /mnt/userrw/?

Back Ground:  
I consider the case of updating each partition.  
And I would like to know whether user data will be erased after updating partition.

Regarding to the following ticket, it seems that user data is saved in /mnt/userrw.  
If Q1 to Q3 is all “Yes”, I don’t care my concern, that’s why I asked it.

> [@Create directory](https://forum.legato.io/t/create-directory/2504):
>
> Hi, I want to create directory, but system allows me to do it, only when in my .adef file sandboxed: false. I have got in .adef : requires: { dir: { /mnt/userrw / } } my .c file le\_result\_t Err = le\_dir\_Make(“/mnt/userrw/TestDir”, S\_IRUSR | S\_IWUSR); if(Err == LE\_DUPLICATE) { //System creates folder “/mnt/userrw/TestDir” but instead of Err == LE\_OK //I have got Err == LE\_DUPLICATE which is weird. } I am going to store data in files located in the folder, so I have to have pe…

Best Regards,

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [March 17, 2020, 2:31am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/2 "2020-03-17T02:31:18Z")

</div>

1. yes
2. yes
3. yes  
root@swi-mdm9x28-wp:~# df -h | grep ‘/mnt/userrw’  
/dev/ubi4\_0 8.7M 48.0K 8.1M 1% /mnt/userrw  
root@swi-mdm9x28-wp:~# more /proc/mtd  
dev: size erasesize name  
mtd0: 00280000 00040000 “sbl”  
mtd1: 00280000 00040000 “mibib”  
mtd2: 00680000 00040000 “backup”  
mtd3: 00100000 00040000 “security”  
mtd4: 00200000 00040000 “persist”  
mtd5: 01180000 00040000 “efs2”  
mtd6: 04f40000 00040000 “swifota”  
mtd7: 00180000 00040000 “tz”  
mtd8: 000c0000 00040000 “devcfg”  
mtd9: 000c0000 00040000 “rpm”  
mtd10: 02000000 00040000 “modem”  
mtd11: 00100000 00040000 “aboot”  
mtd12: 00f00000 00040000 “boot”  
mtd13: 01e00000 00040000 “system”  
mtd14: 008c0000 00040000 “lefwkro”  
mtd15: 01900000 00040000 “swirw”  
mtd16: 08300000 00040000 “userapp”  
mtd17: 03680000 00040000 “reserved”  
mtd18: 02180000 00040000 “slot\_2”  
mtd19: 02180000 00040000 “slot\_1”  
mtd20: 02180000 00040000 “slot\_0”  
root@swi-mdm9x28-wp:~# cat /sys/class/ubi/ubi4/mtd\_num  
15

---

<div class="post-metadata">

### Author: ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)
#### Post date: [March 27, 2020, 7:07am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/3 "2020-03-27T07:07:18Z")

</div>

Hi, jyijyi

I tested the following procedure.

(1) write legato application(.update)  
$update \<file.update\>

(2) write kernel image v19.10  
fwupdate download \<kernel19.10.cwe\>

(3) write kernel image v19.02  
fwupdate download \<kernel19.02.cwe\>

After (3), legato application is erased automatically.  
(Regarding to your answer, this legato application is saved in mtd16 userapp, so I think it is not erased by updating only kernel image.)

Regarding to (3), I get cwe file by executing “make wp76” to the following source code.  
[https://downloads.sierrawireless.com/legato/1911/legato-19.11.0.tar.bz2](https://downloads.sierrawireless.com/legato/1911/legato-19.11.0.tar.bz2)

Question:  
Could you tell me the reason why legato application is erased by the above sequence?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [March 27, 2020, 7:20am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/4 "2020-03-27T07:20:57Z")

</div>

can you try just upgrading with the same legato version on 19.2.0 instead of using 19.10.0 ?  
you can check by “legato version” where the string will be changed if you have upgrade successfully.

---

<div class="post-metadata">

### Author: ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)
#### Post date: [March 29, 2020, 11:31pm UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/5 "2020-03-29T23:31:40Z")

</div>

Hi, jyijyi

> > can you try just upgrading with the same legato version on 19.2.0 instead of using 19.10.0 ?

In that case, legato application is not removed automatically.  
I suspect if legato version is same before and after updating, legato application is kept.

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [March 30, 2020, 1:08am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/6 "2020-03-30T01:08:41Z")

</div>

Maybe it is because your application is not built with the new legato version.

---

<div class="post-metadata">

### Author: ![HIROKI11976](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@HIROKI11976](https://forum.legato.io/u/HIROKI11976)
#### Post date: [April 6, 2020, 8:22am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/7 "2020-04-06T08:22:10Z")

</div>

Hi, jyijyi

Sorry for late reply.  
As we tested, legato application was not removed after executing build once time.  
As the result, if legato framework is updated version, legato application is also needed to execute build in new legato framework.  
Is that right?

---

<div class="post-metadata">

### Author: ![jyijyi](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/jyijyi/32/822_2.png) [@jyijyi](https://forum.legato.io/u/jyijyi)
#### Post date: [April 6, 2020, 8:27am UTC](https://forum.legato.io/t/wp7605-partition-update-each-partition-by-executing-fw-update/5083/8 "2020-04-06T08:27:21Z")

</div>

Actually I advised you to build the application together with the new legato.cwe.  
In this case, you don’t need to care about the above.
