From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Handling images(.jpg, .bmp etc) in u-boot
Date: Sun, 31 Mar 2013 12:38:04 +0200 [thread overview]
Message-ID: <20130331123804.5a8699f8@crub> (raw)
In-Reply-To: <1364722200272-151106.post@n7.nabble.com>
Hi,
On Sun, 31 Mar 2013 02:30:00 -0700 (PDT)
bhargavak <anur.bhargav@gmail.com> wrote:
> Hi
>
> Thank you for that heads up.
> In one of posts above a reference to the following code fragment is made, it
> uses a fatload command
>
> > For example, this is the whole "code" for a slide show demo I've been
> > using on a number of trade shows:
>
> > bootdelay=6
> > show_one=fatload mmc 0:2 40001000 slide-${i}.bmp;bmp d 40001000
> > slide_show=while mmc rescan; do for i in 1 2 3 4 5 6 7 8 ; do run
> > show_one ; sleep ${delay} ; done ; done
> > bootcmd=run slideshow
>
> Can you please explain the "show_one" and the "slide_show" commands ?
> And, do I just put this into board config ?
"show_one" and "slide_show" are environment variables containing
a sequence of U-Boot commands. These can be executed by "run show_one"
or "run slide_show".
When "show_one" is executed, U-Boot runs two commands:
fatload mmc 0:2 40001000 slide-${i}.bmp
and
bmp display 40001000
The first command loads a file (i.e. "slide-0.bmp") into
SDRAM memory at address 0x40001000. It loads the file from
the MMC/SD-Card which is connected to the first available
SD-Card controller. The file is loaded from the second
partition on the SD-Card which is a FAT partition (therefore
fatload command). The "${i}" in the file name is used
to be able to load images with different file names when
this command is executed in a loop.
The second command reads the image at address 0x40001000
in SDRAM, decodes the image data and copies it into the
frame buffer.
"slide_show" command is a loop which test for SD-Card
presence ("mmc rescan") and executes another inner loop
in which the "show_one" command is running 8 times
with index "i" counting from 1 to 8 (so that 8 different
images are loaded into SDRAM while each loop iteration).
After each load/display operation in the loop the execution
of the next loop iteration is delayed by the amount of
seconds specified in the "delay" environment variable.
Note that these loops will only work if U-Boot was built
with enabled CONFIG_SYS_HUSH_PARSER in the board configuration.
You normally won't put these commands into board config.
You have to setup the environment variables on the U-Boot
command line using "setenv" command and save them using
"saveenv" command.
HTH,
Anatolij
next prev parent reply other threads:[~2013-03-31 10:38 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-24 7:48 [U-Boot] Handling images(.jpg, .bmp etc) in u-boot bhargavak
2013-03-24 10:05 ` Wolfgang Denk
2013-03-24 11:26 ` bhargavak
2013-03-24 13:16 ` Wolfgang Denk
2013-03-30 17:47 ` bhargavak
2013-03-31 8:54 ` Anatolij Gustschin
2013-03-31 9:30 ` bhargavak
2013-03-31 10:38 ` Anatolij Gustschin [this message]
2013-03-31 11:54 ` bhargavak
2013-03-31 13:21 ` Anatolij Gustschin
2013-03-31 17:56 ` bhargavak
2013-04-06 10:33 ` Bhargav AK
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=20130331123804.5a8699f8@crub \
--to=agust@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox