From cfa34996b0beb90e9b63a5b6f89c78123a2d428e Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 7 Sep 2017 10:29:51 +0200 Subject: cmd: fastboot: Rework fastboot dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fastboot need a bunch of options to be operating properly, such as the g_dnl gadget, the fastboot command, and some options that make sense. Since fastboot is now part of Kconfig, make sure we have them right. That will also reduce the boilerplate in the defconfigs. Reviewed-by: Ɓukasz Majewski Reviewed-by: Simon Glass Signed-off-by: Maxime Ripard --- cmd/fastboot/Kconfig | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'cmd') diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig index fb0c5da..7330da2 100644 --- a/cmd/fastboot/Kconfig +++ b/cmd/fastboot/Kconfig @@ -3,11 +3,16 @@ comment "FASTBOOT" menuconfig FASTBOOT bool "Fastboot support" depends on USB_GADGET + default y if ARCH_SUNXI && USB_MUSB_GADGET if FASTBOOT config USB_FUNCTION_FASTBOOT bool "Enable USB fastboot gadget" + default y + select USB_GADGET_DOWNLOAD + imply ANDROID_BOOT_IMAGE + imply CMD_FASTBOOT help This enables the USB part of the fastboot gadget. -- cgit v1.1 From 47738acceda5bae52b7c33ce912da6b52244c033 Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Thu, 24 Aug 2017 11:52:32 +0200 Subject: 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. Reviewed-by: Tom Rini Reviewed-by: Jagan Teki Signed-off-by: Maxime Ripard --- cmd/Kconfig | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cmd') diff --git a/cmd/Kconfig b/cmd/Kconfig index 07ec03b..28c91ca 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -665,10 +665,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 -- cgit v1.1 From de86fc3859f9c9ae26faed6f9d8fc115e1329b4f Mon Sep 17 00:00:00 2001 From: Maxime Ripard Date: Wed, 23 Aug 2017 10:12:22 +0200 Subject: sunxi: Remove the MMC index hack The current code, if there's both an eMMC and an MMC slot available on the board, will swap the MMC indices based on whether we booted from the eMMC or the MMC. This way, the MMC we're supposed to boot on will always have the index 0. However, this causes various issues, for example when using other components that base their behaviour on the MMC index, such as fastboot. Let's remove that hack, and take the opposite approach. The MMC will always have the same index, but the bootcmd will pick the same device than the one we booted from. This is done through the introduction of the mmc_bootdev environment variable that will be filled by the board code based on the boot device informations we can get from the SoC. In order to not introduce regressions, we also need to adjust the fastboot MMC device and the environment device in order to set it to the eMMC, over the MMC, like it used to be the case. Tested-by: Chen-Yu Tsai Signed-off-by: Maxime Ripard --- cmd/fastboot/Kconfig | 2 ++ 1 file changed, 2 insertions(+) (limited to 'cmd') diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig index 7330da2..214bbc2 100644 --- a/cmd/fastboot/Kconfig +++ b/cmd/fastboot/Kconfig @@ -74,6 +74,8 @@ config FASTBOOT_FLASH config FASTBOOT_FLASH_MMC_DEV int "Define FASTBOOT MMC FLASH default device" depends on FASTBOOT_FLASH && MMC + default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 + default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 help The fastboot "flash" command requires additional information regarding the non-volatile storage device. Define this to -- cgit v1.1