Device error code: 0x83 - Image size out of range

I have detailed information below, I’m getting the Device error code: 0x83 - Image size out of range when we flash the software into the module. I have sufficient space in the module. side
Tool Version
swicwe (version 1.29) - Tool to handle CWE and SPK images

swicwe -o mycust.spk -c 9999999_9907152_SWI9X07Y_02.37.06.05_00_GENERIC_002.128_000.spk yocto_wp76xx.4k.cwe legato-squashfs.ubi.cwe
input image type is SPKG
input image type is APPL
input image type is APPL
Parsing input file 9999999_9907152_SWI9X07Y_02.37.06.05_00_GENERIC_002.128_000.spk
Type Size(Exclude Header) Product Compress Version
*SPKG 28687209 Y921 0 9999999_9907152_SWI9X07Y_02.37.06.05_00_GENERIC_002.128_000
*BOOT 420864 Y921 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
HASH 6480 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
SBL1 413584 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
*MODM 28216140 Y921 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
HASH 6560 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
TZON 522748 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
QRPM 160112 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
DSP2 27525120 9X28 0 SWI9X07Y_02.37.06.05 b15b59 AZUSW2-CTO-CRG-sign-production-wp76xx-1678 2022/09/29 0909/29/22
*FILE 49005 Y921 0 9999999_9907152_SWI9X07Y_02.37.06.05_00_GENERIC_002.128_000
Parsed image is SPKG, finding components
Found BOOT component
Found MODM component
Found FILE component
Parsing input file yocto_wp76xx.4k.cwe
Type Size(Exclude Header) Product Compress Version
*APPL 34988904 Y921 0 SWI9X07Y_03.01.07.00 2025/01/29 16:45:13
SYST 23592960 9X28 0 SWI9X07Y_03.01.07.00 2025/01/29 16:45:13
APPS 11395144 9X28 0 4.14.253 20250129164654
Parsed image is Legato/Linux
Parsing input file legato-squashfs.ubi.cwe
Type Size(Exclude Header) Product Compress Version
*APPL 9699728 Y921 0 21.05.2.rc2 MYLOVM 2025/01/29 21:36:11
USER 9699328 9X28 0 21.05.2.rc2 MYLOVM 2025/01/29 21:36:11
Parsed image is Legato/Linux
Concatenating images

CWE Header Generator 3.01. Copyright Sierra Wireless, Inc., 2012
Output CWE Header File /tmp/temp.mbn.hdr
Image size 0x45fa381, crc32 0xed71a7ce

cm info

Device: WP7608
IMEI: XXXXXXXXXXXX
IMEISV: 12
FSN: XG223530161410
Firmware Version: SWI9X07Y_02.37.06.05 b15b59 jenkins 2022/09/27 07:54:33
Bootloader Version: SWI9X07Y_02.37.06.05 b15b59 jenkins 2022/09/27 07:54:33
MCU Version: 002.015
PRI Part Number (PN): 9908665
PRI Revision: 001.002
Carrier PRI Name: GENERIC
Carrier PRI Revision: 002.128_000
SKU: 1104194
Last Reset Cause: Reset, User Requested
Resets Count: Expected: 325 Unexpected: 1

Build host: MCPCM
Versions:

  • poky: yocto-3.1.15-44-g38c55bd
  • meta-openembedded: 86b864a
  • meta-swi: 4c8281f
  • meta-swi-extras: e41a336
  • linux-msm-4.14: 4.14.253

using SDK for WP76 ( Release 17 + Legato 21.05.rc2 )

partition?
PART BLOCK SIZE
NAME OFFSET (KB)
0:SBL 00000000 2560
0:MIBIB 0000000A 2560
0:BACKUP 00000014 6656
0:SECURITY 0000002E 1024
0:PERSIST 00000032 2048
0:EFS2 0000003A 17920
0:SWIFOTA 00000080 81152
0:TZ 000001BD 1536
0:DEVCFG 000001C3 768
0:RPM 000001C6 768
0:modem 000001C9 32768
0:aboot 00000249 1024
0:boot 0000024D 15360
0:system 00000289 45056
0:LEFWKRO 00000339 8960
0:SWIRW 0000035C 25600
0:USERAPP 000003C0 153088
0:RESERVED 00000616 22528
0:SLOT_2 0000066E 34304
0:SLOT_1 000006F4 34304
0:SLOT_0 0000077A 34304

OK

FTD Output (failed ):

FDT version: 1.0.1902.1
Awaiting suitable port or adapter …
Switching to boot & hold mode …
Disabling selective suspend …
Awaiting port removal …
Awaiting download port …
Switching to streaming mode …
Downloading images …
Writing image
Flashing image /
Enabling selective suspend …
Firmware download failed.
Primary error code: 77 - Failed in streaming download stage.
Secondary error code: 68 - Received incorrect response.
Device error code: 0x83 - Image size out of range.

Preexisting images information:
Current:
Firmware:
ImageId:
BuildId:
Configuration:
ImageId:
BuildId:
Final images information:
Current:
Firmware:
ImageId:
BuildId:
Configuration:
ImageId:
BuildId:

OEM PRI:

IMEI:

Total time elapsed: 46032 ms.

Time to switch to boot mode: 9985 ms.

Images downloaded:
Image ID: 002.128_000
Build ID: 02.37.06.05_GENERIC
failed

Time to reset to application mode: -1 ms.

If I flash only the file “yocto_wp76xx.4k.cwe,” it is successful.

Probably your legato-squashfs.ubi.cwe is too big

even I tried with simple “hello world code”. but no luck.
Also I can update application from the VSC. working fine.
Problem with the swicwe tool

From the partition size, legato image should be less than 9MB

I just tried holloword project. still size is higher.
how to reduce the size ?
can we remove some exisiting app ?
how to increase legatofw partision size ?

You can see here:

You need to ask distributor to give you a tool to enable at!partition command

I have expanded the LEFWKRO partition to 15MB and successfully flashed the code. However, I have encountered a new issue during bootup. & it keeps rebooting.

boot_verifier: Error while reading signature length.

Log Type: B - Since Boot(Power On Reset), D - Delta, S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.1.2-00096
S - IMAGE_VARIANT_STRING=LAATANAZA
S - OEM_IMAGE_VERSION_STRING=SWI9X07Y_03.01.07.00 41ad93 jenkins 2023/03/16 10:58:16
S - Boot Config, 0x000002e1
B - 1216 - PBL, Start
B - 3720 - bootable_media_detect_entry, Start
B - 4282 - bootable_media_detect_success, Start
B - 4286 - elf_loader_entry, Start
B - 7820 - auth_hash_seg_entry, Start
B - 31534 - auth_hash_seg_exit, Start
B - 83677 - elf_segs_hash_verify_entry, Start
B - 130743 - PBL, End
B - 138988 - SBL1, Start
B - 200873 - pm_device_init, Start
B - 220942 - PM_SET_VAL:Skip
D - 18757 - pm_device_init, Delta
B - 222589 - boot_config_data_table_init, Start
D - 0 - boot_config_data_table_init, Delta - (0 Bytes)
B - 231068 - CDT version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:129
B - 237869 - sbl1_ddr_set_params, Start
B - 241712 - Pre_DDR_clock_init, Start
D - 213 - Pre_DDR_clock_init, Delta
D - 0 - sbl1_ddr_set_params, Delta
B - 254400 - pm_driver_init, Start
D - 4453 - pm_driver_init, Delta
B - 260653 - cpr_init, Start
D - 122 - cpr_init, Delta
B - 265319 - cpr_cx_mx_apc_vol_update, Start
D - 91 - cpr_cx_mx_apc_vol_update, Delta
B - 280508 - clock_init, Start
D - 152 - clock_init, Delta
B - 280752 - boot_flash_init, Start
D - 40443 - boot_flash_init, Delta
B - 324215 - boot_flash_swi_ddr_init, Start
D - 31293 - boot_flash_swi_ddr_init, Delta
B - 518134 - hw_family:5, hw_type:23, hw_rev:40
B - 522068 - SSMEM init OK
B - 525942 - DEBUG OU: 0000000000000002
B - 526003 - DEBUG OU - setting: 2
B - 526796 - is_memory_dump_allowed (0) in this secure module
B - 546956 - USB non-zero endpoint requirements: 9 in, 5 out
B - 548725 - opening partition 0:SWIFOTA
B - 550830 - error for readpage:0
B - 554063 - DWL-get: ecnt=5 code=0
B - 563365 - API change: date not generated by cwe_header_init
B - 570197 - Failed to read size: /swinv/item_files/CUST_IM_SWITCH_HIDE
B - 576389 - Failed to read size: /swinv/item_files/FOTA_PARTITION
B - 577487 - Failed to read size: /swinv/item_files/CUST_IM_CONFIG
B - 589534 - flags: u=1 e=1 obmsk=c,0
B - 598044 - error for readpage:0
B - 598532 - error for readpage:64
B - 599172 - error for readpage:128
B - 602283 - error for readpage:192
B - 605333 - ssmem_release: region 20 not exists
B - 610000 - ssmem_get: region 20 not exists
B - 616283 - Image Load, Start
D - 145851 - QSEE Image Loaded, Delta - (930032 Bytes)
D - 213 - boot_pm_post_tz_device_init, Delta
B - 766556 - sbl1_efs_handle_cookies, Start
D - 30 - sbl1_efs_handle_cookies, Delta
B - 774486 - Image Load, Start
D - 38918 - DEVCFG Image Loaded, Delta - (31520 Bytes)
B - 813465 - Image Load, Start
D - 30 - SEC Image Loaded, Delta - (0 Bytes)
B - 820084 - Image Load, Start
D - 55907 - RPM Image Loaded, Delta - (154680 Bytes)
B - 876692 - Image Load, Start
B - 878949 - Auth disabled for image 9
B - 925797 - error for readpage:0
B - 926285 - error for readpage:64
B - 926925 - error for readpage:128
B - 930067 - error for readpage:192
B - 933086 - ssmem_release: region 20 not exists
B - 937753 - ssmem_get: region 20 not exists
D - 65331 - APPSBL Image Loaded, Delta - (440068 Bytes)
B - 947299 - QSEE Execution, Start
D - 854 - QSEE Execution, Delta
B - 953979 - SBL1, End
D - 817370 - SBL1, Delta
S - Throughput, 8000 KB/s (1743540 Bytes, 195099 us)
S - DDR Frequency, 240 MHz
Android Bootloader - UART_DM Initialized!!!
[10] QUP: I2C status flags :0x1363c8
[10] QUP: I2C status flags :0x11163c8
[30] QUP: I2C status flags :0x1363c8
[40] QUP: I2C status flags :0x11163c8
[60] QUP: I2C status flags :0x1163c8
[60] I2C slave addr:0x71 not connected
[70] ERROR: No devinfo partition found
[70] Neither ‘config’ nor ‘frp’ partition found
[70] ERROR: No misc partition found
[1850] boot_verifier: Error while reading signature length.
[1860] SSMEM init OK[1860] ssmem_get: region 20 not exists[1860] SWI: auth failed, OEM auth disabled
[1960] ERROR: No devinfo partition found
[1970] DEBUG: cmdline has root=
[2020] Channel alloc freed

so problem is related to your legato image?
If you download only the official legato image, will it boot up successfully?

If you download only the official Legato image, will it boot up successfully?

yes, it has boot up successfully.

also, I would like to give you below test result,

  1. I flashed (“fdt yocto_wp76xx.4k.cwe”) my custom yocto image, and it has booted successfully. no problem

  2. later I flashed (“fdt legato-squashfs.ubi.cwe”) my custom legato image and it booted successfully and changes were reflected in the device. now I can see both changes. no problem.

The problem is seen only after merging all those makes spk file and flash “fdt mycust.spk” .

swicwe -o mycust.spk -c 9999999_9907152_SWI9X07Y_02.37.06.05_00_GENERIC_002.128_000.spk yocto_wp76xx.4k.cwe legato-squashfs.ubi.cwe

is there any problem with the above command?

you can make a test with all official cwe images to verify if your swicwe command tool has problem :

https://source.sierrawireless.com/resources/airprime/software/wp76xx/wp76xx-firmware-release-17-components/#sthash.D7KJCnJ0.dpbs

BTW, how about “modem image+ yocto image” or “modem image + legato image” or “yocto image + legato image”?