Software update confusion

@jyijyi,

“make wp85" it works well ! i don’t have a problem

Then you can use the cwe generated by make wp85.

@jyijyi,

it’s the same thing ? when i use :

  • default.sdef (modified) then mksys
    or
  • default.sdef (modified) then make wp85 ( in this case, where I find the .cwe ? )

**And I do not understand why it does not work with mksys, you don’t have a little idea ??

Thank’s

the legato.cwe image is in ./build/wp85/ folder.
Normally I use make wp85 directly instead of mksys…

@jyijyi,

I have a last question : if legato.cwe is the image to update in the target, system.wp85.update is what ? because in legato.io they say that system.wp85.update is the result of building : mksys - Legato Docs

drwxrwxr-x 9 mallaoui mallaoui 4096 août 28 10:26 ./
drwxrwxr-x 4 mallaoui mallaoui 4096 août 27 11:31 …/
drwxrwxr-x 3 mallaoui mallaoui 4096 août 27 11:32 apps/
drwxrwxr-x 13 mallaoui mallaoui 4096 août 27 11:32 framework/
lrwxrwxrwx 1 mallaoui mallaoui 23 août 27 16:44 legato.cwe → legato-squashfs.ubi.cwe
lrwxrwxrwx 1 mallaoui mallaoui 19 août 27 16:44 legato.default → legato.squashfs.ubi
drwxrwxr-x 6 mallaoui mallaoui 4096 août 27 11:32 legatoimg/
-rw-r–r-- 1 mallaoui mallaoui 2301952 août 27 16:44 legato.squashfs
-rw-rw-r-- 1 mallaoui mallaoui 2752512 août 27 16:44 legato.squashfs.ubi
-rw-rw-r-- 1 mallaoui mallaoui 2753312 août 27 16:44 legato-squashfs.ubi.cwe
-rw------- 1 mallaoui mallaoui 11523072 août 27 16:44 legato.yaffs2
-rw-rw-r-- 1 mallaoui mallaoui 11523872 août 27 16:44 legato-yaffs2.cwe
lrwxrwxrwx 1 mallaoui mallaoui 24 août 27 16:44 legatoz.cwe → legatoz-squashfs.ubi.cwe
-rw-rw-r-- 1 mallaoui mallaoui 2284048 août 27 16:44 legatoz-squashfs.ubi.cwe
-rw-rw-r-- 1 mallaoui mallaoui 2760022 août 27 16:44 legatoz-yaffs2.cwe
drwxrwxr-x 3 mallaoui mallaoui 4096 août 27 16:44 pa-check/
drwxrwxr-x 4 mallaoui mallaoui 4096 août 27 16:44 staging/
drwxrwxr-x 6 mallaoui mallaoui 4096 août 27 11:32 system/
-rw-rw-r-- 1 mallaoui mallaoui 2392010 août 27 16:44 system.wp85.update
drwxrwxr-x 2 mallaoui mallaoui 4096 août 27 11:32 tools/

Thank you

Have you tried to flash the system.wp85.update by update command on the target?
Normally i will just flash the legato.cwe file to module by fwupdate command on target.

This is how I do it:

go into Legato-19.02.0
make wp76xx
I can use legato.cwe then without problem but it has a lot of apps I dont need like:
[stopped] voiceCallService
[stopped] wifi
[stopped] wifiApTest
[stopped] wifiClientTest
[running] wifiService
[stopped] wifiWebAp
[running] qmiAirVantage
[running] positioningService
[running] atAirVantage
[running] atQmiLinker
[running] audioService
[running] avcService

In ideal place my .sdef would have these apps removed and has my app added.
But I tried building it like this:

apps:
{
// Platform services.
$LEGATO_ROOT/apps/platformServices/audioService {start: manual}
$LEGATO_ROOT/apps/platformServices/cellNetService
$LEGATO_ROOT/apps/platformServices/dataConnectionService
$LEGATO_ROOT/apps/platformServices/fwupdateService
$LEGATO_ROOT/apps/platformServices/modemService
$LEGATO_ROOT/apps/platformServices/positioningService {start: manual}
$LEGATO_ROOT/apps/platformServices/powerMgr
$LEGATO_ROOT/apps/platformServices/secStore
$LEGATO_ROOT/apps/platformServices/smsInboxService {start: manual}
$LEGATO_ROOT/apps/platformServices/voiceCallService {start: manual}
$LEGATO_ROOT/apps/platformServices/gpioService
$LEGATO_ROOT/apps/platformServices/atService
$LEGATO_ROOT/apps/platformServices/portService

// Command-line tools.
$LEGATO_ROOT/apps/tools/tools

// Custom application
myapp.adef

}

When this is build and converted to cwe and flashed legato doesn’t even start. Is there another way to do this? So I want to exclude some applications and include mine into golden image.

I think you need to eliminate those default app one by one and see which app makes this problem.

Seems like my application is making it a problem. When I build my app with mkapp and push the .update file to device everything works, when I add my application to list of applications to .sdef, its builds and it wont work when I update it.

What would be the difference between building the app with mkapp and pushing it, and putting adef into my .sdef and calling mksys?

You can try manually start the app and see if this is related to timing.

I tried to set that my app has to be run manually but still the result is the same, legato doesn’t install on the target.

What I want to try is to maybe bind binary file of my application to sdef as described here

What I’d like to know if my binary is build with mkapp and what is the exact location of the file?
When I build myApp I get a folder like this: _build_myApp

then in it I have this folders:

_build_myApp/wp76xx/app/myApp
and in that folder there are 3 folders and a file:
obj src staging myApp.wp76xx

Is this file the binary I need to link to .sdef? if so what do I write? I tried writting myApp.wp76xx.app pointing to directory in sdef but nothing helped.

How about just embed a simple helloworld app instead of your app?
Does this make the problem?

Bundling helloWorld works it produces system.wp76xx.update it converts to cwe successfully and after flashing everything works.
I used the same build flags to make system with helloWorld as I do with myApp so that I verify that there is no problem with the build flags I send with mkSys command.

Once again after burning the cwe file that bundles helloWorld, I can use update to burn myApp.wp76xx.update and it is added to the list of apps and works fine.

So the problem only occurs when I bundle my application to .sdef and build it with mksys.

Can you tell me where can I find the binary for my application to try that also?

Please attach your application here.
I will try to build it with legato framework.

Hi, I seem to have a similar problem. I am building my system with mksys, and when I use the .update. Everything works well. But when I try to generate golden system/image leagto.cwe, my apps won’t update with fwupdate.
On curios note. When I bundle my legato.cwe together with kernel & modem upgrade. Those do update, but my apps are still missing.

Info

  • Using WP7700, but I have noticed the same problem WP7702
  • SDK for WP77 (Release 12 + Legato 19.11.1) [I used an older version, where this worked]
  • I am using not sandboxed legacy apps. (using CMake cross-compile project setup)
  • swiflash is version (5.1).
  • swicwe is version (1.24).

Steps:

  1. mksys (Using this .update works)
  2. systocwe (update → legato.cwe) (dont work)

I plan to test out with the latest legato release tomorrow. To see if that changes anything.

  • is there any way to find a reason why fwupdate download fails. I could not detect anything from the log.

jaan


Log grepped by =ERR=

Mar 15 21:07:31 swi-mdm9x28-wp user.err Legato: =ERR= | startSystem[846]/framework T=main | daemon.c RedirectStderr() 39 | Failed to open ‘/dev/console’. No such device
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabelExec() 529 | Could not set SMACK EXEC label for ‘/legato/systems/current/bin/_appStopClient’. Read-only file system.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabelExec() 529 | Could not set SMACK EXEC label for ‘/legato/systems/current/bin/sdir’. Read-only file system.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabelExec() 529 | Could not set SMACK EXEC label for ‘/legato/systems/current/bin/configEcm’. Read-only file system.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabel() 499 | Could not set SMACK label for ‘/legato/systems/current/config/users.cfg’. No such file or directory.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabel() 499 | Could not set SMACK label for ‘/legato/systems/current/config/apps.cfg’. No such file or directory.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabel() 499 | Could not set SMACK label for ‘/legato/systems/current/config/modules.cfg’. No such file or directory.
Mar 15 21:07:32 swi-mdm9x28-wp user.err Legato: =ERR= | updateDaemon[874]/framework T=main | smack.c smack_SetLabel() 499 | Could not set SMACK label for ‘/legato/systems/current/config/framework.cfg’. No such file or directory.
Mar 15 21:07:36 swi-mdm9x28-wp user.err Legato: =ERR= | rSimDaemon[1003]/rSimDaemon T=main | le_rsim.c le_rsim_Init() 1757 | pa_rsim_AddSimActionRequestHandler failed
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[931]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_GET_PROFILE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=5.[0x05]
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[931]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_SET_PROFILE_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=5.[0x05]
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[931]/le_pa_audio T=main | pa_audio.c InitAudioClient() 689 | Cannot activate the QMI audio profile value to .0
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | audioDaemon[931]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_SWI_M2M_AUDIO_GET_AVCFG_REQ_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=5.[0x05]
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | posDaemon[1027]/swiQmi T=main | swiQmi.c InitService() 454 | Service type not recognized: QMI_SERVICE_SWI_LOC (15)
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1077] | chmod: /legato/systems/current/apps/wifiService/read-only/pa_wifi: Read-only file system
Mar 15 21:07:37 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1077]/daemon T=main | pa_wifi_ap.c pa_wifiAp_Init() 600 | WiFi Access Point Command Failed: chmod (256)
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/swiQmi T=main | swiQmi.c swiQmi_CheckResponse() 799 | Sending QMI_UIM_GET_EID_RESP_V01 failed: rc=0 (), resp.result=1.[0x01], resp.error=3.[0x03]
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/le_pa T=main | pa_sim_qmi.c pa_sim_GetCardEID() 3000 | Failed to get the EID
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/le_pa_ecall T=main | pa_ecall_qmi.c OEMCheckResponseCode() 124 | Sending QMI_SWI_M2M_ECALL_STOP_REQ_V01 failed: rc=0, resp.result=1.[0x01], resp.error=3.[0x03]
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/le_pa_ecall T=main | pa_ecall_qmi.c pa_ecall_End() 1238 | Could not End the eCall
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/le_pa_ecall T=main | pa_ecall_qmi.c OEMCheckResponseCode() 124 | Sending QMI_SWI_M2M_ECALL_SET_TX_MODE_REQ_V01 failed: rc=0, resp.result=1.[0x01], resp.error=3.[0x03]
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002]/le_pa_ecall T=main | pa_ecall_qmi.c OEMCheckResponseCode() 124 | Sending QMI_SWI_M2M_ECALL_GET_TX_MODE_REQ_V01 failed: rc=0, resp.result=1.[0x01], resp.error=3.[0x03]
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002] | tee: /dev/console: No such device
Mar 15 21:07:40 swi-mdm9x28-wp user.err Legato: =ERR= | modemDaemon[1002] | tee: /dev/console: No such device
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateResult: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/instanceId: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/internalState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isConnectionPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isInstallPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateResult: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/instanceId: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/internalState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isConnectionPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isInstallPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateResult: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/instanceId: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/internalState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isConnectionPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/fw/isInstallPending: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/updateResult: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/instanceId: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | avcFs.c ReadFs() 44 | failed to open /avc/sw/internalState: LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | osPortCredentials.c lwm2mcore_GetCredential() 97 | Unable to retrieve credentials for 7: /avms/LWM2M_DM_PSK_IDENTITY: -1 LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | osPortCredentials.c lwm2mcore_GetCredential() 97 | Unable to retrieve credentials for 9: /avms/LWM2M_DM_PSK_SECRET: -1 LE_NOT_FOUND
Mar 15 21:07:41 swi-mdm9x28-wp user.err Legato: =ERR= | avcDaemon[945]/avcDaemon T=main | osPortCredentials.c lwm2mcore_GetCredential() 97 | Unable to retrieve credentials for 10: /avms/LWM2M_DM_SERVER_ADDR: -1 LE_NOT_FOUND
Mar 15 21:07:45 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1077] | ERR* failed to write i2c data
Mar 15 21:07:45 swi-mdm9x28-wp user.err Legato: =ERR= | wifiService[1077] | FTL* Failed to enable PCA9548A I2C switch

hi am tring to use .cwe file to update application
for ex:- created .cwe file for App1 and am installing the .cwe file using the command fwupdate wp76xx “filename.update”

Connecting to service …
Download started …
Download successful
Installing & Reboot …
Timeout, server 192.168.2.2 not responding.
Connection interrupted, target is likely rebooting.

what is the reason for it

Is the official legato.cwe working for
“fwupdate download legato.cwe”?

https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-16-components/