Skip to content

Build arm64 real-time kernel for low-latency audio playback on Raspberry Pi

Notifications You must be signed in to change notification settings

jesset/RPi-audio-kernel-build

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build ARM64 real-time kernel for low-latency music play on RPi

  • RT kernel
  • arm64/aarch64
  • minimalized kernel modules/features for high quality audio playback
    • disable IPv6/Netfilter/serial modules ... (not needed by audio playback, basically)
    • Support PCM 352k8 and 384k sample rates 1
    • Support More USB DAC (native DSD) 2
  • only support Raspberry Pi 3B/3B+/4B
  • only support ext2/3/4/vfat/xfs filesystem

How to Build

# 1. prepare a Ubuntu 16.04 x86_64 install, upgrade, and get build tools.
sudo apt update && sudo apt upgrade -y
sudo reboot
sudo apt install -y libncurses5-dev  bc build-essential gcc-aarch64-linux-gnu git unzip ccache

# 2. build kernel
git clone https://github.com/jesset/RPi-audio-kernel-build.git
cd RPi-audio-kernel-build
./kbuild.sh
# or, add a localversion
LOCALVERSION=-my-r1 ./kbuild.sh

# 3. install kernel tarball
# copy kernel tarball to RPi ...
sudo -i
cd / && tar --no-same-owner -xf /path/to/kernelbuild-XYZ.tar.xz

# 4. upgrade firmware (optional)
git clone --depth 1 https://github.com/raspberrypi/firmware.git
cd firmware
sudo cp -v start*.elf fixup*.dat bootcode.bin LICENCE.broadcom  /boot/

Ref

https://isojed.nl/blog/2017/10/25/raspberry-pi-rt-preempt/

https://www.raspberrypi.org/documentation/linux/kernel/building.md

https://medium.com/@metebalci/latency-of-raspberry-pi-3-on-standard-and-real-time-linux-4-9-kernel-2d9c20704495

https://devsidestory.com/build-a-64-bit-kernel-for-your-raspberry-pi-3/

https://github.com/RoPieee/ropieee-kernel.git