[MangOH] [WP8548] WP8548 bricked with custom yocto build

Hello all,

I am unable to recover WP8548 (MangOH board) from (obviously bad) custom yocto image.
Symptoms:
What is happening is that the module is rebooting during the boot procedure I tapped into the serial port and here is what I am getting (I will short it):

[i][ 0.000000] Kernel is starting…

[ 3.644712] ubi0: scanning is finished
[ 3.653502] ubi0 error: vtbl_check: too large reserved_pebs 397, good PEBs 394
[ 3.659758] ubi0 error: vtbl_check: volume table check failed: record 0, error 9
[ 3.667083] Volume table record 0 dump:
[ 3.670929] reserved_pebs 397
[ 3.674103] alignment 1
[ 3.677155] data_pad 0
[ 3.680207] vol_type 1
[ 3.683229] upd_marker 0
[ 3.686281] name_len 6
[ 3.689424] name rootfs
[ 3.692873] usb 1-1.3: new high-speed USB device number 4 using msm_hsic_host
[ 3.699984] crc 0xf43cf3d2
[ 3.704104] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd2, error -22
ubiattach: error!: cannot attach mtd2
error 22 (Invalid argument)
rootfs: dev ‘/dev/ubi0_0’ ‘ubifs’
[ 3.742041] hub 1-1.3:1.0: USB hub found
[ 3.754951] hub 1-1.3:1.0: 5 ports detected
[ 3.778055] UBIFS error (pid: 85): cannot open “/dev/ubi0_0”, error -22rootfs: mount failed
rootfs: dev ‘/dev/ubi0_0’ does not existSystem error!

[ 3.809674] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000100
[ 3.809674]
[ 3.817945] CPU: 0 PID: 1 Comm: init Not tainted 3.14.29ltsi-c14b887744_39dcf2256d #2
[ 3.825820] [] (unwind_backtrace) from [] (show_stack+0x20/0x24)
[ 3.833511] [] (show_stack) from [] (dump_stack+0x20/0x28)
[ 3.840683] [] (dump_stack) from [] (panic+0x9c/0x1dc)
[ 3.847550] [] (panic) from [] (do_exit+0x4b0/0x90c)
[ 3.854234] [] (do_exit) from [] (do_group_exit+0x5c/0xdc)
[ 3.861437] [] (do_group_exit) from [] (__wake_up_parent+0x0/0x30)
[ 3.869342] [] (__wake_up_parent) from [] (ret_fast_syscall+0x0/0x30)
[ 3.977384] Rebooting in 5 seconds…
[ 8.973721] Going down for restAndroid Bootloader - UART_DM Initialized!!!
[10] ERROR: No misc partition found[/i]

After a couple of reboots a new tty device appears on my workstation:

New USB device found, idVendor=05c6, idProduct=9008
[18016.047443] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[18016.047453] usb 1-2: Product: QHSUSB_DLOAD
[18016.047461] usb 1-2: Manufacturer: Qualcomm CDMA Technologies MSM
[18016.048880] qcserial 1-2:1.0: Qualcomm USB modem converter detected
[18016.052668] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB0

What did I try to recover:
I tried the swiflash tool - it didn’t work. - fails on looking for serial port

How did I get here:
I had to resize the rootfs so I could accommodate larger image:

  • The procedure was a success using the AT!APPPARTCHG
  • I also had to modify UBI_ROOTFS_SIZE ?= “32MiB” in meta-swi-mdm9x15/conf/machine I put it to 48 (that I have to do so the yocto build could pass)
  • After this I uploaded the cwe file to the target (yocto-legato one) using fwupdate and it worked perfectly.
  • However I had problem with running legato procedures like cm and also the fwupdate service was not working.

At this point I assumed that the problem should be because since I changed the size of rootfs the starting address of the partition of the legato should have changes and I have not noted that anywhere in the yocto build’s settings.

Then I returned the partition sizes to the default ones using AT!APPPARTCHG= with the values (in the order of appearance: APPSBL, PAD, APPS, PAD, SYSTEM, PAD, USERDATA, PAD, USERAPP, PAD): 896, 128, 20096, 384, 50048, 384, 37888, 2560,140288,1280.
Again I flashed the stock firmware and the system worked fine.
Then I found a yocto’s meta-swi-extras meta-swi-extras/common/recipes/mdm9x15-partition-update/mdm9x15-partition-update/custom_partition.xml which described the partitions and their sizes - when comparing it to the result of AT!APPPARTCHG? there were obvious differences, so I modified it to match the AT!APPPARTCHG? values. Then I rebuilt the image and used fwupdate to upload the new image (the fwupdate completed successfully) and then the device was dead - as described above.

The SKU of the WP is 1102816

Can you suggest a potential fix to the situation?
In your opinion what caused the issue?
Why is there difference between the partitions yocto is working with and those on the device?
Any help will be appreciated.

Thanks in advance,
George

I post the recovery steps in windows for your reference. You can see the following link in Sierra web.
source.sierrawireless.com/resour … /swiflash/

1)Either toggle the TP1 pin to LOW or OFF position
Multi-switch(SW401) - 7. TP1_BOOT(Pri CF3 Pin 47, on MangOH board, this is switch number 7) //EN/DIS CF3 module’s TP1 (boot) signal.
PS: The system will stay boot mode
2)Check Sierra Wireless DM Port(COM12) exist?
3)Download your customer configuration file and the all SKUs carrier configuration file. Click the following exe files.
a) Customer WP8548 SKU 1102816 SWI9X15Y_07.10.04.00
b) Carrier Generic all SKUs Configuration 001.020_000
4)TP1 switch back to HIGH or ON position once the download finished.

Hello supercraig,

Thank you!
It worked like a charm. I tried it in Linux, after flipping the switch the device enumerated as ttyUSB0. Afterwards
using swiflash:
$swiflash -m “WP85XX” -i 1102816_9905383_WP8548_07.10.04.00_00_Generic_001.006_000-field.spk #For the firmware
$swiflash -m “WP85XX” -i 9999999_9904559_SWI9X15Y_07.10.04.00_00_GENERIC_001.020_000-field.spk - for the carrier configuration.
Now that I know I could recover the SoC, I will continue my investigation on the Yocto more confidently. :slight_smile:

Best Regards,
George

Hi George,
Good job. Glad to hear the good news and may you can overcome everything.
Hope the information can help all who meet the issue.