FOTA for FX30S how to

@cchenry @lpacyk any idea how we can fix this problem? Need to be able to build the yocto image to move ahead with our system design, this is the last bit holding us.

Hi @claudio.baldini,
I apologize for the difficulties youā€™re having. I donā€™t have a solution for you at this time, but will let you know once thereā€™s an update.
BR,
Chris

Hi @claudio.baldini,
Iā€™ve pulled and built the swi-fx30-catm_2.0.0 and it runs without issue. Iā€™m using a Ubuntu 16.04 machine, but 18.04 should be fine as well.

Here is the procedure I used:

Create a workspace folder:

$ mkdir leaf-fx30-catm_2.0.0
$ cd leaf-fx30-catm_2.0.0

Initialize the workspace for Leaf

$ leaf init

Setup the workspace

$ leaf setup -p swi-fx30-catm_2.0.0

Pull the yocto workspace

$ leaf getsrc swi-linux

Edit the FX30 Makefile

$ cd swi-linux-src/
$ vi Makefile

Modify the Makefile to change pulling Legato from gerrit.legato.io to github:

Original:

$ repo init -u ssh://${LEAF_GERRIT_USER}@gerrit.legato.io:29418/manifest \

New:

$ repo init -u ssh://git@github.com/legatoproject/manifest \

Execute make to pull the Legato source code, but do not build the entire workspace

$ make

Once the Legato source code has been pulled, the yocto build will start. Cancel the build by pressing:

$ ctrl-c

Copy the Legato proprietary binaries from the leaf-data metadata to the Legato source folder

$ cdā€¦
$ cp -r ./leaf-data/current/fx30-catm-legato/apps/proprietary ./legato-src-fx30-catm/legato/apps/

Confirm the proprietary folder is present

$ ls legato-src-fx30-catm/legato/apps/

Perform a clean, and then build the image

$ cd swi-linux-src/
$ make clean
$ make

BR,
Chris

ah, ok, I didn`t know I had to modify the Makefile, will give it a go and update you.

@cchenry I have tried this, but I am still having the same problem with the ssh connection after I have downloaded and installed the built FX30_WP77xx_full_R11.0.0.007_c964f253-sierra-SWI9X06Y_02.22.12.00.cwe and still have the problem with ssh into the target.

Not entirely sure if I need to still update the external.mk file or if I need to disable the getsrc
leaf getsrc swi-linux --disable
or if this is not required if I point the Makefile to github instead of gerrit.

Have followed the sequence twice and I still end up with the same problem of losing the ssh connectivity to the device.
As soon as I flash the stock firmware to the unit, then the ssh connection comes back to life.
pinging the target still works, so the ubuntu host can definitely connect to the FX30.

Not sure what I am doing wrong, but I have created a fresh new workspace and followed those steps, but I can`t get this going.

Hi @claudio.baldini,

You only need to execute:
leaf getsrc swi-linux --disable
if the proprietary binaries folder doesnā€™t exist in:
./leaf-data/current/fx30-catm-legato/apps/proprietary

Could you please post the contents of your folder:
<workspace>/legato-src-fx30-catm/legato/apps

Ensure you have a folder named ā€œproprietaryā€ and it contains the binaries you copied from:
./leaf-data/current/fx30-catm-legato/apps/proprietary

You do indeed need to modify the meta-columbia-x-catm/external.mk file to pull from github.

BR,
Chris

These are the steps I am doing in the order I am doing them:
$ mkdir yoctoProject
$ cd yoctoProject
$ leaf init
$ leaf setup -p swi-fx30-catm_2.0.0
$ leaf getsrc swi-linux
$ leaf getsrc swi-linux --disable
NOTE: I see that the Makefile has been recently modified and already pointing to the github

I am also replacing the external.mk file in this folder:
swi-linux-src/meta-columbia-x/meta-columbia-x-catm
and the Makefile is pointing to it:
Makefile ā†’ meta-columbia-x/meta-columbia-x-catm/external.mk

$ cd swi-linux-src/
$ make
Alt the make before it starts compiling
$ ctrl-c
$ cdā€¦
$ cp -r ./leaf-data/current/fx30-catm-legato/apps/proprietary ./legato-src-fx30-catm/legato/apps/

$ ls legato-src-fx30-catm/legato/apps/
CMakeLists.txt platformServices proprietary sample test tools

$ cd swi-linux-src/
$ make clean
$ make

The make is successful with the following WARNINGs
Initialising tasks: 100% |###################################################################################################################################################################| Time: 0:00:04
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: ti-wifi-utils-wl18xx-R8.6+gitAUTOINC+cf8965aad7-r5 do_fetch: Failed to fetch URL git://git.ti.com/wilink8-wlan/18xx-ti-utils.git, attempting MIRRORS if available
WARNING: pbzip2-native-1.1.13-r0 do_fetch: Failed to fetch URL https://launchpad.net/pbzip2/1.1/1.1.13/+download/pbzip2-1.1.13.tar.gz, attempting MIRRORS if available
WARNING: wl18xx-firmware-r8.a9.14-r4+gitrAUTOINC+2568d8f61f do_populate_lic: wl18xx-firmware: No generic license file exists for: TI-TSPA in any provider
WARNING: ima-policy-1.0-r1 do_install: IMA: Immutable files will not be protected.
WARNING: dbus-1.10.10-r0 do_configure: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/sstate-control/manifest-swi-mdm9x28-wp-legato-tools.populate_sysroot not found
WARNING: ell-0.8-r0 do_configure: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/sstate-control/manifest-swi-mdm9x28-wp-legato-tools.populate_sysroot not found
WARNING: dbus-glib-0.106-r0 do_configure: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/sstate-control/manifest-swi-mdm9x28-wp-legato-tools.populate_sysroot not found
WARNING: python3-dbus-1.2.4-r0 do_configure: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/sstate-control/manifest-swi-mdm9x28-wp-legato-tools.populate_sysroot not found
WARNING: bluez5-5.50-r0 do_configure: /home/claudio/yoctoProject/swi-linux-src/build_bin/tmp/sstate-control/manifest-swi-mdm9x28-wp-legato-tools.populate_sysroot not found
WARNING: mdm9x28-image-minimal-1.0-r0.0 do_rootfs: The license listed TI-TSPA was not in the licenses collected for recipe wl18xx-firmware
WARNING: mdm9x28-image-minimal-1.0-r0.0 do_rootfs: [log_check] mdm9x28-image-minimal: found 1 warning message in the logfile:
[log_check] WARNING: The license listed TI-TSPA was not in the licenses collected for recipe wl18xx-firmware
NOTE: Tasks Summary: Attempted 3548 tasks of which 1221 didnā€™t need to be rerun and all succeeded.
Summary: There were 14 WARNING messages shown.

then I download the image to the FX30:
swi-linux-src/build_bin/images/public$ scp FX30_WP77xx_full_R11.0.0.007_c964f253-sierra-SWI9X06Y_02.22.12.00.cwe root@192.168.2.2:/tmp

ssh into the unit, and run this command:
fwupdate download FX30_WP77xx_full_R11.0.0.007_c964f253-sierra-SWI9X06Y_02.22.12.00.cwe

After the reboot, I can ping the IP of the target but the ssh doesn`t work at all.
So I have to re-download the stock firmware to be able to use the ssh root@192.168.2.2

@cchenry if you could or anyone else can help as I don`t see what I am doing wrong, I am not adding anything just trying to make the yocto pulled from the github.

all of this is outside the ā€˜leaf shellā€™ just to confirm.

@cchenry could you confirm there is a solution to this?
I have downloaded and built the yocto project a few times now always with the same result, this was by starting a fresh new workspace

Hi @claudio.baldini
I donā€™t see any issues with your procedure, but Iā€™m concerned why you said the makefile is already pointing to GitHub.
Are you certain youā€™re workspace is completely brand new?
If youā€™re reusing a directory you have to delete the hidden files.
BR
Chris

@cchenry I was deleting the whole folder and then recreating a new folder with the same name, now I have created a folder (workspace) with a different name and yes, it seems that the Makefile is already pointing to the githubā€¦
Recompiled the yocto image and still get the same problem, do I need to uninstall and re-install the whole leaf?
This is getting a little out of hands, I donā€™t know how many times I have done this and still canā€™t get it to work properly, unsure of what is the reason of it.
The post was opened end of march, it would be very nice to get this to work.

Hi @claudio.baldini,

Iā€™m not sure what else to try, Iā€™m able to build following the same procedure.

Could you please try deleting all the leaf cache and metadata:

rm -rf ~/.leaf
rm ~/.cache/leaf

Please be aware, this will delete all of the leaf metadata, so make backups of any files that you need.

BR,
Chris

I am able to build, but once I download the new built firmware to the unit, then ssh won`t work anymore.
Just to confirm that I should still be able to connect using
ssh root@192.168.2.2

Once I have built and downloaded the cwe fileā€¦?

@cchenry so to recap what is happening, I can compile the yocto on a VM running this ubuntu release:
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic

But when I download the cwe file, then I can`t connect through ssh anymore.
This is even after I have removed the ~/.leaf and ~/cache/.leaf so to force to re-download from the server.
The physical connection is working as if I flash back the stock firmware using the windows .exe, then I can again use ssh to get into the target.

On a second VM running:
|Description:|Ubuntu 16.04.7 LTS|
|Release:|16.04|
|Codename:|xenial|

I can`t compile, I have tried several times and near to the end it gives and error:
Initialising tasks: 100% |############################################################################################################################################################| Time: 0:00:21
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: lk-1.3.0-r2 do_deploy: Function failed: do_deploy (log file is located at /home/claudio/yocto/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/log.do_deploy.6706)
ERROR: Logfile of failure stored in: /home/claudio/yocto/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/log.do_deploy.6706
Log data follows:
| DEBUG: Executing shell function do_deploy
| /home/claudio/yocto/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/usr/share/android-signing/verity/boot_signer: line 8: java: command not found
| WARNING: /home/claudio/yocto/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/run.do_deploy.6706:1 exit 127 from ā€˜/home/claudio/yocto/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/usr/share/android-signing/verity/boot_signer $image_type ${unsigned_image_path} /home/claudio/yocto/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/usr/share/android-signing/security/verity.pk8 /home/claudio/yocto/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/usr/share/android-signing/security/verity.x509.pem ${signed_image_path}ā€™
| ERROR: Function failed: do_deploy (log file is located at /home/claudio/yocto/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/lk/1.3.0-r2/temp/log.do_deploy.6706)
ERROR: Task (/home/claudio/yocto/swi-linux-src/meta-swi/meta-swi-mdm9xxx/recipes-bsp/lk/lk_1.3.0.bb:do_deploy) failed with exit code ā€˜1ā€™
NOTE: Tasks Summary: Attempted 2978 tasks of which 2966 didnā€™t need to be rerun and 1 failed.

Summary: 1 task failed:
/home/claudio/yocto/swi-linux-src/meta-swi/meta-swi-mdm9xxx/recipes-bsp/lk/lk_1.3.0.bb:do_deploy
Summary: There were 8 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:300: recipe for target ā€˜image_binā€™ failed
make: *** [image_bin] Error 1

Do we know what is happening or are we able to find out if I send you any log or anything else from the VMs I am using?
Because at this point I really don`t know what to do next, beside giving up on building the yocto imageā€¦
Surely building the yocto image is not meant to be this troublesome, but repeating the same process over and over again is not going to solve the issue.

| /home/claudio/yocto/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/usr/share/android-signing/verity/boot_signer: line 8: java: command not found

You need to install JAVA, you can see here:

yes, I did fix that, I have compiled on so many different VMs that I didn`t even read the errorā€¦

Anyhow, I have now compiled the new packaget 3.0.0 for the Fx30 using the leaf R14 and downloaded to the target, it seems now working, con connect through ssh and the app list is as per stock firmware.

So we will move on to implement the compatibility with WiFi through the Talon board, separate post then this.

1 Like

how to add my apps to linux source?

what kind of application are you talking about?
Native C program or legato application?

If you are talking about legato application, you can download the legato framework through leaf (swi-fx30-catm_3.0.0) and add your application to legato.cwe:

Hello, may I ask what was the final resolution to this issue? I am having the same problem, I have a customized kernel/yocto/legato built from leaf fx30-catm_2.0.0 which works fine on my FX30, however now I no longer have AirVantage updates available (at+wdss? returns +WDSS: NOT IMPLEMENTED). I have verified that installing the factory R11.0.0.007 cwe file restores Air Vantage ability but our custom application requires the customized legato build. How can I restore Air Vantage OTA ability to my customized Legato package.