Project

General

Profile

Building and Customizing qcom-multimedia-proprietary-image with Yocto (QLI 2.X)

The purpose of this page is to outline how to build the qcom-multimedia-proprietary-image from source.

This specifically relate to Critical Link BSP 2.X (which is based on Qualcomm QLI 2.X based and Yocto wrynose).

Please be aware that rebuilding from source takes considerable hardware space (~120 GB) and execution time (depending on the capabilities of your machine a fresh build can take 2-10 hours).

Building the Image

This section details the steps needed to prepare for a Yocto build. These steps do not need to be re-run for rebuilds (e.g. source or configuration changes after an initial build).

Note that these steps were validated on a machine running Ubuntu 24.04 with kas, git and docker installed. You should be able to run these steps on any system that has kas, git and docker .

  1. Create a top level directory for your build: We will refer to this directory as ${YOCTO_BUILD_DIR} moving forward.
  2. Clone the Critical Link meta-layer for the dev kit: Adds Critical Link's custom Yocto layer for the MitySOM-QC6490/5430 development kit.
    git clone https://support.criticallink.com/git/meta-mitysom-qc6490-5430-devkit.git -b wrynose
    1. The wrynose branch contains the latest regression tested release.
    2. The wrynose-next branch is where new features are being staged for release. This allows for early access to new features, but has not yet been regression tested and git history may be re-written. Please only use this branch if you are willing to accept the risks of these caveats.
  3. Build the image:
    time kas-container build meta-mitysom-qc6490-5430-devkit/ci/qcs6490-mitysom-devkit.yml:meta-mitysom-qc6490-5430-devkit/ci/qcom-distro-cl.yml:meta-mitysom-qc6490-5430-devkit/ci/performance.yml

Once bitbake has completed successfully ${YOCTO_BUILD_DIR}/build/tmp/deploy/images/qcs6490-mitysom-devkit/qcom-multimedia-proprietary-image-qcs6490-mitysom-devkit.rootfs.qcomflash is the directory to navigate to in order to run the qdl tool to program the SOM.
See Programming the MitySOM QC6490 for further details on using the qdl tool to program the SOM.

Customizing qcom-multimedia-proprietary-image

This section will detail some common changes you may want to make to customize the image you are building.

Adding Packages to the Filesystem

  1. Update IMAGE_INSTALL:append in ${YOCTO_BUILD_DIR}/meta-mitysom-qc6490-5430-devkit/recipes-products/images/qcom-multimedia-proprietary-image.bbappend

Adding Kernel Command Line Arguments

  1. Option 1:
    1. Update KERNEL_CMDLINE_EXTRA in ${YOCTO_BUILD_DIR}/meta-mitysom-qc6490-5430-devkit/conf/machine/qcs6490-mitysom-devkit.conf
      KERNEL_CMDLINE_EXTRA += " quiet "
  2. Option 2:
    1. Update meta-mitysom-qc6490-5430-devkit/ci/{performance,debug}.yml
      local_conf_header:                                                              
        cmdline-perf: |                                                               
          KERNEL_CMDLINE_EXTRA:append = " quiet
      
  3. Kernel command line args can be checked in flashed image via cat /proc/cmdline

Kernel Development

The kernel for the MitySOM-QC is based on the linux-qcom recipe. ${YOCTO_BUILD_DIR}/meta-mitysom-qc6490-5430-devkit/recipes-kernel/linux/linux-qcom-custom_6.18.bbappend specifies how patches are applied on top of linux-qcom-custom at build time.

In order to see and modify the source of the kernel, please utilize the following steps:

  1. Run an interactive shell inside the kas build container environment: This allows us to run devtool, etc.
    kas-container shell meta-mitysom-qc6490-5430-devkit/ci/qcs6490-mitysom-devkit.yml:meta-mitysom-qc6490-5430-devkit/ci/qcom-distro-cl.yml:meta-mitysom-qc6490-5430-devkit/ci/debug.yml
  2. Checkout a patched version of the kernel: This will extract a copy of the kernel from Qualcomm's site, and apply all the patches from any bitbake recipes into the ${YOCTO_BUILD_DIR}/build/workspace/sources/linux-qcom area.
    devtool modify linux-qcom
    
  3. Update the kernel config: Launches menuconfig and saves config changes to a devtool-generated fragment file.
    devtool menuconfig linux-qcom
    
  4. Make changes to the kernel source or dts: In the workspace area, make any changes needed to kernel as normal. You can build kernel outputs running the command below.
    devtool build linux-qcom
    
  5. Build all outputs with your kernel/device tree changes: This rebuilds the full image including your kernel and device tree updates.
    devtool build-image qcom-multimedia-proprietary-image
    
  6. When you are happy with your changes: Commit your changes on the local branch as you would for a normal development cycle.
    1. Note: You may need to commit from inside the docker
  7. Save off any defconfig changes: Note that devtool no longer creates oe-local-files/devtool-fragment.cfg and you will manually need to copy over any defconfig changes.
    1. Changes can be added to meta-mitysom-qc6490-5430-devkit/recipes-kernel/linux/linux-qcom/configs/mitysom-qc-bsp-additions.cfg
  8. Generate Patch Files in meta layer: When you are ready to migrate patches over to the meta-layer, run one of two the commands below:
    1. This will generate patch files and update the bbappend file SRCURIs and maintains the working folder to allow continued development:
      devtool update-recipe linux-qcom -a ../meta-mitysom-qc6490-5430-devkit
      
    2. This will generate patch files and update the bbappend file SRCURIs and finish will clean up / move the working folder to an archive area:
      devtool finish linux-qcom ../meta-mitysom-qc6490-5430-devkit
      

Updating Devicetree

If you only need to update Devicetree, the following steps will be quicker than rebuilding the entire qcom-multimedia-proprietary-image:

  1. Run an interactive shell inside the kas build container environment: This allows us to run devtool, etc.
    kas-container shell meta-mitysom-qc6490-5430-devkit/ci/qcs6490-mitysom-devkit.yml:meta-mitysom-qc6490-5430-devkit/ci/qcom-distro-cl.yml:meta-mitysom-qc6490-5430-devkit/ci/debug.yml
  2. Checkout a patched version of the kernel: This will extract a copy of the kernel from Qualcomm's site, and apply all the patches from any bitbake recipes into the ${YOCTO_BUILD_DIR}/build/workspace/sources/linux-qcom area.
    devtool modify linux-qcom
    
  3. Modify the desired dts file(s)
    1. e.g. ${YOCTO_BUILD_DIR}/build/workspace/sources/linux-qcom/arch/arm64/boot/dts/qcom/mitysom-qc6490-devkit.dts is the top level dts file for the MitySOM-QC Development Kit.
  4. Build the DTB
    devtool build linux-qcom
    
  5. Update the DTB on your MitySOM-QC
    1. Ensure you have fastboot installed on your host PC
      1. e.g. sudo apt install android-tools-fastboot on Ubuntu (24.04)
    2. Boot the MitySOM-QC in fastboot mode following one of the two methods below:
      1. Boot the SOM into Linux execute command reboot bootloader
        1. You can also execute via adb with command adb shell 'reboot bootloader'
      2. Power the SOM on while holding the Vol Down button
        1. Note that this can be accomplished by applying 12V to the Development Kit, then holding Vol Down while plugging in the USB-C cable connected to your PC
  1. If successful you should see Android Fastboot mode near the bottom of the console output
    1. Note that if you try to boot into fastboot mode without USB-C connected you will see Reboot into firmware interface not supported. ???????????????????????????????????????????????????
  1. Flash ${YOCTO_BUILD_DIR}/build/tmp/deploy/images/qcs6490-mitysom-devkit/dtb-multi-dtb-image.vfat
    fastboot flash dtb_a dtb-multi-dtb-image.vfat
    
  2. Press any key on the console to continue the boot process

Issues

If you have any issue please make sure to post in the forums so that we can provide support.