When building software targeting Pi, it's common practice to use the pkgconfig to assist building by specifying PKG_CONFIG_PATH. Unfortunately, the presence of the legacy pkgconfig that conflict with Mesa's libraries will cause issues for users that build against the firmware pkgconfig, but wish to target Mesa. (Pi 4B or earlier revisions using the f/kms overlay). Although a possible workaround may be to omit the custom PKG_CONFIG_PATH of the firmware pkgconfig during build, there are plausible use cases in which to target a software build against Mesa whilst also leveraging the non GL-specific firmware libraries (e.g. MMAL for hardware codec support that works on the FKMS overlay, or BCM_HOST for basic board detection). Note: this conflict is already resolved via the Raspbian packages by deliberately omitting the conflicting .pc files during the packaging stage; see https://github.com/raspberrypi/firmware/issues/857
This repository contains the source code for the ARM side libraries used on Raspberry Pi. These typically are installed in /opt/vc/lib and includes source for the ARM side code to interface to: EGL, mmal, GLESv2, vcos, openmaxil, vchiq_arm, bcm_host, WFC, OpenVG.
Use buildme to build. It requires cmake to be installed and an ARM cross compiler. For 32-bit cross compilation it is set up to use this one: https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian
Whilst 64-bit userspace is not officially supported, some of the libraries will work for it. To cross compile, install gcc-aarch64-linux-gnu and g++-aarch64-linux-gnu first. For both native and cross compiles, add the option --aarch64 to the buildme command.
Note that this repository does not contain the source for the edidparser and vcdbg binaries due to licensing restrictions.