[Solved] Quick question (breed stuff)

Just a quick question..

flash [bank ] write addr src size

anyone no what this means src is it where the firmware filename goes.

Thanks inadvance

You need to ask this question to the creators of Breed (that's where this seems to come from).

OK tmomas.

worth a try.... if only i had a bootloader that opened into openwrt shell plus i am not brainy enough to build one. Thanks Anyway.

Give link, where you've met it.


Not sure if I am aloud to link to breed. So don't want to be banned

From common considerations: https://docs.espressif.com/projects/esp-idf/en/release-v3.2/api-reference/storage/spi_flash.html

esp_err_t spi_flash_write (size_t dest_addr , const void * src , size_t size )

Write data to Flash.


For fastest write performance, write a 4 byte aligned size at a 4 byte aligned offset in flash from a source buffer in DRAM. Varying any of these parameters will still work, but will be slower due to buffering.


Writing more than 8KB at a time will be split into multiple write operations to avoid disrupting other tasks in the system.




  • dest_addr : Destination address in Flash.
  • src : Pointer to the source buffer.
  • size : Length of data, in bytes.

src would be an address in RAM. You need to load the data to be flashed into RAM first. At least for this command breed looks like it works almost identically to u-boot.

Rather than writing to flash directly it is safer to TFTP and boot an initramfs build of OpenWrt for your model, which will be the "OpenWrt shell" you were talking about. Then use the sysupgrade command to flash the sysupgrade build of OpenWrt permanently. The safety advantage is that as long as you use the correct build for your model, it will install OpenWrt only to the proper location in flash so as not to damage other vital data in the flash chip.

OK, and concerning Xiaomi router, how to write anything into NAND memory, running from 'external' SOIC-8 flash?

A big thanks to all for the useful information which will give me a starting block to safety flash thr chip using tftp.

Some very useful info in this thread.

Regards all

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

1 Like