~ubuntu-branches/ubuntu/saucy/u-boot/saucy

« back to all changes in this revision

Viewing changes to doc/README.commands

  • Committer: Package Import Robot
  • Author(s): Clint Adams
  • Date: 2012-05-01 18:07:19 UTC
  • mfrom: (16.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20120501180719-rjntk3287im4a0ns
Tags: 2012.04.01-1
* New upstream version.
  - Update mipsel-native-endianness.diff.
  - Update no-error-on-set-but-unused-variables.diff (partially merged).
  - Drop kirkwood_spi-irq_mask.diff (merged).
  - Drop kirkwood-disable-l2c.diff (merged).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
 
2
2
Commands are added to U-Boot by creating a new command structure.
3
 
This is done by first including command.h
4
 
 
5
 
Then using the U_BOOT_CMD() macro to fill in a cmd_tbl_t struct.
 
3
This is done by first including command.h, then using the U_BOOT_CMD() macro
 
4
to fill in a cmd_tbl_t struct.
6
5
 
7
6
U_BOOT_CMD(name,maxargs,repeatable,command,"usage","help")
8
7
 
9
8
name:    is the name of the commad. THIS IS NOT a string.
10
 
maxargs: the maximumn numbers of arguments this function takes
 
9
maxargs: the maximum number of arguments this function takes
 
10
repeatable: either 0 or 1 to indicate if autorepeat is allowed
11
11
command: Function pointer (*cmd)(struct cmd_tbl_s *, int, int, char *[]);
12
12
usage:   Short description. This is a string
13
 
help:    long description. This is a string
14
 
 
15
 
 
16
 
**** Behinde the scene ******
 
13
help:    Long description. This is a string
 
14
 
 
15
 
 
16
**** Behind the scene ******
17
17
 
18
18
The structure created is named with a special prefix (__u_boot_cmd_)
19
19
and placed by the linker in a special section.