[U-Boot] standalone apps and their use of exported functions

Hey there!
I am trying to customize/extend uboot with a standalone application which is automatically loaded before booting the kernel. Is there any way i can safely access uboot functions besides the exported(include/exports.h) ones? e.g. functions that can be executed from the command line - like nand copy, saveenv,...
...Im really doing hard on finding some documentation about this subject.
thanks, Valentin

Dear Valentin Ecker,
In message 50321C2D-42AF-4823-A9BA-0A37B6DC9911@gmail.com you wrote:
I am trying to customize/extend uboot with a standalone application which is automatically loaded before booting the kernel. Is there any way i can safely access uboot functions besides the exported(include/exports.h) ones? e.g. functions that can be executed from the command line - like nand copy, saveenv,...
...Im really doing hard on finding some documentation about this subject.
I recommend having a look in the doc/ directory, for example there is a file doc/README.standalone which you might find interesting.
Best regards,
Wolfgang Denk

so there is no solution without messing in the code?
...because this is what i want to avoid as far as possible.
are there any intentions in explicitly NOT changing these 3 files ([_] exports.{h|c}) in the future? So that a patch will still be working in future versions?
thx for the fast answer! Valentin
On 05.11.2009, at 11:41, Wolfgang Denk wrote:
Dear Valentin Ecker,
In message 50321C2D-42AF-4823-A9BA-0A37B6DC9911@gmail.com you wrote:
I am trying to customize/extend uboot with a standalone application which is automatically loaded before booting the kernel. Is there any way i can safely access uboot functions besides the exported(include/exports.h) ones? e.g. functions that can be executed from the command line - like nand copy, saveenv,...
...Im really doing hard on finding some documentation about this subject.
I recommend having a look in the doc/ directory, for example there is a file doc/README.standalone which you might find interesting.
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@denx.de Swap read error. You lose your mind.

Dear Valentin Ecker,
In message 6806058A-4EA5-44F9-80D9-410C42869504@gmail.com you wrote:
so there is no solution without messing in the code?
Link your application with U-Boot?
are there any intentions in explicitly NOT changing these 3 files ([_] exports.{h|c}) in the future? So that a patch will still be working in future versions?
This question makes no sense to me. A patch is only needed until your code is in mainline, and then it should be working in future versions automatically. And the standalone application is separated by a well-defined interface, which should also be upward compatible, to that would keep working, too.
Best regards,
Wolfgang Denk

ok, maybe i get something wrong, but the README.standalone section 5 it says that i have to extend the jump table with the functions i want to export. e.g i want to call run_command() in my standalone application. This function is not declared in exports.h. So do i have to add it to the table then or not? Intuitively i would simply link it.
Thanks for your time, Valentin
On 05.11.2009, at 14:52, Wolfgang Denk wrote:
Dear Valentin Ecker,
In message 6806058A-4EA5-44F9-80D9-410C42869504@gmail.com you wrote:
so there is no solution without messing in the code?
Link your application with U-Boot?
are there any intentions in explicitly NOT changing these 3 files ([_] exports.{h|c}) in the future? So that a patch will still be working in future versions?
This question makes no sense to me. A patch is only needed until your code is in mainline, and then it should be working in future versions automatically. And the standalone application is separated by a well-defined interface, which should also be upward compatible, to that would keep working, too.
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@denx.de I think there's a world market for about five computers. -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943

Dear Valentin Ecker,
In message 5A3D79E5-E8FE-475A-898F-75B44AFE4BE5@gmail.com you wrote:
ok, maybe i get something wrong, but the README.standalone section 5 it says that i have to extend the jump table with the functions i want to export. e.g i want to call run_command() in my standalone application. This function is not declared in exports.h. So do i have to add it to the table then or not? Intuitively i would simply link it.
If you link against U-Boot, you don't need a standalone application at all, as then you lose all the specific properties of a SA app: your code is no longer independent of the U-Boot image running on the board, and your code must be released under GPL.
So just add it as part of the U-Boot image.
Best regards,
Wolfgang Denk
participants (2)
-
Valentin Ecker
-
Wolfgang Denk