# Flash custom firmware fails

**URL:** https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021
**Category:** mangOH Green
**Created:** [December 22, 2017, 8:41am UTC](https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021 "2017-12-22T08:41:07Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![dingo](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dingo](https://mangoh.discourse.group/u/dingo)
#### Post date: [December 22, 2017, 8:41am UTC](https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021/1 "2017-12-22T08:41:07Z")

</div>

swicwe -o custom-firmware.spk -c 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000.spk mcufw\_001.011.cwe boot-yocto\_wp85.cwe legatoz.cwe boot\_wp85.cwe user1-single-part-ubifs-empty\_wp85.cwe yocto\_wp85.cwe

link file 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000.spk  
Type Size(Exclude Header) Product Compress Version  
\*SPKG 24549675 9X15 0 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000  
\*BOOT 528428 Y912 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
QRPM 104672 9X15 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
SBL2 422956 9X15 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
\*MODM 23976402 Y912 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP1 1861297 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP2 19753073 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP3 2360832 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
\*FILE 43645 9X15 0 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000  
24549675+0 records in  
24549675+0 records out  
24549675 bytes (25 MB, 23 MiB) copied, 22.6156 s, 1.1 MB/s

link file mcufw\_001.011.cwe  
Type Size(Exclude Header) Product Compress Version  
\*FILE 14579 9X15 0 9999999\_9999999\_MCU\_001.011\_00\_00\_00  
29+1 records in  
29+1 records out  
14979 bytes (15 kB, 15 KiB) copied, 5.6739e-05 s, 264 MB/s

link file boot-yocto\_wp85.cwe  
Type Size(Exclude Header) Product Compress Version  
\*APPL 29894478 Y912 0 Thu Apr 27 02:28:16 PDT 2017  
SYST 25821531 9X15 1 Thu Apr 27 02:28:16 PDT 2017  
APBL 74572 9X15 0 Thu Apr 27 02:28:16 PDT 2017  
APPS 3997175 9X15 1 Thu Apr 27 02:28:16 PDT 2017  
58388+1 records in  
58388+1 records out  
29894878 bytes (30 MB, 29 MiB) copied, 0.0708352 s, 422 MB/s

link file legatoz.cwe  
Type Size(Exclude Header) Product Compress Version  
\*APPL 2311324 Y912 0 16.10.3 40eaf32 jenkins 2017/04/28 04:06:58  
USER 2310924 9X15 1 16.10.3 40eaf32 jenkins 2017/04/28 04:06:58  
4515+1 records in  
4515+1 records out  
2311724 bytes (2.3 MB, 2.2 MiB) copied, 0.00505263 s, 458 MB/s

link file boot\_wp85.cwe  
Type Size(Exclude Header) Product Compress Version  
\*APPL 74972 Y912 0 Thu Dec 21 19:06:38 EST 2017  
APBL 74572 9X15 0 Thu Dec 21 19:06:38 EST 2017  
147+1 records in  
147+1 records out  
75372 bytes (75 kB, 74 KiB) copied, 0.000218721 s, 345 MB/s

link file user1-single-part-ubifs-empty\_wp85.cwe  
Type Size(Exclude Header) Product Compress Version  
\*APPL 262544 Y912 0 Thu Dec 21 19:06:42 EST 2017  
UAPP 262144 9X15 0 Thu Dec 21 19:06:42 EST 2017  
513+1 records in  
513+1 records out  
262944 bytes (263 kB, 257 KiB) copied, 0.000570465 s, 461 MB/s

link file yocto\_wp85.cwe  
Type Size(Exclude Header) Product Compress Version  
\*APPL 29800140 Y912 0 Thu Dec 21 19:06:38 EST 2017  
SYST 25804287 9X15 1 Thu Dec 21 19:06:38 EST 2017  
APPS 3995053 9X15 1 Thu Dec 21 19:06:38 EST 2017  
58204+1 records in  
58204+1 records out  
29800540 bytes (30 MB, 28 MiB) copied, 0.0715646 s, 416 MB/s

CWE Header Generator 3.00. Copyright Sierra Wireless, Inc., 2012  
Output CWE Header File /tmp/temp.mbn.hdr  
Image size 0x52e24a0, crc32 0x5eb2bcb8

dingo@dingo-P65-P67RGRERA:~/yocto/build\_bin/tmp/deploy/images/swi-mdm9x15$ swicwe --parse custom-firmware.spk Type Size(Exclude Header) Product Compress Version  
\*SPKG 86910112 Y912 0 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000  
\*BOOT 528428 Y912 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
QRPM 104672 9X15 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
SBL2 422956 9X15 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
\*MODM 23976402 Y912 0 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP1 1861297 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP2 19753073 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
DSP3 2360832 9X15 1 SWI9X15Y\_07.12.09.00 r34123 CARMD-EV-FRMWR1 2017/04/26 23:34:19  
\*FILE 43645 9X15 0 9999999\_9904559\_SWI9X15Y\_07.12.09.00\_00\_GENERIC\_001.033\_000  
\*FILE 14579 9X15 0 9999999\_9999999\_MCU\_001.011\_00\_00\_00  
\*APPL 29894478 Y912 0 Thu Apr 27 02:28:16 PDT 2017  
SYST 25821531 9X15 1 Thu Apr 27 02:28:16 PDT 2017  
APBL 74572 9X15 0 Thu Apr 27 02:28:16 PDT 2017  
APPS 3997175 9X15 1 Thu Apr 27 02:28:16 PDT 2017  
\*APPL 2311324 Y912 0 16.10.3 40eaf32 jenkins 2017/04/28 04:06:58  
USER 2310924 9X15 1 16.10.3 40eaf32 jenkins 2017/04/28 04:06:58  
\*APPL 74972 Y912 0 Thu Dec 21 19:06:38 EST 2017  
APBL 74572 9X15 0 Thu Dec 21 19:06:38 EST 2017  
\*APPL 262544 Y912 0 Thu Dec 21 19:06:42 EST 2017  
UAPP 262144 9X15 0 Thu Dec 21 19:06:42 EST 2017  
\*APPL 29800140 Y912 0 Thu Dec 21 19:06:38 EST 2017  
SYST 25804287 9X15 1 Thu Dec 21 19:06:38 EST 2017  
APPS 3995053 9X15 1 Thu Dec 21 19:06:38 EST 2017  
Segmentation fault (core dumped)  
dingo@dingo-P65-P67RGRERA:~/yocto/build\_bin/tmp/deploy/images/swi-mdm9x15$ instsys custom-firmware.spk 192.168.2.2  
Applying update from file ‘custom-firmware.spk’ to device at address ‘192.168.2.2’.  
Unpacking package: 0%  
FAILED

\*\*\*Error: Received bad update package. See log for details.  
Update failed  
Systems installed:  
11 [good] \<-- current  
Legato framework is running.

Jan 7 17:54:20 swi-mdm9x15 [authpriv.info](http://authpriv.info) dropbear[28207]: Child connection from 192.168.2.3:33292  
Jan 7 17:54:21 swi-mdm9x15 authpriv.notice dropbear[28207]: Auth succeeded with blank password for ‘root’ from 192.168.2.3:33292  
Jan 7 17:54:21 swi-mdm9x15 [user.info](http://user.info) Legato: INFO | updateDaemon[6023]/updateDaemon T=main | updateDaemon.c le\_update\_Start() 1792 | Update request accepted.  
Jan 7 17:54:21 swi-mdm9x15 [user.info](http://user.info) Legato: INFO | updateDaemon[28210]/framework T=main | LE\_FILENAME user\_Create() 979 | Created user ‘SecurityUnpack’ with uid 1007 and gid 1007.  
Jan 7 17:54:21 swi-mdm9x15 user.err Legato: =ERR= | updateDaemon[6023]/updateDaemon T=main | updateUnpack.c JsonErrorHandler() 300 | Malformed update pack (Document must start with ‘{’ or ‘[’. (at line 1))  
Jan 7 17:54:21 swi-mdm9x15 user.err Legato: =ERR= | updateDaemon[6023]/updateDaemon T=main | updateDaemon.c UpdateFailed() 417 | Update failed!!  
Jan 7 17:54:21 swi-mdm9x15 user.crit Legato: _CRT_ | updateDaemon[6023]/updateDaemon T=main | updateDaemon.c PipelineDone() 1638 | security-unpack was killed by signal 13.  
Jan 7 17:54:21 swi-mdm9x15 [authpriv.info](http://authpriv.info) dropbear[28207]: Exit (root): Disconnect received  
Jan 7 17:54:21 swi-mdm9x15 [authpriv.info](http://authpriv.info) dropbear[28211]: Child connection from 192.168.2.3:33294  
Jan 7 17:54:22 swi-mdm9x15 authpriv.notice dropbear[28211]: Auth succeeded with blank password for ‘root’ from 192.168.2.3:33294  
Jan 7 17:54:22 swi-mdm9x15 [authpriv.info](http://authpriv.info) dropbear[28211]: Exit (root): Disconnect received

---

<div class="post-metadata">

### Author: ![dingo](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dingo](https://mangoh.discourse.group/u/dingo)
#### Post date: [December 22, 2017, 9:55am UTC](https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021/2 "2017-12-22T09:55:07Z")

</div>

yeah… ok nevermind i figured it out… the docs arent very clear with the new instsys and swiflash tools usage

---

<div class="post-metadata">

### Author: ![dfrey](https://sea2.discourse-cdn.com/flex016/user_avatar/mangoh.discourse.group/dfrey/32/303_2.png) [@dfrey](https://mangoh.discourse.group/u/dfrey)
#### Post date: [December 22, 2017, 7:49pm UTC](https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021/3 "2017-12-22T19:49:02Z")

</div>

Can you explain the solution so that others who have the same problem in the future have an easier time solving the problem?

---

<div class="post-metadata">

### Author: ![dingo](https://avatars.discourse-cdn.com/v4/letter/d/c2a13f/32.png) [@dingo](https://mangoh.discourse.group/u/dingo)
#### Post date: [December 22, 2017, 9:11pm UTC](https://mangoh.discourse.group/t/flash-custom-firmware-fails/1021/4 "2017-12-22T21:11:56Z")

</div>

> [@dingo](#):
>
> $ instsys custom-firmware.spk 192.168.2.2

is not how to flash the spk …

swiflash -m “WP85XX” -i custom-firmware.spk would be correct… however we use instsys name.wp85.update 192.168.2.2 … and the documentation between the two doesnt seem to exist, so some clarity would be helpful.
