linux
Kernel source tree for Raspberry Pi-provided kernel builds. Issues unrelated to the linux kernel should be posted on the community forum at https://forums.raspberrypi.com/
Top Related Projects
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Quick Overview
The raspberrypi/linux repository is the official Linux kernel source tree for Raspberry Pi devices. It contains the customized kernel code, drivers, and configurations specifically tailored for Raspberry Pi hardware. This repository is maintained by the Raspberry Pi Foundation and serves as the basis for the operating system that runs on millions of Raspberry Pi devices worldwide.
Pros
- Optimized specifically for Raspberry Pi hardware, ensuring maximum performance and compatibility
- Regularly updated with the latest kernel features and security patches
- Open-source, allowing for community contributions and customizations
- Includes drivers and support for Raspberry Pi-specific hardware components
Cons
- Large repository size, which can be challenging for users with limited storage or bandwidth
- Requires advanced knowledge of Linux kernel development for meaningful contributions
- May have a steeper learning curve compared to pre-built Raspberry Pi OS images
- Some features or drivers may be specific to Raspberry Pi, limiting portability to other platforms
Getting Started
To get started with the Raspberry Pi Linux kernel:
-
Clone the repository:
git clone https://github.com/raspberrypi/linux.git
-
Install necessary build tools:
sudo apt-get install git bc bison flex libssl-dev make
-
Configure the kernel for your Raspberry Pi model:
cd linux KERNEL=kernel7 make bcm2709_defconfig
-
Build the kernel:
make -j4 zImage modules dtbs
-
Install the modules and copy the kernel and device tree blobs:
sudo make modules_install sudo cp arch/arm/boot/dts/*.dtb /boot/ sudo cp arch/arm/boot/dts/overlays/*.dtb* /boot/overlays/ sudo cp arch/arm/boot/dts/overlays/README /boot/overlays/ sudo cp arch/arm/boot/zImage /boot/$KERNEL.img
-
Reboot your Raspberry Pi to use the new kernel.
Note: These instructions are simplified and may vary depending on your specific Raspberry Pi model and requirements. Always refer to the official documentation for the most up-to-date and detailed instructions.
Competitor Comparisons
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Pros of OpenWrt
- Broader device support, targeting various routers and embedded devices
- More customizable and modular system, allowing for easier feature addition
- Larger community and more frequent updates
Cons of OpenWrt
- Less optimized for Raspberry Pi hardware specifically
- May require more technical knowledge to set up and configure
- Potentially less stable on Raspberry Pi devices compared to the official Linux kernel
Code Comparison
OpenWrt (package/kernel/mac80211/files/lib/wifi/mac80211.sh):
append DRIVERS "mac80211"
lookup_phy() {
[ -n "$phy" ] && {
[ -d /sys/class/ieee80211/$phy ] && return
}
Raspberry Pi Linux (drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c):
static struct wiphy *brcmf_cfg80211_wiphy_alloc(struct brcmf_cfg80211_info *cfg)
{
struct wiphy *wiphy;
struct brcmf_pub *drvr = cfg->pub;
The code snippets show different approaches to wireless networking implementation, with OpenWrt using a shell script for device detection and the Raspberry Pi Linux kernel using C for low-level driver configuration.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual CopilotREADME
Linux kernel
There are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. Please read Documentation/admin-guide/README.rst first.
In order to build the documentation, use make htmldocs
or
make pdfdocs
. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Top Related Projects
This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git.
Convert designs to code with AI
Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.
Try Visual Copilot