FOTA for FX30S how to

Hi @claudio.baldini
Please try running “make wp77xx” within the leaf shell.
You can enter the leaf shell with command
leaf shell

Hi @claudio.baldini ,

To clarify, copy the proprietary binaries to the legato-src folder in order to build the legato framework. This will build pre-patched legato framework for FX30. As Lukasz suggested, make sure you enter leaf shell first.

For the yocto image, you’ll need to copy the binaries to swi-linux. But don’t go to swi-linux/legato and do a make wp77xx. This will build unpatched legato framework. Instead, go to swi-linux and just type “make”.

We believe the swi-linux workspace will build.


@cchenry yes, it does compile now, I did create a fresh new workspace and following the steps it does work. I am not entirely sure why it didn`t work yesterday, but will figure it out later on.
Now I can build from legato source, have downloaded the built system and it seems all apps are now included, also the AV connection seems working.

In regards to the yocto source, I don`t know to which folder I should copy the binaries?
I still need to manually copy the file before I run the make or it will not find the repository, just worth mentioning it.

I have still a couple of questions about how the AirVantage interaction with the legato should be.
I am opening the session (le_avc_StartSession) every 10 minutes and the to close it from the handler after one of the following flags is returned:
Is this correct way of doing it?
Because I have noticed that if the session is not stopped, any next download will not work, possibly status of downloads is only checked at the starting of a session.

@cchenry do you know what binaries I need to move for building the yocto image?

Hi @claudio.baldini,

For the yocto env, copy the files:
cp -r ./leaf-data/current/fx30-catm-legato/apps/proprietary ./legato-src-fx30-catm/apps/

Regarding the AV start session, I recommend posting on the Legato forum.


@cchenry his is the full log after I run the make from $LEGATO_WORKSPACE/swi-linux-src, I still can`t compile:
logs.txt (6.6 KB)

Downloaded the source:
(lsh:TEST) ~/yoctoSource$ leaf getsrc swi-linux
Disable the source:
(lsh:TEST) ~/yoctoSource$ leaf getsrc swi-linux --disable
Copy the binary files:
(lsh:TEST) ~/yoctoSource$ cp -r ./leaf-data/current/fx30-catm-legato/apps/proprietary ./legato-src-fx30-catm/apps/
Ran the make:
(lsh:TEST) ~/yoctoSource/swi-linux-src$ make

All of this within the leaf shell.

@lpacyk would you know why the make fails when building the yocto image?
ERROR: Task (/home/claudio/yoctoProject/swi-linux-src/meta-swi/common/recipes-legato/legato-af/ failed with exit code ‘1’

It keeps failing with this error, and I dont understand my machine cant fetch or is a problem with latency or what else. I have connection to the internet and I can authenticate to github, all that is setup correctly.

If you could help it would be highly appreciated.

Hi @claudio.baldini ,
When you build the yocto environment (swi-linux), you must not use leaf shell.

Only use leaf shell for building the legato-src.


@cchenry I have tried both ways, it still fails when make is ran outside the leaf shell:

NOTE: Executing RunQueue Tasks
ERROR: legato-tools-git-r0 do_fetch: Function failed: do_fetch (log file is located at /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_fetch.20625)
ERROR: Logfile of failure stored in: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_fetch.20625
Log data follows:
| DEBUG: Executing shell function do_fetch
| ERROR: Function failed: do_fetch (log file is located at /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_fetch.20625)
ERROR: Task (/home/claudio/yoctoProject/swi-linux-src/meta-swi/common/recipes-legato/legato-af/ failed with exit code ‘1’

@cchenry @lpacyk would you know why the make of the yocto is not able to fetch the required packages?

Hi @claudio.baldini,

We’ve determined there’s an issue if a “repo sync” has been executed on the workspace.

If you’ve done this, your workspace I’d corrupted and you’ll need to start with a clean leaf workspace. Make sure you don’t execute “repo sync” otherwise the corruption will occur again.

Sorry, you’ll need to manually edit the makefile and copy the legato proprietary binaries still.


@cchenry to what step you refer to “repo sync”?

  1. start a fresh workspace, init the leaf profile to R11 for the FX30
  2. leaf getsrc swi-linux (so to get the source)
  3. leaf getsrc swi-linux --disable (so to avoid the sync on making the yocto)
  4. replace the
  5. cd into swi-linux-src and run the make outside of the leaf shell

Am I missing any step or have inverted any of them?

Hi Claudio those steps seem correct.

Can you provide the log for the error that you encountered?
ERROR: legato-tools-git-r0 do_fetch: Function failed: do_fetch (log file is located at /home/claudio/yoctoSource/swi-linux-src/build_bin/tmp/work/x86_64-linux/legato-tools/git-r0/temp/log.do_fetch.30280).

We have had 4 different people go through the same steps so we need to narrow down why it is failing for you.

@lpacyk @cchenry with a new workspace the make is working, possibly I did run the make before disabling the repo synching.
I do need to run the make and then manually to copy the binary:
cp -r ./leaf-data/current/fx30-catm-legato/apps/proprietary ./legato-src-fx30-catm/apps/
as the ./legato-src-fx30-catm/apps/ is only generated after the first make run.

it is all a bit troublesome but at least I can make the yocto image now.

At this point if I want to add my custom apps, I will need to embed them into the:
then run the make again.

Where am I going to find the .cwe file for the update to the target?

Hi @claudio.baldini,
That’s great to hear. The build artifacts are located at:

@cchenry great, thank you for that.
downloaded the built firmware to the target but now I can’t ssh into it, either if I can ping the unit.
Is the ssh through usb something I need to add manually? Or it should work with the standard yocto I have built? It could be a problem with the firewall.

I can restore the stock firmware with the windows’ flashing tool (fdt2) so to recover the ssh connectivity, but I am wondering if this should be included in the cwe I have built or something didn’t work as expected?

@cchenry @lpacyk I have the feeling something is not working properly, could you confirm that losing the ssh connectivity is normal for a standard built image?
I have used the generic cwe firmware, it is too big to be attached to the forum but I may send it to you privately so you can validate it.
I haven`t added or modified anything, just downloaded the yocto source and ran the make command.

@cchenry @lpacyk would you be able to confirm where the problem is, as we are looking at implementing the WiFi interface and will need to modify the yocto image for that. So we would like to confirm that the image built with the standard tools is valid while we are still having the problem with the ssh connectivity after the download of the cwe firmware.

Hi @claudio.baldini,

There shouldn’t be an issue with ssh.

Could you please confirm the following:

  1. Is the Sierra wireless ECM device available in the device manager?
  2. Do you have an ip address on your host machine?
  3. Could you try a different micro USB cable? Some are not suitable for data transfer and only can be used for charging.


hey @cchenry thank you for your reply, I am pretty confident that is relative to the cwe file I downloaded, as once I flash back the stock firmware, then the ssh is available again and I can connect into the target. This is without touching the usb connection, or IP of the host I am using.