mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 19:11:53 +00:00
new commands: uuid and guid - generate random unique identifier
Those commands basis on implementation of random UUID generator version 4 which is described in RFC4122. The same algorithm is used for generation both ids but string representation is different as below. char: 0 9 14 19 24 36 xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx UUID: be be be be be GUID: le le le be be Commands usage: - uuid [<varname>] - guid [<varname>] The result is saved in environment as a "varname" variable if argument is given, if not then it is printed. New config: - CONFIG_CMD_UUID Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: trini@ti.com
This commit is contained in:
parent
4e4815feae
commit
89c8230dec
3 changed files with 49 additions and 5 deletions
|
@ -58,14 +58,16 @@
|
|||
#if (defined(CONFIG_PARTITION_UUIDS) || \
|
||||
defined(CONFIG_EFI_PARTITION) || \
|
||||
defined(CONFIG_RANDOM_UUID) || \
|
||||
defined(CONFIG_CMD_UUID) || \
|
||||
defined(CONFIG_BOOTP_PXE)) && \
|
||||
!defined(CONFIG_LIB_UUID)
|
||||
#define CONFIG_LIB_UUID
|
||||
#endif
|
||||
|
||||
#if defined(CONFIG_RANDOM_UUID) && \
|
||||
!defined(CONFIG_LIB_RAND) && \
|
||||
!defined(CONFIG_LIB_HW_RAND)
|
||||
#if (defined(CONFIG_RANDOM_UUID) || \
|
||||
defined(CONFIG_CMD_UUID)) && \
|
||||
(!defined(CONFIG_LIB_RAND) && \
|
||||
!defined(CONFIG_LIB_HW_RAND))
|
||||
#define CONFIG_LIB_RAND
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue