From: Detlev Zundel <dzu@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] hello world application
Date: Sun, 31 Oct 2004 15:43:49 +0100 [thread overview]
Message-ID: <873bzvdk2i.fsf@deepthought.outer.space.org> (raw)
In-Reply-To: <20041031080457.27425.qmail@web12009.mail.yahoo.com> (Jhavk's message of "Sun, 31 Oct 2004 01:04:57 -0700 (PDT)")
Hi Jhavk,
> I want to make gzipped hello_world application and
> later execute it using bootm command.
>
> I figured that mkimage is the utility for making
> compressed STANDALONE image.
>
> But it needs an option mkimage -d <datafile>
>
> Now what is this datafile? Is it hello_world or
> hello_world.bin or hello_world.srec
> I tried all 3, but they give different sizes of
> gzipped image. So i am confused.
Right - the differences are:
hello_world - ELF file generated by compiler. You need an ELF loader
for this if you want to execute it (bootm does not contain ELF code).
This is usually used for cross debugging as the file to feed to the
debugger.
hello_world.srec - MotorolaS-Record file (ascii format) only used for
serial download as it can encode binary files in 7 bit. One can think
of this as kind of like BASE64 with some address meta information
added.
hello_world.bin - This is generated from the ELF file and actually
contains a memory dump without any meta information - so you have to
ensure that it is being loaded to the correct address. This is the
file you should use as the datafile. Be sure to provide the mkimage
tool with the correct load and entry points (although the entry point
can be overriden with the second argument of bootm for standalone
applications). Also be aware that the environment variable
"autostart" determines whether a standalone application started with
bootm really starts. This is a neat trick for "misusing" the
standalone application format to compress simple datafiles needed on
the target.
Having this in mind, the different sizes after compression should now
be obvious ;)
Cheers
Detlev
--
Deutsches Grundgesetz Artikel 14 Absatz 2:
Eigentum verpflichtet. Sein Gebrauch soll zugleich dem Wohle der
Allgemeinheit dienen.
next prev parent reply other threads:[~2004-10-31 14:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-31 8:04 [U-Boot-Users] hello world application Jhavk
2004-10-31 14:43 ` Detlev Zundel [this message]
2004-10-31 21:29 ` Wolfgang Denk
2004-10-31 21:25 ` Wolfgang Denk
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=873bzvdk2i.fsf@deepthought.outer.space.org \
--to=dzu@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