[BPI-R3 Mini] Boot from NAND fails

The default openwrt which is provided by bpi does not support usb in uboot…here i used the openwrt userspace to flash emmc…you can look into my wiki where i have added steps today to flash emmc

1 Like

Could you tell me how the eMMC-NAND switch actually works? Can I perform operations on the eMMC in the NAND switch position?


sorry automatic translation

I found a way to download mtk_uartboot without connecting via a third-party adapter! You only need a TypeC - TypeC cable. It is necessary to connect the board at the moment when the red LED lights up (there is only one!) have time to run this program and you will already be in Uboot (you can check this with the help command)

the switch on r3mini only defines bootdevice (similar to first 2 switches on full r3) as on r3 only 1 spi and 1 mmc device is there…so no tricks are not needed to switch spi-chipselect and mmc-device (last 2 switches on r3)

and yes - as you have only nand and emmc on r3mini, you can access both when booted from both (if your system uboot/linux supports it)

1 Like

It turned out to run mtk_uart boot, upload files to a USB flash drive and download it, but I don’t understand what to do next with them, from the word at all… If it’s not difficult for you to help with this, please. I believe that I have very little time left before the resuscitation of my eMMC

good that you have now uboot loaded with usb support (which looks like mine)…

i do not know the exact files from openwrt/immortalwrt, and if they use a specific way…imho openwrt stores fip in ubifs (i have not done anything with it yet).

i can only guess that the first file (squashfs-sysupgrade) is the kernel with initrd, bl31-uboot.fip is similar to my fip and emmc-preloader is the bl2 which have to be on boot0 block

basic way is described here https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r3:uboot#writing_emmc

fatload usb 0:1 $loadaddr file

and then write the file to the right position. but i do not know the partition sheme for immortalwrt (i guess in the gpt file)…maybe they use for fip the same as i do, but maybe not…

maybe @1715173329 can help here? @dangowrt can help with openwrt specific parts

ImmortalWrt uses the exactly same GPT partition layout as OpenWrt. FYI openwrt/target/linux/mediatek/image/filogic.mk at v23.05.3 · openwrt/openwrt · GitHub

You can run mmc part to print the partition table, then write the firmware to correspond part. See the example provided by @frank-w (thank you).

emmc-bl31-uboot.fip -> fip
initramfs-recovery.itb -> recovery
squashfs-sysupgrade.itb -> production

I can see bl2 failed to load fip. How did you flash the fip?

Then fip should be flashed at block 0x3400,right? I though openwrt uses ubi dor fip,but maybe only for nand/nor

now I’m trying to record eMMC by analogy

block 0x3400

That’s correct. FYI openwrt/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch at efa71c532e4778433263626bfff1a40e48f6bdb4 · openwrt/openwrt · GitHub

1 Like

I just downloaded it and recorded it sequentially BL2 and FIP

You miss gpt layout when partition is not found

Newer atf (after i created the emmc write section) use search for fip partition instead of fixed offset to get start of fip

Maybe it is enough if you flash the emmc gpt image (3rd in image above) to offset 0x0 of emmc

1 Like

Thanks to you, I have downloaded fip <3 now the next stage :smiley: my kernel is not loading (I wrote ImmortalWRT)

I think I figured it out… I forgot about the instructions

Yesterday I managed to download ImmortalWRT (fork of OpenWRT) 1-3) I downloaded Gpt, bl2, fip from a flash drive 4) And downloaded inittamfs-recovery via tftp 5) Next, I updated sysupgrade via Luci

It remains to update additional packages today. For some reason, they did not want to update yesterday (“opkg update” does not work, error 6 writes)

You can use the Openwrt SNAPSHOT firmware selector version also. It’s working with just a small fix. It took me a few hours to understand why default images not working and self compiled without any problems. You just have to add the missing airoha-en8811h-firmware packages and “REQUEST BUILD” as shown in the picture.

If not added you will get the PHY failure:

mtk_soc_eth 15100000.ethernet eth0: validation of 2500base-x with support 00000000,00000000,000062e8 and advertisement 00000000,00000000,000062c0 failed: -EINVAL
...
Unable to handle kernel access to user memory outside uaccess routines at virtual address
1 Like

It’s strange that the airoha-en8811h-firmware package is missing because kmod-phy-airoha-en8811h is selected, and that depends on airoha-en8811h-firmware. The problem is probably that in this way it doesn’t end up in the initramfs (=recovery) but only in the production (=squashfs+overlay) image… However, that will not change even if you include airoha-en8811h-firmware in the Firmware Selector…

I ran into the same issue today. but still, I can boot from emmc. will read your thread carefully.

Hello everyone, I need help, there is a brick. through mtk_uartboot, getting into uboot, I choose to update the firmware, I choose tftp.the address on the computer in the network card of the tftp server is 192.168.1.2. But, all attempts to download from the server end with an error. are there any options to solve the problem?

Imho it is easier using usb for loading files to flash