public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] Loading FPGA from an mkimage created image?
@ 2004-11-22 11:28 Steven Scholz
  2004-11-22 16:48 ` Wolfgang Denk
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Scholz @ 2004-11-22 11:28 UTC (permalink / raw)
  To: u-boot

Hi there,

I know that

	fpga load [device number] [image address] [image size]

can be used to init an FPGA.
Now I want to compress and wrap the FPGA data with mkimage.

Is there a way to pass the address of an Image to "fpga load".
Or do I have to umcompress it first using "bootm" or something and then pass the 
address and size to "fpga load"?

Thanks!

-- 
Steven Scholz

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2004-11-22 11:28 [U-Boot-Users] Loading FPGA from an mkimage created image? Steven Scholz
@ 2004-11-22 16:48 ` Wolfgang Denk
  2004-11-22 17:51   ` Steven Scholz
                     ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-11-22 16:48 UTC (permalink / raw)
  To: u-boot

In message <41A1CD69.6000708@imc-berlin.de> you wrote:
> 
> I know that
> 
> 	fpga load [device number] [image address] [image size]
> 
> can be used to init an FPGA.
> Now I want to compress and wrap the FPGA data with mkimage.
> 
> Is there a way to pass the address of an Image to "fpga load".

Umm... that's the third parameter in the usage message above:  "image
address" - isn't it?

> Or do I have to umcompress it first using "bootm" or something and then pass the 
> address and size to "fpga load"?

Either this, or extend the fpga command to understand compressed
images.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The perversity of nature is nowhere better demonstrated by  the  fact
that,  when  exposed to the same atmosphere, bread becomes hard while
crackers become soft.

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2004-11-22 16:48 ` Wolfgang Denk
@ 2004-11-22 17:51   ` Steven Scholz
  2004-11-22 18:55     ` Wolfgang Denk
  2005-06-10  9:22   ` Steven Scholz
  2005-06-10 17:32   ` Steven Scholz
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Scholz @ 2004-11-22 17:51 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

> In message <41A1CD69.6000708@imc-berlin.de> you wrote:
> 
>>I know that
>>
>>	fpga load [device number] [image address] [image size]
>>
>>can be used to init an FPGA.
>>Now I want to compress and wrap the FPGA data with mkimage.
>>
>>Is there a way to pass the address of an Image to "fpga load".
> 
> 
> Umm... that's the third parameter in the usage message above:  "image
> address" - isn't it?

No. IIRC then "image" in "image address" means (raw) data as the FPGA would 
understand it.

>>Or do I have to umcompress it first using "bootm" or something and then pass the 
>>address and size to "fpga load"?
> 
> Either this, or extend the fpga command to understand compressed
> images.
So checking for valid mkimage header? And then uncompress to $loadaddr?
And maybe even introduce a new image type "FPGA data" ?

-- 
Steven Scholz

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2004-11-22 17:51   ` Steven Scholz
@ 2004-11-22 18:55     ` Wolfgang Denk
  0 siblings, 0 replies; 8+ messages in thread
From: Wolfgang Denk @ 2004-11-22 18:55 UTC (permalink / raw)
  To: u-boot

In message <41A2272D.7050403@imc-berlin.de> you wrote:
> 
> > Umm... that's the third parameter in the usage message above:  "image
> > address" - isn't it?
> 
> No. IIRC then "image" in "image address" means (raw) data as the FPGA would 
> understand it.

I see. Sorry, I never used this command myself yet.

> >>Or do I have to umcompress it first using "bootm" or something and then pass the 
> >>address and size to "fpga load"?
> > 
> > Either this, or extend the fpga command to understand compressed
> > images.
> So checking for valid mkimage header? And then uncompress to $loadaddr?

Yes - if it's compressed; otherwise just memcpy().

> And maybe even introduce a new image type "FPGA data" ?

No. This is what applies (from "include/image.h"):

 * "Firmware Images" are binary images containing firmware (like
 *      U-Boot or FPGA images) which usually will be programmed to
 *      flash memory.


Viele Gr??e,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Es sind ?berhaupt nur die Dummk?pfe, die sich den Befehlen der  M?ch-
tigen  widersetzen.  Um  sie  zu ruinieren ist es genug, ihre Befehle
treu zu erf?llen.                  - Peter Hacks: "Die sch?ne Helena"

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2004-11-22 16:48 ` Wolfgang Denk
  2004-11-22 17:51   ` Steven Scholz
@ 2005-06-10  9:22   ` Steven Scholz
  2005-06-10 10:26     ` Wolfgang Denk
  2005-06-10 17:32   ` Steven Scholz
  2 siblings, 1 reply; 8+ messages in thread
From: Steven Scholz @ 2005-06-10  9:22 UTC (permalink / raw)
  To: u-boot

Dear Wolfgang,

I pick up this old thread.

>>I know that
>>
>>	fpga load [device number] [image address] [image size]
>>
>>can be used to init an FPGA.
>>Now I want to compress and wrap the FPGA data with mkimage.
>> ...
>>Is there a way to pass the address of an Image to "fpga load".
>> ...
>>Or do I have to umcompress it first using "bootm" or something and then pass the 
>>address and size to "fpga load"?
> 
> Either this, or extend the fpga command to understand compressed
> images.

I see that code for checking and uncompressing images is duplicated many 
times across the U-Boot sources.
Are there any plans to provide a generic helper function for this task?

Thanks.

--
Steven

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2005-06-10  9:22   ` Steven Scholz
@ 2005-06-10 10:26     ` Wolfgang Denk
  2005-06-10 15:06       ` Steven Scholz
  0 siblings, 1 reply; 8+ messages in thread
From: Wolfgang Denk @ 2005-06-10 10:26 UTC (permalink / raw)
  To: u-boot

Dear Steven,

in message <42A95BF3.5050607@imc-berlin.de> you wrote:
> 
> I pick up this old thread.

Thanks for it.

> I see that code for checking and uncompressing images is duplicated many 
> times across the U-Boot sources.

Yes :-(

> Are there any plans to provide a generic helper function for this task?

No. Cleanup and patches welcome.

Best regards,

Wolfgang Denk

-- 
Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"The bad reputation UNIX has gotten is totally undeserved, laid on by
people who don't understand, who have not gotten in there  and  tried
anything."          -- Jim Joyce, owner of Jim Joyce's UNIX Bookstore

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2005-06-10 10:26     ` Wolfgang Denk
@ 2005-06-10 15:06       ` Steven Scholz
  0 siblings, 0 replies; 8+ messages in thread
From: Steven Scholz @ 2005-06-10 15:06 UTC (permalink / raw)
  To: u-boot

Hi,

>>I see that code for checking and uncompressing images is duplicated many 
>>times across the U-Boot sources.
> 
> Yes :-(
> 
> 
>>Are there any plans to provide a generic helper function for this task?
> 
> 
> No. Cleanup and patches welcome.

Shell we split out the image code from cmd_bootm.c into cmd_image.c and image.c?

-- 
Steven

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

* [U-Boot-Users] Loading FPGA from an mkimage created image?
  2004-11-22 16:48 ` Wolfgang Denk
  2004-11-22 17:51   ` Steven Scholz
  2005-06-10  9:22   ` Steven Scholz
@ 2005-06-10 17:32   ` Steven Scholz
  2 siblings, 0 replies; 8+ messages in thread
From: Steven Scholz @ 2005-06-10 17:32 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk wrote:

> In message <41A1CD69.6000708@imc-berlin.de> you wrote:
> 
>>I know that
>>
>>	fpga load [device number] [image address] [image size]
>>
>>can be used to init an FPGA.
>>Now I want to compress and wrap the FPGA data with mkimage.
>>
>>Is there a way to pass the address of an Image to "fpga load".
> 
> ... extend the fpga command to understand compressed
> images.

Please consider the attached patch. I know it's duplicating some code but 
that's all I can do for now.

multiIO_2> fpga load 0 $loadaddr
    Image Name:   multiIO TEST FPGA
    Created:      2005-06-10  14:01:40 UTC
    Image Type:   ARM U-Boot Standalone Program (uncompressed)
    Data Size:    42431 Bytes = 41.4 kB
    Load Address: 20008000
    Entry Point:  deadbeef
    Verifying Checksum ... OK
    Loading Firmware/Standalone Image ... OK
Loading FPGA Device 0........................................... Done.

----

* Patch by Steven Scholz, 10 Jun 2005:
    Adding new configuration option CONFIG_FPGA_IMAGE
    This allows to pass U-Boot images of the types "FIRMWARE" or
    "STANDALONE" to the fpga command

Thanks.

--
Steven

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: u-boot-fpga-mkimage.patch
Url: http://lists.denx.de/pipermail/u-boot/attachments/20050610/3fda1cd9/attachment.txt 

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

end of thread, other threads:[~2005-06-10 17:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-22 11:28 [U-Boot-Users] Loading FPGA from an mkimage created image? Steven Scholz
2004-11-22 16:48 ` Wolfgang Denk
2004-11-22 17:51   ` Steven Scholz
2004-11-22 18:55     ` Wolfgang Denk
2005-06-10  9:22   ` Steven Scholz
2005-06-10 10:26     ` Wolfgang Denk
2005-06-10 15:06       ` Steven Scholz
2005-06-10 17:32   ` Steven Scholz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox