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?
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.
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.
$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
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)
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.
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.
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 @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.
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?
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.
Were you operating on a VM or a dedicated host? I have not been able to successfully run swiflash from my Ubuntu VM, but fwupdate has worked well so far.
I never really figured this out. To my knowledge, swiflash is another proprietary wrapper around proprietary Qualcomm software. I’m not sure if the bug is actually in swiflash itself or something related to the host computer. I tried from a few different towers running Ubuntu 16 and never got anywhere (I even double checked the mangOH getting started docs). For this reason I don’t adopt closed source projects such as the mangOH anymore (some of it’s open, but not the bits that matter).