* [U-Boot] load file to memory in standalone program
@ 2013-05-18 15:14 Scott A
2013-05-18 23:35 ` Henrik Nordström
2013-05-21 12:29 ` Wolfgang Denk
0 siblings, 2 replies; 4+ messages in thread
From: Scott A @ 2013-05-18 15:14 UTC (permalink / raw)
To: u-boot
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.
Note: i tried do_fat_fsload function call however compiling threw undefined reference. If this is the correct method maybe i am just using it wrong.
Thanks Scott
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] load file to memory in standalone program
2013-05-18 15:14 [U-Boot] load file to memory in standalone program Scott A
@ 2013-05-18 23:35 ` Henrik Nordström
2013-05-21 12:33 ` Wolfgang Denk
2013-05-21 12:29 ` Wolfgang Denk
1 sibling, 1 reply; 4+ messages in thread
From: Henrik Nordström @ 2013-05-18 23:35 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] load file to memory in standalone program
2013-05-18 23:35 ` Henrik Nordström
@ 2013-05-21 12:33 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2013-05-21 12:33 UTC (permalink / raw)
To: u-boot
Dear Henrik,
In message <1368920138.23379.14.camel@localhost> you wrote:
>
> 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.
Technically you may be right. The reason why we intentionally
maintain a very lean interface to standalone programs is that we allow
such applications to be distributed even under non-GPL licenses.
If you need more fancy features, just add your code to U-Boot and
distribute it under GPL.
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
In a business, marketroids, salespukes, and lawyers have different
goals from those who actually do work and produce something. Usually,
is is the former who triumph over the latter, due to the simple rule
that those who print the money make the rules.
-- Tom Christiansen in <5jdcls$b04$2@csnews.cs.colorado.edu>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] load file to memory in standalone program
2013-05-18 15:14 [U-Boot] load file to memory in standalone program Scott A
2013-05-18 23:35 ` Henrik Nordström
@ 2013-05-21 12:29 ` Wolfgang Denk
1 sibling, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2013-05-21 12:29 UTC (permalink / raw)
To: u-boot
Dear Scott A,
In message <COL126-W15B9EDAC5841A2C364A531B6AD0@phx.gbl> you wrote:
>
> 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 somethin
> g 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 e
> xample.
> Note: i tried do_fat_fsload function call however compiling threw undefined
> reference. If this is the correct method maybe i am just using it wrong.
No, such functionality is not available in standalone programs.
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
A failure will not appear until a unit has passed final inspection.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-05-21 12:33 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-18 15:14 [U-Boot] load file to memory in standalone program Scott A
2013-05-18 23:35 ` Henrik Nordström
2013-05-21 12:33 ` Wolfgang Denk
2013-05-21 12:29 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox