Add custom overlay for MCP2517FD for Raspberry pi 4 for CAN bus FD

So, I am trying to interface with the can bus hat from seeed studio using the raspberry pi 4.

Link to Overlay

This new board uses the newer mcp2517fd chip instead of the notorious mcp2515 chip which is built into raspbian. I need to now add this overlay to


I see the


overlay. Of course resin-boot is read only so I have to do something before it starts up, but have no idea what that would be.

1 Like

Hi Drey!

I’m glad to see you’re still fighting! We’re working in the background to try and work out your Beaglebone Green issue with CANbus, but moving over to a more capable device might be a good step anyway.

So to this issue, you can use our special configurable variables to set DT Overlays:

This page gives some guidance for the overlay you’re trying to use:

Hope this helps. Keep going, we’ll get you sorted!


Hello! I also need overlay support for MCP2517FD for raspberry pi 3B+.
Can you provide instructions on how to add the custom overlay?
Thank you in advance

Hi there! Did you manage to load the overlay?

Hi @npetridis,

To include your custom overlay in a BalenaOS image you can open a PR in the balena-raspberrypi repository. Here’s an example PR on how to add your overlay

1 Like

Thank you very much Alexandru! A little more help here.
So the PR has three file changes:

  • layers/meta-balena-raspberrypi/conf/layer.conf
    Seems ok I’m just not sure if I should name my dtbo file 2xmcp2517fd or mcp2517fd. Should this be defined by how it is named in the raspberry kernel system?
  • layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi_%.bbappend
    Is straight forward
  • layers/meta-balena-raspberrypi/recipes-kernel/linux/linux-raspberrypi/0009-seeed studio-can-bus-v2-Add-dtbo-for-this-can-bus.patch
    About my patch file, should it have prefix 0001, 0009 or something else?

Concerning the content of the patch file, the diff is extracted from where? A quick search lead me here but I can’t find arch/arm/boot/dts/overlays/Makefile path
I use raspberry pi 3 model B maybe not the correct branch?
Also I have located 2xMCP2517FD.dtbo and 2xMCP2517FD-overlay.dts files here, should I add these files somehow of are they already located in raspberry os (not balena os).
Sorry for the noob questions first time trying to figure these out! Hopefully I will soon be able to contribute more independently!

heyo @npetridis,

the patched makefile is here - github always struggles with lots of files in a directory but going via url works…

1 Like