Frank-W, thank you again for your help and patience.
More testing…I can now boot in to NAND and see the UBOOT menu. The R3 mini boots to OpenWrt (under NAND) with the UART adapter connected through minicom.
What I did:
I created a custom version of the Rooter firmware and included the kmod-mtd-rw package in the kernel. I then installed the custom version to eMMC and was able to execute the NAND restore commands at the Rooter prompt under minicom:
insmod mtd-rw.ko i_want_a_brick=1
mtd write /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-preloader.bin /dev/mtd0
ubidetach -m 1
ubiformat /dev/mtd1
ubiattach -m 1
volsize=$(wc -c < /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip)
ubimkvol /dev/ubi0 -N fip -n 0 -s $volsize -t static
ubiupdatevol /dev/ubi0_0 /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-snand-bl31-uboot.fip
cd /lib/firmware/airoha
cat EthMD32.dm.bin EthMD32.DSP.bin > /tmp/en8811h-fw.bin
ubimkvol /dev/ubi0 -N en8811h-fw -n 1 -s 147456 -t static
ubiupdatevol /dev/ubi0_1 /tmp/en8811h-fw.bin
ubimkvol /dev/ubi0 -n 2 -N ubootenv -s 126976
ubimkvol /dev/ubi0 -n 3 -N ubootenv2 -s 126976
volsize=$(wc -c < /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb)
ubimkvol /dev/ubi0 -n 4 -N recovery -s $volsize
ubiupdatevol /dev/ubi0_4 /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-initramfs-recovery.itb
volsize=$(wc -c < /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb)
ubimkvol /dev/ubi0 -n 5 -N fit -s $volsize
ubiupdatevol /dev/ubi0_5 /mnt/sda1/openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
ubimkvol /dev/ubi0 -n 6 -N rootfs_data -m
The commands executed successfully with the exception of the following command:
root@ROOter:/lib/firmware/airoha# ubimkvol /dev/ubi0 -n 5 -N fit -s $volsize
[ 966.017853] block ubiblock0_5: created from ubi0:5(fit)
Volume ID 5, size 93 LEBs (11808768 bytes, 11.2 MiB), LEB size 126976 bytes (124.0 KiB), dynamic, name "fit", alignment 1
root@ROOter:/lib/firmware/airoha# [ 966.173274] mtdblock_open: 6 callbacks suppressed
[ 966.173283] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[ 966.186784] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[ 966.201732] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[ 966.210645] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[ 966.237249] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[ 966.246101] mtdblock: MTD device 'bl2' is NAND, please consider using UBI block devices instead.
[ 966.260950] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[ 966.269808] mtdblock: MTD device 'ubi' is NAND, please consider using UBI block devices instead.
[ 966.336641] /dev/ubiblock0_5: Can't open blockdev
[ 966.342031] /dev/ubiblock0_5: Can't open blockdev
[ 966.347211] /dev/ubiblock0_5: Can't open blockdev
[ 966.352450] /dev/ubiblock0_5: Can't open blockdev
[ 966.357855] F2FS-fs (ubiblock0_5): Magic Mismatch, valid(0xf2f52010) - read(0xffffffff)
[ 966.365924] F2FS-fs (ubiblock0_5): Can't find valid F2FS filesystem in 1th superblock
[ 966.373772] F2FS-fs (ubiblock0_5): Magic Mismatch, valid(0xf2f52010) - read(0xffffffff)
[ 966.381756] F2FS-fs (ubiblock0_5): Can't find valid F2FS filesystem in 2th superblock
[ 966.389968] /dev/ubiblock0_5: Can't open blockdev
[ 966.394944] exFAT-fs (ubiblock0_5): invalid boot record signature
[ 966.401040] exFAT-fs (ubiblock0_5): failed to read boot sector
[ 966.406852] exFAT-fs (ubiblock0_5): failed to recognize exfat type
[ 966.414120] /dev/ubiblock0_5: Can't open blockdev
I ignored the message and continued entering the NAND restore commands. I then powered the R3 mini off, switched to NAND and powered it back on. The R3 mini booted and the UBOOT menu came up under NAND.
I do not see any wireless networks for OpenWrt on my laptop.
I cannot connect to the R3 mini with an ethernet cable through a browser using 192.168.1.1. Under minicom i see the following:
root@OpenWrt:~# ifconfig
br-lan Link encap:Ethernet HWaddr EA:27:73:B8:F9:F0
inet addr:192.168.1.1 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: fde9:307e:72db::1/60 Scope:Global
inet6 addr: fe80::e827:73ff:feb8:f9f0/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1691 errors:0 dropped:0 overruns:0 frame:0
TX packets:159 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:107743 (105.2 KiB) TX bytes:15974 (15.5 KiB)
eth0 Link encap:Ethernet HWaddr EA:27:73:B8:F9:F0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1697 errors:0 dropped:0 overruns:0 frame:0
TX packets:166 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:132680 (129.5 KiB) TX bytes:17606 (17.1 KiB)
Interrupt:121
eth1 Link encap:Ethernet HWaddr EA:27:73:B8:F9:F1
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:121
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:321 errors:0 dropped:0 overruns:0 frame:0
TX packets:321 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:25036 (24.4 KiB) TX bytes:25036 (24.4 KiB)
I guess I’m further along. I might do some additional testing later today.
Rooter firmware comes up on eMMC and I am able to connect to the cellular network.
Eric