Building and Customizing firmware¶
Introduction¶
The meta-mitysom-qc6490-5430-devkit/recipes-firmware/firmware/firmware-qcom-bootbins recipe contains an assortment of firmware binaries required for the MitySOM-QC to boot properly.
While Critical Link is only allowed to distribute binaries for these firmwares, it important to discuss how a user can get access to the original source and make modifications to meet the needs of their projects.
Getting Access¶
In order to get access to the source, you will need to sign up for an account with Qualcomm.
Once you have created an account you may need to reach out to Qualcomm about becoming a "Licensed developers with authorized access" to get the appropriate access level to download the necessary source. See https://www.qualcomm.com/support/working-with-qualcomm for further details.
Getting the Source¶
The detailed steps for getting the necessary source files can be found here
To simplify navigating this information we will outline the key steps below as well:
- Install QSC CLI
- Set up the Ubuntu Host computer
- Get the Source
mkdir -p <FIRMWARE_ROOT> cd <FIRMWARE_ROOT> git clone -b <firmware release tag> --depth 1 https://qpm-git.qualcomm.com/home2/git/qualcomm/qualcomm-linux-spf-1-0_ap_standard_oem_nm-qimpsdk.git # <firmware release tag> r1.0_00095.0 corresponds to Critical Link BSP 1.0 and BSP 1.1
Modifying and Building the Firmware¶
Details on how to build each firmware can be found here
Below we will provide details on how the firmwares have been modified in Critical Link's BSP distribution so that you can re-create these binaries and make any modifications if desired.
Note that you may not only need to rebuild certain firmwares for your needs, as thus following all the steps below are not necessary.
Prerequisites¶
Please be sure to steps under the Prerequisites section here before moving on to building any of the firmwares.
Qualcomm TEE firmware¶
This firmware is related to the TrustZone and modification is necessary if changes are made to the functionality QUP ports.
Modifications¶
Below we will detail modifications done by Critical Link for this firmware.
QUP Configuration¶
These changes were made to add support for the peripherals on the MitySOM-QC Development Kit:
Add the following to the end of TZ.XF.5.29.1/trustzone_images/core/settings/buses/qup_accesscontrol/qupv3/config/kodiak/QUPAC_Access.c:
const QUPv3_se_security_permissions_type qupv3_perms_mitysom_qc6490_devkit[] =
{
/* PeriphID, ProtocolID, Mode, NsOwner, bAllowFifo, bLoad, bModExcl */
/*QUPV3_0_SE0 GPIO*/
{ QUPV3_0_SE1, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO, AC_HLOS, TRUE, TRUE, FALSE }, // Dev Kit PCIE
{ QUPV3_0_SE2, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO, AC_HLOS, TRUE, TRUE, FALSE }, // SMB / LS1 I2C
/*QUPV3_0_SE3 GPIO*/
/*QUPV3_0_SE4 GPIO*/
{ QUPV3_0_SE5, QUPV3_PROTOCOL_UART_2W, QUPV3_MODE_FIFO, AC_HLOS, TRUE, FALSE, FALSE }, // Debug UART
/*QUPV3_0_SE6 GPIO*/
/*QUPV3_0_SE7 GPIO*/
{ QUPV3_1_SE0, QUPV3_PROTOCOL_SPMI, QUPV3_MODE_FIFO, AC_ADSP_Q6_ELF, TRUE, TRUE, FALSE }, // QuP SPMI
/*QUPV3_1_SE1 GPIO*/
{ QUPV3_1_SE2, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO, AC_HLOS, TRUE, TRUE, FALSE }, // DevKit I2C1 - USB-C, etc
{ QUPV3_1_SE3, QUPV3_PROTOCOL_I2C, QUPV3_MODE_FIFO, AC_HLOS, TRUE, TRUE, FALSE }, // DevKit I2C2 - Power Monitor
/*QUPV3_1_SE4 GPIO*/
/*QUPV3_1_SE5 GPIO*/
/*QUPV3_1_SE6 GPIO*/
/*QUPV3_1_SE7 GPIO*/
};
const uint32 qupv3_perms_size_mitysom_qc6490_devkit = sizeof(qupv3_perms_mitysom_qc6490_devkit)/sizeof(qupv3_perms_mitysom_qc6490_devkit[0]);
Add the following to TZ.XF.5.29.1/trustzone_images/core/settings/buses/qup_accesscontrol/qupv3/config/kodiak/QUPAC_Access.xml:
<device id="/dev/buses/qupac/32/01"> // IOT MitySOM-QC6490 Dev Kit
<props name="qupv3_perms" type=DALPROP_ATTR_TYPE_STRUCT_PTR>
qupv3_perms_mitysom_qc6490_devkit
</props>
<props name="qupv3_perms_size" type=DALPROP_ATTR_TYPE_STRUCT_PTR>
qupv3_perms_size_mitysom_qc6490_devkit
</props>
<props name="gpii_perms" type=DALPROP_ATTR_TYPE_STRUCT_PTR>
qupv3_gpii_perms
</props>
<props name="gpii_perms_size" type=DALPROP_ATTR_TYPE_STRUCT_PTR>
qupv3_gpii_perms_size
</props>
</device>
Building¶
Please see the section titled Build Qualcomm TEE firmware in this section
Deploying¶
Choose one of the following methods:- Copy TZ.XF.5.29.1/HY22/trustzone_images/build/ms/bin/EACAANAA/devcfg.mbn to your built
qcom-multimedia-imagedirectory - See section Generate firmware prebuilds for details on creating an updated QCM6490_bootbinaries.zip that can be used to update
meta-mitysom-qc6490-5430-devkit/recipes-firmware/firmware/firmware-qcom-bootbinsso that your Yocto Build.
Qualcomm Boot firmware¶
Modifications¶
Below we will detail modifications done by Critical Link for this firmware.
Limiting the LPDDR5 Speed for MitySOM-QC Rev1¶
These changes were made to overcome a hardware design issue on MitySOM-QC Rev1.
File: BOOT.MXF.1.0.c1/boot_images/boot/QcomPkg/SocPkg/Kodiak/Library/DDRTargetLib/ddr_target.c was modified by Critical Link with the following changes for BSP 1.0 and BSP 1.1:
Before function void ddr_post_setup()
+ uint8 g_min_ddr_freq = 0; + uint8 g_max_ddr_freq = 8;
At the end of function void ddr_post_setup()
+ ddr_freq_set_min_max(g_min_ddr_freq, g_max_ddr_freq);
Building¶
Please see the section titled Build Boot in this section
Deploying¶
TODO: add steps for individual deploy of boot fw
See section Generate firmware prebuilds for details on creating an updated QCM6490_bootbinaries.zip that can be used to update meta-mitysom-qc6490-5430-devkit/recipes-firmware/firmware/firmware-qcom-bootbins so that your Yocto Build.
Changes to QCM6490.LE.1.0¶
TODO: Add details on modifications made to add CDT to MitySOM-QC
Generate firmware prebuilds¶
Please see the section titled Generate firmware prebuilds (boot-critical and split-firmware binaries) at the bottom of this section on how to create an updated QCM6490_bootbinaries.zip that can be used to update meta-mitysom-qc6490-5430-devkit/recipes-firmware/firmware/firmware-qcom-bootbins so that your Yocto Build has any custom firmware changes you have made.
Issues¶
If you have any issue please make sure to post in the forums so that we can provide support.
Go to top