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

From ESS-WIKI
Jump to: navigation, search
(Fastboot)
 
(34 intermediate revisions by the same user not shown)
Line 11: Line 11:
  
 
Kernel 5.4.233
 
Kernel 5.4.233
 +
 +
= Host Machine =
 +
 +
*Linux Distro: Ubuntu 22.04 LTS
 +
 +
If yor host machine is Ubuntu 20.04 LTS, you need to install the qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb.
 +
<pre>$ wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb
 +
$ sudo dpkg -i qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb
 +
</pre>
 +
 +
Otherwise, you may get the following yocto build fail:
 +
<pre>ERROR: ubuntu-base-20.04-r0 do_ubuntu_basic_configure: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187' failed with exit code 126
 +
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/log.do_ubuntu_basic_configure.1061187
 +
Log data follows:
 +
| DEBUG: Executing shell function do_ubuntu_basic_configure
 +
| NOTE: copy fakeroot and fakechroot lib to ubuntu-base
 +
| /usr/sbin/chroot: failed to run command ‘/bin/bash’: Exec format error
 +
| WARNING: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187:1 exit 126 from 'fakechroot fakeroot chroot /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/ubuntu_base_tmp /bin/bash -c "cd /var; rm run; ln -s ../run run"'
 +
| ERROR: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187' failed with exit code 126
 +
ERROR: Task (/home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure) failed with exit code '1'
 +
NOTE: Tasks Summary: Attempted 4987 tasks of which 4583 didn't need to be rerun and 1 failed.
 +
NOTE: Writing buildhistory
 +
NOTE: Writing buildhistory took: 6 seconds
 +
 +
Summary: 1 task failed:
 +
&nbsp; /home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure
 +
Summary: There were 235 WARNING messages shown.
 +
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
 +
</pre>
 +
 +
or
 +
<pre>ERROR: ubuntu-base-20.04-r0 do_ubuntu_basic_configure: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287' failed with exit code 1
 +
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/log.do_ubuntu_basic_configure.880287
 +
Log data follows:
 +
| DEBUG: Executing shell function do_ubuntu_basic_configure
 +
| NOTE: copy fakeroot and fakechroot lib to ubuntu-base
 +
| semop(1): encountered an error: Function not implemented
 +
| WARNING: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287:1 exit 1 from 'fakechroot fakeroot chroot /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/ubuntu_base_tmp /bin/bash -c "cd /var; rm run; ln -s ../run run"'
 +
| ERROR: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287' failed with exit code 1
 +
ERROR: Task (/home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure) failed with exit code '1'
 +
NOTE: Tasks Summary: Attempted 3452 tasks of which 3253 didn't need to be rerun and 1 failed.
 +
NOTE: Writing buildhistory
 +
NOTE: Writing buildhistory took: 12 seconds
 +
&nbsp;
 +
Summary: 1 task failed:
 +
&nbsp; /home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure
 +
Summary: There were 234 WARNING messages shown.
 +
Summary: There was 1 ERROR message shown, returning a non-zero exit code.</pre>
  
 
= Docker Install and BSP Download =
 
= Docker Install and BSP Download =
Line 23: Line 71:
 
== Download BSP ==
 
== Download BSP ==
  
You need to get the ADV_GIT_TOKEN by contacting the PM or AE of ROM-2860.
+
<span style="color:#cc0000;">'''You need to get the ADV_GIT_TOKEN by contacting the PM or AE of ROM-2860.'''</span>
 
<pre>$ cd adv-release-bsp
 
<pre>$ cd adv-release-bsp
 
$ git config --global credential.helper 'store --file ~/.my-credentials'
 
$ git config --global credential.helper 'store --file ~/.my-credentials'
$ echo "${ADV_GIT_TOKEN}" > ~/.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_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 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</pre>
 
$ repo sync -c -j12</pre>
 +
 +
== Get and Unzip the Download Files ==
 +
 +
UIV1 yocto downloads file:[https://www.dropbox.com/sh/3z9hh9zht98mzil/AADZum-o736_muEuLhHdwxpTa/officialbuild/risc_qcs_linux_00011.1?dl=0&preview=downloads.qcs6490.ubun.1.0.r00011.1.tar.gz [ downloads.qcs6490.ubun.1.0.r00011.1.tar.gz ]]
 +
<pre>$ cd adv-release-bsp
 +
$ tar -zxvf downloads.qcs6490.ubun.1.0.r00011.1.tar.gz </pre>
  
 
== Copy HLOS of Chipcode ==
 
== Copy HLOS of Chipcode ==
<pre>$ cp -r amss/apps_proc/* .</pre>
+
<pre>$ cp -r amss/apps_proc/* .
 +
</pre>
  
 
= Build Instructions =
 
= Build Instructions =
Line 42: Line 97:
  
 
'''Output images: out/emmc and out/ufs'''
 
'''Output images: out/emmc and out/ufs'''
 +
 +
&nbsp;
 +
 +
== Build All Images individually ==
 +
 +
==== 1. Build ADSP Image ====
 +
<pre>$ scripts/build_release.sh -adsp</pre>
 +
 +
==== 2. Build CDSP Image ====
 +
<pre>$ scripts/build_release.sh -cdsp</pre>
 +
 +
==== 3. Build BOOT(XBL) Image ====
 +
<pre>$ scripts/build_release.sh -boot</pre>
 +
 +
==== 4. Build CDT Image ====
 +
<pre>$ scripts/build_release.sh -cdt</pre>
 +
 +
==== 5. Build TZ Image ====
 +
<pre>$ scripts/build_release.sh -tz</pre>
 +
 +
==== 6. Build YOCTO Image ====
 +
<pre>$ scripts/build_release.sh -yocto</pre>
 +
 +
==== 7. Build META Image ====
 +
<pre>$ scripts/build_release.sh -meta</pre>
 +
 +
==== 8. Build OTA Image ====
 +
<pre>$ scripts/build_release.sh -ota</pre>
  
 
== Build yocto images ==
 
== Build yocto images ==
 
<pre>$ cd poky
 
<pre>$ cd poky
 
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
 
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
$ export PREBUILT_SRC_DIR="<APPS_ROOT>/prebuilt_HY11"
+
$ export PREBUILT_SRC_DIR="/home/adv/adv-release-bsp/prebuilt_HY11"
 
$ source qti-conf/set_bb_env.sh
 
$ source qti-conf/set_bb_env.sh
 
$ bitbake qti-ubuntu-robotics-image</pre>
 
$ bitbake qti-ubuntu-robotics-image</pre>
Line 53: Line 136:
 
<pre>$ cd poky
 
<pre>$ cd poky
 
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
 
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
$ export PREBUILT_SRC_DIR="<APPS_ROOT>/prebuilt_HY11"
+
$ export PREBUILT_SRC_DIR="/home/adv/adv-release-bsp/prebuilt_HY11"
 
$ 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>
Line 72: Line 155:
 
=== Get the official images and unzip ===
 
=== Get the official images and unzip ===
  
Release image URL: TBD
+
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)]]
  
 
Unzip command example:
 
Unzip command example:
<pre><code>$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.tgz</code></pre>
+
<pre>$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.tgz</pre>
 
 
<button>Copy</button>
 
  
 
=== Enter 9008 download mode ===
 
=== Enter 9008 download mode ===
Line 93: Line 174:
 
*Open QFIL tool and click the&nbsp;'''"Select Port"'''  
 
*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]
+
[[File:Qfil flash image 1 1713161681873.png|800px|Qfil flash image 1 1713161681873.png]]
 +
 
 +
&nbsp;
  
 
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''  
 
*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]
+
[[File:Qfil flash image 2 1713161718506.png|800px|Qfil flash image 2 1713161718506.png]]
 +
 
 +
&nbsp;
  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*2.Click the&nbsp;'''"FireHose 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]
+
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
 +
 
 +
&nbsp;
  
 
*1.Select the "Device Type" to&nbsp;'''"emmc"'''  
 
*1.Select the "Device Type" to&nbsp;'''"emmc"'''  
Line 108: Line 195:
 
*3.Select the&nbsp;'''"Erase All Before 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]
+
[[File:Qfil flash image 4 1713161932766.png|800px|Qfil flash image 4 1713161932766.png]]
 +
 
 +
&nbsp;
  
 
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"emmc"'''  
 
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"emmc"'''  
Line 115: Line 204:
 
*4.Click the&nbsp;'''"Download Content"'''  
 
*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]
+
[[File:Qfil flash image 5 1713161947957.png|800px|Qfil flash image 5 1713161947957.png]]
 +
 
 +
&nbsp;
  
 
*Finish Download  
 
*Finish Download  
 
*You can power off the device and power on it again  
 
*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]
+
[[File:Qfil flash image 7 1713161996595.png|800px|Qfil flash image 7 1713161996595.png]]
 +
 
 +
&nbsp;
  
 
==== UFS ====
 
==== UFS ====
Line 128: Line 221:
 
*Open QFIL tool and click the&nbsp;'''"Select Port"'''  
 
*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]
+
[[File:Qfil flash image 1 1713161681873.png|800px|Qfil flash image 1 1713161681873.png]]
 +
 
 +
&nbsp;
  
 
*Select the&nbsp;'''"Qualcomm HS-USB QDloader 9008"'''  
 
*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]
+
[[File:Qfil flash image 2 1713161718506.png|800px|Qfil flash image 2 1713161718506.png]]
 +
 
 +
&nbsp;
  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*2.Click the&nbsp;'''"FireHose 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]
+
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
 +
 
 +
&nbsp;
  
 
*1.Select the "Device Type" to&nbsp;'''"ufs"'''  
 
*1.Select the "Device Type" to&nbsp;'''"ufs"'''  
 
*2.Select the&nbsp;'''"Provision"'''  
 
*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]
+
[[File:Qfil flash image 8 1713163252331.png|800px|Qfil flash image 8 1713163252331.png]]
 +
 
 +
&nbsp;
  
 
*1.Select the&nbsp;'''"provision_ufs31.xml"'''&nbsp;file  
 
*1.Select the&nbsp;'''"provision_ufs31.xml"'''&nbsp;file  
Line 148: Line 249:
 
*3.Click the&nbsp;'''"Provision"'''  
 
*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]
+
[[File:Qfil flash image 9 1713163470993.png|800px|Qfil flash image 9 1713163470993.png]]
 +
 
 +
&nbsp;
  
 
*Finish Provision  
 
*Finish Provision  
 
*You can power off the device and power on it again  
 
*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]
+
[[File:Qfil flash image 10 1713163492158.png|800px|Qfil flash image 10 1713163492158.png]]
 +
 
 +
&nbsp;
  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*1.Click the&nbsp;'''"Configuration"'''  
 
*2.Click the&nbsp;'''"FireHose 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]
+
[[File:Qfil flash image 3 1713161738991.png|800px|Qfil flash image 3 1713161738991.png]]
 +
 
 +
&nbsp;
  
 
*1.Deselected the&nbsp;'''"Provision"'''  
 
*1.Deselected the&nbsp;'''"Provision"'''  
Line 164: Line 271:
 
*3.Select the&nbsp;'''"Erase All Before 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]
+
[[File:Qfil flash image 11 1713163505186.png|800px|Qfil flash image 11 1713163505186.png]]
 +
 
 +
&nbsp;
  
 
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"ufs"'''  
 
*1.Select the "Availible Meta Build Storage Types" to&nbsp;'''"ufs"'''  
Line 171: Line 280:
 
*4.Click the&nbsp;'''"Download Content"'''  
 
*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]
+
[[File:Qfil flash image 12 1713163517837.png|800px|Qfil flash image 12 1713163517837.png]]
 +
 
 +
&nbsp;
  
 
*Finish Download  
 
*Finish Download  
 
*You can power off the device and power on it again  
 
*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]
+
[[File:Qfil flash image 13 1713164712430.png|800px|Qfil flash image 13 1713164712430.png]]
 +
 
 +
&nbsp;
 +
 
 +
&nbsp;
  
 
== Fastboot ==
 
== Fastboot ==
Line 182: Line 297:
 
*Micro USB: ROM-ED92 USB0  
 
*Micro USB: ROM-ED92 USB0  
  
Connecto the ROM-ED92 USB0 to host computer and set the Micro USB to&nbsp;'''peripheral'''&nbsp;mode.
+
Connect&nbsp;the ROM-ED92 USB0 to host computer and set the Micro USB to&nbsp;'''peripheral'''&nbsp;mode.
 
<pre># echo "peripheral" > /sys/devices/platform/soc/a600000.ssusb/mode</pre>
 
<pre># echo "peripheral" > /sys/devices/platform/soc/a600000.ssusb/mode</pre>
  
Line 199: Line 314:
  
 
=== Use the fastboot to flash the kernel boot image ===
 
=== Use the fastboot to flash the kernel boot image ===
<pre>adv@adv-desktop:/qualcomm/adv-release-bsp/amss$ fastboot flash boot_a qti-ubuntu-robotics-image-qcs6490-odk-boot.img
+
<pre>adv@adv-desktop:~$ fastboot flash boot_a qti-ubuntu-robotics-image-qcs6490-odk-boot.img
 
target reported max download size of 805306368 bytes
 
target reported max download size of 805306368 bytes
 
sending 'boot_a' (24420 KB)...
 
sending 'boot_a' (24420 KB)...
Line 207: Line 322:
 
finished. total time: 0.935s
 
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
+
adv@adv-desktop:~$ fastboot flash boot_b qti-ubuntu-robotics-image-qcs6490-odk-boot.img
 
target reported max download size of 805306368 bytes
 
target reported max download size of 805306368 bytes
 
sending 'boot_b' (24420 KB)...
 
sending 'boot_b' (24420 KB)...
Line 216: Line 331:
  
 
=== Use the fastboot to flash the kernel dtbo image ===
 
=== Use the fastboot to flash the kernel dtbo image ===
<pre>adv@adv-desktop4:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_a dtbo.img
+
<pre>adv@adv-desktop4:~$ fastboot flash dtbo_a dtbo.img
 
target reported max download size of 805306368 bytes
 
target reported max download size of 805306368 bytes
 
sending 'dtbo_a' (12330 KB)...
 
sending 'dtbo_a' (12330 KB)...
Line 224: Line 339:
 
finished. total time: 0.497s
 
finished. total time: 0.497s
  
adv@adv-desktop4:/qualcomm/adv-release-bsp/amss$ fastboot flash dtbo_b dtbo.img
+
adv@adv-desktop4:~$ fastboot flash dtbo_b dtbo.img
 
target reported max download size of 805306368 bytes
 
target reported max download size of 805306368 bytes
 
sending 'dtbo_b' (12330 KB)...
 
sending 'dtbo_b' (12330 KB)...

Latest revision as of 08:14, 5 September 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

Host Machine

  • Linux Distro: Ubuntu 22.04 LTS

If yor host machine is Ubuntu 20.04 LTS, you need to install the qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb.

$ wget http://archive.ubuntu.com/ubuntu/pool/universe/q/qemu/qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb
$ sudo dpkg -i qemu-user-static_6.2+dfsg-2ubuntu6_amd64.deb

Otherwise, you may get the following yocto build fail:

ERROR: ubuntu-base-20.04-r0 do_ubuntu_basic_configure: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187' failed with exit code 126
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/log.do_ubuntu_basic_configure.1061187
Log data follows:
| DEBUG: Executing shell function do_ubuntu_basic_configure
| NOTE: copy fakeroot and fakechroot lib to ubuntu-base
| /usr/sbin/chroot: failed to run command ‘/bin/bash’: Exec format error
| WARNING: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187:1 exit 126 from 'fakechroot fakeroot chroot /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/ubuntu_base_tmp /bin/bash -c "cd /var; rm run; ln -s ../run run"'
| ERROR: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.1061187' failed with exit code 126
ERROR: Task (/home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 4987 tasks of which 4583 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 6 seconds

Summary: 1 task failed:
  /home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure
Summary: There were 235 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

or

ERROR: ubuntu-base-20.04-r0 do_ubuntu_basic_configure: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287' failed with exit code 1
ERROR: Logfile of failure stored in: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/log.do_ubuntu_basic_configure.880287
Log data follows:
| DEBUG: Executing shell function do_ubuntu_basic_configure
| NOTE: copy fakeroot and fakechroot lib to ubuntu-base
| semop(1): encountered an error: Function not implemented
| WARNING: /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287:1 exit 1 from 'fakechroot fakeroot chroot /home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/ubuntu_base_tmp /bin/bash -c "cd /var; rm run; ln -s ../run run"'
| ERROR: Execution of '/home/adv/adv-release-bsp/build-qti-distro-ubuntu-fullstack-debug/tmp-glibc/work/aarch64-oe-linux/ubuntu-base/20.04-r0/temp/run.do_ubuntu_basic_configure.880287' failed with exit code 1
ERROR: Task (/home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3452 tasks of which 3253 didn't need to be rerun and 1 failed.
NOTE: Writing buildhistory
NOTE: Writing buildhistory took: 12 seconds
 
Summary: 1 task failed:
  /home/adv/adv-release-bsp/poky/meta-qti-ubuntu/recipes-core/ubuntu-base/ubuntu-base_20.04.bb:do_ubuntu_basic_configure
Summary: There were 234 WARNING messages shown.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.

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 "https://AIM-Linux:${ADV_GIT_TOKEN}@dev.azure.com" > ~/.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

Get and Unzip the Download Files

UIV1 yocto downloads file:[ downloads.qcs6490.ubun.1.0.r00011.1.tar.gz ]

$ cd adv-release-bsp
$ tar -zxvf downloads.qcs6490.ubun.1.0.r00011.1.tar.gz 

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 All Images individually

1. Build ADSP Image

$ scripts/build_release.sh -adsp

2. Build CDSP Image

$ scripts/build_release.sh -cdsp

3. Build BOOT(XBL) Image

$ scripts/build_release.sh -boot

4. Build CDT Image

$ scripts/build_release.sh -cdt

5. Build TZ Image

$ scripts/build_release.sh -tz

6. Build YOCTO Image

$ scripts/build_release.sh -yocto

7. Build META Image

$ scripts/build_release.sh -meta

8. Build OTA Image

$ scripts/build_release.sh -ota

Build yocto images

$ cd poky
$ export MACHINE=qcs6490-odk DISTRO=qti-distro-ubuntu-fullstack-debug
$ export PREBUILT_SRC_DIR="/home/adv/adv-release-bsp/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="/home/adv/adv-release-bsp/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: OS Support List (based on Ubuntu 20.04 - LU 1.0)

Unzip command example:

$ sudo tar -zxvf 2860A1AIM37UIV10059_emmc_2024-03-14.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 QFIL to flash image

EMMC

  • Open QFIL tool and click the "Select Port"

Qfil flash image 1 1713161681873.png

 

  • Select the "Qualcomm HS-USB QDloader 9008"

Qfil flash image 2 1713161718506.png

 

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

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"

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"

Qfil flash image 5 1713161947957.png

 

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

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"

Qfil flash image 1 1713161681873.png

 

  • Select the "Qualcomm HS-USB QDloader 9008"

Qfil flash image 2 1713161718506.png

 

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

Qfil flash image 3 1713161738991.png

 

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

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"

Qfil flash image 9 1713163470993.png

 

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

Qfil flash image 10 1713163492158.png

 

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

Qfil flash image 3 1713161738991.png

 

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

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"

Qfil flash image 12 1713163517837.png

 

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

Qfil flash image 13 1713164712430.png

 

 

Fastboot

  • Micro USB: ROM-ED92 USB0

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

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

Enter the fastboot mode

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

Use the fastboot to flash the kernel boot image

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
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

Use the fastboot to flash the kernel dtbo image

adv@adv-desktop4:~$ 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:~$ 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