From: Josh Wu <josh.wu@atmel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [U-boot] mmc write|read howto
Date: Sat, 27 Apr 2013 14:25:02 +0800 [thread overview]
Message-ID: <517B6F3E.8010102@atmel.com> (raw)
In-Reply-To: <CAD6G_RROAaPKRk2PGZMSLdMT0DDsEbwN2DvELG8GX-kUp0GhAg@mail.gmail.com>
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 <interface> <dev[:part]> <addr> <filename> <bytes>
- write file 'filename' from the address 'addr' in RAM
to 'dev' on 'interface'
so you can use:
fatwrite mmc 0 0x20000000 file 0x4000
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
next prev parent reply other threads:[~2013-04-27 6:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-26 20:51 [U-Boot] [U-boot] mmc write|read howto Jagan Teki
2013-04-27 6:25 ` Josh Wu [this message]
2013-04-27 9:26 ` Jagan Teki
2013-04-27 9:38 ` Josh Wu
2013-04-27 10:52 ` Josh Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=517B6F3E.8010102@atmel.com \
--to=josh.wu@atmel.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.