Skip to contentSkip to conversation

cmd: Move CONFIG_RANDOM_UUID to Kconfig

PATCH New Maxime Ripard 3 participants 5 messages Aug 24, 2017 – Aug 26, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 cmd: Move CONFIG_RANDOM_UUID to Kconfig

CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when none are provided.

Move that option to Kconfig.

---
 cmd/Kconfig                       | 7 +++++++
 configs/evb-rv1108_defconfig      | 1 +
 configs/rock_defconfig            | 1 +
 include/configs/am57xx_evm.h      | 1 -
 include/configs/dra7xx_evm.h      | 1 -
 include/configs/edison.h          | 1 -
 include/configs/odroid.h          | 1 -
 include/configs/rockchip-common.h | 2 --
 include/configs/trats.h           | 1 -
 include/configs/trats2.h          | 1 -
 include/configs/vinco.h           | 1 -
 include/configs/xilinx_zynqmp.h   | 1 -
 scripts/config_whitelist.txt      | 1 -
 13 files changed, 9 insertions(+), 11 deletions(-)
cmd/Kconfig +7 -0
index cd72ea8e56a9..5e2885bbaa95 100644
@@ -591,10 +591,17 @@ config CMD_GPT
 	bool "GPT (GUID Partition Table) command"
 	select PARTITION_UUIDS
 	select EFI_PARTITION
+	imply RANDOM_UUID
 	help
 	  Enable the 'gpt' command to ready and write GPT style partition
 	  tables.
 
+config RANDOM_UUID
+	bool "GPT Random UUID generation"
+	help
+	  Enable the generation of partitions with random UUIDs if none
+	  are provided.
+
 config CMD_GPT_RENAME
 	bool "GPT partition renaming commands"
 	depends on CMD_GPT
configs/evb-rv1108_defconfig +1 -0
index 3deea7c0dcb1..a43683041359 100644
@@ -7,6 +7,7 @@ CONFIG_DEBUG_UART=y
 CONFIG_ENV_IS_NOWHERE=y
 # CONFIG_DISPLAY_CPUINFO is not set
 # CONFIG_CMD_IMLS is not set
+CONFIG_RANDOM_UUID=y
 CONFIG_CMD_SF=y
 # CONFIG_CMD_SETEXPR is not set
 CONFIG_CMD_CACHE=y
configs/rock_defconfig +1 -0
index 2ad6a6c521da..b03856889981 100644
@@ -14,6 +14,7 @@ CONFIG_ENV_IS_IN_MMC=y
 CONFIG_SPL_STACK_R=y
 CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x2000
 # CONFIG_CMD_IMLS is not set
+CONFIG_RANDOM_UUID=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_SPI=y
include/configs/am57xx_evm.h +0 -1
index 9f07bba0c898..4de59a644fb6 100644
@@ -72,7 +72,6 @@
 #include <configs/ti_omap5_common.h>
 
 /* Enhance our eMMC support / experience. */
-#define CONFIG_RANDOM_UUID
 #define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
include/configs/dra7xx_evm.h +0 -1
index 1a58c6ef24f2..0d847808e021 100644
@@ -100,7 +100,6 @@
 #include <configs/ti_omap5_common.h>
 
 /* Enhance our eMMC support / experience. */
-#define CONFIG_RANDOM_UUID
 #define CONFIG_HSMMC2_8BIT
 
 /* CPSW Ethernet */
include/configs/edison.h +0 -1
index 03aa70230619..bec79496441c 100644
@@ -14,7 +14,6 @@
 #define CONFIG_BOOTCOMMAND "run bootcmd"
 
 /* DISK Partition support */
-#define CONFIG_RANDOM_UUID
 
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_LONGHELP
include/configs/odroid.h +0 -1
index 563854d9bbbf..22686657b62a 100644
@@ -175,7 +175,6 @@
 	"fdtaddr=40800000\0"
 
 /* GPT */
-#define CONFIG_RANDOM_UUID
 
 /* Security subsystem - enable hw_rand() */
 #define CONFIG_EXYNOS_ACE_SHA
include/configs/rockchip-common.h +0 -2
index 29a492dc5529..bd3364a81bd9 100644
@@ -27,8 +27,6 @@
 	func(DHCP, dchp, na)
 #endif
 
-#define CONFIG_RANDOM_UUID
-
 #ifdef CONFIG_ARM64
 #define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
 #else
include/configs/trats.h +0 -1
index 3059d89ac90f..08cd7cf266a8 100644
@@ -170,7 +170,6 @@
 #define CONFIG_SYS_SPL_ARGS_ADDR        CONFIG_SYS_SDRAM_BASE + 0x100
 
 /* GPT */
-#define CONFIG_RANDOM_UUID
 
 /* Security subsystem - enable hw_rand() */
 #define CONFIG_EXYNOS_ACE_SHA
include/configs/trats2.h +0 -1
index 1f3ce9d94104..b523b6d1b8ae 100644
@@ -151,7 +151,6 @@
 	"fdtaddr=40800000\0" \
 
 /* GPT */
-#define CONFIG_RANDOM_UUID
 
 /* Security subsystem - enable hw_rand() */
 #define CONFIG_EXYNOS_ACE_SHA
include/configs/vinco.h +0 -1
index adff1b6d7f71..a0c522c86781 100644
@@ -59,7 +59,6 @@
 #define CONFIG_SYS_MMC_CLK_OD		500000
 
 /* For generating MMC partitions */
-#define CONFIG_RANDOM_UUID
 
 #endif
 
include/configs/xilinx_zynqmp.h +0 -1
index 77d7899deff4..3b1119f94e51 100644
@@ -114,7 +114,6 @@
 #  define CONFIG_FASTBOOT_FLASH_MMC_DEV 0
 # endif
 
-# define CONFIG_RANDOM_UUID
 # define PARTS_DEFAULT \
 	"partitions=uuid_disk=${uuid_gpt_disk};" \
 	"name=""boot"",size=16M,uuid=${uuid_gpt_boot};" \
scripts/config_whitelist.txt +0 -1
index 4689d6310f0c..50ac011a6bdd 100644
@@ -1903,7 +1903,6 @@ CONFIG_RAMDISK_ADDR
 CONFIG_RAMDISK_BOOT
 CONFIG_RAM_BOOT
 CONFIG_RAM_BOOT_PHYS
-CONFIG_RANDOM_UUID
 CONFIG_RCAR_BOARD_STRING
 CONFIG_RD_LVL
 CONFIG_REALMODE_DEBUG
Signature · 1 line
2.13.5
#1 lore raw

PATCH 2/2 sunxi: Enable CMD_GPT by default

GPT is pretty common these days and can be useful for things like fastboot. Add a platform imply, so that users can still opt out if they wish so.

---
 arch/arm/Kconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm/Kconfig +1 -0
index 9cfeedeebd95..efb4769a9ea1 100644
@@ -680,6 +680,7 @@ config ARCH_SUNXI
 	select USB_STORAGE if DISTRO_DEFAULTS
 	select USB_KEYBOARD if DISTRO_DEFAULTS
 	select USE_TINY_PRINTF
+	imply CMD_GPT
 	imply FAT_WRITE
 	imply PRE_CONSOLE_BUFFER
 	imply SPL_GPIO_SUPPORT
Signature · 1 line
2.13.5
#2 lore raw

PATCH 2/2 sunxi: Enable CMD_GPT by default

Quoted 4 lines · Maxime Ripard

GPT is pretty common these days and can be useful for things like fastboot. Add a platform imply, so that users can still opt out if they wish so.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.
#3 lore raw

PATCH 1/2 cmd: Move CONFIG_RANDOM_UUID to Kconfig

In reply to Maxime Ripard
Quoted 6 lines · Maxime Ripard

CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when none are provided.

Move that option to Kconfig.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170824/503a5803/attachment.sig>
#4 lore raw

PATCH 1/2 cmd: Move CONFIG_RANDOM_UUID to Kconfig

Quoted 10 lines · Tom Rini
Quoted 6 lines · Maxime Ripard

CONFIG_RANDOM_UUID is used by the GPT command to generate random UUID when none are provided.

Move that option to Kconfig.

thanks!

Signature · 4 lines
Jagan Teki
Free Software Engineer | www.openedev.com
U-Boot, Linux | Upstream Maintainer
Hyderabad, India.