blob: dfa2320ba2679c69d88a95d26d5b721724bc1ae9 [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Jason Hobbs6e39cce2011-08-23 11:06:56 +00002/*
3 * Copyright 2011 Calxeda, Inc.
Abdellatif El Khlifidc3cb5d2023-08-04 14:33:38 +01004 * Copyright 2022-2023 Arm Limited and/or its affiliates <open-source-office@arm.com>
5 *
6 * Authors:
7 * Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
Jason Hobbs6e39cce2011-08-23 11:06:56 +00008 */
9
Simon Glass21fcfd82023-08-24 13:55:44 -060010#define LOG_CATEGOT LOGC_CORE
11
Simon Glassed38aef2020-05-10 11:40:03 -060012#include <command.h>
Heinrich Schuchardta4628b42022-01-16 14:10:23 +010013#include <efi_api.h>
Simon Glass5e6201b2019-08-01 09:46:51 -060014#include <env.h>
Simon Glass274e0b02020-05-10 11:39:56 -060015#include <rand.h>
Simon Glass495a5dc2019-11-14 12:57:30 -070016#include <time.h>
Simon Glass6f044982020-05-10 11:39:52 -060017#include <uuid.h>
Jason Hobbs6e39cce2011-08-23 11:06:56 +000018#include <linux/ctype.h>
Przemyslaw Marczakfa907342014-04-02 10:20:02 +020019#include <errno.h>
Przemyslaw Marczak0c813362014-04-02 10:20:03 +020020#include <asm/io.h>
21#include <part_efi.h>
22#include <malloc.h>
Matthias Bruggerd03560b2020-12-18 10:28:03 +010023#include <dm/uclass.h>
24#include <rng.h>
Jason Hobbs6e39cce2011-08-23 11:06:56 +000025
Jason Hobbs6e39cce2011-08-23 11:06:56 +000026int uuid_str_valid(const char *uuid)
27{
28 int i, valid;
29
30 if (uuid == NULL)
31 return 0;
32
33 for (i = 0, valid = 1; uuid[i] && valid; i++) {
34 switch (i) {
35 case 8: case 13: case 18: case 23:
36 valid = (uuid[i] == '-');
37 break;
38 default:
39 valid = isxdigit(uuid[i]);
40 break;
41 }
42 }
43
Przemyslaw Marczak0c813362014-04-02 10:20:03 +020044 if (i != UUID_STR_LEN || !valid)
Jason Hobbs6e39cce2011-08-23 11:06:56 +000045 return 0;
46
47 return 1;
48}
49
Patrick Delaunay65f94ed2015-10-27 11:00:28 +010050static const struct {
51 const char *string;
52 efi_guid_t guid;
53} list_guid[] = {
Heinrich Schuchardt0a13b792022-01-16 11:55:39 +010054#ifdef CONFIG_PARTITION_TYPE_GUID
Patrick Delaunay65f94ed2015-10-27 11:00:28 +010055 {"system", PARTITION_SYSTEM_GUID},
56 {"mbr", LEGACY_MBR_PARTITION_GUID},
57 {"msft", PARTITION_MSFT_RESERVED_GUID},
58 {"data", PARTITION_BASIC_DATA_GUID},
59 {"linux", PARTITION_LINUX_FILE_SYSTEM_DATA_GUID},
60 {"raid", PARTITION_LINUX_RAID_GUID},
61 {"swap", PARTITION_LINUX_SWAP_GUID},
Rasmus Villemoesdad0b632020-11-20 11:45:36 +010062 {"lvm", PARTITION_LINUX_LVM_GUID},
63 {"u-boot-env", PARTITION_U_BOOT_ENVIRONMENT},
Simon Glass21fcfd82023-08-24 13:55:44 -060064 {"cros-kern", PARTITION_CROS_KERNEL},
65 {"cros-root", PARTITION_CROS_ROOT},
66 {"cros-fw", PARTITION_CROS_FIRMWARE},
67 {"cros-rsrv", PARTITION_CROS_RESERVED},
Heinrich Schuchardt0a13b792022-01-16 11:55:39 +010068#endif
Simon Glassf7f55782023-03-20 08:30:12 +130069#if defined(CONFIG_CMD_EFIDEBUG) || defined(CONFIG_EFI)
Heinrich Schuchardta4628b42022-01-16 14:10:23 +010070 {
71 "Device Path",
72 EFI_DEVICE_PATH_PROTOCOL_GUID,
73 },
74 {
75 "Device Path To Text",
76 EFI_DEVICE_PATH_TO_TEXT_PROTOCOL_GUID,
77 },
78 {
79 "Device Path Utilities",
80 EFI_DEVICE_PATH_UTILITIES_PROTOCOL_GUID,
81 },
82 {
83 "Unicode Collation 2",
84 EFI_UNICODE_COLLATION_PROTOCOL2_GUID,
85 },
86 {
87 "Driver Binding",
88 EFI_DRIVER_BINDING_PROTOCOL_GUID,
89 },
90 {
91 "Simple Text Input",
92 EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID,
93 },
94 {
95 "Simple Text Input Ex",
96 EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL_GUID,
97 },
98 {
99 "Simple Text Output",
100 EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID,
101 },
102 {
103 "Block IO",
104 EFI_BLOCK_IO_PROTOCOL_GUID,
105 },
106 {
107 "Simple File System",
108 EFI_SIMPLE_FILE_SYSTEM_PROTOCOL_GUID,
109 },
110 {
111 "Loaded Image",
112 EFI_LOADED_IMAGE_PROTOCOL_GUID,
113 },
114 {
115 "Graphics Output",
116 EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID,
117 },
118 {
119 "HII String",
120 EFI_HII_STRING_PROTOCOL_GUID,
121 },
122 {
123 "HII Database",
124 EFI_HII_DATABASE_PROTOCOL_GUID,
125 },
126 {
127 "HII Config Routing",
128 EFI_HII_CONFIG_ROUTING_PROTOCOL_GUID,
129 },
130 {
131 "Load File2",
132 EFI_LOAD_FILE2_PROTOCOL_GUID,
133 },
134 {
135 "Random Number Generator",
136 EFI_RNG_PROTOCOL_GUID,
137 },
138 {
139 "Simple Network",
140 EFI_SIMPLE_NETWORK_PROTOCOL_GUID,
141 },
142 {
143 "PXE Base Code",
144 EFI_PXE_BASE_CODE_PROTOCOL_GUID,
145 },
146 {
147 "Device-Tree Fixup",
148 EFI_DT_FIXUP_PROTOCOL_GUID,
149 },
150 {
Heinrich Schuchardtd2a7d122022-01-16 17:46:38 +0100151 "TCG2",
152 EFI_TCG2_PROTOCOL_GUID,
153 },
154 {
Heinrich Schuchardta4628b42022-01-16 14:10:23 +0100155 "System Partition",
156 PARTITION_SYSTEM_GUID
157 },
158 {
159 "Firmware Management",
160 EFI_FIRMWARE_MANAGEMENT_PROTOCOL_GUID
161 },
162 /* Configuration table GUIDs */
163 {
164 "ACPI table",
165 EFI_ACPI_TABLE_GUID,
166 },
167 {
168 "EFI System Resource Table",
169 EFI_SYSTEM_RESOURCE_TABLE_GUID,
170 },
171 {
172 "device tree",
173 EFI_FDT_GUID,
174 },
175 {
176 "SMBIOS table",
177 SMBIOS_TABLE_GUID,
178 },
179 {
Heinrich Schuchardtb36c9a02024-01-22 14:04:35 +0100180 "SMBIOS3 table",
181 SMBIOS3_TABLE_GUID,
182 },
183 {
Heinrich Schuchardta4628b42022-01-16 14:10:23 +0100184 "Runtime properties",
185 EFI_RT_PROPERTIES_TABLE_GUID,
186 },
187 {
188 "TCG2 Final Events Table",
189 EFI_TCG2_FINAL_EVENTS_TABLE_GUID,
190 },
Jose Marinhoff72cb32021-12-23 14:51:07 +0000191 {
192 "EFI Conformance Profiles Table",
193 EFI_CONFORMANCE_PROFILES_TABLE_GUID,
194 },
Heinrich Schuchardtf4c5bcb2022-01-28 19:29:47 +0100195#ifdef CONFIG_EFI_RISCV_BOOT_PROTOCOL
196 {
197 "RISC-V Boot",
198 RISCV_EFI_BOOT_PROTOCOL_GUID,
199 },
Heinrich Schuchardta4628b42022-01-16 14:10:23 +0100200#endif
Heinrich Schuchardtf4c5bcb2022-01-28 19:29:47 +0100201#endif /* CONFIG_CMD_EFIDEBUG */
Heinrich Schuchardt1bebcb62022-01-16 14:53:37 +0100202#ifdef CONFIG_CMD_NVEDIT_EFI
203 /* signature database */
204 {
205 "EFI_GLOBAL_VARIABLE_GUID",
206 EFI_GLOBAL_VARIABLE_GUID,
207 },
208 {
209 "EFI_IMAGE_SECURITY_DATABASE_GUID",
210 EFI_IMAGE_SECURITY_DATABASE_GUID,
211 },
212 /* certificate types */
213 {
214 "EFI_CERT_SHA256_GUID",
215 EFI_CERT_SHA256_GUID,
216 },
217 {
218 "EFI_CERT_X509_GUID",
219 EFI_CERT_X509_GUID,
220 },
221 {
222 "EFI_CERT_TYPE_PKCS7_GUID",
223 EFI_CERT_TYPE_PKCS7_GUID,
224 },
225#endif
Simon Glass54d26e72023-07-15 21:38:51 -0600226#if defined(CONFIG_CMD_EFIDEBUG) || defined(CONFIG_EFI)
Simon Glassd134ad52023-03-20 08:30:11 +1300227 { "EFI_LZMA_COMPRESSED", EFI_LZMA_COMPRESSED },
228 { "EFI_DXE_SERVICES", EFI_DXE_SERVICES },
229 { "EFI_HOB_LIST", EFI_HOB_LIST },
230 { "EFI_MEMORY_TYPE", EFI_MEMORY_TYPE },
231 { "EFI_MEM_STATUS_CODE_REC", EFI_MEM_STATUS_CODE_REC },
232 { "EFI_GUID_EFI_ACPI1", EFI_GUID_EFI_ACPI1 },
233#endif
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100234};
235
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100236int uuid_guid_get_bin(const char *guid_str, unsigned char *guid_bin)
237{
238 int i;
239
240 for (i = 0; i < ARRAY_SIZE(list_guid); i++) {
241 if (!strcmp(list_guid[i].string, guid_str)) {
242 memcpy(guid_bin, &list_guid[i].guid, 16);
243 return 0;
244 }
245 }
246 return -ENODEV;
247}
248
Rasmus Villemoes7b70bdc2020-11-20 11:45:35 +0100249const char *uuid_guid_get_str(const unsigned char *guid_bin)
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100250{
251 int i;
252
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100253 for (i = 0; i < ARRAY_SIZE(list_guid); i++) {
254 if (!memcmp(list_guid[i].guid.b, guid_bin, 16)) {
Rasmus Villemoes7b70bdc2020-11-20 11:45:35 +0100255 return list_guid[i].string;
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100256 }
257 }
Rasmus Villemoes7b70bdc2020-11-20 11:45:35 +0100258 return NULL;
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100259}
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100260
Simon Glass4acd4f02020-04-08 08:32:58 -0600261int uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin,
262 int str_format)
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000263{
264 uint16_t tmp16;
265 uint32_t tmp32;
266 uint64_t tmp64;
267
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100268 if (!uuid_str_valid(uuid_str)) {
Simon Glass21fcfd82023-08-24 13:55:44 -0600269 log_debug("not valid\n");
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100270#ifdef CONFIG_PARTITION_TYPE_GUID
271 if (!uuid_guid_get_bin(uuid_str, uuid_bin))
272 return 0;
273#endif
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200274 return -EINVAL;
Patrick Delaunay65f94ed2015-10-27 11:00:28 +0100275 }
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200276
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200277 if (str_format == UUID_STR_FORMAT_STD) {
Simon Glass3ff49ec2021-07-24 09:03:29 -0600278 tmp32 = cpu_to_be32(hextoul(uuid_str, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200279 memcpy(uuid_bin, &tmp32, 4);
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000280
Simon Glass3ff49ec2021-07-24 09:03:29 -0600281 tmp16 = cpu_to_be16(hextoul(uuid_str + 9, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200282 memcpy(uuid_bin + 4, &tmp16, 2);
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000283
Simon Glass3ff49ec2021-07-24 09:03:29 -0600284 tmp16 = cpu_to_be16(hextoul(uuid_str + 14, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200285 memcpy(uuid_bin + 6, &tmp16, 2);
286 } else {
Simon Glass3ff49ec2021-07-24 09:03:29 -0600287 tmp32 = cpu_to_le32(hextoul(uuid_str, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200288 memcpy(uuid_bin, &tmp32, 4);
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000289
Simon Glass3ff49ec2021-07-24 09:03:29 -0600290 tmp16 = cpu_to_le16(hextoul(uuid_str + 9, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200291 memcpy(uuid_bin + 4, &tmp16, 2);
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000292
Simon Glass3ff49ec2021-07-24 09:03:29 -0600293 tmp16 = cpu_to_le16(hextoul(uuid_str + 14, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200294 memcpy(uuid_bin + 6, &tmp16, 2);
295 }
296
Simon Glass3ff49ec2021-07-24 09:03:29 -0600297 tmp16 = cpu_to_be16(hextoul(uuid_str + 19, NULL));
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200298 memcpy(uuid_bin + 8, &tmp16, 2);
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000299
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200300 tmp64 = cpu_to_be64(simple_strtoull(uuid_str + 24, NULL, 16));
301 memcpy(uuid_bin + 10, (char *)&tmp64 + 2, 6);
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200302
303 return 0;
304}
305
Abdellatif El Khlifidc3cb5d2023-08-04 14:33:38 +0100306int uuid_str_to_le_bin(const char *uuid_str, unsigned char *uuid_bin)
307{
308 u16 tmp16;
309 u32 tmp32;
310 u64 tmp64;
311
312 if (!uuid_str_valid(uuid_str) || !uuid_bin)
313 return -EINVAL;
314
315 tmp32 = cpu_to_le32(hextoul(uuid_str, NULL));
316 memcpy(uuid_bin, &tmp32, 4);
317
318 tmp16 = cpu_to_le16(hextoul(uuid_str + 9, NULL));
319 memcpy(uuid_bin + 4, &tmp16, 2);
320
321 tmp16 = cpu_to_le16(hextoul(uuid_str + 14, NULL));
322 memcpy(uuid_bin + 6, &tmp16, 2);
323
324 tmp16 = cpu_to_le16(hextoul(uuid_str + 19, NULL));
325 memcpy(uuid_bin + 8, &tmp16, 2);
326
327 tmp64 = cpu_to_le64(simple_strtoull(uuid_str + 24, NULL, 16));
328 memcpy(uuid_bin + 10, &tmp64, 6);
329
330 return 0;
331}
332
Simon Glass4acd4f02020-04-08 08:32:58 -0600333void uuid_bin_to_str(const unsigned char *uuid_bin, char *uuid_str,
334 int str_format)
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200335{
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200336 const u8 uuid_char_order[UUID_BIN_LEN] = {0, 1, 2, 3, 4, 5, 6, 7, 8,
337 9, 10, 11, 12, 13, 14, 15};
338 const u8 guid_char_order[UUID_BIN_LEN] = {3, 2, 1, 0, 5, 4, 7, 6, 8,
339 9, 10, 11, 12, 13, 14, 15};
340 const u8 *char_order;
Heinrich Schuchardt6f035662019-04-29 08:08:43 +0200341 const char *format;
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200342 int i;
343
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200344 /*
345 * UUID and GUID bin data - always in big endian:
346 * 4B-2B-2B-2B-6B
347 * be be be be be
348 */
Heinrich Schuchardt6f035662019-04-29 08:08:43 +0200349 if (str_format & UUID_STR_FORMAT_GUID)
350 char_order = guid_char_order;
351 else
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200352 char_order = uuid_char_order;
Heinrich Schuchardt6f035662019-04-29 08:08:43 +0200353 if (str_format & UUID_STR_UPPER_CASE)
354 format = "%02X";
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200355 else
Heinrich Schuchardt6f035662019-04-29 08:08:43 +0200356 format = "%02x";
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200357
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200358 for (i = 0; i < 16; i++) {
Heinrich Schuchardt6f035662019-04-29 08:08:43 +0200359 sprintf(uuid_str, format, uuid_bin[char_order[i]]);
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200360 uuid_str += 2;
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200361 switch (i) {
362 case 3:
363 case 5:
364 case 7:
365 case 9:
Przemyslaw Marczak0c813362014-04-02 10:20:03 +0200366 *uuid_str++ = '-';
Przemyslaw Marczakfa907342014-04-02 10:20:02 +0200367 break;
368 }
369 }
Jason Hobbs6e39cce2011-08-23 11:06:56 +0000370}
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200371
Przemyslaw Marczak2eb40ee2014-04-02 10:20:05 +0200372#if defined(CONFIG_RANDOM_UUID) || defined(CONFIG_CMD_UUID)
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200373void gen_rand_uuid(unsigned char *uuid_bin)
374{
Heinrich Schuchardt1c126e22019-07-14 23:31:50 +0200375 u32 ptr[4];
376 struct uuid *uuid = (struct uuid *)ptr;
Matthias Bruggerd03560b2020-12-18 10:28:03 +0100377 int i, ret;
378 struct udevice *devp;
379 u32 randv = 0;
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200380
Marek Vasut0d871e72024-04-26 01:02:07 +0200381 if (CONFIG_IS_ENABLED(DM_RNG)) {
Matthias Bruggerd03560b2020-12-18 10:28:03 +0100382 ret = uclass_get_device(UCLASS_RNG, 0, &devp);
Patrick Delaunaya6064f72021-10-22 17:05:47 +0200383 if (!ret) {
Matthias Bruggerd03560b2020-12-18 10:28:03 +0100384 ret = dm_rng_read(devp, &randv, sizeof(randv));
385 if (ret < 0)
386 randv = 0;
387 }
388 }
389 if (randv)
390 srand(randv);
391 else
392 srand(get_ticks() + rand());
Eugeniu Rosca9d74ba62019-05-02 14:27:06 +0200393
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200394 /* Set all fields randomly */
Heinrich Schuchardt1c126e22019-07-14 23:31:50 +0200395 for (i = 0; i < 4; i++)
396 ptr[i] = rand();
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200397
Heinrich Schuchardt1c126e22019-07-14 23:31:50 +0200398 clrsetbits_be16(&uuid->time_hi_and_version,
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200399 UUID_VERSION_MASK,
400 UUID_VERSION << UUID_VERSION_SHIFT);
401
Heinrich Schuchardt1c126e22019-07-14 23:31:50 +0200402 clrsetbits_8(&uuid->clock_seq_hi_and_reserved,
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200403 UUID_VARIANT_MASK,
404 UUID_VARIANT << UUID_VARIANT_SHIFT);
405
Heinrich Schuchardt1c126e22019-07-14 23:31:50 +0200406 memcpy(uuid_bin, uuid, 16);
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200407}
408
Przemyslaw Marczakb4285142014-04-02 10:20:04 +0200409void gen_rand_uuid_str(char *uuid_str, int str_format)
410{
411 unsigned char uuid_bin[UUID_BIN_LEN];
412
413 /* Generate UUID (big endian) */
414 gen_rand_uuid(uuid_bin);
415
416 /* Convert UUID bin to UUID or GUID formated STRING */
417 uuid_bin_to_str(uuid_bin, uuid_str, str_format);
418}
Przemyslaw Marczak2eb40ee2014-04-02 10:20:05 +0200419
Marek Vasut51d85f62019-01-07 21:23:38 +0100420#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_CMD_UUID)
Simon Glassed38aef2020-05-10 11:40:03 -0600421int do_uuid(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
Przemyslaw Marczak2eb40ee2014-04-02 10:20:05 +0200422{
423 char uuid[UUID_STR_LEN + 1];
424 int str_format;
425
426 if (!strcmp(argv[0], "uuid"))
427 str_format = UUID_STR_FORMAT_STD;
428 else
429 str_format = UUID_STR_FORMAT_GUID;
430
431 if (argc > 2)
432 return CMD_RET_USAGE;
433
434 gen_rand_uuid_str(uuid, str_format);
435
436 if (argc == 1)
437 printf("%s\n", uuid);
438 else
Simon Glass6a38e412017-08-03 12:22:09 -0600439 env_set(argv[1], uuid);
Przemyslaw Marczak2eb40ee2014-04-02 10:20:05 +0200440
441 return CMD_RET_SUCCESS;
442}
443
444U_BOOT_CMD(uuid, CONFIG_SYS_MAXARGS, 1, do_uuid,
445 "UUID - generate random Universally Unique Identifier",
446 "[<varname>]\n"
447 "Argument:\n"
448 "varname: for set result in a environment variable\n"
449 "e.g. uuid uuid_env"
450);
451
452U_BOOT_CMD(guid, CONFIG_SYS_MAXARGS, 1, do_uuid,
453 "GUID - generate Globally Unique Identifier based on random UUID",
454 "[<varname>]\n"
455 "Argument:\n"
456 "varname: for set result in a environment variable\n"
457 "e.g. guid guid_env"
458);
Przemyslaw Marczak5ec2ed22014-04-02 10:20:06 +0200459#endif /* CONFIG_CMD_UUID */
460#endif /* CONFIG_RANDOM_UUID || CONFIG_CMD_UUID */