
In message 9771147.post@talk.nabble.com you wrote:
I am trying to write a stand alone application, which is supposed to be a board diagnostics for manufacturing. The way it supposes to work is as follows: U_boot could either download the diagnostics manually under the U_boot prompt, or be calling up do_tftp() directly if it is to be done automatically. Results generated from the diagnostics are to be recorded in the RAM, whose contents shall later be uploaded as a log file to an external server via tftp. After reading the examples provided in the example
I recommend to use the existing log device; note that it is compatible with Linux's syslog mechanism.
(1) In my understanding, the stand alone application (the board diagnostic for manufacturing) is supposed to be compiled as a separately entity in the
Yes.
U-boot path and then be placed in an external server, waiting to be downloaded to the RAM on board; when either go <address> or do_go(address)
You can also store it in flash memory, or on some storage device, of course.
is executed, control get passed to the stand alone application, how could the stand alone application be able to make calls to functions that are exported (those appeared in both exports.c and export.h), without some kind of "linking"? Unless go <address> or do_go(address) perform some sort of
This is documented in the doc/README.standalone file; no linking is done.
"linking" or "peudo linking" action, this doesn't sound possible. Could someone explain to me how this works?
The keyword is: jump table.
My expectation of how this could work is: on execution of the go <address>
Why don't you simply read the documentation instead of speculating?
command or do_go (address), address of the jump table is to be loaded into a register, and it is the responsibility of the application to save the value of this register before anything else, in such a way to allow the application to call up functions that it elects by picking up the correct addresses of these functions via indexing. However, after reading the examples provided in U-boot, I have not seen any motion of saving the value of the register. However, vwhich register U-boot chooses to use would be processor dependent. This is just my two cents.
You should RTFM.
(2) Is uploading currently being supported in U-boot's tftp implementation?
No.
Best regards,
Wolfgang Denk