# Build with Github (firmware and extras)

Source: [https://docs.qualcomm.com/doc/80-65220-2/topic/using-detailed-instructions_3_2.html](https://docs.qualcomm.com/doc/80-65220-2/topic/using-detailed-instructions_3_2.html)

Use the detailed instructions to sync and build the QIRP SDK extra layers along with
    Qualcomm Linux selected firmware sources.

**Prerequisite**

- The host environment is setup according to [GitHub workflow (firmware and extras)](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/build_addn_info.html).

Note:
- For QIRP SDK, you can **Build with standalone commands** as described in the
            following steps.
- **Build with Dockerfile** is not supported for current release.

## Download basic layers

Download the all the basic layers for the QIRP SDK.

### Option 1: Download with manifest

- Download the layers for the QIRP SDK by running the following commands.

Note: To get the latest `<robotics-release-manifest>`, see the [Qualcomm® Linux Intelligent Robotics Product SDK (QIRP SDK) 2.0
                    Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/80-75695-1).

        cd <workspace>
        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-kirkstone -m <robotics-release-manifest>
        repo sync -c -j8Copy to clipboard

    **Example:**

    To download the ``qcom-6.6.28-QLI.1.1-Ver.1.1_robotics-product-sdk-1.1``
            release, run this command:

        repo init -u https://github.com/quic-yocto/qcom-manifest -b qcom-linux-kirkstone -m qcom-6.6.28-QLI.1.1-Ver.1.1_robotics-product-sdk-1.1.xml
        repo sync -c -j8Copy to clipboard

    **Results:** The following layers are downloaded.

        meta-qcom
        meta-qcom-hwe
        meta-qcom-distro
        meta-ros
        meta-qcom-robotics
        meta-qcom-robotics-distro
        meta-qcom-robotics-sdk
        meta-qcom-qim-product-sdkCopy to clipboard

### Option 2: Download with the "git clone" command

1. Set up the host environment and sync the latest Yocto project BSP as described in the
            [Qualcomm Repo Manifest README file](https://github.com/quic-yocto/qcom-manifest/blob/qcom-linux-kirkstone/README.md).
2. Download the layers for the QIRP SDK based on the `<workspace>`
          directory of the downloaded Yocto project
            BSP.

        cd <workspace>
        git clone https://git.codelinaro.org/clo/le/meta-ros.git -b ros.qclinux.1.0.r1-rel 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 layers/meta-qcom-qim-product-sdkCopy to clipboard

**Results:**
          
    The same layers are downloaded as [Option 1: Download with manifest](https://docs.qualcomm.com/doc/80-65220-2/topic/using-detailed-instructions_3_2.html#ID-concept-download-src__section_bhb_qzk_4bc).

**Related Resources**  

- [Architecture](https://docs.qualcomm.com/doc/80-65220-2/topic/architecture.html)

## Sync the meta-qcom-robotics-extras layer and compile the QIRP SDK

Source: [https://docs.qualcomm.com/doc/80-65220-2/topic/using-detailed-instructions_3_2.html](https://docs.qualcomm.com/doc/80-65220-2/topic/using-detailed-instructions_3_2.html)

Sync the `meta-qcom-robotics-extras` layer and compile the robotics
        image of QIRP SDK.

### About this task

**Steps:**

### Procedure

1. Sync and build the Qualcomm^®^ Linux firmware by following the [GitHub workflow (firmware and extras)](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-254/build_addn_info.html).
                
For the above build, firmware prebuilts are successfully generated if the
                        following zip files appear in the
                            &lt;FIRMWARE\_ROOT&gt;/qualcomm-linux-spf-1-0\_ap\_standard\_oem\_nomodem/QCM6490.LE.1.0/common/build/ufs/bin
                        directory:

    - QCM6490\_bootbinaries.zip
    - QCM6490\_dspso.zip
    - QCM6490\_fw.zip
2. Fetch the `meta-qcom-robotics-extras` and
                        `meta-qcom-extras` layer.
                
Note: Get the
                            `<meta-qcom-robotics-extras-release-tag>` from the
                            [Qualcomm® Linux Intelligent Robotics Product SDK (QIRP SDK) 2.0
                    Release Notes](https://docs.qualcomm.com/bundle/publicresource/topics/80-75695-1). For example,
                        `r1.0_00041.0`.

        cd <workspace>
        git clone -b <meta-qcom-robotics-extras-release-tag> --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_hlos_oem_metadata.git
        mkdir -p layers/meta-qcom-robotics-extras
        mkdir -p layers/meta-qcom-extras
        cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata/QCM6490.LE.1.0/common/config/meta-qcom-extras/* layers/meta-qcom-extras/
        cp -rf qualcomm-linux-spf-1-0_hlos_oem_metadata/QCM6490.LE.1.0/common/config/meta-qcom-robotics-extras/* layers/meta-qcom-robotics-extras/Copy to clipboard
3. Set up the build environment.
                
cd <workspace>
        export EXTRALAYERS="meta-qcom-extras meta-qcom-robotics-extras"
        export CUST_ID="213195"
        export FWZIP_PATH="<FIRMWARE_ROOT>/qualcomm-linux-spf-1-0_ap_standard_oem_nomodem/QCM6490.LE.1.0/common/build/ufs/bin"Copy to clipboard

        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=qcm6490 DISTRO=qcom-robotics-ros2-humble source setup-robotics-environmentCopy to clipboard
4. Build the robotics image and QIRP SDK artifacts.
                
../qirp-build qcom-robotics-full-imageCopy to clipboard

**Compilation results:**

    - QIRP SDK artifacts:
                                `<workspace>/build-qcom-robotics-ros2-humble/tmp-glibc/deploy/qirpsdk_artifacts/qirp-sdk_<version>.tar.gz`.
    - Robotics image:
                                `<workspace>/build-qcom-robotics-ros2-humble/tmp-glibc/deploy/images/qcm6490/qcom-robotics-full-image`

Last Published: Jul 08, 2024

[Previous Topic
Build with Github (basic layers)](https://docs.qualcomm.com/bundle/publicresource/80-65220-2/topics/build-with-github-binaries.md) [Next Topic
Build the robotics image with the prebuilt robotics eSDK](https://docs.qualcomm.com/bundle/publicresource/80-65220-2/topics/build-with-prebuilt-esdk.md)