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 Bookworm
./build-kernel.sh
# Target Debian Trixie (testing)
DEBIAN_RELEASE=trixie ./build-kernel.sh
DEBIAN_RELEASE=trixie ./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 bookworm):
wlanpi-kernel-bookworm-v8_*.debwlanpi-kernel-headers-bookworm-v8_*.deb
When building 2712 only (for bookworm):
wlanpi-kernel-bookworm-2712_*.debwlanpi-kernel-headers-bookworm-2712_*.deb
When building both (for bookworm):
- All of the above, PLUS
wlanpi-kernel-bookworm_*.deb- Unified dual-kernel package for universal images
Note: Replace bookworm with trixie in package names when building with DEBIAN_RELEASE=trixie
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 WLAN Pi Kernel for Debian Bookworm
- 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, firmware auto-selects based on hardware
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-bookworm-v8_*.deb # For Pi 5: sudo dpkg -i output/wlanpi-kernel-bookworm-2712_*.deb # For universal image (works on both): sudo dpkg -i output/wlanpi-kernel-bookworm_*.deb