On Banana BPI-M5 wiki page (Banana Pi BPI-M5 - Banana Pi Wiki), there’s Raspbian image available for download, as well as Armbian. I’ve found that Armbian can be built from source as per (GitHub - armbian/build: Armbian Linux build framework generates custom Debian or Ubuntu image for x86, aarch64, riscv64 & armhf), and it clearly supports Banana BPI-M5. But I’m not sure about Raspbian. I found their build framework (GitHub - RPi-Distro/pi-gen: Tool used to create the official Raspberry Pi OS images), but how do I configure it to build for Banana Pi, not Raspberry Pi? There is an issue there with request to support Orange Pi, but it’s closed as “not planned”.
So, how do I build Raspberry Pi OS image for Banana BPI-M5?