At the following link you can find a complete solution for easy deployment of OpenWrt 25.x (kernel 6.12) on all BPI-R4 variants — 4GB/8GB, with/without PoE, with/without BE14 WiFi board. SD rescue, eMMC and NVMe installation covered.
Pre-built images are available for all variants. Advanced users can fork the repository and build customized images using GitHub Actions.
It also includes easy integration of the UniFi stack described here: BPI-R4 OpenWrt — UniFi Protect (NVR) + Network Application on NVMe
For details, installation steps and supported hardware see the README.