embedded-linuxu-boottftp

Is it possible to log the output of a uboot command into a file from u-boot prompt?


I am working with an embedded board which supports u-boot.

I am trying to write and read the emmc device connected to the board, After read, i need to have a look at the contents and compare it with the data that I have written to it.

Is there a way I can log the output of the a u-boot command, when I read a block from eMMC and store it in an address and try to view the contents of it using:

mmc read 0x10700000 133120 1

mm.l 0x10700000

into a file and then can store the file in an emmc partition or a tftp server ?

Thank you for your time,

Nishad


Solution

  • The save command can be used to write memory to a file.

    save file to a filesystem
    
    save <interface> <dev[:part]> <addr> <filename> bytes [pos]
        - Save binary file 'filename' to partition 'part' on device
          type 'interface' instance 'dev' from addr 'addr' in memory.
          'bytes' gives the size to save in bytes and is mandatory.
          'pos' gives the file byte position to start writing to.
          If 'pos' is 0 or omitted, the file is written from the start.
    

    Of cause this requires the file system to be writable. For FAT this implies building with CONFIG_FAT_WRITE=y.