Software update confusion

I’ve been trying to create a legato system with my apps “baked in”, and some of the standard apps that I’m not using removed. I can create an .update file which I can download via Dev studio. But according to the documentation, I have to have a .spk file or a .cwe file to update things. In the docs says you create these using mksys and using an .sdef file, which I did when I made the special Legato version via Dev Studio. I’ve tried using mksys in the “command shell”, but the build always fails because it apparently doesn’t have enough variables set.
The “Create Custom Image” doesn’t work because it won’t take any .update files, they have to be .spk or .cwe. What exactly is the correct method, to make a bundle that I can update the default version on a device?
I also want to have the ability to update my app via a file download (from an outside server), then call le_start_update or the system call of fwupdate. But I can’t tell if the .update is enough…

Hi,

How about you build the legato.cwe file by “make wp85”(for example)?
If the build is successful, then you can modify the required .sdef file to integrate your application into the legato.cwe file.

BTW, fwupdate command should be used for CWE file according to “fwupdate - Legato Docs”.
You can use “update” command for .update file. (update - Legato Docs)

HI @iyijyi,
I don’t have the wp85 code, I have a wp76xx system.

I’ve made a baked in Legato version. How do I modify the .sdef file to have it create a .cwe or an .spk file?

You can try to modify default.sdef and add your application into the .cwe file.

Hi @iyijyi,
I think you are missing my point.
I have my app included in the apps section of the .sdef file. But when I build the system, it creates a .update file, not a .cwe file. All the docs I have read says you need to run fwupdate, not update. But if I download an update, as a .update file, and then run update on it, it appears to work. Is that the way this is supposed to work?
What if I need to update the Linux or the modem firmware portion of the fw. Would that work as well? It just isn’t clear what all the steps are, as both update and fwupdate in my device are much newer than what the documentation is and has many more options.

Thanks,
Evets

Hi,

“fwupdate” is for FW update. (fwupdate - Legato Docs)
In case you want to update application(.update), you need to use “update”. (update - Legato Docs)

For linux or modem FW, it should be in the file name like yocto.cwe or modem.cwe.
And you should use “fwupdate” command.

@jyijyi,
How do I produce a .cwe with Dev Studio?

Also, here is an example of what I’m talking about. From the documentation that you pointed to:
fwupdate [OPTION]

fwupdate help
Print help message and exit

fwupdate download FILE
Download the given CWE file. After a successful download, the modem will reset.

fwupdate query
Query the current firmware version.
This includes the modem firmware version, the bootloader version, and the Linux kernel version.
This can be used after a download and modem reset, to confirm the firmware version.

But if I go to the device and type in fwupdate I get:

NAME:
fwupdate - Download or Query modem firmware

SYNOPSIS:
fwupdate help
fwupdate downloadOnly FILE
fwupdate query
fwupdate install
fwupdate checkStatus
fwupdate markGood
fwupdate download FILE

DESCRIPTION:
fwupdate help
- Print this help message and exit

fwupdate query
  - Query the current firmware version. This includes the modem firmware version, the
    bootloader version, and the linux kernel version.
    This can be used after a download and modem reset, to confirm the firmware version.

fwupdate downloadOnly FILE
  - Download the given CWE file; if '-' is given as the FILE, then use stdin.
    Waits for another command after a successful download.

fwupdate checkStatus
  - Check the status of the downloaded package (DualSys platform only)

fwupdate install
  - Install the downloaded firmware.
    Single System: Trigger reset to initiate install.
    Dual System: Swap and reset to run the downloaded firmware or go back to the old system
    if the running system is not marked good.


fwupdate markGood
  - Mark good the current system (DualSys platform only)

fwupdate download FILE
  - do download, install and markGood in one time
    After a successful download, the modem will reset

Which is much more info, but there isn’t any real examples. The documentation on line isn’t up to date.

Hi,

I just find a command to generate the cwe file by .update file.

Is this more useful to you?

1 Like

Now we’re talkin’! Thank you!!

Evets

Hi,

Developer Studio is supposed to implicitly call systoimg on each system project build to generate a cwe file in the output cwe sub-directory.
This is working on Linux, but on Windows there is a synchronization bug that makes it not working.
This will be fixed in DS 5.3.1, which will be released this week (to fit with WP76 Release 8).

@daav, @jyijyi,
So, I tried this on my windows machine using the build shell and kept getting a “read-only file system”, so i suspect that the partition you set up is running out of space.
So, I tried this on my Linux VM, and the first one was able to make it. However, when I made the fdt download file custom image, it didn’t program correctly. I went back and verified that I could update the device by copying the file over and running update on it. That DID work, but it’s not a method I can use for others.
I made a minor program adjustment, and the second time I tried this method, I couldn’t get the systoimg to work on the update file. I’m currently trying a version that is compiled totally in linux. However, when I download that, I get a “Secboot image not signed” error from the downloader.

Also, what is the difference between systoimg and systocwe? It appears to do the same thing.

Hi @EvetsMostel

They’re actually the same thing. systocwe is the legacy name of systoimg.

The issue on Windows is that most of the build operations can’t be done on the NTFS file system, but somewhere in Docker /tmp container. That’s why systoimg can’t be used directly in the output directory (FYI, take a look at the generated Makefile in the output directory).
The good news are that DS 5.3.1 (integrating the fix for cwe synchronization bug) as just been released. You should be able to upgrade and enjoy the fix.

Concerning the “Secboot image not signed”, sorry, it’s out of my knowledge… Someone else?

The Secboot issue only happens when I pick the PRI for the device (in this case, Verizon). If I leave it out, I don’t get the error. So, the image in the release (R7) is not signed, it appears.

Well, in the process of downloading the update for R8, Somehow it broke my dev studio. I tried reinstalling, and it isn’t in my list for uninstalling. I’m in a bit of a quandary, since I can’t build it anymore. I’ve looked for the download of 5.3.1 but nothing shows up on the source. Any suggestions?

Hi,
Can you try this one and see if DS version 5.3.1 for linux 64-bit can be downloaded?
http://updatesite.sierrawireless.com/developerStudio4/product/devstudio-5.3.1-linux64.zip

Hi @EvetsMostel
Installers update was pending, but now they’re available (even if The Source pages are not up to date yet). You’ll find WP76 R8 (including DS 5.3.1) there: http://download.sierrawireless.com/packages/Legato/archives/legato-18.01.0-R8-WP76-windows.exe

About your Secboot issue:

  • if you install the official Verizon Firmware image, are you still reproducing the issue?
  • please can you provide somewhere (Filebin?) the generated image that causes problem?

Thanks

Actually, it’s easy to reproduce. Just create a custom image, and select all the defaults with R7, but choosing Verizon for the modem firmware. Then use the fdt2 to download the image. If you don’t include the modem firmware for Verizon, it downloads and installs with no issue. Of course to fully test it, I go back to R6.1, otherwise it doesn’t do any real programming.

The way it happened to me was I built a “special” version of Legato with my app included and several others removed (mostly things related to wifi).

I will try this with R8.

Hi @jyijyi,

I dit this modification ( your comment : You can try to modify default.sdef and add your application into the .cwe file.) but :
When i want to build my system to distribute for installation on my target (wp85), wiith mksys tool and via default.sdef file , like that :

mksys -t wp85 default.sdef

This DOES NOT work - the build explodes with long lists of undefined symbols which appear to be from missing libraries (they look like libraries from the platform adapter code) :

mangoh@mangoh-virtualbox:~/legato_framework/legato_16.10.1.m3/legato$ mksys -t wp85 default.sdef
[87/412] Linking C executable
FAILED: /opt/swi/y17-ext/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc --sysroot=/opt/swi/y17-ext/sysroots/armv7a-vfp-neon-poky-linux-gnueabi -o _build_default/wp85/app/audioService/staging/read-only/bin/audioDaemon _build_default/wp85/app/audioService/obj/audioDaemon/_main.c.o -rdynamic -Wl,–enable-new-dtags,-rpath=“$ORIGIN/…/lib” -L “-L_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj” -lComponent_audio “-L_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj” -lComponent_audio “-L$LEGATO_BUILD/framework/lib” -llegato -lpthread -lrt -ldl -lm
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetProfile' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_amr_StartEncoder’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetPcmSamplingRate' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_PlaySignallingDtmf’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetNoiseSuppressorStatus' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_amr_StopEncoder’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_pcm_InitCapture' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_SetPlatformSpecificGain’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_pcm_InitPlayback' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetPcmSamplingResolution’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_amr_StartDecoder' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetPcmCompanding’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to `pa_pcm_GetPeriodSize’
.
.
.
.

_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_StopDtmfDecoder' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_GetDefaultI2sMode’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_SetDspAudioPath' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_SetI2sChannelMode’
_build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_audio_RemoveDtmfStreamEventHandler' _build_default/wp85/component/57ee7e82b90d24ba02e247bba7cf74da/obj/libComponent_audio.so: undefined reference to pa_pcm_Play’
collect2: error: ld returned 1 exit status
[87/412] Compiling C source
ninja: build stopped: subcommand failed

Can you help me to solve this issue please ?

How about using “make wp85”?
If it failed, that means your code has problem.