What is the best way to move DTBO file in container to /boot/overlays

Hello all,

I’m building the MatrixIO overlay from this repository. I’m able to generate the DTBO file using the Makefile in that repository, but now I’m trying to find the best way to move this out of the container into the root filesystem’s /boot/overlays directory.

I prefer this to be done in a Docker Container that runs once every time I deploy and builds/copies the DTBO to /boot/overlays/ just to reduce manual configuration of future devices. Is this possible?

I ended up building the DTBO in a container and then tunneling to the device and using scp to transfer the file to the root filesystem, but I would still love to know if it’s possible to copy it to the root filesystem by mapping a volume (I know Balena limits the volumes that can be mounted).

Hey @KylePalko welcome to the forums! One of the main reasons why this method isn’t supported is that if anything went wrong with the overlay that was added at runtime, it could cause the device to be unable to boot which is obviously very bad if your device is remote!

I think if you acknowledge the risks then the way you’re doing it now is as good as any. If it were my fleet, my preference would be to build the dtbo file and copy it once to the device (either into the image before it was flashed, or onto the media afterwards), then, if there are any updates required, do that as a run-once process on the fleet as a whole remotely from a central location rather than depending on building on every device individually.

Thanks for the reply @chrisys, I agree this way will work well. I’ll go with the current implementation. Thanks again!