Convert Figma logo to code with AI

raspberrypi logofirmware

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.

5,277
1,686
5,277
369

Top Related Projects

11,618

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/

The official documentation for Raspberry Pi computers and microcontrollers

Installation scripts and binaries for the Raspberry Pi 4 and Raspberry Pi 5 bootloader EEPROMs

Examples to accompany the "Raspberry Pi Pico Python SDK" book.

Quick Overview

The raspberrypi/firmware repository is the official firmware repository for Raspberry Pi devices. It contains essential boot files, kernels, and modules required for Raspberry Pi hardware to function properly. This repository is maintained by the Raspberry Pi Foundation and is crucial for developers and users working with Raspberry Pi devices.

Pros

  • Regularly updated with the latest firmware and kernel improvements
  • Provides official, stable releases for Raspberry Pi hardware
  • Includes both pre-compiled binaries and source code for transparency
  • Supports a wide range of Raspberry Pi models and accessories

Cons

  • Large repository size due to multiple firmware versions and hardware support
  • Limited documentation within the repository itself
  • Requires some technical knowledge to navigate and utilize effectively
  • May cause compatibility issues if not used correctly with specific Raspberry Pi models

Getting Started

To use the firmware from this repository:

  1. Clone the repository:

    git clone https://github.com/raspberrypi/firmware.git
    
  2. Navigate to the appropriate directory for your Raspberry Pi model and desired firmware version.

  3. Copy the necessary files (e.g., bootcode.bin, start.elf, kernel.img) to your Raspberry Pi's boot partition.

  4. Update your config.txt file if needed to match the new firmware requirements.

  5. Reboot your Raspberry Pi to apply the new firmware.

Note: It's recommended to backup your current firmware files before updating. Always check the compatibility of the firmware with your specific Raspberry Pi model and operating system version.

Competitor Comparisons

11,618

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/

Pros of linux

  • Full Linux kernel source code, allowing for deep customization and development
  • Broader scope, covering the entire kernel rather than just firmware components
  • More active community involvement and contributions

Cons of linux

  • Larger repository size, requiring more storage and longer clone times
  • Higher complexity, potentially steeper learning curve for newcomers
  • May require more resources to build and test

Code Comparison

linux:

static int __init bcm2835_init(void)
{
    int ret;

    ret = platform_driver_register(&bcm2835_driver);
    if (ret)
        return ret;

    return 0;
}

firmware:

void __attribute__((naked)) _start(void)
{
    asm volatile (
        "mov sp, #0x8000\n"
        "b main\n"
    );
}

The linux repository contains full kernel source code, while the firmware repository focuses on low-level boot and hardware initialization code. The linux example shows a kernel module initialization function, whereas the firmware example demonstrates the entry point for the bootloader.

Pros of pico-sdk

  • Specifically designed for Raspberry Pi Pico microcontroller development
  • Provides a comprehensive C/C++ SDK for RP2040-based devices
  • Includes tools and examples for rapid prototyping and development

Cons of pico-sdk

  • Limited to RP2040-based devices, less versatile than firmware
  • Requires more setup and configuration for development environments
  • May have a steeper learning curve for beginners compared to firmware

Code Comparison

pico-sdk:

#include "pico/stdlib.h"

int main() {
    gpio_init(PICO_DEFAULT_LED_PIN);
    gpio_set_dir(PICO_DEFAULT_LED_PIN, GPIO_OUT);
    while (true) {
        gpio_put(PICO_DEFAULT_LED_PIN, 1);
        sleep_ms(500);
        gpio_put(PICO_DEFAULT_LED_PIN, 0);
        sleep_ms(500);
    }
}

firmware:

# No direct code comparison available
# firmware primarily consists of binary blobs and boot files

Note: The firmware repository doesn't contain user-facing code, making a direct code comparison challenging. It primarily includes binary firmware files and boot-related components for Raspberry Pi devices.

Pros of pico-examples

  • Focused on Raspberry Pi Pico microcontroller, providing specific examples
  • More beginner-friendly with well-documented code samples
  • Regularly updated with new examples and features for Pico development

Cons of pico-examples

  • Limited scope compared to firmware's broader Raspberry Pi support
  • Fewer contributors and less community involvement
  • Smaller codebase with fewer features and options

Code Comparison

pico-examples:

#include "pico/stdlib.h"

int main() {
    const uint LED_PIN = 25;
    gpio_init(LED_PIN);
    gpio_set_dir(LED_PIN, GPIO_OUT);

firmware:

#include "bcm2835.h"

int main(int argc, char **argv) {
    if (!bcm2835_init())
        return 1;
    bcm2835_gpio_fsel(RPI_GPIO_P1_11, BCM2835_GPIO_FSEL_OUTP);

The pico-examples code is more straightforward and specific to the Pico, while firmware uses a broader BCM2835 library for various Raspberry Pi models.

The official documentation for Raspberry Pi computers and microcontrollers

Pros of documentation

  • More accessible for beginners and non-technical users
  • Provides comprehensive guides, tutorials, and explanations
  • Regularly updated with new content and community contributions

Cons of documentation

  • Lacks direct access to firmware files and binaries
  • May not provide as much technical depth for advanced users
  • Requires more frequent updates to stay current with hardware changes

Code comparison

documentation:

# Getting Started with Raspberry Pi

This guide will help you set up your Raspberry Pi for the first time.

1. Insert the microSD card into your Raspberry Pi
2. Connect the power supply
3. Follow the on-screen instructions to complete the setup

firmware:

static void __init bcm2835_init(void)
{
    bcm2835_init_clocks();
    bcm2835_init_uart();
    bcm2835_init_gpio();
    bcm2835_init_vcio();
}

The documentation repo focuses on user-friendly guides and explanations, while the firmware repo contains low-level code and binary files essential for Raspberry Pi hardware functionality. The documentation is more accessible to a wider audience, but the firmware provides critical components for device operation.

Installation scripts and binaries for the Raspberry Pi 4 and Raspberry Pi 5 bootloader EEPROMs

Pros of rpi-eeprom

  • More focused and specific to EEPROM management
  • Smaller repository size, easier to navigate
  • Regular updates and active maintenance

Cons of rpi-eeprom

  • Limited scope compared to the broader firmware repository
  • Fewer contributors and community involvement
  • Less comprehensive documentation

Code Comparison

rpi-eeprom:

def get_bootloader_config():
    cmd = ["vcgencmd", "bootloader_config"]
    try:
        output = subprocess.check_output(cmd, universal_newlines=True)
        return output.splitlines()
    except subprocess.CalledProcessError:
        return None

firmware:

static void __init bcm2708_init_led(void)
{
    led_gpio = 16;
    gpio_request(led_gpio, "ACT LED");
    gpio_direction_output(led_gpio, 0);
    bcm2708_init_led_timer();
}

The rpi-eeprom repository focuses on Python scripts for managing the Raspberry Pi EEPROM, while the firmware repository contains a broader range of C code for various firmware components. The rpi-eeprom code example shows a function to retrieve bootloader configuration, whereas the firmware code initializes an LED GPIO. This highlights the different scopes and languages used in each project.

Examples to accompany the "Raspberry Pi Pico Python SDK" book.

Pros of pico-micropython-examples

  • Focused on MicroPython examples for Raspberry Pi Pico
  • Easier to understand and implement for beginners
  • Provides practical, ready-to-use code samples

Cons of pico-micropython-examples

  • Limited scope compared to firmware's broader functionality
  • May not cover advanced or low-level hardware interactions
  • Smaller community and less frequent updates

Code Comparison

pico-micropython-examples:

import machine
import utime

led = machine.Pin(25, machine.Pin.OUT)
while True:
    led.toggle()
    utime.sleep(1)

firmware:

#include "pico/stdlib.h"

int main() {
    const uint LED_PIN = 25;
    gpio_init(LED_PIN);
    gpio_set_dir(LED_PIN, GPIO_OUT);
    while (true) {
        gpio_put(LED_PIN, 1);
        sleep_ms(500);
        gpio_put(LED_PIN, 0);
        sleep_ms(500);
    }
}

The pico-micropython-examples repository focuses on MicroPython code for the Raspberry Pi Pico, making it more accessible for Python developers. In contrast, the firmware repository contains low-level C code and provides a broader range of functionality for Raspberry Pi hardware. While pico-micropython-examples offers simpler implementation, firmware allows for more advanced and optimized control over the hardware.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

This repository contains pre-compiled binaries of the current Raspberry Pi kernel and modules, userspace libraries, and bootloader/GPU firmware.

A rough guide to this repository and the licences covering its contents is below (check the appropriate directories for more specific licence details):

  • boot:
    • start*.elf, fixup*.dat and bootcode.bin are the GPU firmwares and bootloader. Their licence is described in boot/LICENCE.broadcom.
    • The kernel.img files are builds of the Linux kernel, released under the GPL (see boot/COPYING.linux)
    • The dtbs, overlays and associated README are built from Linux kernel sources, released under the GPL (see boot/COPYING.linux)
  • extra: System.map files for the provided kernel builds (boot/COPYING.linux), and dt-blob.dts (boot/LICENCE.broadcom)
  • modules: pre-built modules for kernel.img (boot/COPYING.linux)