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,
Quoted 9 lines · In message <[email protected]> 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
Signature · 4 lines
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 Swap read error. You lose your mind.
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
Quoted 25 lines · Wolfgang Denk
Dear Valentin Ecker,
Quoted 9 lines · In message <[email protected]> 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
Signature · 4 lines
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 Swap read error. You lose your mind.
Dear Valentin Ecker,
Quoted 1 line · In message <[email protected]> you wrote:
so there is no solution without messing in the code?
Link your application with U-Boot?
Quoted 3 lines
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
Signature · 5 lines
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
I think there's a world market for about five computers.
-- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943ok, 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
Quoted 29 lines · Wolfgang Denk
Dear Valentin Ecker,
Quoted 1 line · In message <[email protected]> you wrote:
so there is no solution without messing in the code?
Link your application with U-Boot?
Quoted 5 lines
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
Signature · 5 lines
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 I think there's a world market for about five computers. -- attr. Thomas J. Watson (Chairman of the Board, IBM), 1943
Dear Valentin Ecker,
Quoted 6 lines · In message <[email protected]> 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 callrun_command()in my standalone application. This function is not declared inexports.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
Signature · 4 lines
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 matrimony, to hesitate is sometimes to be saved." - Butler