[U-Boot-Users] Best place to implement custom "bootdelay" functionnality
Laurent Pinchart
laurent.pinchart at tbox.biz
Tue Jul 18 11:57:09 CEST 2006
On Tuesday 18 July 2006 11:44, Wolfgang Denk wrote:
> In message <200607181054.37865.laurent.pinchart at tbox.biz> you wrote:
> > common/cmd_fpga.c and common/fpga.c are used to configure the FPGA from
> > an in-memory configuration bitstream. What I'm looking for is a function
> > to load the bitstream from a CramFS partition to memory, much like the
> > fsload command does. Something similar to fpga_load() would be useful,
> > some kind of fs_load(buffer, length, partition, filename).
>
> Good old Unix tradition is to provide small and simple tools which
> perform one task, doing this very well, and which can easily be
> combined. So in the first step you will load the image file from
> cramfs into RAM, and in the second step you use the FPGA command to
> boot your FPGA.
Agreed.
> What exactly is your problem?
My problem is to load the image file from cramfs into RAM from a C function.
The fsload command can be used from the command line (or through bootcmd,
preboot, ...), but I haven't been able to find a simple API to load the image
file from cramfs into RAM. cramfs_load() takes a struct part_info pointer
which I don't know how to provide, and I haven't found a way to get the size
of a file to allocate the buffer using malloc.
Best regards,
Laurent Pinchart
More information about the U-Boot
mailing list