I have a problem. My system is an embedded Linux plaform. I am connecting to my board using serial port and I can access U-Boot.
I need to extract the complete firmware residing in flash through the console or through Ethernet. It looks like downloading is easy using TFTP or serial (Kermit, etc), but uploading it to the host PC for backup isn't obvious.
Does anyone know how this can be done?
Assuming that you are using NAND flash and U-Boot 2013.07 or similar:
nand info
command to see the NAND device names, sizes and erase block sizes for each NAND device that U-Boot detectsnand read
command to read from the NAND into RAM. How much NAND to read into RAM depends on the RAM sizemmc write
commandstart usb
to scan the USB for a mass storage or "ethernet" (i.e. OTG) devicestart usb
detects a mass storage device, you can write from RAM to the mass storage device using the usb write
commandmd
command to hex dump arbitrary size block of memory to the serial line, then use some program to translate the ASCII hex back into binaryIf you're willing to rebuild uboot and reflash your board, you can enable the tftpput
command with the CONFIG_CMD_TFTPPUT
option. (Assuming a recent version of uboot.)
Assuming not, within the embedded Linux, you can access your flash through /dev/mtd*
(cat /proc/mtd
to see the partitions). You can use dd
to copy a partition to a ramdisk file, then use cat
to combine the files into a single image, and the use ftpput
to send it to your host. (This assumes that your embedded busybox has been built with these commands.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With