Raspberry Pi Userland

repository·master·Indexed 24 days ago

https://github.com/raspberrypi/userland

Legacy ARM-side libraries for interfacing with VideoCore firmware on Raspberry Pi, including MMAL, EGL, GLESv2, and OpenVG. This repository is deprecated in favor of standard Linux APIs such as V4L2, DRM/KMS, and Mesa. It contains sample applications like hello_videocube and hello_tiger, as well as imv buffer post-processing tools.

Tokens
1.4K
Snippets
3
Records
15
Agent score
85%

What's inside raspberrypi-userland

  1. Migrate from userland to modern Raspberry Pi APIs

    master

    This repository is deprecated and contains proprietary APIs for interfacing with VideoCore firmware. For modern Raspberry Pi development, you should migrate to standard Linux APIs.

    Recommended APIs:

    • V4L2 (Video for Linux 2)
    • DRM/KMS (Direct Rendering Manager / Kernel Mode Setting)
    • Mesa

    Utility Tools: If you need tools like dtoverlay, dtmerge, vcmailbox, or vcgencmd, they have been moved to the raspberrypi/utils repository.

  2. Explore the OpenVG 1.1 Reference Implementation package structure

    master

    The OpenVG 1.1 Reference Implementation (RI) provides sources for OpenVG, VGU, and EGL. The package is organized as follows:

    • bin/win32/: Contains libOpenVG.dll (the Windows implementation) and tiger.exe (the Tiger sample executable).
    • lib/: Contains libOpenVG.lib (the MSVC 6 import library).
    • ri/: Contains the reference implementation source code and project files.
      • src/: Implementation files (.cpp, .h). Includes backends for Windows, Mac OS X, and a null backend.
      • include/: Public headers for development.
        • EGL/egl.h
        • VG/openvg.h
        • VG/vgu.h
    • samples/: Contains the tiger sample application source and MSVC project files (samples.dsw, samples.dsp).
  3. Deprecation notice for MMAL/OpenMAXIL wrapper layer

    master
    The MMAL/OpenMAXIL wrapper layer is deprecated. While it is maintained for legacy compatibility, it is not used by the Raspberry Pi firmware and was intended for a platform-removal use case that never materialized. It is strongly recommended that you do not use these files for new projects.
  4. Build the userland libraries using buildme

    master

    To build the ARM-side libraries (such as EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, and OpenVG), use the buildme tool.

    Prerequisites:

    Building for 64-bit (aarch64): While 64-bit userspace is not officially supported, some libraries may work. To attempt a 64-bit cross-compile:

    1. Install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu.
    2. Use the --aarch64 flag with the buildme command.
  5. Build test applications on a Raspberry Pi

    master

    To build the test applications directly on a Raspberry Pi, you must first build the required libraries (ilclient and vgfont).

    1. Build the libraries:
      • make -C libs/ilclient
      • make -C libs/vgfont
    2. Build the specific application:
      • Navigate to the application directory (e.g., hello_world).
      • Run make.
      • Execute the resulting binary (e.g., ./hello_world.bin).

    Alternatively, you can rebuild all libraries and applications simultaneously by running ./rebuild.sh.

    # Build libraries
    make -C libs/ilclient
    make -C libs/vgfont
    
    # Build and run an app
    cd hello_world
    make
    ./hello_world.bin
    
    # Or rebuild everything
    ./rebuild.sh