-
Notifications
You must be signed in to change notification settings - Fork 1
Home
This wiki contains useful information regarding the ZapPi Linux kernel.
Contents:
- Linux 5.15.y
- Based on Raspberry Pi release tags for stability
- 300Hz timer frequency for ARMv7+
- Link Time Optimization
- Compiled using ZLLVM
- Compiler optimizations (-O3, -mtune to cpu, -polly, -compiler-rt)
- Disabled debugging options to help performance
- Multigenerational LRU (Disabled/Untested on ARMv6)
- Rockchip Linux boot time optimizations
- BBRv2 TCP congestion control
- Mainline scheduler backports
- Scheduler optimization by skipping some calculations
- Misc enhancements from Android, Tizen, Linux
- Tons of inspiration (+patches) from Zen Kernel
Zap Kernel is intended to be a "drag-and-drop" replacement for Raspberry Pi OS.
Backup your kernel:
- RPi0/1:
sudo cp /boot/kernel.img /boot/kernel-bck.img
- RPi2/3 (+ Zero 2 W):
sudo cp /boot/kernel7.img /boot/kernel7-bck.img
- RPi4:
sudo cp /boot/kernel7l.img /boot/kernel7l-bck.img
- RPi64:
sudo cp /boot/kernel8.img /boot/kernel8-bck.img
Unzip the package into a directory:
unzip zap-kernel_*-202X-XX-XX.zip -d out
Run the install script within the extracted directory:
cd out
./install.sh
The backup kernel can be booted by adding, for example, the following to /boot/config.txt:
kernel=kernel7l-bck.img
Use whichever *-bck.img name referenced above.
Downloads can be found in Releases
Signatures (.asc) included can be used to verify the downloaded file against uZap Maintainer's public key:
gpg --recv-keys D85C9504501468CB
gpg --verify zap-kernel*.zip.asc zap-kernel*.zip
Compiling this kernel source requires the following dependencies:
sudo apt install git bc bison curl flex libssl-dev make libc6-dev libncurses5-dev libffi7
LLVM from most sources should be fine to cross compile with the 'compile' script to build, so long as LLVM_DIR is set to the root of the LLVM install.
Although ZLLVM is recommended for x86, as it is optimized to build this code, and can be easily downloaded with:
sh zap/get-zllvm.sh
Compiling the kernel can be done using something similar to the resulting output of the script, for example:
./compile rpi0w rpi2 rpi400 rpi64 LLVM_DIR=~/zllvm-14
will compile a 32-bit kernel for rpi0w, rpi2, rpi400 & the unified 64-bit kernel (for 64-bit capable devices).