From mboxrd@z Thu Jan 1 00:00:00 1970 From: Detlev Zundel Date: Wed, 08 Jun 2011 15:43:36 +0200 Subject: [U-Boot] Download the u-boot from flash back to PC In-Reply-To: (Rishi Dhupar's message of "Wed, 8 Jun 2011 09:25:42 -0400") References: Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Rishi, > I have a board which has a version of u-boot on it that I would like > to save before overwriting. I did not flash this version so I do not > have the source code for it. > > I am trying to figure out is there away to essentially do a 'tftp get' > of the u-boot.bin that was originally written to flash. I do not see > any methods to "read" data from U-boot back to the PC. Is there any > method to do this? The only thing that I know of is CONFIG_CMD_SAVES which does a "save S record over serial line" (check common/cmd_load.c). It is likely that your binary U-Boot does noe have this feature though (it is not in config_cmd_default, so the board maintainer has to define it explicitely). When I needed to do this, I could either attach a BDI3000 which can do a tftp put (remember to create the file on the host first, otherwise it will fail silently!), or I used a linux kernel that was able to read U-Boot through the mtd interface. If you decide to implement a "tftpput" command, I for one would find this a very nice addition indeed ;) Cheers Detlev -- Question : If you were redesigning UNIX, what would you do differently? Ken Thompson: I'd spell creat with an e. -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-40 Fax: (+49)-8142-66989-80 Email: dzu at denx.de