Build u-boot for an existing distro

Hello, Due to the difficulties to buy a Raspebrry Pi 4, I bought a banana Pi M5 to increase my kubernetes cluster (based on k0s). I used to use a Archlinux distro based on a 5.17 kernel. But my img file doesn’t fit to Banana Pi M5, shame !!! So I consider building my own image

As I understand, u-boot (2nd stage) is like grub or lilo, so I “just” have to integrate u-boot to my existing img file to make it bootable on BPI-M5

Does that seem possible for you ? or I totally misunderstood ?

Regards Anthony You can try adding board configuration this way:

5.19.y has dtb, the rest is the same / similar as from Odroid C4

Thank you for your complete answer, I will try and come back to you

This is a prebuilt (2022.07): … might save some time/effort. Original sources are here: (note the path changes in the LOCAL patches).

... might save some time/effort.
Sure, I’m reading documentation on U-Boot, and trying to make my own distro
Thank you

Hello @chewitt, I read the U-Boot documentation, if I really understand, the file ( you proposed me is the result of the build, isn’t it ?
I just have to copy the file on a SD Card through the command detailled on documentation

$ DEV=/dev/your_sd_device
$ dd if=fip/ of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
$ dd if=fip/ of=$DEV conv=fsync,notrunc bs=1 count=444

I’ve done this, but the card doesn’t boot (the green LED stays on)
I’ve probably missed something, thank you for your help


I’ve not test-booted an M5 for a while, but it was working last time I did check it worked and nothing really changed since. This is what I use: