Introduction
Provides a high-level overview of how to build firmware components from source and integrate them into the Qualcomm BSP image. Firmware sources are available to users that have signed the required agreements. If you don’t yet have access, create a Qualcomm ID and see the Working with Qualcomm page to learn more about account verification and access levels. At a high level, you will learn the following:- Set up the host system and install the required packages – Host Setup
- Download the firmware sources from Chipcode – Sync Firmware Sources
- Build the firmware from sources – Build Firmware
- Include built firmware into the BSP image – Build BSP Image
Supported SoCs
The following SoCs are supported by this document. If your chipset is not listed, the firmware build process described here does not apply to your device.Host system requirements
- Operating System
- Ubuntu 22.04
- Configuration
- x86 machine
- Quad-core CPU, for example, Intel i7-2600 at 3.4 GHz (equivalent or better)
- 300 GB free disk space (swap partition > 32 GB)
- 16 GB RAM
- Tools
- Git 1.8.3.1 or later versions
- Tar 1.28 or later versions
- Python 3.10.2 or later versions
- GCC 10.1 or later versions
- GNU Make 4.0 or later versions
- Kas 4.8 or later versions
- Permissions
sudopermission is required to run a few commands
Install QSC-CLI
qsc-cli is a command-line tool provided by Qualcomm that offers an end-to-end workflow
for accessing, managing, and building Qualcomm software. Follow these steps to install
qsc-cli on your system:
- Register your Qualcomm email ID by visiting the Qualcomm Support Page.
-
Download the Debian package for
qsc-cli: -
Install the
qsc-cliDebian package: -
Sign in to
qsc-cliusing your Qualcomm ID. For most users, your Qualcomm ID is your email address. This opens a browser window to complete authentication. If the browser doesn’t open automatically, copy the link printed in the terminal and paste it into your browser to complete authentication.
Host setup
The following instructions are intended for use on a Ubuntu host system. The Yocto build is also supported on other distributions compatible with Yocto, but no validation is performed against them.-
Install the following packages to prepare your host environment for the Yocto build
-
Qualcomm uses the
kastool to sync and build the Yocto project. Use the following steps to installkason your systemOn older Ubuntu versions, thekasversion provided by the system package manager may be outdated. Usingpipxis the recommended way to install kas.-
Install
pipx -
Add the
pipxinstall location to yourPATHThis command updates your shell’s startup file, so the change only takes effect in new shell sessions. Restart your shell session before continuing to the next step. -
Install
kas(version 4.8 or higher is required)
-
Install
-
Verify if the kas installation is successful.
-
The following packages are additionally required to compile firmware:
-
Use
qsc-clito obtain the PAT token for Chipcode access. This token expires in two weeks.Sample output -
Add the following entries to your
~/.netrcfile to authenticate access to Chipcode repositories: -
Update git configurations:
Configuration parameters
The following table describes the build tags for the current release. These values need to be substituted in the build commands.Map firmware source
The following tables describe the firmware distributions that you can download. For more information about the Yocto layers, see Qualcomm Linux metadata layers. Mapping access levels to firmware distributions
Mapping firmware distributions to git repositories
Qualcomm_Linux.SPF.2.0|AP|Standard|OEM| and Qualcomm_Linux.SPF.2.0|AMSS|Standard|OEM| distributions are only supported on QCS6490 chipset.Build firmware
-
Create a workspace directory for the firmware sources and navigate to it.
All subsequent instructions assume this as the working directory.
-
Clone the firmware sources from Chipcode using the release tag and clone
URL from the Firmware Source Mapping table.
-
Substitute the
<firwmare-root>and<distro-clone-directory>in the following commands with the correct values based on the chosen access profile.
- QCM6490/QCS5430
- IQ-9075
- IQ-8275
- IQ-615
- IQ-X7181
- IQ-X5121
PrerequisitesTools required
-
Ensure that the working shell is
bash:The expected output of the command should bebash. If not, enter the bash shell. -
Install the libffi6 package using the following commands. This is required
for the QAIC compiler, which generates the header and the source files from
the IDL files.
-
Install LLVM for AOP, Qualcomm® Trusted Execution Environment
(TEE), and boot compilation:
-
Export the
SECTOOLSvariable and compile the firmware builds (<firmware-root>/<distro-clone-directory>is the top-level directory): -
Install and set up Qualcomm® Hexagon™ Processor. Set
the environment variable HEXAGON_ROOT to the path where the Hexagon SDK is
installed. To change the install path when using
qsc-cli, see Change the Hexagon tool install path.
- Compiler version: Hexagon 8.4.07
- Python version: Python 3.10.2
- libffi6 package
-
Go to the following directory:
-
Clean the build:
-
Build the image:
- Compiler version: Hexagon 8.4.07
- Python version: Python 3.10.2
- libffi6 package
-
Nanopb integration (one-time setup):
-
Go to the following directory:
-
Clean the build:
-
Build the image:
- Compiler version: LLVM version must be updated to 14.0.4
- Python version: Python 3.10
- libffi6 package
-
Install the device tree compiler:
-
Go to the following directory:
-
Install the dependencies:
-
Clean the build:
-
Build the image:
For debug variant builds, replace
RELEASEwithDEBUG.
- Compiler version: LLVM 16.0.7
- Python version: Python 3.10
-
Install LLVM:
-
Clean the build:
-
Build the image:
- Compiler version: LLVM 14.0.4
- Python version: Python 3.10
-
Go to the following directory:
-
Clean the build:
-
Build the image:
This step is only applicable for
Qualcomm_Linux.SPF.2.0|AMSS|Standard|OEM|.- Compiler version: Hexagon 8.4.10
- Python version: Python 3.8.2
-
Nanopb integration (one-time setup):
-
Go to the following directory:
-
Clean the build:
-
Build the image:
This step is only applicable for
Qualcomm_Linux.SPF.2.0|AP|Standard|OEM|.-
Create an integrated firmware binary from the individual components that you
compiled:
-
Firmware prebuilt is successful if the following zip files are generated in the
<firmware-root>/<distro-clone-directory>/QCM6490.LE.2.0/common/build/ufs/bindirectory:QCM6490_bootbinaries.zipQCM6490_dspso.zipQCM6490_fw.zip
Build BSP image
This section describes how to integrate firmware binaries and other source components into a full BSP image using the meta-qcom-extras layer. The BSP image build combines the compiled firmware from the previous step with the Yocto layer stack, producing a flashable image that includes all required binaries.-
Download Qualcomm’s Yocto layer
meta-qcom-extras. For the latest<meta-qcom-extras-release-tag>, see Configuration Parameters.
-
Export
NETRC_FILEparameter to ensure~/.netrccredentials are visible in thekasenvironment: -
Set CUST_ID value to “213195” for meta-qcom-extras compilation.
-
Set the outbound license for the layer and its checksum.
CUST_LICENSEandCUST_LIC_CHKSUMare required for every recipe in the layer.- Customers must specify an appropriate outbound license in the recipes to build the proprietary sources.
- Customers should consult their own legal team for guidance on outbound licensing decisions.
- The chosen outbound license must be compatible with the PKLA.
-
The following values match the placeholder LICENSE files already present in the
source repositories. Use them for internal builds and evaluation without needing
to replace any license files.
Do not use these values for production builds. Define your own license
values for any deployment.
-
Update the license file in the source repositories before building.
All sources used by
meta-qcom-extrascontain a placeholder LICENSE file by default. Recipes verifyCUST_LICENSEagainst this file at build time, so it must be replaced with your chosen outbound license. The upstream repositories cannot be modified directly. Mirror each repository to a local or remote server you own, replace the placeholder LICENSE file, then update theSRC_URIvariable in the affected recipes to point to the new URI.
The sync and layer setup steps above apply to all boards. However,
meta-qcom-extras doesn’t yet provide ready-made recipes for loading custom
firmware binaries on IQ-X7181 and IQ-X5121; use
devtool to modify the
upstream recipes instead, as shown in the “IQ-X7181” and “IQ-X5121” tabs
below.- IQ-X7181
- IQ-X5121
- Other Kits
Firmware Setup
-
Set
FWZIP_PATHto the directory containing the firmware ZIP files to include locally compiled firmware zip paths in the build. -
Override Linux-firmware Binaries
If you want to modify the Linux firmware binaries, use this section to
substitute them into the build.
-
Create a kas configuration file at
meta-qcom-extras/ci/firmware.ymlwith the following content: -
Then modify the linux-firmware recipe using
devtool: -
Unzip the firmware archive:
-
Copy the contents of the firmware zip file into the devtool workspace
When you override the firmwares in
linux-firmware, you must also override the Hexagon DSP binaries.
-
Create a kas configuration file at
-
Override DSPSO Binaries
If you want to modify the Hexagon DSP shared-object binaries, use this section
to substitute the ADSP and CDSP binaries into the build.
-
Initialize a devtool workspace for
hexagon-dsp-binaries: -
Unzip the firmware archive:
-
Copy the ADSP binaries into the devtool workspace:
-
Copy the CDSP binaries into the devtool workspace:
-
Initialize a devtool workspace for
-
Override Boot Firmware Binaries
If you want to modify the boot-critical firmware binaries, use this section
to substitute them into the build.
-
Initialize a devtool workspace for the boot firmware recipe:
-
Unzip the boot binaries archive:
-
Copy boot binaries into the devtool workspace:
Then append the required configuration to the
.bbappendfile:
-
Initialize a devtool workspace for the boot firmware recipe:
-
Run the setup script to apply these parameters to the build environment.
-
Build the software image using
kas. You define build targets based on machine and distro combinations.

