Unable to flush using either fastboot or qdl

I got my RB5 before there’s a 96board release and I’m trying to switch to it from the vendor version. The board can still boot into a login screen on the debug UART port showing “Ubuntu 18.04.5 LTS qrb5165-rb5” which I think was the version from thundercomm.

I’ve tried both the fastboot and recovery installation methods from Installation for Qualcomm Robotics RB5 development kit - 96Boards but couldn’t get either to work correctly.

  1. For the fastboot method, I don’t see the “blue LED” turning on. From the debug UART, however, I can see that it did start the fastboot,

    Launching fastboot
    Fastboot Build Info: Nov 16 2020 15:05:04
    usb_shared_hs_phy_init: hs phy cfg size: 12
    usb_shared_ss_phy_init: ss phy cfg size: 143
    ssusb_phy_init_success_lane_B: 1
    Fastboot: Initializing...
    VB: Non-secure device: Security State: (0xF7F)
    Fastboot: Processing commands
    Failed to get the graphics output protocol.
    Failed to get the graphics output protocol.
    Failed to get width or height
    Failed to get the graphics output protocol.
    Failed to get the graphics output protocol.
    Unable to show fastboot menu on screen: Out of Resources
    

    There seems to be some failures but these doesn’t prevent fastboot from showing up on the host. I can see

    ZTQ39M16002Z    fastboot
    

    from fastboot devices on the host. However, when I try to flash the bootloader using ./flashall, it stops doing anything AFAICT after printing

    Sending 'partition:0' (44 KB)
    

    and on the debug UART I see

    Handling Cmd: getvar:has-slot:partition
    Handling Cmd:
    
    Fastboot Send Fail
    Handling Cmd: getvar:is-logical:partit
    Handling Cmd: download:0000b000:partit
    
    DXE_ASSERT!: /home/scm/jenkins/workspace/VerifyBuild-for-IOT-18.04/build-dir/SDK_MANAGER-rb5165-lu1.0-post_cs-dev/apps_proc/build-qti-distro-ubuntu-fullstack-debug/tmp-gli (691):
    

    So something seems to be wrong here…

  2. For the recovery method, first of all the qdl command gets stuck immediately (without printing anything) half the time. When it works, it would get stuck after

    LOG: INFO: End of supported functions 15
    LOG: INFO: Calling handler for configure
    LOG: INFO: Storage type set to value UFS
    LOG: INFO: Calling handler for program
    [PROGRAM] flashed "rootfs" successfully
    LOG: INFO: Calling handler for program
    

    (and sometimes before the rootfs message). (From the debugger it hangs in a poll waiting for reply from the ttyUSB and a brief look at wireshark shows a lot of traffic with -EINPROGRESS) I’ve waited up to a few minutes here and there’s no progress at all.

    The debug UART prints,

    Format: Log Type - Time(microsec) - Message - Optional Info
    Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
    S - QC_IMAGE_VERSION_STRING=BOOT.XF.3.2-00310-SM8250-1
    S - IMAGE_VARIANT_STRING=Soc8250LAA
    S - OEM_IMAGE_VERSION_STRING=crm-ubuntu12
    S - Boot Interface: USB
    S - Secure Boot: Off
    S - Boot Config @ 0x00786070 = 0x00000001
    S - JTAG ID @ 0x00786130 = 0x0015a0e1
    S - OEM ID @ 0x00786138 = 0x00000000
    S - Serial Number @ 0x00786134 = 0x04e6db9e
    S - OEM Config Row 0 @ 0x007841e0 = 0x0000000000000000
    S - OEM Config Row 1 @ 0x007841e8 = 0x0000000000000000
    S - Feature Config Row 0 @ 0x007841f8 = 0x0040200000000400
    S - Feature Config Row 1 @ 0x00784200 = 0xc000000000000000
    S - Core 0 Frequency, 1516 MHz
    S - PBL Patch Ver: 5
    S - PBL freq: 600 MHZ
    D -      6204 - pbl_apps_init_timestamp
    D -    484123 - bootable_media_detect_timestamp
    D -   3393137 - bl_elf_metadata_loading_timestamp
    D -       735 - bl_hash_seg_auth_timestamp
    D -     89457 - bl_elf_loadable_segment_loading_timestamp
    D -      6263 - bl_elf_segs_hash_verify_timestamp
    D -      7010 - bl_sec_hash_seg_auth_timestamp
    D -       818 - bl_sec_segs_hash_verify_timestamp
    D -        34 - pbl_populate_shared_data_and_exit_timestamp
    S -   3987781 - PBL, End
    B -   3973692 - SBL1, Start
    B -   4088220 - SBL1 BUILD @ 06:35:11 on Nov 20 2020
    D -      1220 - sbl1_hw_init
    D -        30 - boot_flash_init
    D -       915 - sbl1_xblconfig_init
    D -         0 - boot_config_data_table_default_init
    B -   4104507 - Using default CDT
    D -      4697 - boot_config_data_table_init
    B -   4112345 - CDT Version:3,Platform ID:8,Major ID:1,Minor ID:0,Subtype:0
    D -     17233 - sbl1_hw_platform_pre_ddr
    D -      6314 - pmic DevPrg init
    D -      6314 - sbl1_hw_pre_ddr_init
    D -         0 - boot_dload_handle_forced_dload_timeout
    D -        91 - sbl1_ddr_set_params
    B -   4147298 - Can't detect if LP5 or LP4. If it fails to start check build/harware combo
    B -   4171729 - eCDT MRR - Data Starting Address: 0x09066D00
    
    B -   4173071 - DSF version = 156.8.14
    B -   4177341 - Manufacturer ID = 1, Device Type = 8
    B -   4180909 - Rank 0 size = 4096 MB, Rank 1 size = 4096 MB
    D -     38613 - sbl1_ddr_init
    D -        30 - boot_pre_ddi_entry
    D -        61 - sbl1_do_ddr_training
    B -   4197379 - DevProg DDR Entry
    B -   4200612 - usb: init start
    B -   4203662 - usb: enum_carried_from_pbl
    B -   4206621 - usb: HIGH , 0x900e
    B -   4210616 - usb: ENUM success
    B -   4213819 - usb: vbus_det_pm_unavail
    B -   4321118 - usb: host sends ZLP
    B -   4379129 - UFS INQUIRY ID: SAMSUNG KLUDG4UHDB-B2D1 0400
    B -   4380593 - UFS Boot LUN: 1
    

    The Can't detect if LP5 or LP4. If it fails to start check build/harware combo is the only thing that I can see that could be problematic. Is it something I need to worry about? Is there multiple versions of the board?

    I’ve tried both the latest release (-14) and the snapshot (-15) and they behaves basically the same.

Anyone with any idea for debugging this?

I was able to flash the vendor version again to verify that the hardware, as well as the QDL mode, seems to be working. Trying to flash the 96board version still doesn’t work with the same issue. Is there any potential issues with board versions?

Huh, this somehow just worked for me now. The rescue process still doesn’t work but the fastboot method did. The indicator light behavior is completely different from the document (document says blue LED, I see either none or green LED) but the flashing process went through this time. I was also leaving the switches in their default positions rather than changing them to anything for fastboot.

Hi,

Did you figure out why you got the LP5/LP4 error?
I am curious what the solution or cause if the error was?

No I have no idea what was causing it or whether it was the issue.

Hi, So how you managed to finally get into fastboot mode?
Thanks,
Avri