]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
fastboot: move FASTBOOT_FLASH options into Kconfig
authorPetr Kulhavy <brain@jikos.cz>
Fri, 9 Sep 2016 08:27:18 +0000 (10:27 +0200)
committerTom Rini <trini@konsulko.com>
Sun, 2 Oct 2016 00:04:59 +0000 (20:04 -0400)
Move FASTBOOT_MBR_NAME and FASTBOOT_GPT_NAME into Kconfig.
Add dependency on the FASTBOOT_FLASH setting (also for FASTBOOT_MBR_NAME).
Remove the now redundant GPT_ENTRY_NAME.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
Reviewed-by: Tom Rini <trini@konsulko.com>
Acked-by: Steve Rae <steve.rae@raedomain.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: Add FIXME about xxx_PARTITION needing to be in Kconfig]
Signed-off-by: Tom Rini <trini@konsulko.com>
README
cmd/fastboot/Kconfig
common/fb_mmc.c
include/part_efi.h

diff --git a/README b/README
index 3ea4d012f657e0e4238d917012ce448788dd42a0..f29bf50ad0b14040339559c3cb794f01ff32516f 100644 (file)
--- a/README
+++ b/README
@@ -1681,7 +1681,7 @@ The following options need to be configured:
                to generate and write the Backup GUID Partition Table.)
                This occurs when the specified "partition name" on the
                "fastboot flash" command line matches this value.
-               Default is GPT_ENTRY_NAME (currently "gpt") if undefined.
+               The default is "gpt" if undefined.
 
                CONFIG_FASTBOOT_MBR_NAME
                The fastboot "flash" command supports writing the downloaded
index a93d1c09e714117c4b668267d93a79bc66a5c116..5d2facc298de5a1e6b1127087bf1a202c2b5d9ec 100644 (file)
@@ -50,11 +50,35 @@ config FASTBOOT_FLASH
 
 config FASTBOOT_FLASH_MMC_DEV
        int "Define FASTBOOT MMC FLASH default device"
+       depends on FASTBOOT_FLASH
        help
          The fastboot "flash" command requires additional information
          regarding the non-volatile storage device. Define this to
          the eMMC device that fastboot should use to store the image.
 
+config FASTBOOT_GPT_NAME
+       string "Target name for updating GPT"
+       depends on FASTBOOT_FLASH
+       default "gpt"
+       help
+         The fastboot "flash" command supports writing the downloaded
+         image to the Protective MBR and the Primary GUID Partition
+         Table. (Additionally, this downloaded image is post-processed
+         to generate and write the Backup GUID Partition Table.)
+         This occurs when the specified "partition name" on the
+         "fastboot flash" command line matches the value defined here.
+         The default target name for updating GPT is "gpt".
+
+config FASTBOOT_MBR_NAME
+       string "Target name for updating MBR"
+       depends on FASTBOOT_FLASH
+       default "mbr"
+       help
+         The fastboot "flash" command allows to write the downloaded image
+         to the Master Boot Record. This occurs when the "partition name"
+         specified on the "fastboot flash" command line matches the value
+         defined here. The default target name for updating MBR is "mbr".
+
 endif # USB_FUNCTION_FASTBOOT
 
 endmenu
index 4bc68a76570336785678d1eaf33085cb769c82e2..81a3bd063341b32c5cad132bad5dd1d6787c26fa 100644 (file)
 #include <mmc.h>
 #include <div64.h>
 
-#if defined(CONFIG_EFI_PARTITION) && !defined(CONFIG_FASTBOOT_GPT_NAME)
-#define CONFIG_FASTBOOT_GPT_NAME GPT_ENTRY_NAME
+/*
+ * FIXME: Ensure we always set these names via Kconfig once xxx_PARTITION is
+ * migrated
+ */
+#ifndef CONFIG_FASTBOOT_GPT_NAME
+#define CONFIG_FASTBOOT_GPT_NAME "gpt"
 #endif
 
 
-#if defined(CONFIG_DOS_PARTITION) && !defined(CONFIG_FASTBOOT_MBR_NAME)
+#ifndef CONFIG_FASTBOOT_MBR_NAME
 #define CONFIG_FASTBOOT_MBR_NAME "mbr"
 #endif
 
index c8fc8738f96a91846cfe781ac1a8488d01ccdb8f..317c044795caf68081aee879dc20c40835091256 100644 (file)
@@ -27,7 +27,6 @@
 #define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
 #define GPT_HEADER_REVISION_V1 0x00010000
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL
-#define GPT_ENTRY_NAME "gpt"
 #define GPT_ENTRY_NUMBERS              128
 #define GPT_ENTRY_SIZE                 128