# GitHub workflow for registered users
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
The following sections provide instructions to use GitHub to make a build utilizing
prebuilt proprietary binaries/images.
## Host machine requirements
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
| Configuration | Configuration | Configuration | Tools | Permissions |
| --- | --- | --- | --- | --- |
| **Linux** | **Windows** | **Mac** | Tools | Permissions |
| x86 machine | x86 machine | x86/Arm^®^ machine | Git 1.8.3.1 or later versions | A `sudo` permission is
required to execute a few commands. |
| Quad-core CPU, for example, Intel i7-2600 at 3.4 GHz
(equivalent or better) | 16-core CPU | 16-core CPU | Git 1.8.3.1 or later versions | A `sudo` permission is
required to execute a few commands. |
| 300 GB free disk space (swap partition > 32 GB) | 300 GB free space for the VirtualBox VM | 300 GB free space for UTM | Python 3.10.2 or later versions | A `sudo` permission is
required to execute a few commands. |
| 16 GB RAM | 16 GB RAM | 16 GB RAM | GCC 7.5 or later versions | A `sudo` permission is
required to execute a few commands. |
| Ubuntu 22.04 | Microsoft Windows 11 OS | Apple^®^ Mac^®^ OS 14 | GNU Make 4.0 or later versions | A `sudo` permission is
required to execute a few commands. |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
Note: To set up a virtual machine (VM)
running Ubuntu 22.04 OS on Microsoft Windows or Apple Mac, see [Qualcomm Linux Virtual Machine Setup Guide](https://docs.qualcomm.com/bundle/publicresource/topics/80-70014-41/).
Code compilation on a VM is a slow process and may take a few hours. Qualcomm recommends
using an Ubuntu host machine for compilation.
## Install QSC CLI
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
Set up `qsc-cli`:
1. Install curl (if not already
installed):
sudo apt install curlCopy 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.debCopy to clipboard
3. Install the `qsc-cli` Debian
package:
sudo dpkg -i qsc_installer.debCopy to clipboard
4. Log in to
`qsc-cli`:
qsc-cli login -u Copy to clipboard
Note: A one-time login into [chipcode.qti.qualcomm.com](http://chipcode.qti.qualcomm.com/) is required to download Qualcomm
proprietary git repositories. Use your Qualcomm login credentials to complete
this step.
For more details, see `qsc-cli` related topics in
[How to](https://docs.qualcomm.com/doc/80-70014-254/topic/how_to.html).
## Workflow options
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
There are two workflows for registered users to set up, sync, and build Qualcomm Linux
with GitHub as described in the following table:
|  |  |
| :---: | :---: |
| Build public Qualcomm Yocto layers with standalone
commands. | Build public Qualcomm Yocto layers with Dockerfile. |
| [Build with standalone commands](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html#build_from_source_github) | [Build with
Dockerfile](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html#build_private_distribution) |
## Build with standalone commands
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
### Ubuntu host setup
The Ubuntu host machine needs a few setup operations to ensure that the required
software tools are ready.
1. Install the following packages to prepare your host environment for Yocto
build:
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 whiptailCopy to clipboard
2. Add your Qualcomm login ID with Personalized Access Token (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:/local/mnt/workspace$ qsc-cli pat --get
[Info]: Starting qsc-cli version 0.0.0.9
**5LThNlklb55mMVLB5C2KqUGU2jCF**
vim ~/.netrc # add the following entries
machine chipmaster2.qti.qualcomm.com
login
password
machine qpm-git.qualcomm.com
login
password Copy to clipboard
3. 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-8Copy to clipboard
4. 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 trueCopy to clipboard
### Sync
This section uses the Repo tool installed in the previous section to download a list
of git repositories and additional attributes from the [Qualcomm manifest](https://github.com/quic-yocto/qcom-manifest). As part of this process, it downloads
the manifests used in the `repo init` command.
The following table shows an example mapping of Yocto layers to the manifest release
tags that are used to download and build Qualcomm Linux:
| Yocto layers | Manifest release tag | Distribution (`DISTRO`) |
| --- | --- | --- |
| | Base build: High-level OS and prebuilt firmware (GPS only)
`qcom-6.6.28-QLI.1.1-Ver.1.1.xml` | `qcom-wayland` |
|
meta-qcom
meta-qcom-hwe
meta-qcom-qim-product-sdk
| Base build + QIMP SDK build:
`qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3.xml` | `qcom-wayland` |
|
meta-qcom
meta-qcom-hwe
meta-qcom-realtime
| Base build + Real-time kernel build:
`qcom-6.6.28-QLI.1.1-Ver.1.1_realtime-linux-1.0.xml` | `qcom-wayland` |
|
meta-qcom
meta-qcom-hwe
meta-ros
meta-qcom-robotics
meta-qcom-robotics-distro
meta-qcom-robotics-sdk
meta-qcom-qim-product-sdk
| Base build + QIRP SDK build:
`qcom-6.6.28-QLI.1.1-Ver.1.1_robotics-product-sdk-1.1.xml` | `qcom-robotics-ros2-humble` |
For Yocto layer descriptions, see [Table : 1. Qualcomm Linux Yocto layers](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_qsc_gui_intro.html#concept_n2t_tjn_w1c__Yocto_layer_descriptions).
Note: For information on building the
`meta-qcom-extras` add-on layer and select firmware sources, see
[GitHub workflow (firmware and extras)](https://docs.qualcomm.com/doc/80-70014-254/topic/build_addn_info.html).
### Build base image
1. Download Qualcomm Yocto and supporting
layers:
# 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.28-QLI.1.1-Ver.1.1.xml
repo syncCopy to clipboard
Note: For the latest
``, see the Build-critical
release tags section in the [Release
Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240626095531/).
2. Set up the build
environment:
MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
# source setup-environment: Sets the environment settings, creates the build directory build-qcom-wayland,
# and enters into build-qcom-wayland directory.Copy to clipboard
3. Build the software image:
Note: For supported image
recipes, see [What are the image recipes supported as part of the GitHub workflow?](https://docs.qualcomm.com/doc/80-70014-254/topic/how_to.html#howto_build__section_x3c_n5l_zbc_vinayjk_07-08-24-1744-58-455).
bitbake
bitbake qcom-multimedia-imageCopy to clipboard
On successful build, you can
check if `system.img` is present in the
`/build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image`
directory:
cd /build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image
ls -al system.imgCopy to clipboard
### Build QIMP SDK image
1. Download Qualcomm Yocto and supporting layers:
Note: The `` for QIMP SDK build is the same as the base build.
QIMP SDK layer must be cloned on top of the base
build.
# 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.28-QLI.1.1-Ver.1.1.xml
repo syncCopy to clipboard
Note: For the latest ``, see the
Build-critical release tags section in the [Release
Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240626095531/).
2. Clone QIMP SDK layer into the
workspace:
git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b layers/meta-qcom-qim-product-sdk
# Example, is qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3Copy to clipboard
To
build a QIMP SDK layer, the following export is
required:
export EXTRALAYERS="meta-qcom-qim-product-sdk"Copy to clipboard
3. Set up the build
environment:
MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
# source setup-environment: Sets the environment settings, creates the build directory build-qcom-wayland,
# and enters into build-qcom-wayland directory.Copy to clipboard
4. Build the software
image:
bitbake qcom-multimedia-image
# Build SDK image
bitbake qim-product-sdkCopy to clipboard
On successful build, you can check if
`system.img` is present in the
`/build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image`
directory:
cd /build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image
ls -al system.imgCopy to clipboard
### Build QIRP SDK image
1. Download Qualcomm Yocto and supporting layers:
Note: The `` for QIRP SDK build is the same as the base build.
QIRP SDK layers must be cloned on top of the base
build.
# 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.28-QLI.1.1-Ver.1.1.xml
repo syncCopy to clipboard
Note: For the latest
``, see the Build-critical
release tags section in the [Release
Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240626095531/).
2. Download the QIRP SDK layers into the base build ``
directory:
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
3. Set up the build
environment:
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-environment
# source setup-robotics-environment: Sets the environment settings, creates the build directory build-qcom-robotics-ros2-humble,
# and enters into build-qcom-robotics-ros2-humble directory.Copy to clipboard
4. Build the robotics image and QIRP SDK
artifacts:
../qirp-build qcom-robotics-full-imageCopy to clipboard
On
a successful build, you can see the QIRP SDK build artifacts 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/qcm6490/qcom-robotics-full-imageCopy to clipboard
### Build real-time Linux image
1. Download Qualcomm Yocto and supporting layers:
Note: The `` for real-time Linux image is the same as the base
build. Real-time Linux must be cloned on top of the base
build.
# 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.28-QLI.1.1-Ver.1.1.xml
repo syncCopy to clipboard
Note: For the latest
``, see the Build-critical
release tags section in the [Release
Notes](https://docs.qualcomm.com/bundle/publicresource/topics/RNO-240626095531/).
2. Clone real-time Linux layer into the
workspace:
git clone https://github.com/quic-yocto/meta-qcom-realtime -b layers/meta-qcom-realtime
# Example, is qcom-6.6.28-QLI.1.1-Ver.1.1_realtime-linux-1.0Copy to clipboard
To
build a real-time layer, the following export is
required:
export EXTRALAYERS="meta-qcom-realtime"Copy to clipboard
3. Set up the build
environment:
MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
# source setup-environment: Sets the environment settings, creates the build directory build-qcom-wayland,
# and enters into build-qcom-wayland directoryCopy to clipboard
4. Build the software
image:
bitbake qcom-multimedia-imageCopy to clipboard
On
successful build, you can check if `system.img` is present in
the
`/build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image`
directory:
cd /build-qcom-wayland/tmp-glibc/deploy/images/qcm6490/qcom-multimedia-image
ls -al system.imgCopy to clipboard
### Flash
Flash software images to the device using [Flash images for registered users](https://docs.qualcomm.com/doc/80-70014-254/topic/flash_images.html).
## Build with Dockerfile
Source: [https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html)
### Ubuntu host setup
- Install
git:
# Install git if you have not already installed
sudo apt install gitCopy to clipboard
- Clone the `qcom-download-utils` git repository, which provides
Dockerfile for Qualcomm public Yocto layers and a few helper
scripts:
mkdir
cd
git clone https://git.codelinaro.org/clo/le/qcom-download-utils.git
cd qcom-download-utilsCopy to clipboard
- Add user to the Docker
group:
sudo usermod -aG docker $USER
newgrp docker
# To check if user is part of a Docker group, run the following command:
sudo grep /etc/group -e "docker"Copy to clipboard
### Check the machine configuration
- Check if your host is configured
accurately:
bash utils/check_config.sh
# Resolve the errors and run this command until no errors show upCopy to clipboard
- Install
Docker:
bash docker/docker_setup.shCopy to clipboard
Note: As part of the Docker setup, the
`qcom-download-utils` directory structure is shown in the
following figure:

### Build base image
Create a Yocto Docker image and build:
1. Run `docker_build.sh` to create the Docker image with
Dockerfile (**Dockerfile\_22.04**) and Dockertag
(**qcom-6.6.28-qli.1.1-ver.1.1\_22.04**). This Docker image is
used to create the container environment to run the Yocto build.
**Dockertag**: Release folder in lower case letters appended by the
Dockerfile OS version to enable easy identification of the release build
with Dockerfile (Docker does not allow upper case letters in the
Dockertag).
Note: See [docker troubleshooting](https://docs.qualcomm.com/doc/80-70014-254/topic/troubleshoot_sync_build_and_flash.html#troubleshoot_sync_build_and_flash__section_hkm_2dc_p1c_vinayjk_02-29-24-1641-18-155) for troubleshooting Docker
issues.
bash docker/docker_build.sh -f ./docker/dockerfiles/Dockerfile_22.04 -t qcom-6.6.28-qli.1.1-ver.1.1_22.04Copy to clipboard
If
you face any issues while running `docker_build.sh`, see
the following
solution:
# Error 1: cache related issue.
# If you are facing issue with the docker build command, try using --no-cache option. This option will force rebuilding of layers already available
$ bash docker/docker_build.sh -n --no-cache -f ./docker/dockerfiles/Dockerfile_22.04 -t qcom-6.6.28-qli.1.1-ver.1.1_22.04
# Error2: response from daemon: Get "https://registry-1.docker.io/v2/": http: server gave HTTP response to HTTPS client
# Add internal Docker registry mirror. (Internal-only setting for the Qualcomm network)
# Using a tab instead of space and other invisible white-space characters may break the proper work of json configuration files
# and later may lead to Docker service failing to start.
# Solution:
sudo vim /etc/docker/daemon.json
# Add an entry similar to the following in /etc/docker/daemon.json:
{
"registry-mirrors": ["https://docker-registry.qualcomm.com"]
}
# Restart the Docker service to take the new settings
sudo systemctl restart dockerCopy to clipboard
2. Sync and build the Yocto image in a Docker container with the Docker tag and
release
parameters:
bash docker/docker_run.sh -t qcom-6.6.28-qli.1.1-ver.1.1_22.04 -r qcom-6.6.28-QLI.1.1-Ver.1.1Copy to clipboard
Build
workspace is available in `//build-qcom-wayland`. For example,
`qcom-download-utils/qcom-6.6.28-QLI.1.1-Ver.1.1/build-qcom-wayland`.
Note: **# ERROR: error.GitError: git config ('--replace-all', 'color.ui', 'auto'): error: could not write config file /home/$USER/.gitconfig: Device or resource busy**
This error is triggered
when your gitconfig does not set the UI color configuration as Git 1.8.4 is
enabled by default. To enable color display in your account, run the following
command: `git config --global color.ui auto`.
Note: If a build error is triggered
and fixed, run the commands in [Rebuild](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html#build_private_distribution__section_p1h_tv3_v1c_vinayjk_03-23-24-142-26-643).
### Build QIMP SDK image
1. [Build base
image](https://docs.qualcomm.com/doc/80-70014-254/topic/build_from_source_github_intro.html#build_private_distribution__section_opk_sh4_w1c) with Docker.
2. Build QIMP SDK on top of the base image with Docker:
1. Run the `docker run`
command:
# Run the following commands inside the base image build location
cd /qcom-download-utils/qcom-6.6.28-QLI.1.1-Ver.1.1
bash
docker run -it -v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig" -v "${HOME}/.netrc":"/home/${USER}/.netrc" -v $(pwd):$(pwd) -w $(pwd) qcom-6.6.28-qli.1.1-ver.1.1_22.04 /bin/bashCopy to clipboard
2. Clone QIMP SDK layer into the
workspace:
git clone https://github.com/quic-yocto/meta-qcom-qim-product-sdk -b layers/meta-qcom-qim-product-sdk
# Example, is qcom-6.6.28-QLI.1.1-Ver.1.1_qim-product-sdk-1.1.3Copy to clipboard
To
build a QIMP SDK layer, the following export is
required:
export EXTRALAYERS="meta-qcom-qim-product-sdk"Copy to clipboard
3. Set up the build
environment:
MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
# source setup-environment: Sets the environment settings, creates the build directory build-qcom-wayland,
# and enters into build-qcom-wayland directoryCopy to clipboard
4. Build the software
image:
bitbake qcom-multimedia-image
# Build SDK image
bitbake qim-product-sdkCopy to clipboard
### Rebuild
- List the Docker
images:
docker imagesCopy to clipboard
This command generates the following
output:
REPOSITORY TAG IMAGE ID CREATED SIZE
qcom-6.6.28-qli.1.1-ver.1.1_22.04 latest 8fcea388d8ca 2 days ago 1.47GBCopy to clipboard
- Attach the
container:
# Run the following commands outside the Docker container
cd /qcom-download-utils/qcom-6.6.28-QLI.1.1-Ver.1.1
# Run the following commands inside the base image build location
bash
docker run -it -v "${HOME}/.gitconfig":"/home/${USER}/.gitconfig" -v "${HOME}/.netrc":"/home/${USER}/.netrc" -v $(pwd):$(pwd) -w $(pwd) qcom-6.6.28-qli.1.1-ver.1.1_22.04 /bin/bash
# Example
WORKSPACE=/qcom-download-utils/qcom-6.6.28-QLI.1.1-Ver.1.1Copy to clipboard
- Set up the build
environment:
# cd
MACHINE=qcm6490 DISTRO=qcom-wayland source setup-environment
# source setup-environment: Sets the environment settings, creates the build directory build-qcom-wayland,
# and enters into build-qcom-wayland directoryCopy to clipboard
- Build the software
image:
bitbake qcom-multimedia-imageCopy to clipboard
### Flash
Flash software images to the device using [Flash images for registered users](https://docs.qualcomm.com/doc/80-70014-254/topic/flash_images.html).
Last Published: Aug 07, 2024
[Previous Topic
GitHub workflow for unregistered users](https://docs.qualcomm.com/bundle/publicresource/80-70014-254/topics/github_workflow_unregistered_users.md) [Next Topic
GitHub workflow (firmware and extras)](https://docs.qualcomm.com/bundle/publicresource/80-70014-254/topics/build_addn_info.md)