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 .
- Create a top level directory for your build: We will refer to this directory as ${YOCTO_BUILD_DIR} moving forward.
- 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
- The
wrynosebranch contains the latest regression tested release. - The
wrynose-nextbranch 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.
- The
- 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¶
- Update
IMAGE_INSTALL:appendin${YOCTO_BUILD_DIR}/meta-mitysom-qc6490-5430-devkit/recipes-products/images/qcom-multimedia-proprietary-image.bbappend
Adding Kernel Command Line Arguments¶
- Option 1:
- Update
KERNEL_CMDLINE_EXTRAin${YOCTO_BUILD_DIR}/meta-mitysom-qc6490-5430-devkit/conf/machine/qcs6490-mitysom-devkit.confKERNEL_CMDLINE_EXTRA += " quiet "
- Update
- Option 2:
- Update
meta-mitysom-qc6490-5430-devkit/ci/{performance,debug}.ymllocal_conf_header: cmdline-perf: | KERNEL_CMDLINE_EXTRA:append = " quiet
- Update
- 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:
- 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
- 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-qcomarea.devtool modify linux-qcom
- Update the kernel config: Launches menuconfig and saves config changes to a devtool-generated fragment file.
devtool menuconfig linux-qcom
- 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
- 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
- When you are happy with your changes: Commit your changes on the local branch as you would for a normal development cycle.
- Note: You may need to commit from inside the docker
- Save off any defconfig changes: Note that
devtoolno longer createsoe-local-files/devtool-fragment.cfgand you will manually need to copy over any defconfig changes.- Changes can be added to
meta-mitysom-qc6490-5430-devkit/recipes-kernel/linux/linux-qcom/configs/mitysom-qc-bsp-additions.cfg
- Changes can be added to
- 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:
- 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
- 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
- This will generate patch files and update the bbappend file SRCURIs and maintains the working folder to allow continued development:
Updating Devicetree¶
If you only need to update Devicetree, the following steps will be quicker than rebuilding the entire qcom-multimedia-proprietary-image:
- 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
- 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-qcomarea.devtool modify linux-qcom
- Modify the desired dts file(s)
- e.g.
${YOCTO_BUILD_DIR}/build/workspace/sources/linux-qcom/arch/arm64/boot/dts/qcom/mitysom-qc6490-devkit.dtsis the top level dts file for the MitySOM-QC Development Kit.
- e.g.
- Build the DTB
devtool build linux-qcom
- Update the DTB on your MitySOM-QC
- Ensure you have fastboot installed on your host PC
- e.g.
sudo apt install android-tools-fastbooton Ubuntu (24.04)
- e.g.
- Boot the MitySOM-QC in
fastbootmode following one of the two methods below:- Boot the SOM into Linux execute command
reboot bootloader- You can also execute via
adbwith commandadb shell 'reboot bootloader'
- You can also execute via
- Power the SOM on while holding the
Vol Downbutton- Note that this can be accomplished by applying 12V to the Development Kit, then holding
Vol Downwhile plugging in the USB-C cable connected to your PC
- Note that this can be accomplished by applying 12V to the Development Kit, then holding
- Boot the SOM into Linux execute command
- Ensure you have fastboot installed on your host PC
- If successful you should see
Android Fastboot modenear the bottom of the console output- Note that if you try to boot into
fastbootmode without USB-C connected you will seeReboot into firmware interface not supported. ???????????????????????????????????????????????????
- Note that if you try to boot into
- Flash
${YOCTO_BUILD_DIR}/build/tmp/deploy/images/qcs6490-mitysom-devkit/dtb-multi-dtb-image.vfatfastboot flash dtb_a dtb-multi-dtb-image.vfat
- 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.