So I found that while the BPI-R64 has a 7.2GB eMMC, only 900MB are allocated for OpenWrt in the default sdcard image (from downloads.openwrt.org/snapshots).
It turns out this is hard-coded in the makefile, but you can patch it: /target/linux/mediatek/image/mt7622.mk
$(if $(findstring emmc,$1), \ - -t 0x2e -N production -p [email protected] \ + -t 0x2e -N production -p [email protected] \ )
According to fdisk there are 15187935 sectors total available for the main partition, which is about 7373MB (sector size: 512B).
You can re-build the stock OpenWrt image as follows:
- Download the image_builder package from downloads.openwrt.org/snapshots
- Extract into Linux/WSL environment, set up as per openwrt instructions
- Patch the makefile with 01-full-partition-size.patch (365 Bytes):
$ patch -p1 -i 01-full-partition-size.patch
$ make image
- Write to SD card and rewrite eMMC via uboot
Now OpenWrt will utilize the full eMMC space:
df -h Filesystem Size Used Available Use% Mounted on /dev/root 58.0M 58.0M 0 100% /rom tmpfs 496.3M 60.0K 496.2M 0% /tmp /dev/mmcblk0p66 7.1G 410.2M 6.7G 6% /overlay overlayfs:/overlay 7.1G 410.2M 6.7G 6% / tmpfs 512.0K 0 512.0K 0% /dev
If someone is familiar with submitting patches to OpenWrt, it would be great to get this mainlined for BPI-R64 since the stock image just throws away all that eMMC space otherwise…