[U-Boot] load file to memory in standalone program

Henrik Nordström henrik at henriknordstrom.net
Sun May 19 01:35:38 CEST 2013


lör 2013-05-18 klockan 15:14 +0000 skrev Scott A:
> Hi,I am attempting to read a set of files from the fat file system
> into a location in memory.This is easy using the command interface
> using something likefatload mmc 0:1 0x48000000 file.txt
> However i want to do this in a standalone program. Is there a function
> call available to do this in a standalone program.if so could someone
> give an example.

The standalone API do not include filesystem operations, only raw device
operations.

I think it would be a great addition to add generic filesystem
operations to the standalone API. The fs_read() and fs_write() functions
should be possible to export via the standalone API as-is, but should
probably be wrapped a little bit to select which filesystem/partition to
operate on, similar to do_load() but without the u-boot env magics or
variable arguments.

any specification of filesystem type in the API (if needed) should be
done in string form to ensure a long term stable API I think.

Regards
Henrik









More information about the U-Boot mailing list