[U-Boot-Users] Adding new commands

Andreas Schweigstill andreas at schweigstill.de
Mon Oct 16 13:48:03 CEST 2006


Dear llandre!

llandre schrieb:
> #define CFG_CMD_NEW1 0x8000000000000000ULL
> #define CFG_CMD_NEW2 ???
> 
> IIUC we have 64 bits available for the commands and 63 commands are 
> already defined. So how to define more than 64 commands?

This is indeed a big problem which will occur to nearly every developer
who implements new commands. CFG_CMD_* and CONFIG_COMMANDS are only
used for preprocessor evaluation; they don't seem to be used in object
code. But they rely on the ULL (unsigned long long int) type; I don't
think that there is something like a 128bit type which can be used
directly for logical AND operations.

For new command there could be used another macro like CONFIG_COMMANDS2
and CFG_CMD2_* for the configuration values.

Here are some statistics about usage of the old definitions:
CONFIG_COMMANDS: about 1650 entries in 470 files
CFG_CMD: about 4126 entries in 470

With best regards
Andreas Schweigstill


-- 
Dipl.-Phys. Andreas Schweigstill
Schweigstill IT | Embedded Systems
Schauenburgerstraße 116, D-24118 Kiel, Germany
Phone: (+49) 431 5606-435, Fax: (+49) 431 5606-436
Mobile: (+49) 171 6921973, Web: http://www.schweigstill.de/




More information about the U-Boot mailing list