[U-Boot] How to handle binary data file in u-boot

Reinhard Meyer reinhard.meyer at emk-elektronik.de
Thu Jul 29 09:45:23 CEST 2010


Lv Terry-R65388 wrote:
> Hi Experts,
>  
>     We have implemented an display utilty in u-boot and this utlity
> needs a waveform file.
>  
>     We are planning to release this display utility, but we don't know
> how to do with the waveform file. The file is as large as 800KB.
>   
Files that large are usually not embedded within the u-boot image.
>  
>     Now we just put the waveform file on mmc and read it out in boot.
>   
It depends where your u-boot image is. If its in NOR flash, for example, 
one would add a partition of suitable size to put the data in.
If the external location can be flexibly defined (filename for SD/MMC or 
location for others) it is great.
>  
>     Is there any better way to deliver this binary waveform file as part
> of the bootloader?
>   
As part of the bootloader (image) you'd need to convert the bytestream 
into a lengthy initialized array and link it into the image. I'm not 
sure the toolchain can handle that and I am sure that method is not 
welcome in the repository (800kb binary --> several MB c-source)...
>     How is this case  typically handled?
>   
Have a look at the code to handle FPGA images, you can probably even 
reuse or share code with there.

Reinhard


More information about the U-Boot mailing list