[U-Boot] exporting the U-Boot functions to standalone application

Hi,
I wanted to make use of the uboot command functions like do_bdinfo and do_mmc.
when I used do_bdinfo(NULL, 0, 0,NULL);in application program after linking common/cmd_bdinfo.o in make file it worked.
but when I did the same for do_mmc i got a lot of linking errors.
So after looking arround in common/main.c what i did was i made use of cmd ="mmc rescan"; run_command(cmd,0); but no output at all.
I read the README.standalone but of no use could some one please let me know how should i go about it.
Thanks, Mohamed Haneef M.A

Dear Haneef Mohamed,
In message 1332421701.4976.YahooMailNeo@web193301.mail.sg3.yahoo.com you wrote:
I wanted to make use of the uboot command functions like do_bdinfo and do_mmc.
You cannot do this in standalone code.
If you want to access U-Boot features in access to the exported (intentionally very narrow) interface, then link your code with U-Boot. Standalone applications cannot do that.
I read the README.standalone but of no use could some one please let me know how should i go about it.
Link your code with the U-Boot image.
Best regards,
Wolfgang Denk

Dear wolfgang Denk,
How do we link with u-boot? i did not understand.
Thanks and Regards, Mohamed Haneef M.A
________________________________ From: Wolfgang Denk wd@denx.de To: Haneef Mohamed haneef_kernel@yahoo.in Cc: "u-boot@lists.denx.de" u-boot@lists.denx.de Sent: Thursday, 22 March 2012 7:06 PM Subject: Re: [U-Boot] exporting the U-Boot functions to standalone application
Dear Haneef Mohamed,
In message 1332421701.4976.YahooMailNeo@web193301.mail.sg3.yahoo.com you wrote:
I wanted to make use of the uboot command functions like do_bdinfo and do_mmc.
You cannot do this in standalone code.
If you want to access U-Boot features in access to the exported (intentionally very narrow) interface, then link your code with U-Boot. Standalone applications cannot do that.
I read the README.standalone but of no use could some one please let me know how should i go about it.
Link your code with the U-Boot image.
Best regards,
Wolfgang Denk

Dear Haneef Mohamed,
please stop top posting / full quoting. Read http://www.netmeister.org/news/learn2quote.html
In message 1332426646.25781.YahooMailNeo@web193302.mail.sg3.yahoo.com you wrote:
How do we link with u-boot? i did not understand.
Add your sources like any other command source file to the U-Boot tree, ad it to the respectiuve Makefile, and build and link it with the rest of the U-Boot code.
Best regards,
Wolfgang Denk
participants (2)
-
Haneef Mohamed
-
Wolfgang Denk