Link Search Menu Expand Document

VOXL 2 Kernel Build Guide

Table of contents

  1. Overview
  2. Build Components
  3. Setup Guide
    1. Requirements
    2. Build Docker
    3. Run Build Docker
  4. Build Guide
    1. First Time Use (Part 1: Sync)
    2. First Time Use (Part 1: Patch)
    3. Build
    4. Artifacts
  5. Flashing Guide
    1. Test
    2. Flash
  6. Developer Topics
    1. How to Rebuild
    2. How to Enable In Tree Driver (Example)


The VOXL 2 kernel comes from here:

We started with the RB5 development kit and slowly updated the device tree and kernel to work on VOXL2 and VOXL2 Mini.

The aim of this guide is to show you how to build a new kernel for VOXL 2 and VOXL 2 mini and modify it.

Build Components

We’re trying to adhere to bitbake standards, but likely have some inconsistencies with our recipes… Feel free to offer suggestions if things are bugging you or submit PRs!


Setup Guide


  • git
  • Docker
  • the more cores the better if you want to build quickly…

Build Docker

We use “build dockers” all over the place to easily share build environments and use in our CI pipelines.

This step is optional, with the alternative being you look at the Dockerfile for the requirements for the build machine.

git clone -b qrb5165-ubun1.0-14.1a
cd qrb5165-kernel-build-docker



Step 28/28 : RUN export PATH=$PATH:/usr/local/go/bin
 ---> Running in 865ac9837af2
Removing intermediate container 865ac9837af2
 ---> 83b19199b7b5
Successfully built 83b19199b7b5
Successfully tagged qrb5165-kernel-build:qrb5165-ubun1.0-14.1a

Run Build Docker

Now that we have the docker image created (use docker image ls to see), we can run an instance of this using a helper script:


To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.


Now you are in the chroot’d environment, and you don’t need to muddy your system with tools.

Build Guide

First Time Use (Part 1: Sync)

We have to synchronize with the as well as the various ModalAI open source components:

WARNING: This sync command takes some time (10 minutes?) before progressing…



repo has been initialized in /home/user/build_mount/

Now we have the source code needed.

First Time Use (Part 1: Patch)

Apply patches found in the patches directory.

This is done to pull in VOXL 2 customizations and fix errors that are outside the scope of the product but needed to complete the build (e.g. build system fixes).

To apply the patches, run the following:



Now, you can build for VOXL 2, which is the M0054 machine. If building for RB5 Flight, you will use the M0052 machine.

./ -m M0054


The kernel image is qti-ubuntu-robotics-image-m0054-boot.img and lives inside the build docker at:


After you exit the build docker, it will be in your current directory in workspace, for example:

-la workspace/
total 414500
drwxr-xr-x 2 modalai modalai      4096 May  3 15:18 .
drwxr-xr-x 3 modalai modalai      4096 May  3 15:09 ..
-rw-r--r-- 2 modalai modalai  21387346 May  3 15:09 Image.gz
-rw-r--r-- 1 modalai modalai  21393408 May  3 15:18 qti-ubuntu-robotics-image-m0054-boot.img
-rw-r--r-- 2 modalai modalai   5859250 May  3 15:09
-rw-r--r-- 2 modalai modalai 375915296 May  3 15:09 vmlinux

Flashing Guide


You can boot the new kernel without flashing it.

First, check out the current version:

adb shell uname -a
Linux qrb5165-rb5 4.19.125 #1 SMP PREEMPT Fri Apr 15 16:54:55 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux

Now, run the following:

adb reboot bootloader
fastboot boot qti-ubuntu-robotics-image-m0054-boot.img
adb wait-for-device

Now, check the new version:

adb shell uname -a
Linux qrb5165-rb5 4.19.125 #1 SMP PREEMPT Tue May 3 22:06:09 UTC 2022 aarch64 aarch64 aarch64 GNU/Linux


If testing worked above, you can now flash it:

adb reboot bootloader
fastboot flash boot qti-ubuntu-robotics-image-m0054-boot.img
adb wait-for-device

Developer Topics

How to Rebuild

You don’t need to re-sync and patch, just run and build. For example, starting back on the host machine (outside docker):

To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

user@11dbde7bdab7:~$ ls build_mount/

bitbake        meta-openembedded            meta-qti-audio   meta-qti-core     meta-qti-ml        meta-qti-sepolicy  meta-selftest  meta-voxl2-bsp     qti-conf         README.qemu
documentation  meta-poky                    meta-qti-bsp     meta-qti-data     meta-qti-qmmf      meta-qti-ss-mgr    meta-selinux   meta-webkit        README.hardware  scripts
LICENSE        meta-qti-adk                 meta-qti-bt      meta-qti-display  meta-qti-robotics  meta-qti-ubuntu    meta-skeleton  meta-yocto-bsp     README.LSB
meta           meta-qti-aosphal-adaptation  meta-qti-camera  meta-qti-gst      meta-qti-security  meta-qti-video     meta-voxl2     oe-init-build-env  README.poky

Shown above, all the source is still there.

You can edit files, and the build again!


How to Enable In Tree Driver (Example)


For example, for M0054 (VOXL 2):

Enable smsc95xx using CONFIG_USB_NET_SMSC95XX



We can enable by adding CONFIG_USB_NET_SMSC95XX=y to the m005x.cfg file.

Now, you can build again:

./ -m M0054

Note: to rebuild, clean out the existing build:


# this time, for M0104, as example
./ -m M0104

Flash following procedures above. We can check for the flag before the update:

voxl2:/$ zcat /proc/config.gz | grep CONFIG_USB_NET_SMSC95XX
# CONFIG_USB_NET_SMSC95XX is not set

And then after updating:

voxl2:/$ zcat /proc/config.gz | grep CONFIG_USB_NET_SMSC95XX