Packaging Legato on Windows


#1

Hiya,

How do I build an executable for windows that contains an installer and my customized system.update legato image?

I’m looking for something similar to the way a firmware update is done - plug the device in, run the exe, all done. I can sort of do it in linux by creating a .cwe or .spk and using swiflash - but I need to do it in Windows.

Having the user scp’ing the .update file to the WP and then running native linux commands on the WP is NOT an option! You wouldn’t believe the mess we got into trying that…

ciao, Dave


#2

how about using systocwe to change the .update file to cwe?
https://docs.legato.io/latest/toolsHost_systocwe.html


#3

Hiya,

Ta. I’ve tried that and it works OK - for linux and a linux literate client.

But as I mentioned, I need to provide a Windows executable that behaves the same as a Sierra Supplied firmware update package.

ciao, Dave


#4

if you extract the official FW upgrade exe file, there is a fdt2.exe which I believe it is used to download the FW to module.
If you open the .exe by WINRAR, you can see


; Auto-generated, Do not edit - contains SFX script commands
;
; CWE File: WP76xx_Release9_RC4_TELSTRA_test.spk

TempMode
Silent=1
Overwrite=1
Setup=fdt2.exe -force -d wpspk -f WP76xx_Release9_RC4_TELSTRA_test.spk


I believe you can do the same for your cwe file.


#5

Cool, Thanks.

I’ll give it a go and see how I get on.

Much appreciated.

ciao, Dave


#6

Hi @davidc

It’s not much documented (well… not at all…) but the swiflash ZIP file (see https://source.sierrawireless.com/resources/airprime/software/swiflash/) contains both FDT and a swiflash.bat script that replicates the swiflash interface for Windows.
That’s what was used by DS to address recovery use cases on Windows.

Note that if you’re on Windows 10, swiflash deb package contains it as well, so that if you install swiflash on WSL, it routes to FDT in order to give the same behavior than on Linux.

(Please be kind: those procedures haven’t be tested for a while, but the is a good chance they can fit your need :wink: )

Side node: having a standalone exe won’t dispense the final user to install the Windows USB driver to use it.


#7

Hi @daav

Ta. Something to look into tonight.

I seem to hacked together something that sort of works using 7zip and the bits I pulled out of a WP77 firmware update package. Not 100% happy with it, but it will get me started.

As an aside, what’s teh difference between a cwe file and a spk file? The linux tools build a cwe file, but the installer uses a spk file - although is seems to be able to use a cwe file as well.

ciao, Dave


#8

Hi @davidc

cwe/spk files are basically the same file format.
By convention, spk should be a concatenation of cwe, but some cwe are concatenations as well.


#9

Hi @daav

Thanks for that. Much appreciated.

I’ve managed to hack together a windows based installer that mostly works.

fdt2 appears to connect to the module and upload the .cwe file - but then never reconnects after forcing a reboot, and a couple of screens of errors are thrown before the dosbox closes.

Application seems to have been uploaded OK though.

Thanks for the help.

ciao, Dave