This post should serve as a thread for the work I am doing to add a bsp for the raspberry pi 5.
My introduction for GSOC’26: GSOC'26 Introduction & Proof - Preetam.
Data and findings: pi5 rtems bsp - Google Docs
I am testing this on a physical Raspberry Pi 5 4GB using OpenOCD & GDB.
Here’s the update so far:
-
Started with understanding the difference/similarities between the memory & peripheral map of Pi4 and Pi5. I used the following references:
Conclusion:
-
The base peripheral address has changed. Some of the peripheral from Pi4 are stubbed out in Pi5 .i.e, they are still there but read/write does not work on them.
-
Most of the peripherals have moved behind the RP1 via PCIe. To get them working we have to make PCIe working first.
-
We still have access to a debug UART, the System Timer and the GIC block on the main bcm2712 chip. So a working minimal bsp should be possible without touching PCIe.
-
-
Following this I verified the boot process of Pi5 and its mostly similar to that of the Pi4. Then, I started a rough & hacky implementation just to see how far we can boot into.
I was able to jump to
Initbut I had to disablebsp_interrupt_initializeand stub outBSP_output_char. Details are as follows:-
I did all this in a folder
bsps/aarch64/raspberrypi5for now just to avoid conflicts. I guess we can merge this into the existingbsps/aarch64/raspberrypifolder once the bsp is somewhat stable. As I said the initial implementation is very rough so the files and directories may not be clean. -
To satisfy the build process, I disabled tests and samples for now. Also a stub for
BSP_output_charwas needed to satisfy the linker when building the application. -
Changes involve putting in the correct peripheral base address and the address for the GIC block. Since Pi4 uses 64-bit addresses, had to use the correct datatype for it. More here.
-
I had to add an
isbinstruction to flush out the write tosctlr_el1byaarch64_mmu_enable, elsememsetwas crashing out. I think this is a must requirement but somehow Pi4 was getting away with it. I will try sending a MR for this. -
For some reason
bsp_interrupt_initializeinbsp_startis causing problems. I had to comment it out to get toInit. I have used the correct peripheral address for the GIC block but somewhere down the line its crashing.
The whole thing is accessible here, in my rtems fork.
-
Now, I am trying to debug and fix the issue with bsp_interrupt_initialize. Once that’s handled, I guess I can move to clock and console.
I would appreciate any suggestions/feedback from the community specially on directory structure, debugging the GIC block and on what should be by next steps. Thanks.

