Skip to content

Conversation

@ryandrake08
Copy link

Summary

Remove dependency on bcm_host library (libraspberrypi-dev) for VideoCore GPU FFT builds.

Problem

The libraspberrypi-dev package came from the raspberrypi/userland repository, which is now archived and marked as "ancient and deprecated." The package is not available in Trixie and is being phased out on Bookworm through package replacement. The libraspberrypi-dev package provided the bcm_host library. With it gone, builds with PLATFORM=rpiv2 will fail on recent Raspberry Pi OS distributions because gpu_fft_base.c depends on:

  • bcm_host_get_peripheral_address()
  • bcm_host_get_peripheral_size()
  • bcm_host_get_sdram_address()

Solution

Query the board revision directly via the VideoCore mailbox interface (which is already used by gpu_fft for other purposes), and derive the peripheral address and memory flags from the processor type encoded in the revision bits.

I also considered an alternative approach using the device tree (/proc/device-tree/soc/ranges) to obtain the peripheral address, available in the remove-bcm-host-device-tree branch. I chose the mailbox approach because it fits better with the existing gpu_fft code.

Alternatives

If this change is not desired, users can work around the issue by building and installing bcm-host-shim, which provides stub implementations of the required bcm_host functions.

Testing

Tested on Raspberry Pi 2 Model B Rev 1.1 running Raspberry Pi OS Trixie.

@gabeschine gabeschine self-requested a review December 16, 2025 18:05
@gabeschine
Copy link
Collaborator

Overall LG, although I cannot test as I don't have any RPI-2 hardware. Does anyone else who happens to be watching this PR have the ability to test?

@ryandrake08
Copy link
Author

Thanks for the quick review. No hurry on merging. I did this change to solve my own problem, and it's only useful to people who are running the latest and greatest rpi operating systems. If it's helpful to others, that's great. If there is a way I can help with the CI checks above, I'm happy to look into it. I don't really use docker or containers so I hope I didn't break anything in those deployments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants