Difference between revisions of "AIM-Linux/BSP/Qualcomm/RISC QCS Linux 00011.1"

From ESS-WIKI
Jump to: navigation, search
Line 1: Line 1:
  
 
= Introduction =
 
= Introduction =
 +
 
This document describes how to work with the RISC and Qualcomm r00011.1 Board Support Package (BSP) release.
 
This document describes how to work with the RISC and Qualcomm r00011.1 Board Support Package (BSP) release.
  
 
== Ubuntu Version ==
 
== Ubuntu Version ==
 +
 
Ubuntu 20.04
 
Ubuntu 20.04
  
 
== Kernel Version ==
 
== Kernel Version ==
 +
 
Kernel 5.4.233
 
Kernel 5.4.233
  
 
= Docker Install and BSP Download =
 
= Docker Install and BSP Download =
 +
 
== Pull docker images ==
 
== Pull docker images ==
 
<pre>$ sudo docker pull advrisc/u20.04-qcslbv1:latest</pre>
 
<pre>$ sudo docker pull advrisc/u20.04-qcslbv1:latest</pre>
Line 18: Line 22:
  
 
== Download BSP ==
 
== Download BSP ==
 +
 
You need to get the ADV_GIT_TOKEN by contacting the PM or AE of ROM-2860.
 
You need to get the ADV_GIT_TOKEN by contacting the PM or AE of ROM-2860.
 
<pre>$ cd adv-release-bsp
 
<pre>$ cd adv-release-bsp
Line 29: Line 34:
  
 
= Build Instructions =
 
= Build Instructions =
 +
 
== Source env ==
 
== Source env ==
 
<pre>$ source scripts/env.sh</pre>
 
<pre>$ source scripts/env.sh</pre>
Line 34: Line 40:
 
== Build All Images ==
 
== Build All Images ==
 
<pre>$ scripts/build_release.sh -all</pre>
 
<pre>$ scripts/build_release.sh -all</pre>
 +
 
'''Output images: out/emmc and out/ufs'''
 
'''Output images: out/emmc and out/ufs'''
  
Line 49: Line 56:
 
$ source qti-conf/set_bb_env.sh
 
$ source qti-conf/set_bb_env.sh
 
$ bitbake -fc cleanall linux-msm && bitbake linux-msm && bitbake qti-ubuntu-robotics-image -fc do_make_bootimg && bitbake qti-ubuntu-robotics-image -fc do_makedtbo</pre>
 
$ bitbake -fc cleanall linux-msm && bitbake linux-msm && bitbake qti-ubuntu-robotics-image -fc do_make_bootimg && bitbake qti-ubuntu-robotics-image -fc do_makedtbo</pre>
 +
 +
&nbsp;
 +
 +
== Recovery & Rescue ==
 +
 +
=== QFIL ===
 +
 +
==== Install the QPST_QFIL and Qualcomm_USB_Driver ====
 +
 +
Download and install the following files on the Windows OS (Windows 10 Test OK):
 +
 +
*QPST_QFIL: qpst.win.2.7_installer_00496.2.zip
 +
*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.
 +
 +
==== Get the official images and unzip ====
 +
 +
Release image URL: TBD
 +
 +
Unzip command example:
 +
<pre><code>$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.tgz</code></pre>
 +
 +
<button>Copy</button>
 +
 +
==== Enter 9008 download mode ====
 +
 +
*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
 +
 +
==== Use the QFIL to flash image ====
 +
 +
===== EMMC =====
 +
 +
*Open QFIL tool and click the&nbsp;'''"Select Port"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png]
 +
 +
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png]
 +
 +
*1.Click the&nbsp;'''"Configuration"'''
 +
*2.Click the&nbsp;'''"FireHose Configuration"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png]
 +
 +
*1.Select the "Device Type" to&nbsp;'''"emmc"'''
 +
*2.Select the&nbsp;'''"Reset After Download"'''
 +
*3.Select the&nbsp;'''"Erase All Before Download"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_4_1713161932766.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_4_1713161932766.png]
 +
 +
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"emmc"'''
 +
*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"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_5_1713161947957.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_5_1713161947957.png]
 +
 +
*Finish Download
 +
*You can power off the device and power on it again
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_7_1713161996595.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_7_1713161996595.png]
 +
 +
===== UFS =====
 +
 +
Need to do the&nbsp;'''Provision'''&nbsp;when using it for the first time
 +
 +
*Open QFIL tool and click the&nbsp;'''"Select Port"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png]
 +
 +
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png]
 +
 +
*1.Click the&nbsp;'''"Configuration"'''
 +
*2.Click the&nbsp;'''"FireHose Configuration"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png]
 +
 +
*1.Select the "Device Type" to&nbsp;'''"ufs"'''
 +
*2.Select the&nbsp;'''"Provision"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_8_1713163252331.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_8_1713163252331.png]
 +
 +
*1.Select the&nbsp;'''"provision_ufs31.xml"'''&nbsp;file
 +
*2.Select the&nbsp;'''"prog_firehose_ddr.elf"'''&nbsp;programmer file
 +
*3.Click the&nbsp;'''"Provision"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_9_1713163470993.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_9_1713163470993.png]
 +
 +
*Finish Provision
 +
*You can power off the device and power on it again
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_10_1713163492158.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_10_1713163492158.png]
 +
 +
*1.Click the&nbsp;'''"Configuration"'''
 +
*2.Click the&nbsp;'''"FireHose Configuration"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png]
 +
 +
*1.Deselected the&nbsp;'''"Provision"'''
 +
*2.Select the&nbsp;'''"Reset After Download"'''
 +
*3.Select the&nbsp;'''"Erase All Before Download"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_11_1713163505186.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_11_1713163505186.png]
 +
 +
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"ufs"'''
 +
*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"'''
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_12_1713163517837.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_12_1713163517837.png]
 +
 +
*Finish Download
 +
*You can power off the device and power on it again
 +
 +
[https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_13_1713164712430.png https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_13_1713164712430.png]
 +
 +
=== Fastboot ===
 +
 +
*Micro USB: ROM-ED92 USB0
 +
 +
Connecto the ROM-ED92 USB0 to host computer and set the Micro USB to&nbsp;'''peripheral'''&nbsp;mode.
 +
<pre><code># echo "peripheral" > /sys/devices/platform/soc/a600000.ssusb/mode</code></pre>
 +
 +
<button>Copy</button>
 +
 +
=== Enter the fastboot mode ===
 +
<pre><code>adv@adv-desktop:~$ adb devices
 +
List of devices attached
 +
2e8c656e        device
 +
 +
adv@adv-desktop:~$ adb root
 +
restarting adbd as root
 +
 +
adv@adv-desktop:~$ adb reboot bootloader
 +
 +
adv@adv-desktop:~$ fastboot devices
 +
2e8c656e        fastboot</code></pre>
 +
 +
<button>Copy</button>
 +
 +
=== Use the fastboot to flash the kernel boot image ===
 +
<pre><code>adv@adv-desktop:/qualcomm/adv-release-bsp/amss$ 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:/qualcomm/adv-release-bsp/amss$ fastboot flash boot_b qti-ubuntu-robotics-image-qcs6490-odk-boot.img
 +
target reported max download size of 805306368 bytes
 +
sending 'boot_b' (24420 KB)...
 +
OKAY [  0.827s]
 +
writing 'boot_b'...
 +
OKAY [  0.133s]
 +
finished. total time: 0.960s</code></pre>
 +
 +
<button>Copy</button>
 +
 +
=== Use the fastboot to flash the kernel dtbo image ===
 +
<pre><code>adv@adv-desktop4:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_a dtbo.img
 +
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:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_b dtbo.img
 +
target reported max download size of 805306368 bytes
 +
sending 'dtbo_b' (12330 KB)...
 +
OKAY [  0.422s]
 +
writing 'dtbo_b'...
 +
OKAY [  0.061s]
 +
finished. total time: 0.483s</code></pre>
 +
 +
<button>Copy</button>
 +
 +
Comments <fieldset aria-hidden="true"><legend>​</legend></fieldset>

Revision as of 09:14, 6 August 2024

Introduction

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

Ubuntu Version

Ubuntu 20.04

Kernel Version

Kernel 5.4.233

Docker Install and BSP Download

Pull docker images

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

Run docker example

$ mkdir -p ~/qualcomm-bsp
$ sudo docker run -it --name adv-qcs6490-ubun-1-0 -v ~/qualcomm-bsp:/home/adv/adv-release-bsp:rw --privileged advrisc/u20.04-qcslbv1:latest /bin/bash

Download BSP

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

$ cd adv-release-bsp
$ git config --global credential.helper 'store --file ~/.my-credentials'
$ echo "${ADV_GIT_TOKEN}" > ~/.my-credentials
$ repo init -u https://dev.azure.com/AIM-Linux/risc_qcs_linux_00011.1/_git/manifests -b main -m adv_3.5.1.r1-06500-QCS6490.0.xml --repo-url=https://git.codelinaro.org/clo/tools/repo.git --repo-branch=qc-stable
$ repo sync -c -j12

Copy HLOS of Chipcode

$ cp -r amss/apps_proc/* .

Build Instructions

Source env

$ source scripts/env.sh

Build All Images

$ scripts/build_release.sh -all

Output images: out/emmc and out/ufs

Build yocto images

$ cd poky
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
$ export PREBUILT_SRC_DIR="<APPS_ROOT>/prebuilt_HY11"
$ source qti-conf/set_bb_env.sh
$ bitbake qti-ubuntu-robotics-image

Build boot and dtb images

$ cd poky
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
$ export PREBUILT_SRC_DIR="<APPS_ROOT>/prebuilt_HY11"
$ source qti-conf/set_bb_env.sh
$ bitbake -fc cleanall linux-msm && bitbake linux-msm && bitbake qti-ubuntu-robotics-image -fc do_make_bootimg && bitbake qti-ubuntu-robotics-image -fc do_makedtbo

 

Recovery & Rescue

QFIL

Install the QPST_QFIL and Qualcomm_USB_Driver

Download and install the following files on the Windows OS (Windows 10 Test OK):

  • QPST_QFIL: qpst.win.2.7_installer_00496.2.zip
  • 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.

Get the official images and unzip

Release image URL: TBD

Unzip command example:

<code>$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.tgz</code>

<button>Copy</button>

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 QFIL to flash image

EMMC
  • Open QFIL tool and click the "Select Port"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png

  • Select the "Qualcomm HS-USB QDloader 9008"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png

  • 1.Click the "Configuration"
  • 2.Click the "FireHose Configuration"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png

  • 1.Select the "Device Type" to "emmc"
  • 2.Select the "Reset After Download"
  • 3.Select the "Erase All Before Download"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_4_1713161932766.png

  • 1.Select the "Availible Meta Build Storage Types" to "emmc"
  • 2.Select the "Select Build Type" to "Meta Build"
  • 3.Click the "Load Content" and Select the contents.xml file of emmc
  • 4.Click the "Download Content"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_5_1713161947957.png

  • Finish Download
  • You can power off the device and power on it again

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_7_1713161996595.png

UFS

Need to do the Provision when using it for the first time

  • Open QFIL tool and click the "Select Port"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_1_1713161681873.png

  • Select the "Qualcomm HS-USB QDloader 9008"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_2_1713161718506.png

  • 1.Click the "Configuration"
  • 2.Click the "FireHose Configuration"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png

  • 1.Select the "Device Type" to "ufs"
  • 2.Select the "Provision"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_8_1713163252331.png

  • 1.Select the "provision_ufs31.xml" file
  • 2.Select the "prog_firehose_ddr.elf" programmer file
  • 3.Click the "Provision"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_9_1713163470993.png

  • Finish Provision
  • You can power off the device and power on it again

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_10_1713163492158.png

  • 1.Click the "Configuration"
  • 2.Click the "FireHose Configuration"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_3_1713161738991.png

  • 1.Deselected the "Provision"
  • 2.Select the "Reset After Download"
  • 3.Select the "Erase All Before Download"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_11_1713163505186.png

  • 1.Select the "Availible Meta Build Storage Types" to "ufs"
  • 2.Select the "Select Build Type" to "Meta Build"
  • 3.Click the "Load Content" and Select the contents.xml file of ufs
  • 4.Click the "Download Content"

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_12_1713163517837.png

  • Finish Download
  • You can power off the device and power on it again

https://ess-kms.edgecenter.io/xdept/public/autoinsert/qfil_flash_image_13_1713164712430.png

Fastboot

  • Micro USB: ROM-ED92 USB0

Connecto the ROM-ED92 USB0 to host computer and set the Micro USB to peripheral mode.

<code># echo "peripheral" > /sys/devices/platform/soc/a600000.ssusb/mode</code>

<button>Copy</button>

Enter the fastboot mode

<code>adv@adv-desktop:~$ adb devices
List of devices attached
2e8c656e        device

adv@adv-desktop:~$ adb root
restarting adbd as root

adv@adv-desktop:~$ adb reboot bootloader

adv@adv-desktop:~$ fastboot devices
2e8c656e        fastboot</code>

<button>Copy</button>

Use the fastboot to flash the kernel boot image

<code>adv@adv-desktop:/qualcomm/adv-release-bsp/amss$ 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:/qualcomm/adv-release-bsp/amss$ fastboot flash boot_b qti-ubuntu-robotics-image-qcs6490-odk-boot.img
target reported max download size of 805306368 bytes
sending 'boot_b' (24420 KB)...
OKAY [  0.827s]
writing 'boot_b'...
OKAY [  0.133s]
finished. total time: 0.960s</code>

<button>Copy</button>

Use the fastboot to flash the kernel dtbo image

<code>adv@adv-desktop4:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_a dtbo.img
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:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_b dtbo.img
target reported max download size of 805306368 bytes
sending 'dtbo_b' (12330 KB)...
OKAY [  0.422s]
writing 'dtbo_b'...
OKAY [  0.061s]
finished. total time: 0.483s</code>

<button>Copy</button>

Comments <fieldset aria-hidden="true"><legend>​</legend></fieldset>