Banana PI-R2 EMMC installation

I need a decent guide to install Openwrt on BananaPI-R2. There are just too many information in different places here that it becomes difficult to get a simple installation of openwrt on the EMMC drive of the BPI-R2 done. I also need to expand the /overlay partition after installation.

Examples are:

Installation guide: https://wiki.banana-pi.org/Getting_Started_with_R2#OpenWrt_On_SD_.26_Emmc_Steps

Installation manual: Banana pi bpi-r2 installation manual

Here, it shows that the current release is 19.07.10: https://openwrt.org/toh/sinovoip/banana_pi_r2

And if I search I find this latest version: https://downloads.openwrt.org/releases/22.03.0-rc4/targets/mediatek/mt7623/

It would be great if someone can help point to the right steps.
Thanks!

The instructions in the table of hardware seem straightforward, what issue are you having?

I can just tell you that the documentation is outdated. For example, this file: "bananapi_bpi-r2-sdcard.img.gz" was mentioned without giving the location to the file.
Here is the steps I followed:

  1. wget https://downloads.openwrt.org/snapshots/targets/mediatek/mt7623/openwrt-mediatek-mt7623-bananapi_bpi-r2-sdcard.img.gz

  2. mv openwrt-mediatek-mt7623-bananapi_bpi-r2-sdcard.img.gz bananapi_bpi-r2-sdcard.img.gz

Prepare SD Card:
3. gzip -cd bananapi_bpi-r2-sdcard.img.gz > /dev/mmcblk1

  1. Reboot to U-Boot and select "Install bootloader, recovery and production to eMMC."

  2. I removed the SD card afterwards and boot production system from eMMC.

  3. fdisk -l showed:

Disk /dev/mmcblk0: 7.28 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 640 2687 2048 1M 41 PPC PReP Boot
/dev/mmcblk0p2 8192 90111 81920 40M ea Linux extended boot
/dev/mmcblk0p3 98304 311295 212992 104M 2e unknown

  1. I did "cat /proc/mtd"
    and it returned nothing:
    dev: size erasesize name

Please let me know if I miss any step.
Thanks!

If you have the prerequisites (Linux system, UART cable), try these instructions:

The steps a valid even with master or current 22.3 rc4 branches. I have a bananapi r2 on my own.

Good news: you have to fumble with SD-card and UART cable only once, after running the device from emmc you can simply upgrade using the itb file from ./bin/targets/mediatek/mt7623

Good luck!
Go

PS:
I tried also the images from openwrt.org (without transferring to emmc) but found the filesystem sizes too small for loading additional modules (VPN, Minidlna).
For master branch you should know as minidlna is broken because of missing dependencies

@Gotthard
Thanks very much for the link! I followed every step but I still arrived at the same situation: "cat /proc/mtd" was empty.
If I missed any step in the link above, it must be at the last step #14.
"you can easily transfer the card image to mmc using u-boot option “transfer from sd to mmc” during reboot (with serial connection only)"

I didn't find any option in the uboot that says "transfer from sd to mmc" . Instead I select "Install bootloader, recovery and production to eMMC."
I removed ssd and reboot afterwards and boot into the emmc. There the "/proc/mtd" file was empty.
Thanks in advance.

cat /proc/mtd is also empty at my system. Maybe I have missed some kernel modules

You are right, the boot loader options has changed between the years, but you have selected the correct one (thta´s easy because of red marking). If you remove your sdcard after the transfer, system will boot from emmc (w/o option "transfer to emmc"). That should be enough proof of running from emmc.
In /dev I see some devices in relation to mmc

root@bananapi:/dev# ls mmc*
mmcblk0       mmcblk0boot1  mmcblk0p2     mmcblk0p65    mmcblk0rpmb
mmcblk0boot0  mmcblk0p1     mmcblk0p3     mmcblk0p66

and fdisk -l reports

root@bananapi:/dev# fdisk -l
Disk /dev/mmcblk0: 7.28 GiB, 7818182656 bytes, 15269888 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x5452574f

Device         Boot Start    End Sectors  Size Id Type
/dev/mmcblk0p1        640   2687    2048    1M 41 PPC PReP Boot
/dev/mmcblk0p2       8192  90111   81920   40M ea Linux extended boot
/dev/mmcblk0p3      98304 311295  212992  104M 2e unknown


So I think, /proc/mmc is not reliable for correct function of emmc.

with regards
Go

I still haven't been able to solve my problem. I tried the steps here: Expanding OpenWrt squashfs image? (SDcard) - #7 by hc62 to extend the /overlay, but after reboot, It indeed showed that my extra partition is mounted to the root directory, but it is not included in the overlay as expected from this command: "df /overlay /"
Any suggestion or help would be great.