June 2017
Intermediate to advanced
478 pages
13h 14m
English
U-Boot has drivers for NOR CFI chips in drivers/mtd and has the commands erase to erase memory and cp.b to copy data byte by byte, programming the flash cells. Suppose that you have NOR flash memory mapped from 0x40000000 to 0x48000000, of which 4 MiB starting at 0x40040000 is a kernel image, then you would load a new kernel into flash using these U-Boot commands:
U-Boot# tftpboot 100000 uImageU-Boot# erase 40040000 403fffffU-Boot# cp.b 100000 40040000 $(filesize)
The variable filesize in the preceding example is set by the tftpboot command to the size of the file just downloaded.
Read now
Unlock full access