From mboxrd@z Thu Jan 1 00:00:00 1970 From: Josh Wu Date: Sat, 27 Apr 2013 17:38:23 +0800 Subject: [U-Boot] [U-boot] mmc write|read howto In-Reply-To: References: <517B6F3E.8010102@atmel.com> Message-ID: <517B9C8F.1060207@atmel.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 4/27/2013 5:26 PM, Jagan Teki wrote: > Hi Josh, > > On Sat, Apr 27, 2013 at 11:55 AM, Josh Wu wrote: >> Hi, Jagan >> >> >> On 4/27/2013 4:51 AM, Jagan Teki wrote: >>> Hi All, >>> >>> I need some help regarding mmc write and mmc read commands usage. >>> >>> I am using a 4GB SD/MMC plus and socked eMMC cards, usually I am >>> formatting these cards on my host pc with >>> fat partition and copy the images into card. while in the u-boot level >>> I am reading the images from card and copy it onto mem addr >>> like fatload mmc 0 0x1000 uImage. >>> >>> Can we write the images onto these cards in u-boot level?, using mmc >>> write. >>> same way can we read back using mmc read? if so how to do that. >> >> yes, define the CONFIG_FAT_WRITE macro in your board config file. >> re-build your u-boot. then you will find "fatwrite" command. >> >> U-Boot> fatwrite >> fatwrite - write file into a dos filesystem >> >> Usage: >> fatwrite >> - write file 'filename' from the address 'addr' in RAM >> to 'dev' on 'interface' >> >> so you can use: >> fatwrite mmc 0 0x20000000 file 0x4000 > Thanks for your information. > > I will try the fatwrite, and this must require to have the card should > formatted as FAT on host, is it? yes. Also U-Boot can support EXT2, EXT4, UBI read. And EXT4 write (CONFIG_CMD_EXT4_WRITE). > Any possibility to do the formation on u-boot itself.? according to my understanding, no. Best Regards, Josh Wu > > Thanks, > Jagan. > >> Best Regards, >> Josh Wu >> >>> Request for help. >>> >>> Thanks, >>> Jagan. >>> _______________________________________________ >>> U-Boot mailing list >>> U-Boot at lists.denx.de >>> http://lists.denx.de/mailman/listinfo/u-boot >>