Okay, let's break down the kernel choices for your custom Raspberry Pi 5 minimal OS based on the raspberrypi/linux repository.
Current Stable Kernel for Raspberry Pi 5:
- The official Raspberry Pi OS is currently based on the Linux 6.6 LTS (Long-Term Support) kernel. [1, 2, 4][1]
- As of March 2024, Raspberry Pi OS releases started using kernel 6.6.x (specifically 6.6.20 mentioned in one source)[2]. [1, 2] This replaced the previous 6.1 LTS kernel. [1]
- The
rpi-6.6.y branch in the raspberrypi/linux GitHub repository is the current stable branch used for Raspberry Pi OS releases. [10, 11, 21] This branch receives Raspberry Pi-specific patches and updates based on the upstream stable 6.6.y kernel. [7, 11][2][5][8]
Understanding the Newer Branches (rpi-6.7.y to rpi-6.14.y):
- Raspberry Pi Foundation's Fork: The
raspberrypi/linux repository is a fork of the official Linux kernel. It contains the necessary patches and configurations specifically for Raspberry Pi hardware that might not yet be (or might never be) in the mainline (upstream) Linux kernel. [3, 12, 19][2][5][8]
- Branching Strategy: The
rpi-x.y.z branches in this repository generally track the corresponding upstream stable/mainline kernel versions (like linux-x.y.z). [8, 10] They serve as development/integration branches where Raspberry Pi-specific patches are applied and tested on top of newer kernel versions.
- Stability and Patches:
- While these newer branches (6.7+) exist and likely contain some Pi-specific patches [19], they are not considered the stable, production-ready branches for Raspberry Pi OS.
- They represent ongoing development and testing for future Raspberry Pi OS releases or for users who need specific features/fixes present only in newer kernels and are willing to test. [10, 18][2][5][8]
- The Pi-specific drivers and device tree configurations needed for full hardware support (like camera modules, specific HATs, GPU features, etc.) might be incomplete, experimental, or buggy in these newer, non-default branches. [15, 20]
- Upstream kernel support for Pi 5 hardware is still evolving (e.g., BCM2712 SoC support targeted for 6.8, other features for 6.12/6.13). [6, 15] The
raspberrypi/linux repo often backports or includes necessary patches before they land upstream, making its stable branch the most reliable source for Pi hardware support. [15]
- Future Placeholders? They aren't just placeholders. They are active development branches tracking upstream progress and integrating Pi patches. However, they haven't gone through the full stabilization and release process that the
rpi-6.6.y branch has for current Raspberry Pi OS. [10, 18][2][5][8]
Recommendation for Your Custom Minimal OS:
-
Safest Choice (Recommended): Start with the rpi-6.6.y branch. [1, 2, 4, 10, 11][2][5][8]
- Pros: This is the version currently shipped with Raspberry Pi OS, meaning it's the most tested and stable for Pi 5 hardware. It contains the necessary drivers, device tree overlays, and firmware integration for the Pi 5. [2, 3, 4] It's an LTS kernel, ensuring longer support[5]. [1, 2]
- Cons: You won't get the absolute latest kernel features present in 6.7+.
-
Bleeding-Edge Choice (Advanced/Experimental): You could try a newer branch like rpi-6.14.y (or whichever is the latest). [17]
- Pros: Access to the newest mainline kernel features and potentially newer Pi-specific developments being tested.
- Cons: Higher risk of instability, missing Pi 5 specific functionality, bugs, or incomplete hardware support. [15] You'll be responsible for testing and potentially fixing issues yourself. These branches might undergo rebasing or significant changes. [10]
Conclusion:
For creating a minimal and stable customized OS for the Raspberry Pi 5, the rpi-6.6.y branch is the strongly recommended starting point. It ensures you have the correct, tested, and supported kernel foundation with the necessary Raspberry Pi 5 specific patches. [1, 2, 4, 11][2][5][8]
The newer branches (6.7.y+) are more suitable for kernel developers or users who specifically need features from those later kernels and are prepared to handle potential instability or missing hardware support. [15, 18][2][5][8]