aboutsummaryrefslogtreecommitdiff
path: root/drivers/fastboot
diff options
context:
space:
mode:
authorAlex Kiernan2018-05-29 15:30:42 +0000
committerMarek Vasut2018-05-30 11:59:21 +0200
commit42d8dd4424099ad65400b34af1eb51258130e0b6 (patch)
tree4b939668ee8fb11379759923ea3a6d0b9e763b09 /drivers/fastboot
parentd2df2abbcd4b88539605f8329edd244e6474d7a0 (diff)
fastboot: Correct dependencies in FASTBOOT_FLASH
Ensure that when selecting FASTBOOT_FLASH you end up with a buildable configuration. Prior to this you could select NAND without MTDPARTS and end up with an image which (surprisingly) excluded NAND. Also fix dependencies on FASTBOOT_GPT_NAME/FASTBOOT_MBR_NAME which require you have EFI_PARTITION/DOS_PARTITION enabled. Delete redundant FASTBOOT_FLASH_NAND_DEV from Kconfig - it was only ever used as a guard and the value was ignored in all cases, we're using FASTBOOT_FLASH_NAND as the guard now. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'drivers/fastboot')
-rw-r--r--drivers/fastboot/Kconfig17
-rw-r--r--drivers/fastboot/Makefile8
2 files changed, 6 insertions, 19 deletions
diff --git a/drivers/fastboot/Kconfig b/drivers/fastboot/Kconfig
index 93a8ac64e76..9bbc5c661d4 100644
--- a/drivers/fastboot/Kconfig
+++ b/drivers/fastboot/Kconfig
@@ -56,6 +56,7 @@ config FASTBOOT_USB_DEV
config FASTBOOT_FLASH
bool "Enable FASTBOOT FLASH command"
default y if ARCH_SUNXI
+ depends on MMC || (NAND && CMD_MTDPARTS)
help
The fastboot protocol includes a "flash" command for writing
the downloaded image to a non-volatile storage device. Define
@@ -71,7 +72,7 @@ config FASTBOOT_FLASH_MMC
config FASTBOOT_FLASH_NAND
bool "FASTBOOT on NAND"
- depends on NAND
+ depends on NAND && CMD_MTDPARTS
endchoice
@@ -85,19 +86,9 @@ config FASTBOOT_FLASH_MMC_DEV
regarding the non-volatile storage device. Define this to
the eMMC device that fastboot should use to store the image.
-config FASTBOOT_FLASH_NAND_DEV
- int "Define FASTBOOT NAND FLASH default device"
- depends on FASTBOOT_FLASH_NAND
- depends on CMD_MTDPARTS
- default 0 if ARCH_SUNXI && NAND_SUNXI
- help
- The fastboot "flash" command requires additional information
- regarding the non-volatile storage device. Define this to
- the NAND device that fastboot should use to store the image.
-
config FASTBOOT_GPT_NAME
string "Target name for updating GPT"
- depends on FASTBOOT_FLASH
+ depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
default "gpt"
help
The fastboot "flash" command supports writing the downloaded
@@ -110,7 +101,7 @@ config FASTBOOT_GPT_NAME
config FASTBOOT_MBR_NAME
string "Target name for updating MBR"
- depends on FASTBOOT_FLASH
+ depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
default "mbr"
help
The fastboot "flash" command allows to write the downloaded image
diff --git a/drivers/fastboot/Makefile b/drivers/fastboot/Makefile
index b38dcff2026..e4bd389adf0 100644
--- a/drivers/fastboot/Makefile
+++ b/drivers/fastboot/Makefile
@@ -2,9 +2,5 @@
obj-y += fb_common.o
-ifdef CONFIG_FASTBOOT_FLASH_MMC_DEV
-obj-y += fb_mmc.o
-endif
-ifdef CONFIG_FASTBOOT_FLASH_NAND_DEV
-obj-y += fb_nand.o
-endif
+obj-$(CONFIG_FASTBOOT_FLASH_MMC) += fb_mmc.o
+obj-$(CONFIG_FASTBOOT_FLASH_NAND) += fb_nand.o