[U-Boot] adding new command in u-boot

Hi,
I am trying to create a new command that would be used to do custom tests like mm, md, mtest all at once by calling their do_** function.
So I tried to create a simple command initially to print some message and print bdinfo in the hush: I did the following
created a file in common/cmd_myprint.c the file looks like this #include <command.h> #include <common.h>
int do_myprint(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { printf("U-Boot Test"); do_bdinfo(NULL, 0, 0, NULL); return 0; }
U_BOOT_CMD( myprint, 1, 1, do_myprint, "print message", "" );
------------------------------
then i added this in makefile as COBJS-y += cmd_myprint.o
this got compiled without any problem and even got the hush prompt but when i gave help command i did not see my command listed there. please help me in solving this issue.
Thanks, haneef

Hi,
On Fri, 9 Mar 2012 19:29:03 +0530 Haneef hawk21 haneef.hawk21@gmail.com wrote:
Hi,
I am trying to create a new command that would be used to do custom tests like mm, md, mtest all at once by calling their do_** function.
Can't you just put needed commands in a script and run it?
...
U_BOOT_CMD( myprint, 1, 1, do_myprint, "print message", "" );
...
this got compiled without any problem and even got the hush prompt but when i gave help command i did not see my command listed there.
Try to pass a help string as the sixth argument of U_BOOT_CMD().
BR, Anatolij
participants (2)
-
Anatolij Gustschin
-
Haneef hawk21