# GitHub workflow (firmware and extras) Note This information is applicable only for authorized users. To upgrade your access, go to [http://www.qualcomm.com/support/working-with-qualcomm](http://www.qualcomm.com/support/working-with-qualcomm). Use this information to build various Qualcomm Linux Yocto layers including the `meta-qcom-hwe`, `meta-qcom-extras`, `meta-qcom-qim-product-sdk`, and `meta-qcom-robotics-sdk` layers using selective proprietary sources and binaries/libraries. ## Host machine requirements > > > | Configuration | Permissions | > | --- | --- | > | x86 machine | A `sudo` permission is required to run a few commands | > | Quad-core CPU, for example, Intel i7-2600 at 3.4 GHz
(equivalent or better) | A `sudo` permission is required to run a few commands | > | 300 GB free disk space (swap partition > 32 GB) | A `sudo` permission is required to run a few commands | > | 16 GB RAM | A `sudo` permission is required to run a few commands | > | Ubuntu 22.04 | A `sudo` permission is required to run a few commands | > | | | > | | | > | | | > | | | ## Install QSC CLI 1. Install curl (if not installed already): sudo apt install curl Copy to clipboard 2. Download the Debian package for `qsc-cli`: cd curl -L https://softwarecenter.qualcomm.com/api/download/software/qsc/linux/latest.deb -o qsc_installer.deb Copy to clipboard 3. Install the `qsc-cli` Debian package: sudo apt update sudo apt install ./qsc_installer.deb Copy to clipboard 4. Log in to `qsc-cli`: qsc-cli login -u Copy to clipboard Note For more information, see `qsc-cli` related topics in [How to Sync](https://docs.qualcomm.com/doc/80-70015-254/topic/how_to.html#howto-sync). ## Ubuntu host setup The Ubuntu host machine must be setup to ensure that the required software tools are installed and configured for use. 1. Install the following packages: sudo apt update sudo apt install repo gawk wget git diffstat unzip texinfo gcc build-essential chrpath socat cpio python3 python3-pip python3-pexpect xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev pylint xterm python3-subunit mesa-common-dev zstd liblz4-tool locales tar python-is-python3 file libxml-opml-simplegen-perl vim whiptail sudo apt-get install lib32stdc++6 libncurses5 checkinstall libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev curl Copy to clipboard 2. Add your Qualcomm login ID with PAT to the `~/.netrc` file in your home directory: # Log in to qsc-cli to generate PAT qsc-cli login -u # Run the following command to generate PAT qsc-cli pat --get # This command gives output as shown in the following note # The last line in this output is the token, which can be used to access # Qualcomm Proprietary repositories. This token expires in two weeks. Copy to clipboard Note [user@hostname](mailto:user%40hostname):/local/mnt/workspace$ qsc-cli pat –get [Info]: Starting qsc-cli version 0.0.0.9 **5LThNlklb55mMVLB5C2KqUGU2jCF** 3. Use your preferred text editor to edit the `~/.netrc` file and add the following entries: Note Create the `~/.netrc` file if it does not exist. machine chipmaster2.qti.qualcomm.com login password machine qpm-git.qualcomm.com login password Copy to clipboard 4. Set up the locales (if not set up already): sudo locale-gen en_US.UTF-8 sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8 Copy to clipboard 5. Update git configurations: # Check if your identity is configured in .gitconfig git config --get user.email git config --get user.name # Run the following commands if you do not have your account identity set in .gitconfig git config --global user.email git config --global user.name <"Your Name"> # Add the following UI color option for output of console (optional) git config --global color.ui auto # Add the following git configurations to fetch large size repositories and to avoid unreliable connections git config --global http.postBuffer 1048576000 git config --global http.maxRequestBuffer 1048576000 git config --global http.lowSpeedLimit 0 git config --global http.lowSpeedTime 999999 # Add the following git configurations to follow remote redirects from http-alternates files or alternates git config --global http.https://chipmaster2.qti.qualcomm.com.followRedirects true git config --global http.https://qpm-git.qualcomm.com.followRedirects true Copy to clipboard 6. Set up Python 3.10.2: Note Skip the following instructions if you already have Python 3.10.2 or later versions. python --version # Download it in a directory of your choice wget https://www.python.org/ftp/python/3.10.2/Python-3.10.2.tgz tar -xvf Python-3.10.2.tgz cd Python-3.10.2 # Use sudo if you need to access /opt ./configure --prefix=/opt/python3 --enable-optimizations make make install ln -s /opt/python3/bin/python3 /opt/python3/bin/python export PATH=/opt/python3/bin:$PATH export PYTHONPATH=/opt/python3/lib:$PYTHONPATH Copy to clipboard ## Build with firmware sources ### Sync firmware The following table describes the Qualcomm Yocto layers and release tags: | Access level | Yocto layer | Release tag | Example | | --- | --- | --- | --- | | Public developers (unregistered) | `meta-qcom-hwe` | manifest release tag | qcom-6.6.38-QLI.1.2-Ver.1.1.xml | | Public developers (unregistered) | `meta-qcom-qim-product-sdk` | manifest release tag | qcom-6.6.38-QLI.1.2-Ver.1.1\_qim-product-sdk-1.1.2.xml | | Public developers (unregistered) | `meta-qcom-robotics-sdk` | manifest release tag | qcom-6.6.38-QLI.1.2-Ver.1.1\_robotics-product-sdk-1.1.xml | | Licensed developers with authorized access | `meta-qcom-extras` | meta-qcom-extras release tag | r1.0\_00049.0 | | See [Mapping access levels](https://docs.qualcomm.com/doc/80-70015-254/topic/build_addn_info.html#build-mapping-access-levels) | NA | firmware release tag | r1.0\_00049.0 | | | | | | | | | | | The following tables describe the firmware distributions that can be downloaded according to the need and entitlements: | **Access level** | **Distribution** | Yocto layers | | --- | --- | --- | | Licensed developers with authorized access | BSP build: High-level OS and firmware source (GPS only)


`Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|NoModem` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras` | | Licensed developers with authorized access | BSP build + QIMP SDK



>
>
> `Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|NM_QIMPSDK` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras`


`meta-qcom-qim-product-sdk` | | Licensed developers with authorized access | BSP build + QIMP SDK + QIRP SDK



>
>
> `Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|NM_QIRPSDK` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras`


`meta-qcom-robotics-extras`


`meta-ros`


`meta-qcom-robotics`


`meta-qcom-robotics-distro`


`meta-qcom-robotics-sdk`


`meta-qcom-qim-product-sdk` | | Licensed developers (contact Qualcomm for access) | BSP build: High-level OS and firmware (GPS only) source


`Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras` | | Licensed developers (contact Qualcomm for access) | BSP build + QIMP SDK (GPS only)



>
>
> `Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|QIMPSDK` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras`


`meta-qcom-robotics-extras`


`meta-qcom-qim-product-sdk` | | Licensed developers (contact Qualcomm for access) | BSP build: High-level OS and firmware (GPS and modem) source



>
>
> `Qualcomm_Linux.SPF.1.0|AMSS|Standard|OEM|` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras` | | Licensed developers (contact Qualcomm for access) | BSP build + QIMP SDK (GPS and modem)



>
>
> `Qualcomm_Linux.SPF.1.0|AMSS|Standard|OEM|QIMPSDK` | `meta-qcom`


`meta-qcom-hwe`


`meta-qcom-distro`


`meta-qcom-extras`


`meta-qcom-qim-product-sdk` | | | | | | | | | | | | | Note For more information on the Yocto layers, see [Qualcomm Linux metadata layers and descriptions](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-27/platform_software_features.html#qualcomm-linux-metadata-layers-overview). Mapping of firmware distributions and git repositories | Firmware distribution | Git command | Directory into which firmware gets synced on git clone | | --- | --- | --- | | Qualcomm\_Linux.SPF.1.0|AP|Standard|OEM|NoModem | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem.git` | `qualcomm-linux-spf-1-0_ap_standard_oem_nomodem` | | Qualcomm\_Linux.SPF.1.0|AP|Standard|OEM|NM\_QIMPSDK | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk.git` | `qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk` | | Qualcomm\_Linux.SPF.1.0|AP|Standard|OEM|NM\_QIRPSDK | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk.git` | `qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk` | | Qualcomm\_Linux.SPF.1.0|AP|Standard|OEM| | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem.git` | `qualcomm-linux-spf-1-0_ap_standard_oem` | | Qualcomm\_Linux.SPF.1.0|AP|Standard|OEM|QIMPSDK | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_qimpsdk.git` | `qualcomm-linux-spf-1-0_ap_standard_oem_qimpsdk` | | Qualcomm\_Linux.SPF.1.0|AMSS|Standard|OEM| | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_amss_standard_oem.git` | `qualcomm-linux-spf-1-0_amss_standard_oem` | | Qualcomm\_Linux.SPF.1.0|AMSS|Standard|OEM|QIMPSDK | `git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_amss_standard_oem_qimpsdk.git` | `qualcomm-linux-spf-1-0_amss_standard_oem_qimpsdk` | Note Commands in the following sections are based on the binary and source for firmware images without modem and GPS (see the command in [Mapping of firmware distributions and git repositories](https://docs.qualcomm.com/doc/80-70015-254/topic/build_addn_info.html#mapping-firmware-table)). Hence, `qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk` is used. If you use any other distribution, then update the directory accordingly. The **Git command** column (see [Mapping of firmware distributions and git repositories](https://docs.qualcomm.com/doc/80-70015-254/topic/build_addn_info.html#mapping-firmware-table)) provides information about the git repositories that contain the firmware sources. These repositories are hosted on Qualcomm servers. Clone the appropriate repositories based on your access profile and use case. The following `git clone` command downloads the selected firmware components in source, except the modem: mkdir -p cd git clone -b --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk.git # Example, is r1.0_00049.0 Copy to clipboard Note - The `git clone` command clones the content into the `/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk` directory. - For the latest ``, see the section *Build-critical release tags* in the [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). ### Build firmware Tab QCS6490/QCS5430 Tab QCS9075 Prerequisites - Ensure that the working shell is `bash`. echo $0 Copy to clipboard The expected output of the command should be `bash`. If not, enter the bash shell: bash Copy to clipboard - Install the libffi6 package using the following commands. This is required for the QAIC compiler, which generates header and source files from IDL files: curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb sudo dpkg -i libffi6_3.2.1-8_amd64.deb Copy to clipboard - Install LLVM for AOP, TZ, and BOOT compilation: cd mkdir llvm # Log in to qpm-cli and activate the license qpm-cli --login qpm-cli --license-activate sdllvm_arm # LLVM requirement for BOOT compilation is 14.0.4 qpm-cli --install sdllvm_arm --version 14.0.4 --path /llvm/14.0.4 chmod -R 777 /llvm/14.0.4 # LLVM requirement for TZ compilation is 16.0.7 qpm-cli --install sdllvm_arm --version 16.0.7 --path /llvm/16.0.7 chmod -R 777 /llvm/16.0.7 Copy to clipboard - Export the `SECTOOLS` variable and compile the firmware builds (`/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk` is the top-level directory): export SECTOOLS=/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/sectoolsv2/ext/Linux/sectools export SECTOOLS_DIR=/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/sectoolsv2/ext/Linux # An example is QCM6490.LE.1.0, see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard - Install and set up Qualcomm^®^ Hexagon^™^ Processor: qpm-cli --extract hexagon8.4 --version 8.4.07 export HEXAGON_ROOT=$HOME/Qualcomm/HEXAGON_Tools echo $HEXAGON_ROOT Copy to clipboard Note Set the environment variable HEXAGON\_ROOT to the path where the Hexagon SDK is installed. To change the install path when using `qpm-cli`, see [Change the Hexagon tool install path](https://docs.qualcomm.com/doc/80-70015-254/topic/how_to.html#section-nqg-cj3-v1c-vinayjk-03-23-24-006-3-877). Build cDSP **Tools required** - Compiler version: Hexagon 8.4.07 - Python version: Python 3.10.2 - libffi6 package **Build steps** 1. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/CDSP.HT.2.5.c3/cdsp_proc/build/ms Copy to clipboard 2. Clean the build: python ./build_variant.py kodiak.cdsp.prod --clean Copy to clipboard 3. Build the image: python ./build_variant.py kodiak.cdsp.prod Copy to clipboard Build aDSP **Tools required** - Compiler version: Hexagon 8.4.07 - Python version: Python 3.10.2 - libffi6 package **Nanopb integration (one-time setup)** cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/ADSP.HT.5.5.c8/adsp_proc/qsh_api curl https://jpa.kapsi.fi/nanopb/download/nanopb-0.3.9.5-linux-x86.tar.gz -o nanopb-0.3.9.5-linux-x86.tar.gz cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/ADSP.HT.5.5.c8/adsp_proc/ python qsh_api/build/config_nanopb_dependency.py -f nanopb-0.3.9.5-linux-x86 Copy to clipboard **Build steps** 1. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/ADSP.HT.5.5.c8/adsp_proc/build/ms Copy to clipboard 2. Clean the build: python ./build_variant.py kodiak.adsp.prod --clean Copy to clipboard 3. Build the image: python ./build_variant.py kodiak.adsp.prod Copy to clipboard Build Boot **Tools required** - Compiler version: LLVM version must be updated to 14.0.4 Note To avoid build errors, ensure that there is a `/` at the end of the command. export LLVM=/llvm/14.0.4/ Copy to clipboard - Python version: Python 3.10 - libffi6 package **Build steps** 1. Install the device tree compiler: sudo apt-get install device-tree-compiler export DTC=/usr/bin Copy to clipboard 2. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/BOOT.MXF.1.0.c1/ Copy to clipboard 3. Install the dependencies: python -m pip install -r boot_images/boot_tools/dtschema_tools/oss/requirements.txt Copy to clipboard 4. Clean the build: python -u boot_images/boot_tools/buildex.py -t kodiak,QcomToolsPkg -v LAA -r RELEASE --build_flags=cleanall Copy to clipboard 5. Build the image: python -u boot_images/boot_tools/buildex.py -t kodiak,QcomToolsPkg -v LAA -r RELEASE Copy to clipboard Note For debug variant builds, replace `RELEASE` with `DEBUG`. TZ firmware **Tools required** - Compiler version: LLVM 16.0.7 - Python version: Python 3.10 **Build steps** 1. Install LLVM: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/TZ.XF.5.29/trustzone_images/build/ms/ vi build_config_deploy_kodiak.xml # Edit all the occurrences of /pkg/qct/software/llvm/release/arm/16.0.7/ to /llvm/16.0.7/ Copy to clipboard 2. Clean the build: python build_all.py -b TZ.XF.5.0 CHIPSET=kodiak --cfg=build_config_deploy_kodiak.xml --clean Copy to clipboard 3. Build the image: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/TZ.XF.5.29/trustzone_images/build/ms/ python build_all.py -b TZ.XF.5.0 CHIPSET=kodiak --cfg=build_config_deploy_kodiak.xml Copy to clipboard AOP firmware **Tools required** - Compiler version: LLVM 14.0.4 - Python version: Python 3.10 **Build steps** 1. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/AOP.HO.3.6/aop_proc/build/ Copy to clipboard 2. Build the image: ./build_kodiak.sh -l /llvm/14.0.4/ Copy to clipboard CPUCP firmware The CPUCP firmware is released as a binary and build compilation is not required. CPUSYS.VM firmware The CPUSYS.VM firmware is released as a binary and build compilation is not required. BTFM firmware The BTFM firmware is released as a binary and build compilation is not required. WLAN firmware The WLAN firmware is released as a binary and build compilation is not required. Generate firmware prebuilds (boot-critical and split-firmware binaries) Create an integrated firmware binary from the individual components that you compiled: # cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/build # An example is QCM6490.LE.1.0, see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/) cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/QCM6490.LE.1.0/common/build python build.py --imf Copy to clipboard Note Firmware prebuild is successful if the following zip files are generated in the `/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/QCM6490.LE.1.0/common/build/ufs/bin` directory: - `QCM6490_bootbinaries.zip` - `QCM6490_dspso.zip` - `QCM6490_fw.zip` Prerequisites - Ensure that the working shell is `bash`. echo $0 Copy to clipboard The expected output of the command should be `bash`. If not, enter the bash shell: bash Copy to clipboard - Install the libffi6 package using the following commands. This is required for the QAIC compiler, which generates header and source files from IDL files: curl -LO http://archive.ubuntu.com/ubuntu/pool/main/libf/libffi/libffi6_3.2.1-8_amd64.deb sudo dpkg -i libffi6_3.2.1-8_amd64.deb Copy to clipboard - Install LLVM for AOP, TZ, and BOOT compilation: cd mkdir llvm # Log in to qpm-cli and activate the license qpm-cli --login qpm-cli --license-activate sdllvm_arm # LLVM requirement for BOOT compilation is 14.0.4 qpm-cli --install sdllvm_arm --version 14.0.4 --path /llvm/14.0.4 chmod -R 777 /llvm/14.0.4 # LLVM requirement for TZ compilation is 16.0.7 qpm-cli --install sdllvm_arm --version 16.0.7 --path /llvm/16.0.7 chmod -R 777 /llvm/16.0.7 Copy to clipboard - Export the `SECTOOLS` variable and compile the firmware builds (`/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk` is the top-level directory): export SECTOOLS=/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/sectoolsv2/ext/Linux/sectools export SECTOOLS_DIR=/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/sectoolsv2/ext/Linux # An example is QCS9100.LE.1.0, see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard - Install and set up Hexagon: qpm-cli --extract hexagon8.6 --version 8.6.05.2 export HEXAGON_ROOT=$HOME/Qualcomm/HEXAGON_Tools echo $HEXAGON_ROOT Copy to clipboard Note Set the environment variable HEXAGON\_ROOT to the path where the Hexagon SDK is installed. To change the install path when using `qpm-cli`, see [Change the Hexagon tool install path?](https://docs.qualcomm.com/doc/80-70015-254/topic/how_to.html#section-nqg-cj3-v1c-vinayjk-03-23-24-006-3-877). Build DSP **Tools required** - Compiler version: Hexagon 8.6.05.2 - Python version: Python 3.8.2 **Build steps** 1. Install the device tree compiler: sudo apt-get install device-tree-compiler export DTC_PATH=/usr/bin Copy to clipboard 2. Install the dependencies: pip install ruamel.yaml==0.17.17 pip install dtschema==2021.10 pip install jsonschema==4.0.0 Copy to clipboard 3. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/DSP.AT.1.0/dsp_proc/build/ms Copy to clipboard 4. Clean the build: python ./build_variant.py lemans.adsp.prod --clean python ./build_variant.py lemans.cdsp0.prod --clean python ./build_variant.py lemans.cdsp1.prod --clean python ./build_variant.py lemans.gpdsp0.prod --clean python ./build_variant.py lemans.gpdsp1.prod --clean Copy to clipboard 5. Build the image: python ./build_variant.py lemans.adsp.prod && python ./build_variant.py lemans.cdsp0.prod && python ./build_variant.py lemans.cdsp1.prod && python ./build_variant.py lemans.gpdsp0.prod && python ./build_variant.py lemans.gpdsp1.prod Copy to clipboard Build Boot **Tools required** - Compiler version: LLVM version must be updated to 14.0.4 export LLVM=/llvm/14.0.4/ Copy to clipboard - Python version: Python 3.10 - libffi6 package **Build steps** 1. Install the device tree compiler: sudo apt-get install device-tree-compiler export DTC=/usr/bin Copy to clipboard 2. Navigate to the following directory: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/BOOT.MXF.1.0.c1/ Copy to clipboard 3. Install the dependencies: python -m pip install -r boot_images/boot_tools/dtschema_tools/oss/requirements.txt Copy to clipboard 4. Clean the build: python -u boot_images/boot_tools/buildex.py -t lemans,QcomToolsPkg - v LAA -r RELEASE --build_flags=cleanall Copy to clipboard 5. Build the image: python -u boot_images/boot_tools/buildex.py -t lemans,QcomToolsPkg - v LAA -r RELEASE Copy to clipboard Note For debug variant builds, replace `RELEASE` with `DEBUG`. TZ firmware **Tools required** - Compiler version: LLVM 16.0.7 - Python version: Python 3.10 **Build steps** 1. Install LLVM: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/TZ.XF.5.29/trustzone_images/build/ms/ vi build_config_deploy_lemans.xml # Edit all the occurrences of /pkg/qct/software/llvm/release/arm/16.0.7/ to /llvm/16.0.7/ Copy to clipboard 2. Clean the build: python build_all.py -b TZ.XF.5.0 CHIPSET=lemans --cfg=build_config_deploy_lemans.xml --clean Copy to clipboard 3. Build the image: cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/TZ.XF.5.29/trustzone_images/build/ms/ python build_all.py -b TZ.XF.5.0 CHIPSET=lemans --cfg=build_config_deploy_lemans.xml Copy to clipboard AOP firmware The AOP firmware is released as a binary and build compilation is not required. CPUCP firmware The CPUCP firmware is released as a binary and build compilation is not required. CPUSYS.VM firmware The CPUSYS.VM firmware is released as a binary and build compilation is not required. BTFM firmware The BTFM firmware is released as a binary and build compilation is not required. WLAN firmware The WLAN firmware is released as a binary and build compilation is not required. Generate firmware prebuilds (boot-critical and split-firmware binaries) Create an integrated firmware binary from the individual components that you compiled: # cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/build # An example is QCS9100.LE.1.0, see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/) cd /qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/QCS9100.LE.1.0/common/build python build.py --imf Copy to clipboard Note Firmware prebuild is successful if the following zip files are generated in the `/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk/QCS9100.LE.1.0/common/build/ufs/bin` directory: - `QCS9100_bootbinaries.zip` - `QCS9100_dspso.zip` - `QCS9100_fw.zip` ### Build BSP image with extras BSP image build contains the software components for Qualcomm device support and value-added software features applicable to Qualcomm SoCs. It includes a reference distribution configuration for Qualcomm products. The `meta-qcom-extras` layer enables source compilation of select components, which are otherwise present as binary. For more details, see [Qualcomm Linux metadata layers](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-27/platform_software_features.html#qualcomm-linux-metadata-layers-overview). 1. Download Qualcomm Yocto and the supporting layers with extras: # cd to directory where you have 300 GB of free storage space to create your workspaces mkdir cd repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-kirkstone -m # Example, is qcom-6.6.38-QLI.1.2-Ver.1.1.xml repo sync git clone https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_hlos_oem_metadata.git -b --depth 1 # Example, is r1.0_00049.0 mkdir -p layers/meta-qcom-extras cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata//common/config/meta-qcom-extras/* layers/meta-qcom-extras/ # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard Note For the `` and `` information, see the section *Build-critical release tags* in the [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). 2. Set up the Yocto build: # Export additional meta layers to EXTRALAYERS. Location is assumed under /layers. export EXTRALAYERS="meta-qcom-extras" # CUST_ID is used to clone the proprietary source repositories downloaded by meta-qcom-extras. # It allows source compilation for the corresponding binaries present in meta-qcom-hwe. # This ID is constant for the firmware repository qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk.git. # CUST_ID must be initialized to for "Licensed developers (contact Qualcomm for access)". # For example, for distributions like "Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|" and "Qualcomm_Linux.SPF.1.0|AMSS|Standard|OEM|", # is provided while signing up for distributions mapping to "Licensed developers (contact Qualcomm for access)". # To find , sign in to your account at qualcomm.com. # Click the profile icon, select Account Settings, and then scroll down to the Company Information section. # Use the number specified for Export ID as . export CUST_ID="213195" # The firmware recipe is compiled when the Yocto build is initiated. Firmware recipe expects the # path of firmware. You have generated firmware prebuilts (boot-critical and split-firmware binaries) # using the steps described in the previous section. The directory path must contain QCM6490_bootbinaries.zip, # QCM6490_dspso.zip, and QCM6490_fw.zip. # Set the environment variable to pick up the prebuilts: export FWZIP_PATH="/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/build/ufs/bin" # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard 3. Set up the build environment: MACHINE= DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment # source setup-environment: Sets the environment, creates the build directory build-qcom-wayland, # and enters into build-qcom-wayland directory. Copy to clipboard Note To know the `MACHINE` parameter values, see [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). 4. Compile the Yocto build: bitbake qcom-multimedia-image Copy to clipboard Note Clean the Yocto build: bitbake -fc cleansstate qcom-multimedia-image bitbake -fc cleanall qcom-multimedia-image Copy to clipboard After a successful build, check that the `system.img` file is in the `/build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image` directory: cd /build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image ls -al system.img Copy to clipboard 5. Flash the generated build using [Flash images](https://docs.qualcomm.com/doc/80-70015-254/topic/flash_images.html). ### Build QIMP SDK image with extras The QIMP SDK is a collection of four standalone function SDKs, namely, IM SDK, Qualcomm® Neural Processing SDK, Qualcomm® AI Engine direct SDK, and the TensorFlow Lite runtime. It also includes reference applications that you can use to develop use cases. The `meta-qcom-extras` layer enables source compilation of select components, which are otherwise present as binary. For more details, see [QIMP SDK Quick Start Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-51). 1. Download the QIMP SDK layers, Qualcomm Yocto layer, and the supporting layers with extras: # cd to directory where you have 300 GB of free storage space to create your workspaces mkdir cd repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-kirkstone -m # Example, is qcom-6.6.38-QLI.1.2-Ver.1.1.xml repo sync git clone https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_hlos_oem_metadata.git -b --depth 1 # Example, is r1.0_00049.0 mkdir -p layers/meta-qcom-extras cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata//common/config/meta-qcom-extras/* layers/meta-qcom-extras/ # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b qcom-6.6.38-QLI.1.2-Ver.1.1_qim-product-sdk-1.1.2 layers/meta-qcom-qim-product-sdk Copy to clipboard Note For the `` and `` information, see the section *Build-critical release tags* in the [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). 2. Set up the Yocto build: # Export additional meta layers to EXTRALAYERS. Location is assumed under /layers. export EXTRALAYERS="meta-qcom-extras meta-qcom-qim-product-sdk" # CUST_ID is used to clone the proprietary source repositories downloaded by meta-qcom-extras. # It allows source compilation for the corresponding binaries present in meta-qcom-hwe. # This ID is constant for the firmware repository qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk.git. # CUST_ID must be initialized to for "Licensed developers (contact Qualcomm for access)". # For example, for distributions like "Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|" and "Qualcomm_Linux.SPF.1.0|AMSS|Standard|OEM|", # is provided while signing up for distributions mapping to "Licensed developers (contact Qualcomm for access)". # To find , sign in to your account at qualcomm.com. # Click the profile icon, select Account Settings, and then scroll down to the Company Information section. # Use the number specified for Export ID as . export CUST_ID="213195" # The firmware recipe is compiled when the Yocto build is initiated. Firmware recipe expects the # path of firmware. You have generated firmware prebuilts (boot-critical and split-firmware binaries) # using the steps described in the previous section. The directory path must contain QCM6490_bootbinaries.zip, # QCM6490_dspso.zip, and QCM6490_fw.zip. # Set the environment variable to pick up the prebuilts: export FWZIP_PATH="/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk//common/build/ufs/bin" # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard 3. Set up the build environment: MACHINE= DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-wayland QCOM_SELECTED_BSP=custom source setup-environment # source setup-environment: Sets the environment, creates the build directory build-qcom-wayland, # and enters into build-qcom-wayland directory. Copy to clipboard Note To know the `MACHINE` parameter values, see [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). 4. Compile the QIMP SDK build: bitbake qcom-multimedia-image # Build SDK image bitbake qcom-qim-product-sdk Copy to clipboard Note Clean the QIMP SDK build: bitbake -fc cleansstate qcom-multimedia-image bitbake -fc cleanall qcom-multimedia-image bitbake -fc cleansstate qcom-qim-product-sdk bitbake -fc cleanall qcom-qim-product-sdk Copy to clipboard After a successful build, check that the `system.img` file is in the `/build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image` directory: cd /build-qcom-wayland/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-multimedia-image ls -al system.img Copy to clipboard 5. Flash the generated build using [Flash images](https://docs.qualcomm.com/doc/80-70015-254/topic/flash_images.html). ### Build QIRP SDK image with extras The QIRP SDK 2.0 is a collection of components that enable you to develop robotic features on Qualcomm platforms. This SDK is applicable to the Qualcomm Linux releases. The `meta-qcom-extras` layer enables source compilation of select components, which are otherwise present as binary. For more details, see [QIRP SDK 2.0 User Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70015-265). Note Before you begin, clone the respective firmware for QIRP SDK, for example, `qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk`. 1. Download QIRP SDK layers, Qualcomm Yocto, and supporting layers with extras: # cd to directory where you have 300 GB of free storage space to create your workspaces mkdir cd repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-kirkstone -m # Example, is qcom-6.6.38-QLI.1.2-Ver.1.1.xml repo sync git clone https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_hlos_oem_metadata.git -b --depth 1 # Example, is r1.0_00049.0 mkdir -p layers/meta-qcom-extras mkdir -p layers/meta-qcom-robotics-extras cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata//common/config/meta-qcom-extras/* layers/meta-qcom-extras/ cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata//common/config/meta-qcom-robotics-extras/* layers/meta-qcom-robotics-extras/ # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). git clone https://github.com/ros/meta-ros -b kirkstone layers/meta-ros git clone https://github.com/quic-yocto/meta-qcom-robotics.git layers/meta-qcom-robotics git clone https://github.com/quic-yocto/meta-qcom-robotics-distro.git layers/meta-qcom-robotics-distro git clone https://github.com/quic-yocto/meta-qcom-robotics-sdk.git layers/meta-qcom-robotics-sdk git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b layers/meta-qcom-qim-product-sdk # Example, is qcom-6.6.38-QLI.1.2-Ver.1.1_qim-product-sdk-1.1.2 Copy to clipboard Note For the ``, ``, and `` information, see the section *Build-critical release tags* in the [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240626095531/). 2. Set up the Yocto build: # Export additional meta layers to EXTRALAYERS. Location is assumed under /layers. export EXTRALAYERS="meta-qcom-extras meta-qcom-robotics-extras" # CUST_ID is used to clone the proprietary source repositories downloaded by meta-qcom-extras. # It allows source compilation for the corresponding binaries present in meta-qcom-hwe. # This ID is constant for the firmware repository qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk.git. # CUST_ID must be initialized to for "Licensed developers (contact Qualcomm for access)". # For example, for distributions like "Qualcomm_Linux.SPF.1.0|AP|Standard|OEM|" and "Qualcomm_Linux.SPF.1.0|AMSS|Standard|OEM|", # is provided while signing up for distributions mapping to "Licensed developers (contact Qualcomm for access)". # To find , sign in to your account at qualcomm.com. # Click the profile icon, select Account Settings, and then scroll down to the Company Information section. # Use the number specified for Export ID as . export CUST_ID="213195" # The firmware recipe is compiled when the Yocto build is initiated. Firmware recipe expects the # path of firmware. You have generated firmware prebuilts (boot-critical and split-firmware binaries) # using the steps described in the previous section. The directory path must contain QCM6490_bootbinaries.zip, # QCM6490_dspso.zip, and QCM6490_fw.zip. # Set the environment variable to pick up the prebuilts: export FWZIP_PATH="/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qirpsdk//common/build/ufs/bin" # An example is QCM6490.LE.1.0. For more information on , see the latest Release Notes (https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). Copy to clipboard 3. Compile the QIRP SDK build: ln -s layers/meta-qcom-robotics-distro/set_bb_env.sh ./setup-robotics-environment ln -s layers/meta-qcom-robotics-sdk/scripts/qirp-build ./qirp-build MACHINE= DISTRO=qcom-robotics-ros2-humble QCOM_SELECTED_BSP=custom source setup-robotics-environment # Example, MACHINE=qcs6490-rb3gen2-vision-kit DISTRO=qcom-robotics-ros2-humble QCOM_SELECTED_BSP=custom source setup-robotics-environment # source setup-robotics-environment: Sets the environment, creates the build directory build-qcom-robotics-ros2-humble, # and enters into build-qcom-robotics-ros2-humble directory. ../qirp-build qcom-robotics-full-image Copy to clipboard Note To know the `MACHINE` parameter values, see [Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240929204440/). After a successful build, check that the QIRP SDK build artifacts are at the following paths: QIRP SDK artifacts: /build-qcom-robotics-ros2-humble/tmp-glibc/deploy/qirpsdk_artifacts/qirp-sdk_.tar.gz # system.img is present in the following path Robotics image: /build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcs6490-rb3gen2-vision-kit/qcom-robotics-full-image Copy to clipboard 4. Flash the generated build using [Flash images](https://docs.qualcomm.com/doc/80-70015-254/topic/flash_images.html). Last Published: Feb 03, 2026 [Previous Topic GitHub workflow for registered users](https://docs.qualcomm.com/bundle/publicresource/80-70015-254/topics/build_from_source_github_intro.md) [Next Topic Flash images](https://docs.qualcomm.com/bundle/publicresource/80-70015-254/topics/flash_images.md) Source: [https://docs.qualcomm.com/doc/80-70015-254/topic/build_addn_info.html](https://docs.qualcomm.com/doc/80-70015-254/topic/build_addn_info.html)