# Reducing the size of Legato.cwe

**URL:** <https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706>\
**Category:** Legato Application Framework\
**Created:** [March 4, 2024, 4:19am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706 "2024-03-04T04:19:48Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [March 4, 2024, 4:19am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/1 "2024-03-04T04:19:49Z")

</div>

I want to reduce the legato.cwe size to less than 6MB can anyone adivse on how we can do it. I am not using AirVantage serivces and apps.

The only thing I need is the legato tools and Data Connection service.

Attached is my testbuild.sdef and the default.sdef  
[default.sdef](https://forum.legato.io/uploads/short-url/sEqtqyEh2uuYYUAtETUYVyC5P2U.sdef) (3.7 KB)

[testbuild.sdef](https://forum.legato.io/uploads/short-url/6ykDPH77mxP5Zu3oBCbCuGi7haP.sdef) (2.4 KB)

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [March 4, 2024, 4:23am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/2 "2024-03-04T04:23:02Z")

</div>

Attached is the platformBuildVars.sinc file I do not use Audio, ecall, secure storage in my legato app and therefore don’t need in my final cwe file. How can I remove the unwanted platform adapters to reduce the size of my final legato.cwe binary?  
[platformBuildVars.sinc](https://forum.legato.io/uploads/short-url/e9X8XZwTQZ6FLxzQJBaEsO94cv9.sinc) (2.3 KB)

---

<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 4, 2024, 6:09am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/3 "2024-03-04T06:09:18Z")

</div>

does this work?  
Since no validation before on this setting, you need to build it and verify on your board.

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [March 4, 2024, 6:20am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/4 "2024-03-04T06:20:03Z")

</div>

yes the basic legato works fine but I want to reduce the size further please advise

---

<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 4, 2024, 6:21am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/5 "2024-03-04T06:21:33Z")

</div>

i saw there is still some application in default.sdef, have you tried to further comment out some of them?

BTW, why don’t use the OCT to enable the AT!PARTITION to enlarge the legato partition?

---

<div class="post-metadata">

**Author:** ![gi1](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@gi1](https://forum.legato.io/u/gi1)\
**Post date:** [May 26, 2024, 12:35pm UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/6 "2024-05-26T12:35:59Z")

</div>

Did you solved? Got same problem here.

regards.

---

<div class="post-metadata">

**Author:** ![Pankaj](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.legato.io/pankaj/32/1317_2.png) [@Pankaj](https://forum.legato.io/u/Pankaj)\
**Post date:** [June 3, 2024, 3:04am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/7 "2024-06-03T03:04:54Z")

</div>

@gi1 ,

Able to reduce the size to around 6.5MB. If your legato.cwe is larger than 8MB then better you can go for resizing the partition as suggested by @jyijyi

Thanks & Regards,

Pankaj Sant.

---

<div class="post-metadata">

**Author:** ![gi1](https://avatars.discourse-cdn.com/v4/letter/g/e79b87/32.png) [@gi1](https://forum.legato.io/u/gi1)\
**Post date:** [June 19, 2024, 10:19pm UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/8 "2024-06-19T22:19:54Z")

</div>

My problem is to shrink to have a faster download of legato.cwe on device firmware update… it’s a speed problem on updates. Actually with wp7702 it take round 20 minutes to download.

regards  
gianmaria

---

<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:** [June 21, 2024, 4:21am UTC](https://forum.legato.io/t/reducing-the-size-of-legato-cwe/6706/9 "2024-06-21T04:21:00Z")

</div>

see if this helps to use delta

> [@Delta updates for rootfs/kernel?](https://forum.legato.io/t/delta-updates-for-rootfs-kernel/5064):
>
> Hey everyone, I saw an earlier post on Sierra’s forum about making delta updates that was never resolved: Where are we with delta update capabilities now? In particular I’m using the WP7702. I see a lot of code in legato that refers to handling delta updates in pa\_fwupdate\_singlesys.c, but I can’t find any tools for generating them or any example files for understanding the format if I wanted to make them myself. Based on the source code it obviously involves bsdiff or imgdiff. It seems that…
