FX30S how to build the stock legato framework on a linux command line

Hi

Anyone any ideas how to correctly install the latest FX30s 3G legato build system and framework.

I have tried
legato-spm -s http://updatesite.sierrawireless.com/packages/Legato/fx30-wp85-R14.0.4.002 -i -m “FX30(WP85XX)” -k pdk.64

Then “make” in the legato folder
~/legato/packages/legato.sdk.16.10.1.m3.fx30_wp85-pdk-x86_64-201809041156/resources/framework/legato$

I can build for WP85 / WP76 / WP75 without any problems

Could it be that a broken package has been released ?

Thanks in advance

John

Hi John,
I recommend to download the full FX30 source tarfile together with the Legato 16.10.1.m3 tarfile from the Source:

https://source.sierrawireless.com/resources/airlink/software_downloads/fx30-firmware/fx30-firmware-3g/

Extract the FX30 file first, then extract the Legato tarfile inside the workspace. If all is well, you should have a “legato” folder in your workspace. ie, a “legato” folder at the same level as your meta-columbia-x folder.

Type: “make” at your workspace level to build the entire Yocto image.

The build system is older, so you’ll find the images located here:
build_bin/tmp/deploy/images/swi-mdm9x15

  1. Legato framework only: legato-image.wp85.cwe (does not include the FX30 Legato applications)
  2. Bootloader, kernel, rfs Legato: boot-yocto-legato_wp85.cwe (does not include the radio module fw)
  3. boot-yocto_wp85.cwe: Bootloader, kernel, rfs (no Legato)

If you are trying to build legato on it’s own (“make” in the legato folder) you need to additionally install the 16.10.1.m3 toolchain.

BR,
Chris

Hi Chris
I just want to be able to build the legato image from source - using a command line build.
Legato-spm seems to have installed the correct build tools and legato image. make - the legato image fails

Hi John,
I understand, however, if you don’t build the full yocto image, some Legato patches will be missing. See:

meta-columbia-x/meta-columbia-x-app/recipes/legato-af

Currently, these files are only related to versioning, so perhaps you don’t need them. But be aware, other FX30 releases may contain important Legato patches.

BR,
Chris

Which version of Ubuntu is the build designed to work with?

I have 16.04 and I see
Build image of minimal rootfs (for swi-mdm9x15).
WARNING: Host distribution “Ubuntu-16.04” has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.

Hi John,
You can use either 14.04 or 16.04.
BR,
Chris

Hi Chris

Do you have any clues as to what is causing the following make failure ? - as far a I can tell everything is in the right place and was downloaded from the source (as above)

Final part of build output follows

Thanks John

log.do_compile.2725.tar.gz (3.7 KB)

| ERROR: Function failed: do_compile (log file is located at /home/john/FX30/workspace/build_bin/tmp/work/x86_64-poky-linux-gnueabi/gcc-cross-initial-arm/4.9.1-r0/temp/log.do_compile.2725)
ERROR: Task 854 (/home/john/FX30/workspace/poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.9.bb, do_compile) failed with exit code ‘1’
NOTE: Tasks Summary: Attempted 242 tasks of which 239 didn’t need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
/home/john/FX30/workspace/poky/meta/recipes-devtools/gcc/gcc-cross-initial_4.9.bb, do_compile
Summary: There was 1 WARNING message shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
Makefile:151: recipe for target ‘image_bin’ failed
make: *** [image_bin] Error 1

Hi John,
I’m not sure what the issue is based on the logs.

I think you’re trying to build from legato-spm?

Could you try building from the source tarfiles?

BR,
Chris

Hi Chris

I was trying a straight Yocto build as per the instructions on the source. I think the problem the previous time was that the build was interrupt by something in the HOST OS - then I retried the part finished make and it failed.

However I retried with a clean install of everything and the build got a lot further - This time the build failed because the PC lost it’s 'internet connection for a short while. However the build must have gracefully stopped and I was able to continue the build with another “make”

Finally the Yocto build succeeded - for anyone else attempting this

Try with >60Gb drive space

might need this

sudo dpkg-reconfigure dash

install the toolchain

and

Create a soft link from the versioned folder to /y17-ext (delete the existing soft link if needed)

$ cd /opt/swi
$ rm y-17-ext
$ sudo ln -s y17-ext-fx30 y17-ext

extract the base system yocto

tar -xvf FX30_WP8548_full_R14.0.4.002.tar.gz

tar -xvf legato-16.10.1.m3.tar.bz2

rename the legato-16... folder legato

Workspace directory tree after build looked like this ( tree -d -L 1 )

.
├── build_bin
├── downloads
├── kernel
├── legato
├── lk
├── mangOH
├── meta-columbia-x
├── meta-mangoh
├── meta-openembedded
├── meta-swi
├── meta-swi-extras
└── poky


install these puppies

makeinfo
gawk
chrpath
sdl-config

edit some stuff

Known Issues:
When building the Source code package, a build error occurs:
error “cat: modules/Columbia/apps/columbiaAtServiceComponent/columbiaAtService.c: No such file or directory”

To resolve this:
/home/john/FX30/workspace/meta-columbia-x/meta-columbia-x-app/recipes/legato-af

Edit the file            meta-columbia-x / meta-columbia-x-app/recipes/legato-af/legato-af_git.bbappend 

and remove the entire “do_compile_append” function.

except "do_compile_append” doesn’t exist in the file , however the following function does exist

do_compile_prepend() {
    COLUMBIA_FILE=modules/Columbia/apps/columbiaAtServiceComponent/columbiaAtService.c

    GEN_DATE=$(date -u)

    cat ${COLUMBIA_FILE} | sed "1 s/^.*$/char date[]=\"$GEN_DATE\";/" \
                           > ${COLUMBIA_FILE}_tmp
    mv ${COLUMBIA_FILE}_tmp ${COLUMBIA_FILE}

}

attempt a yocto build

After “make” in the project workspace - I got this

NOTE: Tasks Summary: Attempted 2559 tasks of which 1057 didn't need to be rerun and all succeeded.

Summary: There were 21 WARNING messages shown.

Then

attempt a legato build

cd legato
make

markdown

I’ve just noticed that the forum actually takes markdown - as well as the odd formatting language contained in the menu bar

Cheers

John

Hi John,
Thanks for clarifying. Yes, those are the build steps to build from source.

Just a couple of comments:

  1. You don’t need to install the toolchain unless to manually build legato like you did at the end
  2. The Yocto build will build legato for you. The images are located at:

build_bin/tmp/deploy/images/swi-mdm9x15

The file: boot-yocto-legato_wp85.cwe contains all the components except for the radio module firmware.

BR,
Chris