Operations 13 min read

How to Build, Install, and Benchmark a PREEMPT‑RT Linux Kernel on an OK3588 Board

This guide walks through setting up a PREEMPT‑RT Linux kernel (5.10.66‑rt53) on a Feiling OK3588 development board, explaining the patch's key features, installation steps, and how to verify real‑time performance using cyclictest and stress‑ng under idle and full‑load conditions.

Liangxu Linux
Liangxu Linux
Liangxu Linux
How to Build, Install, and Benchmark a PREEMPT‑RT Linux Kernel on an OK3588 Board

Introduction

The PREEMPT‑RT (or RT) patch adds real‑time capabilities to the Linux kernel, reducing latency and improving predictability for time‑sensitive applications such as industrial control, audio processing, and robotics.

Environment

Hardware: Feiling OK3588 development board

Kernel source: 5.10.66‑rt53 Build host: Ubuntu 20.04 LTS (cross‑toolchain aarch64-linux-gnu‑)

Real‑time kernel features

Low latency : Faster response to external events.

High‑priority scheduling : Guarantees timely execution of critical tasks.

Preemptive support : Allows real‑time tasks to interrupt long‑running kernel code.

Lock optimizations : Reduces lock contention and critical‑section duration.

Improved thread handling : Better scheduling policies for real‑time threads.

What the patch changes

High‑resolution timers for nanosecond‑level precision.

Interrupt threading so that interrupt handlers run in kernel threads.

Replace spinlocks ( spinlock_t) with real‑time mutexes ( rt_mutex) to make critical sections preemptible and support priority inheritance, preventing priority inversion.

Installing and using the real‑time patch

Download the kernel source:

wget https://www.kernel.org/pub/linux/kernel/vX.Y/linux-X.Y.Z.tar.xz
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.