BPI-R4 install nand/emmc from serial console [solved]

Hello guys, How to install the snapshot openwrt image from serial console using the usb disk into the nand or emmc? I’m not sure if that’s are the correct files :confused:

4

I cannot list partition, the gpt seems to be missing?

Uboot installed successfully: I’ve downloaded the files bpi-r4_spim-nand_bl2.img bpi-r4_spim-nand_fip.bin from: Release Build for branch 2024-07-bpi (2024.07) · frank-w/u-boot · GitHub

usb start
fatload usb 0:1 $loadaddr bpi-r4_spim-nand_bl2.img
mtd write spi-nand0 $loadaddr 0x0 0x100000
fatload usb 0:1 $loadaddr bpi-r4_spim-nand_fip.bin
mtd write spi-nand0 $loadaddr 0x580000 0x200000 

If you want to use openwrt, the Re ght way is to use image for sdcard => nand => emmc

Sdcard uboot has install function for nand in its menu and so on. My uboot is different to openwrt.

I’ve stuck with emmc partitions issue at the moment


EXT_CSD[179], PARTITION_CONFIG:
BOOT_ACK: 0x0
BOOT_PARTITION_ENABLE: 0x0
PARTITION_ACCESS: 0x0
emmc available
bootconf=#conf-emmc
fit=bpi-r4.itb
** No partition table - mmc 0 **
Couldn't find partition mmc 0:5
Can't set block device

Have you flashed emmc gpt partition layout? Not sure how openwrt it does…but basicly you can copy first 1m of sdcard (writing to image on usb) to emmc and then replace the fip (bl2 is in boot0 so skipped on emc user part)

To load any file from partition (5) it needs to have filesystem on it of course…this cannot be done from uboot,so i booted from spimnand a kernel+initrd to do the emmc steps except bl2

Info for others how to install the openwrt uboot properly into nand:

usb start
fatload usb 0:1 $loadaddr bpi-r4_spim-nand_bl2.img
mtd write spi-nand0 $loadaddr 0x0 0x100000
fatload usb 0:1 $loadaddr openwrt-mediatek-filogic-bananapi_bpi-r4-snand-bl31-uboot.fip
mtd write spi-nand0 $loadaddr 0x580000 0x200000

I still cannot understand why, after executing a reset of all settings to factory defaults, I have an issue with the UBI device?

SOLVED: The SD card is the key and the first point to start writing to other devices