All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] how to make mkimage command work?
@ 2012-05-17 23:12 apple pie
  2012-05-18 10:26 ` Andreas Bießmann
  2012-05-18 11:43 ` Wolfgang Denk
  0 siblings, 2 replies; 3+ messages in thread
From: apple pie @ 2012-05-17 23:12 UTC (permalink / raw)
  To: u-boot



Hi,
 
Please correct me if I am wrong. From what I understand, u-boot itself is relocated to RAM by calling 
the procedure: relocate_code at the end of the procedure: board_init_f . 
 
There is a need for me to load an executable to a static address (say, 0x82xx_xxxx) in RAM such that 
control could be passed to this executable from U-boot. How could this be accomplished, with the
limitation that:
 
the executeable is to be downloaded together with u-boot.bin, zImage, ramdisk and other images
that are to be be executed before u-boot etc, as a blob onto the eMMC?
 
 
Could u-boot be used to relocate the said executable to the address: 0x82xx_xxxx? u-boot does not
have the knowledge where this executable resides in eMMC. This also means that it would not be possible
to use u-boot command: cp (memory copy) to do the relocation, as the command itself requires knowledge
of the source address.
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] how to make mkimage command work?
  2012-05-17 23:12 [U-Boot] how to make mkimage command work? apple pie
@ 2012-05-18 10:26 ` Andreas Bießmann
  2012-05-18 11:43 ` Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: Andreas Bießmann @ 2012-05-18 10:26 UTC (permalink / raw)
  To: u-boot

Dear apple pie,

On 18.05.2012 01:12, apple pie wrote:

<snip>

> From a u-boot user group, I have learned that by using the command: "mkimage" it would be able to package a raw
> image into a blob understood by u-boot. I have discovered a few "mkimage" files, such as mkimage.o, mkimage, other
> than mkimage.c, mkimage.h and mkimage.l. But, I soon found out that I could not execute the command: mkimage.
> What should I do in order to execute the command? There isn't a file called mkimage.bin generated!!

mkimage is a HOST tool running on your build machine. You may build it
from u-boot source by calling something like:

---8<---
# cd $UBOOT_SRC
# HOSTCC=gcc make tools
# ./tools/mkimage
--->8---

The tool is often required, therefore some distributions provide it
(debian: u-boot-tools: /usr/bin/mkimage). But this may not include some
newer features.

To understand mkimage, the binary format of the header a.s.o please read
$UBOOT_SRC/README and/or the source.

best regards

Andreas Bie?mann

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] how to make mkimage command work?
  2012-05-17 23:12 [U-Boot] how to make mkimage command work? apple pie
  2012-05-18 10:26 ` Andreas Bießmann
@ 2012-05-18 11:43 ` Wolfgang Denk
  1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2012-05-18 11:43 UTC (permalink / raw)
  To: u-boot

Dear apple pie,

In message <SNT139-W44162AFF85311A54D1D4AE3190@phx.gbl> you wrote:
> 
> 
> Please correct me if I am wrong. From what I understand, u-boot itself is relocated to RAM by calling 
> the procedure: relocate_code at the end of the procedure: board_init_f . 

Right.

> There is a need for me to load an executable to a static address (say, 0x82xx_xxxx) in RAM such that 
> control could be passed to this executable from U-boot. How could this be accomplished, with the
> limitation that:

Just tell the linker that this is your load address when liniking your
binary.

> Could u-boot be used to relocate the said executable to the address: 0x82xx_xxxx? u-boot does not

No, U-Boot cannot do this.

> From a u-boot user group, I have learned that by using the command: "mkimage" it would be able to package a raw
> image into a blob understood by u-boot. I have discovered a few "mkimage" files, such as mkimage.o, mkimage, other
> than mkimage.c, mkimage.h and mkimage.l. But, I soon found out that I could not execute the command: mkimage.

Did you ever try to read the U-Boot manual? mkimage even has it's own
man page entry in doc/

> What should I do in order to execute the command? There isn't a file called mkimage.bin generated!!

Unix commands normally don't have any such ".bin" suffixes.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Never call a man a fool.  Borrow from him.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-18 11:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-17 23:12 [U-Boot] how to make mkimage command work? apple pie
2012-05-18 10:26 ` Andreas Bießmann
2012-05-18 11:43 ` Wolfgang Denk

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.