How to flash new kernel to mangOH


#1

I bought a new mangOH green device, and I want to customize its kernel.

I couldn’t find any procedure for loading or building a kernel.

From searching the internet it looks like legato-af is the project you use to build the new kernel, and indeed after building it I can see the file ./build_bin/tmp/deploy/images/swi-mdm9x15/boot-yocto_wp85.cwe.

It looks like swiflash -m wp85 -i boot-yocto_wp85.cwe should work, but I’m not entirely sure.

I also saw the fwupdateService running on the mangOH, and I’m not sure. Does swiflush communicate with this service?

If this is the case, how would I be able to reflash the device if I accidentally flash a corrupted kernel.

Is there a document describing the flashing components architecture?

Thanks


#2

Hey @ohad,

The source you need to customize the base OS can be found here: https://source.sierrawireless.com/resources/legato/downloads/.

Instructions on building this code can be found here: https://source.sierrawireless.com/resources/legato/linuxoverview/. The download page is a little confusing, so I circled the ones you want.

In theory, you should be able to produce a custom .cwe file and flash it as described. The fwupdateService is used with the fwupdate command line tool to flash .spk files (I’m not certain what the difference is here, Sierra Wireless seems to provide pre-built firmware as .spk files).

I’m currently waiting on better build hardware to try this out. I ran it on an Ubuntu virtual machine on my late 2016 MacBook Pro and it was far too slow to make this effective. I’ll keep you updated as I go.

Cheers!


#3

Hi @nick ,

Thank you for your help.

I was able to flash the device using fwupdate tool. However, I’d like to be able to recover the device even if it cannot to up and is in bootloader mode. I looked at fastboot and swiflash tools for that. The swiflash tool failed on download of the firmware. Regarding the bootloader, I’m not sure what should be the image to recover the device(Mangoh Green WP8548) with.

Thanks,

Ohad


#4

And here’s the output:

$swiflash -m “WP85XX” -i WPx5xx_Release14_GENERIC_SPK.spk
Detecting USB of the target
DONE
Communicating with the target
DONE
Switching to firmware download mode
…DONE
Downloading the firmware
…ERROR: Firmware Download failed. Callback status 59399DONE
ERROR: Firmware Download Failed


#5

Is there a reason why you’re loading release 14 instead of release 15?


#6

Hey @ohad,

I believe swiflash is designed to be used with .cwe files. I’ve been installing .spk files by invoking fwupdate download <firmwareFile> <targetIP>.


#7

Hey @nick,

I followed the recovery procedure at https://source.sierrawireless.com/resources/legato/wpxxxxrecoveryprocedure/
@dfrey, there’s no reason to use release 14, I tried both 14 and 15 with the same results.


#8

Hey here,
Some information concerning images flashing:

  • both fwupdate and swiflash work with both .cwe and .spk files
  • actually, a .spk is by convention a composite concatenation of several .cwe images (e.g. modem Firmware image + linux image + legato image)
  • the difference between fwupdate and swiflash is:
    • fwupdate (host script) works over an SSH connection, to provision the file and call the fwupdate (embedded tool) to apply the update from the Linux land.
    • swiflash works at a lower level, requiring a physical USB connection to the device, and is able to perform download even if linux or legato is not running correctly on the device
      (designed for recovery use cases)

#9

What @daav said is useful and correct. One other tool that exists in the same area is FDT2. FDT2 (like swiflash) can be used to recover units that don’t have a functional ssh service running. FDT2 runs on Windows whereas swiflash runs on Linux.


#10

Hey all,

I was successfully flashing official firmware packages with swiflash but I’ve been seeing Callback status 59399DONE as reported by @ohad since earlier today (on 7 separate units and 2 separate computers). I have a feeling this has something to do with the host setup but I’m not sure.


#11

Hi guys,

We succeeded to execute swiflash from another PC. The problem seems to be related to USB drivers on the laptop we tried to flash from(Dell Latitude 5580, Ubuntu 16.04). After we succeeded to flash from another laptop, we could do it also from the original laptop after rebooting it and when the USB1 device comes up properly(which does not always happen…).

Thanks for the help,
Ohad


#12

Thanks @ohad. I definitely suspected the issue was the host computer since my entire fleet stopped working a the same time. I’ll give this a go in a few hours.


#13

I spent an hour or so re-installing Ubuntu 16.04 and it works now.07f8a91fb093452bea90e52a208c62c6


#14

Hey all,

My issues with swiflash appear to be back… that means I got 14 days out of this Ubuntu installation with working swiflash. I have no idea what causes this, but it’s not feasible to simply re-install the OS every time this goes sideways.

Does swiflash have some cache or configuration files I should be clearing?


#15

Hi @nick

a swiflash update was posted yesterday (4.6)
Please can you update with apt and try again?


#16

Hey @daav,

I’ve tested with swiflash 4.6 and 4.5. This issue seems to be following my host computer. I’m also having trouble applying updates over fwupdate for some reason. I’ll keep you guys posted as I investigate this.

Cheers!