[BPI-R4] How to get an openwrt image to eMMC?

Hello! I have been building my own version of openwrt for a while and now I have been using that with the SD image flashed to… an SD.

Now, when I build I get all of these output files:

mt7981-ram-ddr3-bl2.bin
mt7981-ram-ddr4-bl2.bin
mt7986-ram-ddr3-bl2.bin
mt7986-ram-ddr4-bl2.bin
mt7988-ram-comb-bl2.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-emmc-bl31-uboot.fip
openwrt-mediatek-filogic-bananapi_bpi-r4-emmc-preloader.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-initramfs-recovery.itb
openwrt-mediatek-filogic-bananapi_bpi-r4.manifest
openwrt-mediatek-filogic-bananapi_bpi-r4-sdcard.img.gz
openwrt-mediatek-filogic-bananapi_bpi-r4-snand-bl31-uboot.fip
openwrt-mediatek-filogic-bananapi_bpi-r4-snand-preloader.bin
openwrt-mediatek-filogic-bananapi_bpi-r4-squashfs-sysupgrade.itb

How can I install the same build first on the NAND and then on the eMMC?

Thank you!

Afair it is designed to boot the sdcard one first and then install to nand from it,then boot this and install emmc

Yeah, I tried to use the process in Getting Started BPI-R4 | BananaPi Docs assuming is the same but then I get to:

root@OpenWrt:/mnt# mtd erase /dev/mtd0
Could not open mtd device: /dev/mtd0
Could not open mtd device: /dev/mtd0
root@OpenWrt:/mnt# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00200000 00020000 "bl2"
mtd1: 07e00000 00020000 "ubi"

Any clue on what am I missing?

Do not use the bpi way here…mainline openwrt is installed using uboot menu