[U-Boot-Users] Adding functionality to u-boot...

Jakob Viketoft linux at viketoft.se
Wed May 28 12:58:39 CEST 2008


Hello!

I'm using u-boot 1.1.6 on a custom PCB of ours when we are prototyping
some hardware. I would like to transfer files over the ethernet to and
from the card using tftp and it seemed natural trying to use the
built-in u-boot functionality for this.

I have written a tftpwrite function which works well from command line
in much the same way as tftpboot (but in the other direction of course).
Now, I would like to call this function from my stand-alone program to
transfer files to and from memory regions which I specify.

To make things as easy as possible, I have created a TftpPut and TftpGet
function which takes arguments as filename, load address and size and
then set the "usual" variables used by existing function TftpStart and
newly written TftpWrite.

I have added TftpPut and TftpGet to _exports.h and I can compile and
link my stand-alone program to this customized version of u-boot.
However, the function doesn't seem to actually be called. As far as I
can see, the calls to TftpPut and TftpGet look much the same as the
u-boot built-in printf call (which works perfectly). If I "go" to the
address of the function TftpPut or TftpGet directly from the u-boot
prompt, I can see that it works as expected, but why can't I call it
from my stand-alone program?

Are there any more steps I have to do to make the new functions play
nicely with the rest of u-boot, or can anyone think of any other thing
which could be causing the problem? I don't get any errors, it just seem
that the functions are either never actually called or disregarded
somehow when supposed to be taken care of by u-boot...

Best regards,

	/Jakob




More information about the U-Boot mailing list