Is there an instruction how to build single image for SD loading? I understand there is image file in the forum but would like to understand how to build such image from the scratch. Thanks in advance!
What kind of os do you want to have?
My pipelines build a debian/ubuntu image (base image for r4 is done in u-boot repo with build.sh in mtk-atf branch).
More information here:
https://wiki.fw-web.de/doku.php?id=en:bpi-r4:start#debian_ubuntu_image_building
To build OpenWrt first make sure all build prerequisites are present: [OpenWrt Wiki] Build system setup
OpenWrt build instructions for BPi-R4:
git clone https://git.openwrt.org/openwrt/openwrt.git
cd openwrt
make menuconfig
# now select MediaTek ARM -> Filogic -> BananaPi R4
make -j$(nproc)
As a result you will find the SD card image in bin/targets/mediatek/filogic/
. This image will allow installation to SPI-NAND, and from there to the eMMC, it contains ARM TrustedFirmware-A, U-Boot and OpenWrt/Linux, all built from source.