Книга: Embedded Linux Primer: A Practical, Real-World Approach
7.3.2. U-Boot Command Sets
7.3.2. U-Boot Command Sets
U-Boot supports more than 60 standard command sets that enable more than 150 unique commands using CFG_* macros. A command set is enabled in U-Boot through the use of configuration setting (CFG_*) macros. For a complete list from a recent U-Boot snapshot, consult Appendix B, "U-Boot Configurable Commands." Here are just a few, to give you an idea of the capabilities available:
Command Set | Commands |
---|---|
CFG_CMD_FLASH | Flash memory commands |
CFG_CMD_MEMORY | Memory dump, fill, copy, compare, and so on |
CFG_CMD_DHCP | DHCP Support |
CFG_CMD_PING | Ping support |
CFG_CMD_EXT2 | EXT2 File system support |
The following line of Listing 7-4 defines the commands enabled in a given U-Boot configuration, as driven by the board-specific header file:
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_DHCP)
Instead of typing out each individual CFG_* macro in your own board-specific configuration header, you can start from a default set of commands predefined in the U-Boot source. The macro CONFIG_CMD_DFL defines this default set of commands. CONFIG_CMD_DFL specifies a list of default U-Boot command sets such as tftpboot (boot an image from a tftpserver), bootm (boot an image from memory), memory utilities such as md (display memory), and so on. To enable your specific combination of commands, you can start with the default and add and subtract as necessary. The example from Listing 7-4 adds the DHCP command set to the default. You can subtract in a similar fashion:
#define CONFIG_COMMANDS (CONFIG_CMD_DFL & ~CFG_CMD_NFS)
Take a look at any board-configuration header file in .../include/configs/ for examples.
- 7.3. A Universal Bootloader: Das U-Boot
- 14.3.3. gdb User-Defined Commands
- 14.3.6. printk Debugging
- Chapter 8. Saving and restoring large rule-sets
- Appendix A. Detailed explanations of special commands
- Basics of the iptables command
- Commands
- Creating CDs from the Command Line
- Using the kill Command to Control Processes
- The echo command
- При загрузке Windows появляется сообщение – неправильный файл boot. ini. За что этот файл отвечает и как исправить данну...
- Можно ли отказаться от Проводника? Мне удобнее работать с Total Commander, но Проводник все равно постоянно «висит» в па...