I tried to do this via WSL (Ubuntu), but it didn’t work, it doesn’t find the uart, (I tried USB0 and USB5). I have an idea to boot from a Linux flash drive to try it, but it seems to me there will be no difference
I couldn’t even load mtk_uartboot.
I tried to do this via WSL (Ubuntu), but it didn’t work, it doesn’t find the uart, (I tried USB0 and USB5). I have an idea to boot from a Linux flash drive to try it, but it seems to me there will be no difference
I couldn’t even load mtk_uartboot.
3 hours later… I managed to transfer COM3 to wsl as USB0 and run the whole thing… the result is the same, perhaps of course Windows itself somehow does not work correctly with CH340G. I don’t even know what I would like to believe anymore, whether this is a Windows case or a CH340G…
Having connected the board directly to the computer via PD, I found the built-in CH340, but it is sad that when it is disconnected, it disappears and the mtk_uartboot program closes.
there is good guide to extend eMMC overlayfs?
thx!
please open new thread as emmc / overlayfs is not related to nand bootup
so just an update, i’ve successfully loaded sysupgrade from USB, here is what i’ve done
boot into Uboot console an run these commands:
Start USB subsystem:
usb start
List files on the USB stick (it should be formatted in FAT32), optional step if you know the name of the file to load:
fatls usb 0:1
Load sysupgrade in RAM and then write into eMMC:
fatload usb 0:1 $loadaddr openwrt-mediatek-filogic-bananapi_bpi-r3-mini-squashfs-sysupgrade.itb
Finally write it on eMMC:
run emmc_write_production
I think the same can be done for BL2, EN8811H firmware and BL3+FIP changing the run
command with these (you need fatload
commands each time BEFORE execute the other run
commands):
BL2:
run emmc_write_bl2
BL3+FIP:
emmc_write_fip
EN8811H firmware:
emmc_write_en8811h_fw
Hope this can be useful
Is it possible to start the board with the switch in the NAND position, go to uBOOT and download BL2 and so on for eMMC? I understand correctly what is needed in my case bl2, bl3, fip and then sysapgrede ?bl2, bl3, fip and then sysapgrede ?and could you recommend a program to switch to Uboot? I tried using “putty”, but for some reason it is impossible to select a menu item there and send a command in any way
After all, it’s about my CH340G… Commands are not even sent to putty through it, there will be a new UART adapter in a few days (it seems PL2303TA). I started the board with the switch to the NAND position, and tried to log in to Boot (first with my adapter), the commands were not sent, and then I tried to connect again via Type to the laptop and a miracle happened. the native CH340G works correctly and commands come to the board, therefore the matter is with the adapter itself, which cannot send a command from the computer to the board. I wish I knew how to restore bl2 and other partitions without a third-party UART adapter. Or are there any commands (or methods) to restore the emc? (in the NAND position, everything works without the M2 expansion card, even the OpenWRT web interface opens… now I have a lot of questions)
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
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)
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
block 0x3400
That’s correct. FYI openwrt/package/boot/uboot-mediatek/patches/442-add-bpi-r3-mini.patch at efa71c532e4778433263626bfff1a40e48f6bdb4 · openwrt/openwrt · GitHub
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