Difference between revisions of "AIM-Linux/BSP/Qualcomm/RISC QCS Yocto LE1.1 ROM2860"

From ESS-WIKI
Jump to: navigation, search
(Build All Images)
 
(8 intermediate revisions by the same user not shown)
Line 40: Line 40:
 
<pre>$ cd /home/adv/BSP
 
<pre>$ cd /home/adv/BSP
 
$ tar -zxvf downloads.qcs6490.le.1.1.r00041.0.tar </pre>
 
$ tar -zxvf downloads.qcs6490.le.1.1.r00041.0.tar </pre>
 +
 +
== Install QSC CLI and Create ~/.netrc ==
 +
<pre>adv@7cc0fa834366:~$ curl -L https://softwarecenter.qualcomm.com/api/download/software/qsc/linux/latest.deb -o qsc_installer.deb
 +
adv@7cc0fa834366:~$ sudo dpkg -i qsc_installer.deb
 +
 +
adv@7cc0fa834366:~$ qsc-cli login -u <username>
 +
password: ************
 +
Logged in successfully.
 +
 +
adv@7cc0fa834366:~$ qsc-cli pat --get
 +
[Info]: Starting qsc-cli version 0.0.0.9
 +
<your PAT token>
 +
 +
adv@7cc0fa834366:~$ vim ~/.netrc
 +
machine chipmaster2.qti.qualcomm.com
 +
login <your Qualcomm login id>
 +
password <your PAT token>
 +
 +
machine qpm-git.qualcomm.com
 +
login <your Qualcomm login id>
 +
password <your PAT token></pre>
  
 
= Build Instructions =
 
= Build Instructions =
Line 45: Line 66:
 
== Source env ==
 
== Source env ==
 
<pre>$ source scripts/env.sh</pre>
 
<pre>$ source scripts/env.sh</pre>
 
  
 
== Build All Images ==
 
== Build All Images ==
Line 52: Line 72:
 
*'''Output ufs images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image'''  
 
*'''Output ufs images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image'''  
 
*'''Output emmc images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image-emmc'''  
 
*'''Output emmc images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image-emmc'''  
 
&nbsp;
 
  
 
== Build All Images individually ==
 
== Build All Images individually ==
Line 83: Line 101:
 
$ devtool modify qps615
 
$ devtool modify qps615
 
$ ../qirp-build qcom-robotics-full-image</pre>
 
$ ../qirp-build qcom-robotics-full-image</pre>
 +
 +
&nbsp;
  
 
= Recovery & Rescue =
 
= Recovery & Rescue =
 +
 
Using windows PCAT or Qualcomm Download (QDL) tool to flash software images to the device.
 
Using windows PCAT or Qualcomm Download (QDL) tool to flash software images to the device.
  
== Emergency download (EDL) mode ==
+
== Get the official images and unzip ==
Connect the Micro USB (EDL) to your linux host computer.
 
  
 +
Release image URL: [[AIM-Linux/BSP/Qualcomm/Linux_Yocto_OS_Release_note/LE1.1/Internal|OS Support List(LE1.1 based on Yocto4.0)]]
  
== Windows PCAT Tool ==
+
Unzip command example:
 +
<pre>$ sudo tar -zxvf 2860A1AIM38LIV11030_emmc_2024-11-18.tgz</pre>
  
=== Install the QPST_QFIL and Qualcomm_USB_Driver ===
+
== Enter 9008 download mode ==
  
Download and install the following files on the Windows OS (Windows 10 Test OK):
+
*Connect the&nbsp;'''Micro USB (EDL)'''&nbsp;to your host computer.
 +
*'''Forced Recovery''': The SW2 switch to 1-on.
 +
*'''Flash EMMC''': the SW1 switch to 1-off, 2-on
 +
*'''Flash UFS''': the SW1 switch to 1-on, 2-on
 +
*Connect the adapter and power on the device
  
*QPST_QFIL: qpst.win.2.7_installer_00496.2.zip
+
== Use the windows PCAT to flash images ==
*Qualcomm_USB_Driver: QUD.WIN.1.1 Installer_10065.1.zip
 
  
Note: If you can't get these files, please contact PM or AE to get these files.
+
'''1. Download the Qualcomm Software Center&nbsp;'''
  
=== Get the official images and unzip ===
+
'''&nbsp; &nbsp; &nbsp; [https://softwarecenter.qualcomm.com/#/ <span lang="EN-US" style="font-family:Aptos">Qualcomm® Software Center</span>]&nbsp;'''
  
Release image URL: [[AIM-Linux/BSP/Qualcomm/Linux_Ubuntu_OS_Release_note/Ubuntu20/Internal|OS Support List (based on Ubuntu 20.04 - LU 1.0)]]
+
'''2. Open the&nbsp;Qualcomm Software Center&nbsp;'''
  
Unzip command example:
+
'''3. Search "PCAT" in the search bar&nbsp;'''
<pre>$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.tgz</pre>
+
 
 +
'''[[File:ROM-2860 search bar.PNG|RTENOTITLE]]'''
 +
 
 +
'''4. Click&nbsp;Qualcomm® Product Configuration Assistant Tool&nbsp;'''
 +
 
 +
'''5. Select Qualcomm® Product Configuration Assistant Tool version&nbsp;'''
 +
 
 +
'''&nbsp; &nbsp; Version: 2.33.2.119'''
 +
 
 +
'''[[File:ROM-2860 PCAT Tool version.PNG|RTENOTITLE]]'''
 +
 
 +
'''6. Install&nbsp;Qualcomm® Product Configuration Assistant Tool 2.33.2.119&nbsp;'''
 +
 
 +
'''7.&nbsp;Search "QUTS" in the search bar&nbsp;&nbsp;'''
 +
 
 +
'''[[File:ROM-2860 QUTS Tool.PNG|RTENOTITLE]]'''
 +
 
 +
'''8. Click the&nbsp;&nbsp;Qualcomm® Unified Tools Services&nbsp;'''
 +
 
 +
'''9. Select&nbsp;Qualcomm® Unified Tools Services version&nbsp;'''
 +
 
 +
'''&nbsp; &nbsp; &nbsp;Version&nbsp;: 1.75.2.9'''
 +
 
 +
'''10. Install&nbsp;Qualcomm® Unified Tools Services&nbsp; 1.75.2.9&nbsp;'''
 +
 
 +
'''[[File:ROM-2860 QUTS Tool version.PNG|RTENOTITLE]]'''
 +
 
 +
'''11. You will find the new application in your Windows system .&nbsp;'''
 +
 
 +
'''[[File:ROM-2860 new tools in windows.PNG|RTENOTITLE]]'''
 +
 
 +
'''12. Unzip the UFS File and eMMC File&nbsp;'''
 +
 
 +
'''For example&nbsp;:&nbsp;'''
 +
 
 +
'''&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2860A1AIM37UIV10084_2024-08-08_ufs_debug.tgz'''
 +
 
 +
'''&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;2860A1AIM37UIV10084_2024-08-08_emmc_debug.tgz&nbsp;'''
 +
 
 +
'''13&nbsp;Connect your device via Micro USB.'''
 +
 
 +
=== '''<u>USF Provision</u>&nbsp;&nbsp;''' ===
 +
 
 +
'''1. Select&nbsp; provision button&nbsp;&nbsp;&nbsp;[[File:ROM-2860 provision file button.PNG|RTENOTITLE]]&nbsp;&nbsp;'''
 +
 
 +
[[File:ROM-2860 provision file icon.PNG|RTENOTITLE]]
  
=== Enter 9008 download mode ===
+
'''2. Add the&nbsp;prog_firehose_ddr.elf and&nbsp;provision_ufs31.xml in UFS&nbsp;&nbsp;folder.&nbsp;'''
  
*Connect the&nbsp;'''Micro USB (EDL)'''&nbsp;to your host computer.
+
[[File:ROM-2860 provision file.PNG|RTENOTITLE]]
*'''Forced Recovery''': The SW2 switch to 1-on.  
 
*'''Flash EMMC''': the SW1 switch to 1-off, 2-on
 
*'''Flash UFS''': the SW1 switch to 1-on, 2-on
 
*Connect the adapter and power on the device
 
  
=== Use the QFIL to flash image ===
+
'''3. Then press "OK" , it will start to do USF Provision.&nbsp;'''
  
==== EMMC ====
+
[[File:ROM-2860 provision file running.PNG|RTENOTITLE]]
  
*Open QFIL tool and click the&nbsp;'''"Select Port"'''  
+
'''4. When the Provision finished , you can see the result in message window.&nbsp;'''
  
[[File:Qfil flash image 1 1713161681873.png|800px|Qfil flash image 1 1713161681873.png]]
+
[[File:ROM-2860 provision file result.PNG|RTENOTITLE]]
  
 
&nbsp;
 
&nbsp;
  
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''  
+
=== '''<u>Flash UFS</u>''' ===
 +
 
 +
'''&nbsp;<span style="background-color:#ffff00;">1. Change the SW1 and SW2&nbsp;</span>'''
 +
 
 +
'''<span style="background-color:#ffff00;">&nbsp;Flash UFS:&nbsp; the SW1 switch to 1-on, 2-on</span>'''
  
[[File:Qfil flash image 2 1713161718506.png|800px|Qfil flash image 2 1713161718506.png]]
+
'''<span style="background-color:#ffff00;">Forced Recovery&nbsp;:&nbsp;&nbsp;The SW2 switch to 1-on&nbsp; ,2 - on .&nbsp;</span>'''
  
&nbsp;
+
'''&nbsp;2. Turn on the power&nbsp;'''
  
*1.Click the&nbsp;'''"Configuration"'''
+
'''&nbsp;3. Open " PCATApp" Tool&nbsp;'''
*2.Click the&nbsp;'''"FireHose Configuration"'''  
 
  
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
+
'''&nbsp;4. Click " Connect A Device"&nbsp;'''
  
&nbsp;
+
[[File:ROM-2860 PCAT UFS .PNG|RTENOTITLE]]
  
*1.Select the "Device Type" to&nbsp;'''"emmc"'''
+
'''5. Select&nbsp; "Qualcomm HS-USB QDLoader 9008 (COM6)&nbsp;'''
*2.Select the&nbsp;'''"Reset After Download"'''
 
*3.Select the&nbsp;'''"Erase All Before Download"'''  
 
  
[[File:Qfil flash image 4 1713161932766.png|800px|Qfil flash image 4 1713161932766.png]]
+
[[File:ROM-2860 PCAT Tool Select device.PNG|RTENOTITLE]]
  
&nbsp;
+
'''6. Click " Connect "&nbsp; device&nbsp;'''
  
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"emmc"'''
+
[[File:ROM-2860 PCAT Tool Connect device.PNG|RTENOTITLE]]
*2.Select the "Select Build Type" to&nbsp;'''"Meta Build"'''
 
*3.Click the&nbsp;'''"Load Content"'''&nbsp;and Select the contents.xml file of&nbsp;'''emmc'''
 
*4.Click the&nbsp;'''"Download Content"'''
 
  
[[File:Qfil flash image 5 1713161947957.png|800px|Qfil flash image 5 1713161947957.png]]
+
'''7. When you connected successfully , it will show&nbsp; "green word" - Qualcomm HS-USB QDLoader 9008 (COM 6)&nbsp;'''
  
&nbsp;
+
[[File:ROM-2860 PCAT UFS connectiondevice.PNG|RTENOTITLE]]
  
*Finish Download
+
'''8. Select UFS Folder in PCAT Tool , the Tool will help load Files automatically and Select "MEMORY_TYPE_UFS"&nbsp;'''
*You can power off the device and power on it again
 
  
[[File:Qfil flash image 7 1713161996595.png|800px|Qfil flash image 7 1713161996595.png]]
+
[[File:ROM-2860 PCAT Select UFS File .PNG|RTENOTITLE]]
  
&nbsp;
+
'''9. Click " Download"&nbsp;'''
  
==== UFS ====
+
[[File:ROM-2860 PCAT Select UFS File Download.png|RTENOTITLE]]
  
Need to do the&nbsp;'''Provision'''&nbsp;when using it for the first time
+
'''10. UFS Download Status&nbsp;'''
  
*Open QFIL tool and click the&nbsp;'''"Select Port"'''  
+
'''[[File:ROM-2860 PCAT Select UFS File Download status.png|RTENOTITLE]]11. UFS Donwload compeleted&nbsp;'''
  
[[File:Qfil flash image 1 1713161681873.png|800px|Qfil flash image 1 1713161681873.png]]
+
'''[[File:ROM-2860 PCAT Select UFS File Download status 100.png|RTENOTITLE]]'''
  
 
&nbsp;
 
&nbsp;
  
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''  
+
'''12. When the UFS installation finished . Close the PCAT tool ,'''
 +
 
 +
'''13. pleaes remove the mirco usb cable, turn off the power&nbsp;'''
 +
 
 +
'''14.'''&nbsp;'''UFS boot up&nbsp;:&nbsp;'''
  
[[File:Qfil flash image 2 1713161718506.png|800px|Qfil flash image 2 1713161718506.png]]
+
'''<span style="background-color:#ffff00;">The SW1 switch to 1-on, 2-on</span>'''
  
&nbsp;
+
'''<span style="background-color:#ffff00;">The SW2 switch to 1-off, 2-on</span>'''
  
*1.Click the&nbsp;'''"Configuration"'''
+
'''15. Connect debug cable and open the terminal ,&nbsp;&nbsp;turn on the power .&nbsp;'''
*2.Click the&nbsp;'''"FireHose Configuration"'''  
 
  
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
+
'''16.&nbsp; When the systme boot up , you need to type &nbsp;" qcm6490 login: root "&nbsp; , " Password: oelinux123"'''
  
&nbsp;
+
'''17.&nbsp; After type the long in and password , and you also can chek the image information about date , kernel version etc..&nbsp;'''
  
*1.Select the "Device Type" to&nbsp;'''"ufs"'''
+
=== '''Flash eMMC''' ===
*2.Select the&nbsp;'''"Provision"'''  
 
  
[[File:Qfil flash image 8 1713163252331.png|800px|Qfil flash image 8 1713163252331.png]]
+
'''1.&nbsp; Turn off the Power&nbsp;'''
  
&nbsp;
+
'''<span style="background-color:#ffff00;">2.&nbsp;Change the SW1 and SW2&nbsp;</span>'''
  
*1.Select the&nbsp;'''"provision_ufs31.xml"'''&nbsp;file
+
'''<span style="background-color:#ffff00;">&nbsp;Flash eMMC:&nbsp; The SW1 switch to 1-off, 2-on</span>'''
*2.Select the&nbsp;'''"prog_firehose_ddr.elf"'''&nbsp;programmer file
 
*3.Click the&nbsp;'''"Provision"'''  
 
  
[[File:Qfil flash image 9 1713163470993.png|800px|Qfil flash image 9 1713163470993.png]]
+
'''<span style="background-color:#ffff00;">Forced Recovery&nbsp;:&nbsp;&nbsp;The SW2 switch to 1-on, 2-on</span>'''
  
&nbsp;
+
'''3. Turn on the power&nbsp;'''
  
*Finish Provision
+
'''4. Make sure the device connection status.&nbsp;'''
*You can power off the device and power on it again
 
  
[[File:Qfil flash image 10 1713163492158.png|800px|Qfil flash image 10 1713163492158.png]]
+
'''5.&nbsp;If the device disconnect with PCAT Tool , please connect it again.&nbsp;'''
  
&nbsp;
+
[[File:ROM-2860 PCAT Tool Connect device.PNG|RTENOTITLE]]
  
*1.Click the&nbsp;'''"Configuration"'''
+
'''6. Select eMMC Folder.'''
*2.Click the&nbsp;'''"FireHose Configuration"'''  
 
  
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
+
'''[[File:ROM-2860 PCAT Select eMMC File.png|RTENOTITLE]]7. Make sure the setting ,then press " Download " button.'''
  
&nbsp;
+
[[File:ROM-2860 PCAT check eMMC setting download1.png|RTENOTITLE]]
  
*1.Deselected the&nbsp;'''"Provision"'''
+
'''&nbsp;8. eMMC downlaoad status&nbsp;'''
*2.Select the&nbsp;'''"Reset After Download"'''
 
*3.Select the&nbsp;'''"Erase All Before Download"'''  
 
  
[[File:Qfil flash image 11 1713163505186.png|800px|Qfil flash image 11 1713163505186.png]]
+
[[File:ROM-2860 PCAT Select eMMC File Download status.png|RTENOTITLE]]
  
&nbsp;
+
'''&nbsp;9. eMMC D''''''onwload compeleted&nbsp;'''
  
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"ufs"'''
+
[[File:ROM-2860 PCAT Select eMMC File Download status 100.png|RTENOTITLE]]
*2.Select the "Select Build Type" to&nbsp;'''"Meta Build"'''
 
*3.Click the&nbsp;'''"Load Content"'''&nbsp;and Select the contents.xml file of&nbsp;'''ufs'''
 
*4.Click the&nbsp;'''"Download Content"'''
 
  
[[File:Qfil flash image 12 1713163517837.png|800px|Qfil flash image 12 1713163517837.png]]
+
'''10. When the eMMC installation finished . Close the PCAT tool ,'''
  
&nbsp;
+
'''11. pleaes remove the mirco usb cable, turn off the power&nbsp;'''
  
*Finish Download
+
'''12.'''&nbsp;'''eMMC boot up&nbsp;:&nbsp;'''
*You can power off the device and power on it again
 
  
[[File:Qfil flash image 13 1713164712430.png|800px|Qfil flash image 13 1713164712430.png]]
+
'''<span style="background-color:#ffff00;">The SW1 switch to 1-off, 2-on</span>'''
  
&nbsp;
+
'''<span style="background-color:#ffff00;">The SW2 switch to 1-off, 2-on&nbsp;</span>'''
  
&nbsp;
+
'''13. Connect debug cable and open the terminal ,&nbsp;&nbsp;turn on the power .&nbsp;'''
  
== Fastboot ==
+
'''14.&nbsp; When the systme boot up , you need to type &nbsp;" qcm6490 login: <span style="background-color:#ffff33;">root </span>"&nbsp; , " Password: <span style="background-color:#ffff00;">oelinux123</span>"'''
  
*Micro USB: ROM-ED92 USB0
+
'''15.&nbsp; After type the long in and password , and you also can chek the image information about date , kernel version etc..&nbsp;'''
  
Connect&nbsp;the ROM-ED92 USB0 to host computer and set the Micro USB to&nbsp;'''peripheral'''&nbsp;mode.
+
== Qualcomm Download (QDL) Tool ==
<pre># echo "peripheral" > /sys/devices/platform/soc/a600000.ssusb/mode</pre>
+
=== One-time Prerequisite ===
 +
To set the udev USB rule with the Qualcomm manufacturing vendor ID 05c6:
 +
<pre>$ cd /etc/udev/rules.d
 +
$ sudo vi 51-qcom-usb.rules
 +
# add the following
 +
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"
 +
$ sudo systemctl restart udev</pre>
  
=== Enter the fastboot mode ===
+
=== Use the QDL to flash images (UFS only now) ===
<pre>adv@adv-desktop:~$ adb devices
+
1. Ensure the QDL mode
List of devices attached
+
<pre>$ lsusb
2e8c656e        device
+
Bus 001 Device 028: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)</pre>
  
adv@adv-desktop:~$ adb root
+
2. Ensure ModemManager is not running
restarting adbd as root
+
It is identified as a Qualcomm modem for some Linux distributions when the device is connected in USB mode. Check the status of ModemManager:
 +
<pre>$ sudo systemctl status ModemManager</pre>
  
adv@adv-desktop:~$ adb reboot bootloader
+
If the ModemManager is enabling, please help to stop it by:
 +
<pre>$ sudo systemctl stop ModemManager</pre>
  
adv@adv-desktop:~$ fastboot devices
+
3. Go to the location of images in the workspace to flash the images:
2e8c656e        fastboot</pre>
+
<pre>$ cd build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image
 +
$ ./qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml
 +
HELLO version: 0x2 compatible: 0x1 max_len: 1024 mode: 0
 +
READ64 image: 13 offset: 0x0 length: 0x40
 +
READ64 image: 13 offset: 0x40 length: 0x3f0
 +
READ64 image: 13 offset: 0x1000 length: 0x1000
 +
READ64 image: 13 offset: 0x2000 length: 0x260
 +
READ64 image: 13 offset: 0x3000 length: 0x1000
 +
READ64 image: 13 offset: 0x4000 length: 0x1000
 +
.
 +
.
 +
.
 +
Update Primary Header with CRC of Primary Header.
 +
LOG: INFO: Calling handler for patch
 +
Zero Out Header CRC in Backup Header.
 +
LOG: INFO: Calling handler for patch
 +
Update Backup Header with CRC of Backup Header.
 +
LOG: INFO: Calling handler for patch
 +
LOG: INFO: Calling handler for setbootablestoragedrive
 +
LOG: INFO: Using scheme of value= 1
 +
partition 1 is now bootable
 +
LOG: INFO: Calling handler for power
 +
LOG: INFO: Will issue reset/power off 100 useconds, if this hangs check if watchdog is enabled
 +
LOG: INFO: bsp_target_reset() 1</pre>
  
=== Use the fastboot to flash the kernel boot image ===
+
If you see the "partition 1 is now bootable" in your terminal window, the flash is successful.
<pre>adv@adv-desktop:~$ fastboot flash boot_a qti-ubuntu-robotics-image-qcs6490-odk-boot.img
 
target reported max download size of 805306368 bytes
 
sending 'boot_a' (24420 KB)...
 
OKAY [  0.790s]
 
writing 'boot_a'...
 
OKAY [  0.144s]
 
finished. total time: 0.935s
 
  
adv@adv-desktop:~$ fastboot flash boot_b qti-ubuntu-robotics-image-qcs6490-odk-boot.img
+
Note:
target reported max download size of 805306368 bytes
+
If you get the following issue, please help to download the qdl file (https://www.dropbox.com/scl/fi/nv65h778rwkhtul1gnwrr/qdl?rlkey=gzy83yt1x2qhhnqzra9kukhai&st=p4n42eax&dl=0) or to build the standalone QDL.
sending 'boot_b' (24420 KB)...
 
OKAY [  0.827s]
 
writing 'boot_b'...
 
OKAY [  0.133s]
 
finished. total time: 0.960s</pre>
 
  
=== Use the fastboot to flash the kernel dtbo image ===
+
<pre>$ ./qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml
<pre>adv@adv-desktop4:~$ fastboot flash dtbo_a dtbo.img
+
-bash: ./qdl: No such file or directory</pre>
target reported max download size of 805306368 bytes
 
sending 'dtbo_a' (12330 KB)...
 
OKAY [  0.427s]
 
writing 'dtbo_a'...
 
OKAY [  0.070s]
 
finished. total time: 0.497s
 
  
adv@adv-desktop4:~$ fastboot flash dtbo_b dtbo.img
+
How to build the standalone QDL?
target reported max download size of 805306368 bytes
+
<pre>$ sudo apt-get install libxml2-dev libudev-dev
sending 'dtbo_b' (12330 KB)...
+
$ git clone https://git.codelinaro.org/linaro/qcomlt/qdl.git
OKAY [  0.422s]
+
$ cd qdl
writing 'dtbo_b'...
+
$ make</pre>
OKAY [  0.061s]
 
finished. total time: 0.483s</pre>
 

Latest revision as of 07:52, 21 November 2024

Introduction

This document describes how to work with the RISC and Qualcomm LE GA1.1 Board Support Package (BSP) release.

Yocto Version

Yocto 4.0.18

Kernel Version

Kernel 6.6.28

Meta Build ID

QCM6490.LE.1.0-00218-STD.PROD-1

Docker Install and BSP Download

Pull docker images

$ sudo docker pull advrisc/u20.04-qcslbv2:latest

Run docker example

$ mkdir -p /home/bsp/myLinux
$ sudo docker run --privileged -it --name qclinux -v /home/bsp/myLinux:/home/adv/BSP:rw advrisc/u20.04-qcslbv2 /bin/bash
adv@7cc0fa834366:~$ sudo chown adv:adv -R BSP

Download BSP

You need to get the ADV_GIT_TOKEN by contacting the PM or AE of ROM-2860.

$ cd /home/adv/BSP
$ git config --global credential.helper 'store --file ~/.my-credentials'
$ echo "https://AIM-Linux:${ADV_GIT_TOKEN}@dev.azure.com" > ~/.my-credentials
$ repo init -u https://dev.azure.com/AIM-Linux/risc_qcs_linux_le_1.1/_git/manifest -b main -m adv-6.6.28-QLI.1.1-Ver.1.1_robotics-product-sdk-1.1.xml
$ repo sync -c -j12

Get and Unzip the Download Files

LIV11 yocto downloads file:[ downloads.qcs6490.le.1.1.r00041.0.tar ]

$ cd /home/adv/BSP
$ tar -zxvf downloads.qcs6490.le.1.1.r00041.0.tar 

Install QSC CLI and Create ~/.netrc

adv@7cc0fa834366:~$ curl -L https://softwarecenter.qualcomm.com/api/download/software/qsc/linux/latest.deb -o qsc_installer.deb
adv@7cc0fa834366:~$ sudo dpkg -i qsc_installer.deb

adv@7cc0fa834366:~$ qsc-cli login -u <username>
password: ************
Logged in successfully.

adv@7cc0fa834366:~$ qsc-cli pat --get
[Info]: Starting qsc-cli version 0.0.0.9
<your PAT token>

adv@7cc0fa834366:~$ vim ~/.netrc
machine chipmaster2.qti.qualcomm.com
login <your Qualcomm login id>
password <your PAT token>

machine qpm-git.qualcomm.com
login <your Qualcomm login id>
password <your PAT token>

Build Instructions

Source env

$ source scripts/env.sh

Build All Images

$ scripts/build_release.sh -all
  • Output ufs images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image
  • Output emmc images: build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image-emmc

Build All Images individually

1. Build ADSP Image

$ scripts/build_release.sh -adsp

2. Build AOP Image

$ scripts/build_release.sh -aop

3. Build CDSP Image

$ scripts/build_release.sh -cdsp

4. Build BOOT(XBL) Image

$ scripts/build_release.sh -boot

5. Build TZ Image

$ scripts/build_release.sh -tz

6. Generate Firmware Prebuilds

$ scripts/build_release.sh -common

7. Build YOCTO Image

$ scripts/build_release.sh -yocto

Build yocto images

$ cd /home/adv/BSP
$ MACHINE=qcm6490 DISTRO=qcom-robotics-ros2-humble source setup-robotics-environment
$ devtool modify qps615
$ ../qirp-build qcom-robotics-full-image

 

Recovery & Rescue

Using windows PCAT or Qualcomm Download (QDL) tool to flash software images to the device.

Get the official images and unzip

Release image URL: OS Support List(LE1.1 based on Yocto4.0)

Unzip command example:

$ sudo tar -zxvf 2860A1AIM38LIV11030_emmc_2024-11-18.tgz

Enter 9008 download mode

  • Connect the Micro USB (EDL) to your host computer.
  • Forced Recovery: The SW2 switch to 1-on.
  • Flash EMMC: the SW1 switch to 1-off, 2-on
  • Flash UFS: the SW1 switch to 1-on, 2-on
  • Connect the adapter and power on the device

Use the windows PCAT to flash images

1. Download the Qualcomm Software Center 

      Qualcomm® Software Center 

2. Open the Qualcomm Software Center 

3. Search "PCAT" in the search bar 

RTENOTITLE

4. Click Qualcomm® Product Configuration Assistant Tool 

5. Select Qualcomm® Product Configuration Assistant Tool version 

    Version: 2.33.2.119

RTENOTITLE

6. Install Qualcomm® Product Configuration Assistant Tool 2.33.2.119 

7. Search "QUTS" in the search bar  

RTENOTITLE

8. Click the  Qualcomm® Unified Tools Services 

9. Select Qualcomm® Unified Tools Services version 

     Version : 1.75.2.9

10. Install Qualcomm® Unified Tools Services  1.75.2.9 

RTENOTITLE

11. You will find the new application in your Windows system . 

RTENOTITLE

12. Unzip the UFS File and eMMC File 

For example : 

         2860A1AIM37UIV10084_2024-08-08_ufs_debug.tgz

         2860A1AIM37UIV10084_2024-08-08_emmc_debug.tgz 

13 Connect your device via Micro USB.

USF Provision  

1. Select  provision button   RTENOTITLE  

RTENOTITLE

2. Add the prog_firehose_ddr.elf and provision_ufs31.xml in UFS  folder. 

RTENOTITLE

3. Then press "OK" , it will start to do USF Provision. 

RTENOTITLE

4. When the Provision finished , you can see the result in message window. 

RTENOTITLE

 

Flash UFS

 1. Change the SW1 and SW2 

 Flash UFS:  the SW1 switch to 1-on, 2-on

Forced Recovery :  The SW2 switch to 1-on  ,2 - on . 

 2. Turn on the power 

 3. Open " PCATApp" Tool 

 4. Click " Connect A Device" 

RTENOTITLE

5. Select  "Qualcomm HS-USB QDLoader 9008 (COM6) 

RTENOTITLE

6. Click " Connect "  device 

RTENOTITLE

7. When you connected successfully , it will show  "green word" - Qualcomm HS-USB QDLoader 9008 (COM 6) 

RTENOTITLE

8. Select UFS Folder in PCAT Tool , the Tool will help load Files automatically and Select "MEMORY_TYPE_UFS" 

RTENOTITLE

9. Click " Download" 

RTENOTITLE

10. UFS Download Status 

RTENOTITLE11. UFS Donwload compeleted 

RTENOTITLE

 

12. When the UFS installation finished . Close the PCAT tool ,

13. pleaes remove the mirco usb cable, turn off the power 

14. UFS boot up : 

The SW1 switch to 1-on, 2-on

The SW2 switch to 1-off, 2-on

15. Connect debug cable and open the terminal ,  turn on the power . 

16.  When the systme boot up , you need to type  " qcm6490 login: root "  , " Password: oelinux123"

17.  After type the long in and password , and you also can chek the image information about date , kernel version etc.. 

Flash eMMC

1.  Turn off the Power 

2. Change the SW1 and SW2 

 Flash eMMC:  The SW1 switch to 1-off, 2-on

Forced Recovery :  The SW2 switch to 1-on, 2-on

3. Turn on the power 

4. Make sure the device connection status. 

5. If the device disconnect with PCAT Tool , please connect it again. 

RTENOTITLE

6. Select eMMC Folder.

RTENOTITLE7. Make sure the setting ,then press " Download " button.

RTENOTITLE

 8. eMMC downlaoad status 

RTENOTITLE

' 9. eMMC D'onwload compeleted 

RTENOTITLE

10. When the eMMC installation finished . Close the PCAT tool ,

11. pleaes remove the mirco usb cable, turn off the power 

12. eMMC boot up : 

The SW1 switch to 1-off, 2-on

The SW2 switch to 1-off, 2-on 

13. Connect debug cable and open the terminal ,  turn on the power . 

14.  When the systme boot up , you need to type  " qcm6490 login: root "  , " Password: oelinux123"

15.  After type the long in and password , and you also can chek the image information about date , kernel version etc.. 

Qualcomm Download (QDL) Tool

One-time Prerequisite

To set the udev USB rule with the Qualcomm manufacturing vendor ID 05c6:

$ cd /etc/udev/rules.d
$ sudo vi 51-qcom-usb.rules
# add the following
SUBSYSTEMS=="usb", ATTRS{idVendor}=="05c6", ATTRS{idProduct}=="9008", MODE="0666", GROUP="plugdev"
$ sudo systemctl restart udev

Use the QDL to flash images (UFS only now)

1. Ensure the QDL mode

$ lsusb
Bus 001 Device 028: ID 05c6:9008 Qualcomm, Inc. Gobi Wireless Modem (QDL mode)

2. Ensure ModemManager is not running It is identified as a Qualcomm modem for some Linux distributions when the device is connected in USB mode. Check the status of ModemManager:

$ sudo systemctl status ModemManager

If the ModemManager is enabling, please help to stop it by:

$ sudo systemctl stop ModemManager

3. Go to the location of images in the workspace to flash the images:

$ cd build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image
$ ./qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml
HELLO version: 0x2 compatible: 0x1 max_len: 1024 mode: 0
READ64 image: 13 offset: 0x0 length: 0x40
READ64 image: 13 offset: 0x40 length: 0x3f0
READ64 image: 13 offset: 0x1000 length: 0x1000
READ64 image: 13 offset: 0x2000 length: 0x260
READ64 image: 13 offset: 0x3000 length: 0x1000
READ64 image: 13 offset: 0x4000 length: 0x1000
.
.
.
Update Primary Header with CRC of Primary Header.
LOG: INFO: Calling handler for patch
Zero Out Header CRC in Backup Header.
LOG: INFO: Calling handler for patch
Update Backup Header with CRC of Backup Header.
LOG: INFO: Calling handler for patch
LOG: INFO: Calling handler for setbootablestoragedrive
LOG: INFO: Using scheme of value= 1
partition 1 is now bootable
LOG: INFO: Calling handler for power
LOG: INFO: Will issue reset/power off 100 useconds, if this hangs check if watchdog is enabled
LOG: INFO: bsp_target_reset() 1

If you see the "partition 1 is now bootable" in your terminal window, the flash is successful.

Note: If you get the following issue, please help to download the qdl file (https://www.dropbox.com/scl/fi/nv65h778rwkhtul1gnwrr/qdl?rlkey=gzy83yt1x2qhhnqzra9kukhai&st=p4n42eax&dl=0) or to build the standalone QDL.

$ ./qdl prog_firehose_ddr.elf rawprogram*.xml patch*.xml
-bash: ./qdl: No such file or directory

How to build the standalone QDL?

$ sudo apt-get install libxml2-dev libudev-dev
$ git clone https://git.codelinaro.org/linaro/qcomlt/qdl.git
$ cd qdl
$ make