Recipes to upgrade python version on FX30

Hello,

I am currently working in a IoT project where we use the FX30 device, in the default linux distribution that comes with the device or the one that I built from source, comes with the python version 2.7.3. In my project I need at least the version 2.7.12, I would like to know if somebody could point me out a recipe to upgrade the python version, I tried it by using the recipes available for mangoh boards without success.

Thanks in advance

Best regards

Gustavo

Please review the following forum post. This should help you: Installing Boto3 onn AirPrime WP7702 - IoT Modules - Sierra Wireless Forum

Assuming you are using the CAT-M FX30, you can take a look at WP 77 R9.1 source, https://source.sierrawireless.com/resources/airprime/software/wp77xx/wp77xx-firmware-release-9,-d-,1-components/, which has python 2.7.12 → “R9.1_SWI9X06Y_02.18.05.00/yocto/poky/meta/recipes-devtools/python/python_2.7.12.bb”. You can modify your recipes based on that one.

Please mention relevant information like FW version, model etc when posting questions to get faster and clearer answers. Also, note that since this is a product(WP77) related query, it’s more relevant on https://forum.sierrawireless.com/ and you will get quicker answers there.
Thanks.

you can try FX30(3G)R17:

https://source.sierrawireless.com/resources/airlink/software_downloads/fx30-firmware/fx30-firmware-3g/#sthash.cEmNgXK3.dpbs

root@fx30:~# cm info
Device: WP8548
IMEI: 359377060004735
IMEISV: 2F
FSN: LL537500110203
Firmware Version: SWI9X15Y_07.13.07.00 92cfd2c jenkins 2018/08/22 19:18:52
Bootloader Version: SWI9X15Y_07.13.07.00 92cfd2c jenkins 2018/08/22 19:18:39
MCU Version:
PRI Part Number (PN): 9904889
PRI Revision: 01.11
Carrier PRI Name: GENERIC
Carrier PRI Revision: 001.040_000
SKU: 1102621
Last Reset Cause: Unknown
Resets Count: Expected: 0 Unexpected: 0
root@fx30:~#
root@fx30:~# legato version
18.06.5.e4479a6a_4d846734b15dea928031af763d2d138c
root@fx30:~#
root@fx30:~# python --version
Python 2.7.12

Hello you all,

Thank you for the replies, I am current using the model FX30(3G) based on WP85.

By following the suggestion to try the R17 firmware, it already has an upgrade for python 2.7.12. For that thank you!

Now I am working on adding the recipes for specific libraries that my project needs.

Best regards

Hi Gustavo,
Have you downloaded the FX30 R17 yocto source code using Leaf swi-fx30-3g_1.0.1?
I think it would be easiest if you add your recipes to the lead swi-linux workspace.
BR,
Chris

Hi Chris,

Yes, I had downloaded the FX30 R17 yocto source code using Leaf.

But when I run the make command, without add any recipe, just the original files, I am getting the following error:

ERROR: legato-af-git-r0 do_patch: Command Error: 'quilt --quiltrc /home/gustavo/leafFX30/swi-linux-src/build_bin/tmp/sysroots/x86_64-linux/etc/quiltrc push' exited with 0  Output:
Applying patch 0002-ALPC-299-Add-columbiaAtService-to-avcService-black-l.patch
patching file components/airVantage/avcAppUpdate/avcAppUpdate.c
Hunk #1 FAILED at 446.
1 out of 1 hunk FAILED -- rejects in file components/airVantage/avcAppUpdate/avcAppUpdate.c   
Patch 0002-ALPC-299-Add-columbiaAtService-to-avcService-black-l.patch can be reverse-applied
ERROR: legato-af-git-r0 do_patch: Function failed: patch_do_patch
ERROR: Logfile of failure stored in: /home/gustavo/leafFX30/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_patch.3364
ERROR: Task (/home/gustavo/leafFX30/swi-linux-src/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_patch) failed with exit code '1'

Do you have a suggestion of what could I do?

BR,

Gustavo

Hi Gustavo,
I think Legato wasn’t pulled properly. When you perform the make, Legato is supposed to be pulled from manifest.
Could you please check your leaf workspace folder (one up from swi-linux) for a folder called legato-src-fx30 or similar? (I don’t mean doing a leaf getsrc swi-legato).
If there is no such folder, could you please do:
make clean
make
And post the output of both commands.
BR,
Chris

Dear Chris,

Yes, there is a “legato-src” folder on my leaf workspace. There is the following in the workspace: “leaf-data”, “legato-src”, “swi-linux-src” (folders) and the “leaf-workspace.json”.

Even having the folder, I tried the “make clean”, and I got the following:
fatal: Not a git repository (or any of the parent directories): .git
rm -rf build_*

Do you have an idea, in what I could do?

Thanks in advance!

BR,
Gustavo

Hi Gustavo,
There’s an issue with the Makefile causing the Legato source code not be pulled. Could you please try this procedure:

  1. Create a new folder in your workspace called “legato-src-fx30” (at the same level as your legato-src folder)
  2. cd legato-src-fx30
  3. repo init -u ssh://<YOUR_USERNAME>@gerrit.legato.io:29418/manifest -m legato/releases/18.06.5/legato.xml
    where <YOUR_USERNAME> is the username you use to connect to gerrit.legato.io
  4. repo sync
  5. cd …/swi-linux-src
  6. ln -s …/legato-src-fx30/legato legato
  7. Comment out line 49 in the Makefile
  8. Build the yocto environment by typing “make”

BR,
Chris

Hi Chris,

Thanks again for your return, I had performed the steps you just suggested, therefore I am still having the same error.

The log file is attached
run.patch_do_patch.1948 (4.9 KB)

Do you think that may it is happening due the toolchain? Or something like that?

Thank you
BR,

Gustavo

Hi Gustavo,
The yocto environment will build the toolchain, so this isn’t the issue. I believe the problem is the legato source code wasn’t pulled properly.

Could you please supply the output for the following commands:

  1. ls -la /home/gustavo/leafFX30
  2. ls -la /home/gustavo/leafFX30/legato-src-fx30
  3. ls -la /home/gustavo/leafFX30/legato-src-fx30/legato
  4. ls -la /home/gustavo/leafFX30/swi-linux-src

Could you confirm the legato source code was pulled correctly when you executed these 2 commands?
repo init -u ssh://gustavo@gerrit.legato.io:29418/manifest -m legato/releases/18.06.5/legato.xml
repo sync

assuming your gerrit username is “gustavo”

The patch that is failing applies to the Legato framework. The framework is pulled using repo and must be outside the swi-linux repo workspace.

In addition, the Legato framework cannot be used from “leaf getsrc swi-legato” because leaf automatically patches the source framework with the FX30 Legato patches. ie, the framework pulled in this way is intended for framework development so it is pre-patched. Compared to the yocto environment, which contains the patch files and applies them to the base framework at build-time.

BR,
Chris

Disregard for the moment, from reading the error message I guess the legato source is now completely hosted on git vs gerrit. I re-downloaded legato by using repo init -u git://github.com/legatoproject/manifest -m legato/releases/18.09.4.xml legato downloaded w/o error and am running make now.

Hi Chris,

I’m trying to build the R11 Linux source for an FX-30. I followed your procedure in this thread to download the legato source, but when I run make in the swi-linux-src folder it fails with the following error:

make[1]: Leaving directory '/home/dcchurchill/myWorkspace/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/legato-af'
| 'platformAdaptor' directory is missing, which means these Legato sources have not been downloaded properly.
| Please refer to https://github.com/legatoproject/legato-af#clone-from-github 
| Makefile:275: recipe for target 'platformAdaptor' failed
| make: *** [platformAdaptor] Error 1
| WARNING: /home/dcchurchill/myWorkspace/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/run.do_compile.10607:1 exit 2 from 'make $LEGATO_TARGET ENABLE_IMA=0 IMA_PRIVATE_KEY= IMA_PUBLIC_CERT='
| ERROR: Function failed: do_compile (log file is located at /home/dcchurchill/myWorkspace/swi-linux-src/build_bin/tmp/work/armv7a-neon-poky-linux-gnueabi/legato-af/git-r0/temp/log.do_compile.10607)
ERROR: Task (/home/dcchurchill/myWorkspace/swi-linux-src/meta-swi/common/recipes-legato/legato-af/legato-af_git.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 2031 tasks of which 1980 didn't need to be rerun and 1 failed.

When I ran repo init in the egato-src-fx30 folder I get a lot of errors like:

Fetching projects:  97% (34/35) legato-Apps-QmiAirVantageBin-wp76xxERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
legato-Apps-QmiAirVantageBin-wp85:
ERROR: Repository not found.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

    error: Cannot fetch legato-Apps-QmiAirVantageBin-wp85 from ssh://git@github.com/legatoproject/legato-Apps-QmiAirVantageBin-wp85
    Fetching projects: 100% (35/35), done.
    Checking out projects:  40% (14/35) legato-Service-AirVantageConnectorerror: Cannot checkout legato-Apps-AtAirVantageBin-wp76xx: ManifestInvalidRevisionError: revision refs/tags/18.09.4 in legato-Apps-AtAirVantageBin-wp76xx not found
    error: in `sync`: revision refs/tags/18.09.4 in legato-Apps-AtAirVantageBin-wp76xx not found

Any idea what I’m doing wrong?

Hi David,
Could you cd to the folder:
legato-src-fx30-catm/legato/platformAdaptor/qmi/bin/wp85

execute:
git remote -v

It should look like this:
git remote -v
legato-github GitHub - legatoproject/legato-PlatformAdaptor-QmiBin-wp85: QMI binaries Platform Adaptor for Legato adapted to Sierra Wireless platform WP85 (fetch)
legato-github GitHub - legatoproject/legato-PlatformAdaptor-QmiBin-wp85: QMI binaries Platform Adaptor for Legato adapted to Sierra Wireless platform WP85 (push)

Then, in a separate folder elsewhere:
git clone GitHub - legatoproject/legato-PlatformAdaptor-QmiBin-wp85: QMI binaries Platform Adaptor for Legato adapted to Sierra Wireless platform WP85

Could you also confirm your GERRIT_USER is correctly set compared to what you entered in your Gerrit username in the Settings:
leaf env user

BR,
Chris

Here was the output from get remote -v:

dcchurchill@ubuntu:~/myWorkspace/legato-src-fx30/legato/platformAdaptor/qmi/bin/wp85$ git remote -v
legato-github-ssh	ssh://git@github.com/legatoproject/legato-PlatformAdaptor-QmiBin-wp85 (fetch)
legato-github-ssh	ssh://git@github.com/legatoproject/legato-PlatformAdaptor-QmiBin-wp85 (push)

My GERRIT_USER was not set in my default env only in my leaf shell env, I had forgot to run leaf shell before ran repo init or repo sync, maybe that was my issue all along. You mentioned my leaf Settings, where are those set how do I view them? The value of my USER env var in my leaf shell is dcchurchill and my GERRIT_USER is david.churchill@thingtech.com, I suppose this is a problem too?

I ran the git clone command you referenced in another directory and it ran fine, however, when I examined the contents of the components directory compared to /legato-src-fx30-catm/legato/platformAdaptor/qmi/bin/wp85/components the new clone had one extra subdirectory le_pa_start

All that being said I was finally successful in building the source by using the repo init command referenced by the page in the error message:

repo init -u git://github.com/legatoproject/manifest -m legato/releases/18.09.4.xml

The one last piece to the puzzle was to install java as it evidently is used to sign some component during the build process.

I’ve successfully built the factory linux distribution then applied my customizations and re-built and both builds succeeded. I have yet to install the image on an Fx-30 I was going to try that today. Do you think I should scrap my working setup and go back and try to get it working using gerrit?