This is a cache of https://www.96boards.org/blog/db845-rt/. It is a snapshot of the page at 2024-11-25T04:12:48.604+0000.
96boards: Real time and ROS2 | Dragonboard-845c, real time setup - 96Boards

96boards: Real time and ROS2 | Dragonboard-845c, real time setup

Servando German Serrano
|

Introduction

In this blog we are expanding the range of 96boards we can use for real time software development. Following on the Hikey970 real time enablement we will focus on the Qualcomm® Robotics Dragonboard-845c Development Platform.

The Robotics DragonBoard™ 845c development board features the Qualcomm SDA845 processor which is a heterogeneous computing architecture and integrates an Octa Core Qualcomm® Kryo™ CPU with performance up to 2.8GHz a Qualcomm® Adreno™ 630 Visual Processing Subsystem (including GPU, VPU and DPU), and a Qualcomm® Hexagon™ 685 DSP with Hexagon Vector Extensions (HVX) delivering sophisticated, on-device AI processing and mobile-optimized computer vision (CV) capabilities for perception, navigation and manipulation

The post is organized as follows:


Initial Setup

Prior to getting the real time enabled kernel on the board we need to follow the steps in the Dragonboard-845c documentation to get Debian Buster running on the board.

After completing the steps we are now able to ssh onto our board using the default linaro user and password. This allows us to scp the compiled kernel modules later on.

Kernel upgrade and flash

Now, to get the real time enabled kernel compiled and flashed on the boards we just need to follow the next steps:

  • Checkout 5.2 Kernel from Linaro’s Qualcomm landing team:
    $ git clone https://git.linaro.org/landing-teams/working/qualcomm/kernel.git -b release/db845c/qcomlt-5.2 linux-qcomlt-5.2
    $ cd linux-qcomlt-5.2
    $ git checkout b13017c21d43cf5cbe81129c650ed5ed44d8adb0
    $ cd ..
    
  • download the appropriate preempt_rt patch and apply it to the kernel source:
    $ wget https://mirrors.edge.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patch-5.2-rt1.patch.xz
    $ cd linux-qcomlt-5.2
    $ xzcat ../patch-5.2-rt1.patch.xz | patch -p1
    
  • Build the default kernel config and enable the fully preemptible option for the kernel build in General Setup -> Preemption Model -> Fully Preemptible Kernel (RT):
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- defconfig
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- menuconfig
    
  • Build the kernel and modules:
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- dtbs modules Image.gz
    
  • Now let’s install the modules into a local directory:
    $ mkdir db845_modules
    $ make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules_install INSTALL_MOD_PATH=./db845_modules
    $ tar czf db845_modules.tar.gz db845_modules
    
  • scp the compressed modules over to the board and extract them into /lib/modules so they are available after we install the real time enabled kernel.

  • Change directory to one level above linux-qcomlt-5.2 and get the ramdisk and a convenience build script:
    $ cd ..
    $ wget http://snapshots.linaro.org/96boards/dragonboard845c/linaro/debian/latest/initrd.img-5.2.0-qcomlt-arm64
    $ wget http://people.linaro.org/~servando.german.serrano/db845/build_db845.sh
    $ chmod +x build_db845.sh
    
  • And, finally, put the Dragonboard-845c in fastboot mode and use the build script to flash the real time enabled kernel:
    $ ./build_db845.sh
    
  • After flashing the kernel reboot the board and log into it, e.g. via the serial port. Now, if everything went well doing uname -v should show ... SMP PREEMPT RT ... so we can confirm that the running kernel has been successfully patched.

Conclusion

Upon completion of the steps above we now have a working board with a real time enabled kernel.

Next time, we’ll reproduce the ROS2 and pendulum demo test that was conducted on the Hikey970 in our previous post, so keep an eye to this space.

This article is Part 3 in a 4-Part Series.

comments powered by Disqus