# Building from legato source

**URL:** <https://forum.sierrawireless.com/t/building-from-legato-source/23803>\
**Category:** WP Series\
**Created:** [May 24, 2021, 2:04am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803 "2021-05-24T02:04:05Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [May 24, 2021, 2:04am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/1 "2021-05-24T02:04:05Z")

</div>

may be a silly question, but I have been using the mksys command to build my system and not I have started building from legato source.  
Is there any documentation about how to implement my custom app in the built system when building from legato source?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [May 24, 2021, 2:51am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/2 "2021-05-24T02:51:50Z")

</div>

you can see here to modify the wifi.sdef to embed your app to legato.cwe.

> **[Flash size wp7607](https://forum.legato.io/t/flash-size-wp7607/3805/35)**
>
> you can go to legato-19.02.0/modules/WiFi/wifi.sdef, under “apps:” section, add e.g. $LEGATO\_ROOT/apps/sample/helloWorld/helloWorld.adef Now the new app will be included in legato.cwe. Please also note that the max size for legato partition is...

---

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [August 11, 2021, 4:18am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/3 "2021-08-11T04:18:16Z")

</div>

how do you download the cwe file built to the target using the AirVantage FOTA platform?  
Do you need to combine it in an app?

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [August 11, 2021, 5:46am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/4 "2021-08-11T05:46:12Z")

</div>

Here is an example to upgrade the legato cwe: ( you can extract it to see how the bundle.app does)

> **[Legato1907to2004.zip](https://drive.google.com/file/d/1W7Hv-Zfbs63BwsgMv0ThcQSvj_AL4q1F/view?usp=sharing)**
>
> Google Drive file.

---

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [August 11, 2021, 5:50am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/5 "2021-08-11T05:50:16Z")

</div>

is there a tool similar to the av-pack to generate this?  
av-pack will not work as it can`t find the info file in the building directory

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [August 11, 2021, 6:01am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/6 "2021-08-11T06:01:22Z")

</div>

I don’t use any tool.  
you can extract it with 7zip and modify it manually.

---

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [August 12, 2021, 1:30am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/7 "2021-08-12T01:30:50Z")

</div>

I believe there should be a command to make the app directly, so you can pass on parameters when making it.  
This should be similar to the av-pack which is the proper process to make the app from the .update file.  
Just to avoid manual errors when zipping it manually.

---

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [August 12, 2021, 11:56pm UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/9 "2021-08-12T23:56:17Z")

</div>

This is a good example of why to use a proper way to build the app:  
The firmware has been updated but the return is failure state, where the final version should be bundled according to the system I have built form source:

[Router with ETH interface](javascript: void(0))  
action [LWM2M\_AIRPRIME\_BUNDLE\_INSTALL]  
Initial firmware version: MDM=SWI9X06Y\_02.36.06.00,LK=1.3.0\_9c047c35f7,OS=3.18.140,RFS=SWI9X06Y\_02.36.07.00,UFS=unknown,LE=19.11.5,LEO=19.11.5,CUPRI=9907957-001.000 ,CAPRI=SIERRA-001.043\_001,MCU=002.015 - Installing full package  
Package downloaded. Starting the upgrade process  
Upgrade successful. Checking the final version  
Unexpected final version [MCU=002.015]

---

<div class="post-metadata">

**Author:** ![jyijyi](https://sea1.discourse-cdn.com/flex025/user_avatar/forum.sierrawireless.com/jyijyi/32/4766_2.png) [@jyijyi](https://forum.sierrawireless.com/u/jyijyi)\
**Post date:** [August 13, 2021, 12:05am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/10 "2021-08-13T00:05:23Z")

</div>

It is because you did not state correctly the mcu version in the bundle.app

---

<div class="post-metadata">

**Author:** ![claudio.baldini](https://avatars.discourse-cdn.com/v4/letter/c/4da419/32.png) [@claudio.baldini](https://forum.sierrawireless.com/u/claudio.baldini)\
**Post date:** [August 13, 2021, 12:09am UTC](https://forum.sierrawireless.com/t/building-from-legato-source/23803/11 "2021-08-13T00:09:15Z")

</div>

I know, and I can get this with the cm info when logged into the target. this was just to say that the manual zipping sound a little messy solution for production systems.
