Skip to main content

Introduction

Flashing using PCAT is an alternative to QDL that provides a more integrated and user-friendly flashing experience. You can use this procedure if you are a registered user having access to Qualcomm’s partner tools. To flash a prebuilt image using PCAT, the following steps are required:

Install Required Packages

qsc-cli is a command-line tool provided by Qualcomm that offers an end-to-end workflow for accessing, managing, and building Qualcomm software. Follow these steps to install qsc-cli on your system:
  • Register your Qualcomm email ID by visiting the Qualcomm Support Page.
  • Download the Debian package for qsc-cli:
    wget https://softwarecenter.qualcomm.com/api/download/software/tools/Qualcomm_Software_Center/Linux/Debian/latest.deb -O qsc_installer.deb
    
  • Install the qsc-cli Debian package:
    sudo apt update
    sudo apt install ./qsc_installer.deb
    
  • Sign in to qsc-cli using your registered email ID:
    qsc-cli login -u <username>
    
pcat is a Qualcomm-provided flashing tool that offers a guided and integrated interface for programming software images onto Qualcomm devices. Follow these steps to install pcat on your system:
  • Install the following tools on the host computer:
    qsc-cli tool install --name quts --activate-default-license
    qsc-cli tool install --name qud --activate-default-license
    qsc-cli tool install --name pcat --activate-default-license
    
    If you encounter issues while installing QUD that require enrolling a public key on your Linux host, see the instructions in the README file located at /opt/QTI/sign/signReadme.txt.
  • Confirm if the QTI_HS-USB_QDLoader driver is available in the installed directory:
    ls –la /dev/Q*
    
    Sample output
    crw-rw-rw- 1 root 242 0 Dec 10 10:51 /dev/QTI_HS-USB_QDLoader_9008_3-8:1.0
    

Obtain Flashable Image

Before flashing, you need a flashable image directory on your host machine. Depending on how you obtained your image, choose one of the following paths.
Prebuilt images are distributed as compressed archives. Download the archive for your device from the Obtain Prebuilt Images section, extract the archive, and go to the extracted directory.
  • Extract the archive:
    unzip <prebuilt-image>.zip
    
  • Go to the extracted directory:
    cd <unzipped-image-directory>/images/<machine>/<image>-<machine>
    
All subsequent instructions are expected to be run from this directory unless stated otherwise.

Identify Storage Configuration

Machine configurations come with either UFS or eMMC storage enabled by default, and these settings are reflected in the prebuilt images. If you need to modify the storage type, you must update the configuration and rebuild the image, as this cannot be changed in prebuilt binaries. The default storage configurations for supported platforms are
MachineStorage Type
IQ-9075-EVKUFS
IQ-8275-EVKUFS
QCS6490UFS
IQ-615-EVKEMMC
IQ-X7181-EVKUFS/SPINOR
IQ-X5121-EVKUFS/SPINOR

Configure CDT

The configuration data table (CDT) contains device-specific information required for proper platform initialization. You need to select the correct CDT file based on your reference kit before flashing.
  • Download the CDT binary from CodeLinaro:
    curl https://artifacts.codelinaro.org/artifactory/codelinaro-le/Qualcomm_Linux/X1E80100/cdt/IQ-X.1.4-EVK-CDT.tar.gz
    
  • Extract the tarball archive:
    tar -xzf IQ-X.1.4-EVK-CDT.tar.gz
    
  • Go to the extracted directory:
    cd IQ-X.1.4-EVK-CDT
    
  • Flash the CDT:
    qdl xbl_s_devprg_ns.melf rawprogram0.xml patch0.xml
    

Switch device to EDL Mode

The device must be in the EDL mode before you flash the software image. The Qualcomm supported device by default enters EDL mode if there is no image on the device after power up or if it’s corrupted. Follow these steps to force the device into EDL mode.
  • Press and hold the F_DL button. Figure: RB3Gen2_device
  • Connect the device to a +12 V wall power supply.
  • Connect the device to the host system using a Type-C cable through the USB Type-C connector.
  • Release the F_DL button. The device is now in EDL mode.
  • Unplug the power cable once the entire flashing process is complete to exit EDL mode.
Verify if the device is in EDL mode by running the following command:
lsusb
Expected output
Bus 002 Device 014: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)

Flash software image

  • Check if PCAT recognizes the device:
    pcat -devices
    
    Sample output
    Searching devices in Device Manager, please wait for a moment…
    ID | DEVICE TYPE | DEVICE STATE | SERIAL NUMBER | ADB SERIAL NUMBER | DESCRIPTION
    NA | NA          | EDL          | BE116704      | be116704          | Qualcomm USB Composite Device:QUSB_BULK_CID:042F_SN:BE116704
    
  • Flash the software image using PCAT by selecting the appropriate storage option:
    pcat -PLUGIN SD -DEVICE <device-serial-number> -BUILD $PWD -MEMORYTYPE UFS -FLAVOR asic
    
  • Flashing is successful if you see the following message in the terminal window:
    Sample output
    xxxx INFO] [ FIRMWARE DOWNLOAD LOG ] Process Finished
    xxxx INFO] Status - TRUE
    xxxx INFO] Response - Downloading software images completed on the device Qualcomm USB Composite Device:QUSB_BULK_CID:042F_SN:BE116704
    
  • After a successful flashing operation, run the lsusb command to see the device information on the terminal window as shown in the following message:
    Sample output for QCS6490
    Bus 002 Device 003: ID 05c6:9135 Qualcomm, Inc. qcs6490-rb3gen2-vision-kit
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub