Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 1 | menu "Fastboot support" |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 2 | |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 3 | config FASTBOOT |
| 4 | bool |
| 5 | imply ANDROID_BOOT_IMAGE |
| 6 | imply CMD_FASTBOOT |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 7 | |
| 8 | config USB_FUNCTION_FASTBOOT |
| 9 | bool "Enable USB fastboot gadget" |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 10 | depends on USB_GADGET |
| 11 | default y if ARCH_SUNXI && USB_MUSB_GADGET |
| 12 | select FASTBOOT |
Maxime Ripard | 6d7dfe2 | 2017-09-07 10:29:51 +0200 | [diff] [blame] | 13 | select USB_GADGET_DOWNLOAD |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 14 | help |
| 15 | This enables the USB part of the fastboot gadget. |
| 16 | |
Alex Kiernan | d5aa57c | 2018-05-29 15:30:53 +0000 | [diff] [blame] | 17 | config UDP_FUNCTION_FASTBOOT |
| 18 | depends on NET |
| 19 | select FASTBOOT |
| 20 | bool "Enable fastboot protocol over UDP" |
| 21 | help |
| 22 | This enables the fastboot protocol over UDP. |
| 23 | |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 24 | if FASTBOOT |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 25 | |
| 26 | config FASTBOOT_BUF_ADDR |
| 27 | hex "Define FASTBOOT buffer address" |
Tom Rini | b5bf562 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 28 | default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL |
| 29 | default 0x81000000 if ARCH_OMAP2PLUS |
| 30 | default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I |
| 31 | default 0x22000000 if ARCH_SUNXI && MACH_SUN9I |
| 32 | default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \ |
| 33 | ROCKCHIP_RK322X |
| 34 | default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \ |
| 35 | ROCKCHIP_RK3399 |
| 36 | default 0x280000 if ROCKCHIP_RK3368 |
| 37 | default 0x100000 if ARCH_ZYNQMP |
Jens Wiklander | f1edae9 | 2018-09-25 16:40:23 +0200 | [diff] [blame] | 38 | default 0 if SANDBOX |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 39 | help |
| 40 | The fastboot protocol requires a large memory buffer for |
| 41 | downloads. Define this to the starting RAM address to use for |
| 42 | downloaded images. |
| 43 | |
| 44 | config FASTBOOT_BUF_SIZE |
| 45 | hex "Define FASTBOOT buffer size" |
Tom Rini | b5bf562 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 46 | default 0x8000000 if ARCH_ROCKCHIP |
| 47 | default 0x6000000 if ARCH_ZYNQMP |
| 48 | default 0x2000000 if ARCH_SUNXI |
Jens Wiklander | f1edae9 | 2018-09-25 16:40:23 +0200 | [diff] [blame] | 49 | default 0x8192 if SANDBOX |
Tom Rini | b5bf562 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 50 | default 0x7000000 |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 51 | help |
| 52 | The fastboot protocol requires a large memory buffer for |
| 53 | downloads. This buffer should be as large as possible for a |
| 54 | platform. Define this to the size available RAM for fastboot. |
| 55 | |
Semen Protsenko | 97bb3f8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 56 | config FASTBOOT_USB_DEV |
| 57 | int "USB controller number" |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 58 | depends on USB_FUNCTION_FASTBOOT |
Semen Protsenko | 97bb3f8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 59 | default 0 |
| 60 | help |
| 61 | Some boards have USB OTG controller other than 0. Define this |
| 62 | option so it can be used in compiled environment (e.g. in |
| 63 | CONFIG_BOOTCOMMAND). |
| 64 | |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 65 | config FASTBOOT_FLASH |
| 66 | bool "Enable FASTBOOT FLASH command" |
Jagan Teki | 04aae03 | 2019-11-19 13:56:18 +0530 | [diff] [blame^] | 67 | default y if ARCH_SUNXI || ARCH_ROCKCHIP |
Alex Kiernan | 8cb1eab | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 68 | depends on MMC || (NAND && CMD_MTDPARTS) |
Alex Kiernan | c568bcb | 2018-05-29 15:30:52 +0000 | [diff] [blame] | 69 | select IMAGE_SPARSE |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 70 | help |
| 71 | The fastboot protocol includes a "flash" command for writing |
| 72 | the downloaded image to a non-volatile storage device. Define |
| 73 | this to enable the "fastboot flash" command. |
| 74 | |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 75 | choice |
| 76 | prompt "Flash provider for FASTBOOT" |
| 77 | depends on FASTBOOT_FLASH |
| 78 | |
| 79 | config FASTBOOT_FLASH_MMC |
| 80 | bool "FASTBOOT on MMC" |
| 81 | depends on MMC |
| 82 | |
| 83 | config FASTBOOT_FLASH_NAND |
| 84 | bool "FASTBOOT on NAND" |
Alex Kiernan | 8cb1eab | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 85 | depends on NAND && CMD_MTDPARTS |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 86 | |
| 87 | endchoice |
| 88 | |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 89 | config FASTBOOT_FLASH_MMC_DEV |
| 90 | int "Define FASTBOOT MMC FLASH default device" |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 91 | depends on FASTBOOT_FLASH_MMC |
Jagan Teki | 04aae03 | 2019-11-19 13:56:18 +0530 | [diff] [blame^] | 92 | default 1 if ROCKCHIP_RK3328 |
| 93 | default 0 if ARCH_ROCKCHIP |
Maxime Ripard | 65cefba | 2017-08-23 10:12:22 +0200 | [diff] [blame] | 94 | default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 |
| 95 | default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 96 | help |
| 97 | The fastboot "flash" command requires additional information |
| 98 | regarding the non-volatile storage device. Define this to |
| 99 | the eMMC device that fastboot should use to store the image. |
| 100 | |
Alex Kiernan | dc40585 | 2018-05-29 15:30:51 +0000 | [diff] [blame] | 101 | config FASTBOOT_FLASH_NAND_TRIMFFS |
| 102 | bool "Skip empty pages when flashing NAND" |
| 103 | depends on FASTBOOT_FLASH_NAND |
| 104 | help |
| 105 | When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff |
| 106 | pages. |
| 107 | |
Petr Kulhavy | 4ed1eca | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 108 | config FASTBOOT_GPT_NAME |
| 109 | string "Target name for updating GPT" |
Alex Kiernan | 8cb1eab | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 110 | depends on FASTBOOT_FLASH_MMC && EFI_PARTITION |
Petr Kulhavy | 4ed1eca | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 111 | default "gpt" |
| 112 | help |
| 113 | The fastboot "flash" command supports writing the downloaded |
| 114 | image to the Protective MBR and the Primary GUID Partition |
| 115 | Table. (Additionally, this downloaded image is post-processed |
| 116 | to generate and write the Backup GUID Partition Table.) |
| 117 | This occurs when the specified "partition name" on the |
| 118 | "fastboot flash" command line matches the value defined here. |
| 119 | The default target name for updating GPT is "gpt". |
| 120 | |
| 121 | config FASTBOOT_MBR_NAME |
| 122 | string "Target name for updating MBR" |
Alex Kiernan | 8cb1eab | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 123 | depends on FASTBOOT_FLASH_MMC && DOS_PARTITION |
Petr Kulhavy | 4ed1eca | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 124 | default "mbr" |
| 125 | help |
| 126 | The fastboot "flash" command allows to write the downloaded image |
| 127 | to the Master Boot Record. This occurs when the "partition name" |
| 128 | specified on the "fastboot flash" command line matches the value |
| 129 | defined here. The default target name for updating MBR is "mbr". |
| 130 | |
Alex Kiernan | c86cde9 | 2018-05-29 15:30:54 +0000 | [diff] [blame] | 131 | config FASTBOOT_CMD_OEM_FORMAT |
| 132 | bool "Enable the 'oem format' command" |
| 133 | depends on FASTBOOT_FLASH_MMC && CMD_GPT |
| 134 | help |
| 135 | Add support for the "oem format" command from a client. This |
| 136 | relies on the env variable partitions to contain the list of |
| 137 | partitions as required by the gpt command. |
| 138 | |
Yann E. MORIN | 3d2561f | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 139 | endif # FASTBOOT |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 140 | |
| 141 | endmenu |