This repository contains build scripts and configurations for the WLAN Pi custom Linux kernel, supporting both Raspberry Pi 4/CM4 and Raspberry Pi 5 hardware platforms.
The build script supports building kernels for different hardware variants:
./build-kernel.sh # Build both v8 (Pi 4) and 2712 (Pi 5) kernels (default)
./build-kernel.sh v8 # Build only Pi 4/CM4 kernel (v8, 4KB pages)
./build-kernel.sh 2712 # Build only Pi 5 kernel (2712, 16KB pages)Building for different Debian releases:
# Default: Debian Trixie
./build-kernel.sh
# Target Debian Bookworm
DEBIAN_RELEASE=bookworm ./build-kernel.sh
DEBIAN_RELEASE=bookworm ./build-kernel.sh v8Requirements:
- Cross-compilation toolchain:
gcc-aarch64-linux-gnu - Build dependencies:
build-essential,git,libncurses-dev,flex,bison,libssl-dev, etc.
Output packages:
When building v8 only (for trixie):
wlanpi-kernel-trixie-v8_*.debwlanpi-kernel-headers-trixie-v8_*.deb
When building 2712 only (for trixie):
wlanpi-kernel-trixie-2712_*.debwlanpi-kernel-headers-trixie-2712_*.deb
When building both (for trixie):
- All of the above, PLUS
wlanpi-kernel-trixie_*.deb- Unified dual-kernel package for universal images
Note: Replace trixie with bookworm in package names when building with DEBIAN_RELEASE=bookworm
The repository includes automated builds via GitHub Actions:
Automatic builds: Triggered on push to branch (builds both kernels by default)
Manual builds:
- Go to Actions → Build and archive WLAN Pi kernel package
- Click "Run workflow"
- Select kernel variant:
both,v8, or2712 - Click "Run workflow" button
Built packages are uploaded as separate artifacts per variant for easy download.
- v8 (Pi 4/CM4): 4KB page size,
CONFIG_ARM64_4K_PAGES, usesbcm2711_defconfig - 2712 (Pi 5): 16KB page size,
CONFIG_ARM64_16K_PAGES, usesbcm2712_defconfig - Dual package: Contains both kernels;
[pi4]/[pi5]conditional filters inconfig.txtselect the matching kernel at boot
See DUAL-KERNEL.md for detailed information about the dual-kernel packaging approach.
-
Clone the Repository:
git clone https://github.com/WLAN-Pi/wlanpi-kernel.git cd wlanpi-kernel -
Build kernels:
./build-kernel.sh
-
Install on target device:
# For Pi 4/CM4: sudo dpkg -i output/wlanpi-kernel-trixie-v8_*.deb # For Pi 5: sudo dpkg -i output/wlanpi-kernel-trixie-2712_*.deb # For universal image (works on both): sudo dpkg -i output/wlanpi-kernel-trixie_*.deb