[U-Boot-Users] Adding command in the u-boot

Hi All, I have added a small piece of code in the file common/command.c in order to add a new command in the u-boot. Snippet of code added is given below. Will this code add the command fst_cmd in the u-boot or I have to make some change some where else in the code. If yes, then tell me where I have to make the change in the u-boot code in order to make this code work.
int do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) { printf ("\nTest Command\n"); return 0; }
U_BOOT_CMD( fst_cmd, 1, 1, do_fst_cmd, "Test command added successfully \n", NULL );
Best Regards, Vikrant Basotra
************************************************************************** This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated. **************************************************************************

In message 3D9FDCA910DD4445896A0BE5ECF009D401B0DFAB@bla.satyam.com you wrote:
I have added a small piece of code in the file common/command.c in order to add a new command in the u-boot. Snippet of code added is given below. Will this code add the command fst_cmd in the u-boot or I have to
p No, it willnot, it will not even compile because it is broken.
make some change some where else in the code. If yes, then tell me where I have to make the change in the u-boot code in order to make this code work.
All this is described in the correespponding README in the doc/ direcoptry.
int do_version (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
^^^^^^^^^^^^^^^^
Error: this identifier is already in use.
fst_cmd, 1, 1, do_fst_cmd,
^^^^^^^^^^^
Error: this identifier is undefined.
Best regards,
Wolfgang Denk
participants (2)
-
Vikrant_Basotra
-
Wolfgang Denk