Alex Kiernan | 312a10f | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 1 | menu "Fastboot support" |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 2 | |
Alex Kiernan | 312a10f | 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 | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 7 | |
| 8 | config USB_FUNCTION_FASTBOOT |
| 9 | bool "Enable USB fastboot gadget" |
Alex Kiernan | 312a10f | 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 | cfa3499 | 2017-09-07 10:29:51 +0200 | [diff] [blame] | 13 | select USB_GADGET_DOWNLOAD |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 14 | help |
| 15 | This enables the USB part of the fastboot gadget. |
| 16 | |
Alex Kiernan | f73a7df | 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 | 312a10f | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 24 | if FASTBOOT |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 25 | |
| 26 | config FASTBOOT_BUF_ADDR |
| 27 | hex "Define FASTBOOT buffer address" |
Tom Rini | 48f6232 | 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 | 0a60a81 | 2018-09-25 16:40:23 +0200 | [diff] [blame] | 38 | default 0 if SANDBOX |
Steve Rae | e016f0b | 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 | 48f6232 | 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 | 0a60a81 | 2018-09-25 16:40:23 +0200 | [diff] [blame] | 49 | default 0x8192 if SANDBOX |
Tom Rini | 48f6232 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 50 | default 0x7000000 |
Steve Rae | e016f0b | 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 | 9af5ba8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 56 | config FASTBOOT_USB_DEV |
| 57 | int "USB controller number" |
Alex Kiernan | 312a10f | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 58 | depends on USB_FUNCTION_FASTBOOT |
Semen Protsenko | 9af5ba8 | 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 | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 65 | config FASTBOOT_FLASH |
| 66 | bool "Enable FASTBOOT FLASH command" |
Jagan Teki | a9af59a | 2019-11-19 13:56:18 +0530 | [diff] [blame] | 67 | default y if ARCH_SUNXI || ARCH_ROCKCHIP |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 68 | depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS) |
Alex Kiernan | c232d14 | 2018-05-29 15:30:52 +0000 | [diff] [blame] | 69 | select IMAGE_SPARSE |
Steve Rae | e016f0b | 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 | |
Heiko Schocher | bc820d5 | 2021-02-10 09:29:03 +0100 | [diff] [blame] | 75 | config FASTBOOT_UUU_SUPPORT |
| 76 | bool "Enable FASTBOOT i.MX UUU special command" |
| 77 | default n |
| 78 | help |
| 79 | The fastboot protocol includes "UCmd" and "ACmd" command. |
| 80 | Be aware that you provide full access to any U-Boot command, |
| 81 | including working with memory and may open a huge backdoor, |
| 82 | when enabling this option. |
| 83 | |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 84 | choice |
| 85 | prompt "Flash provider for FASTBOOT" |
| 86 | depends on FASTBOOT_FLASH |
| 87 | |
| 88 | config FASTBOOT_FLASH_MMC |
| 89 | bool "FASTBOOT on MMC" |
| 90 | depends on MMC |
| 91 | |
| 92 | config FASTBOOT_FLASH_NAND |
| 93 | bool "FASTBOOT on NAND" |
Miquel Raynal | 88718be | 2019-10-03 19:50:03 +0200 | [diff] [blame] | 94 | depends on MTD_RAW_NAND && CMD_MTDPARTS |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 95 | |
| 96 | endchoice |
| 97 | |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 98 | config FASTBOOT_FLASH_MMC_DEV |
| 99 | int "Define FASTBOOT MMC FLASH default device" |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 100 | depends on FASTBOOT_FLASH_MMC |
Jagan Teki | a9af59a | 2019-11-19 13:56:18 +0530 | [diff] [blame] | 101 | default 0 if ARCH_ROCKCHIP |
Maxime Ripard | de86fc3 | 2017-08-23 10:12:22 +0200 | [diff] [blame] | 102 | default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 |
| 103 | default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 104 | help |
| 105 | The fastboot "flash" command requires additional information |
| 106 | regarding the non-volatile storage device. Define this to |
| 107 | the eMMC device that fastboot should use to store the image. |
| 108 | |
Alex Kiernan | 4085b90 | 2018-05-29 15:30:51 +0000 | [diff] [blame] | 109 | config FASTBOOT_FLASH_NAND_TRIMFFS |
| 110 | bool "Skip empty pages when flashing NAND" |
| 111 | depends on FASTBOOT_FLASH_NAND |
| 112 | help |
| 113 | When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff |
| 114 | pages. |
| 115 | |
Patrick Delaunay | 3acbc7b | 2021-01-27 14:46:47 +0100 | [diff] [blame] | 116 | config FASTBOOT_MMC_BOOT_SUPPORT |
| 117 | bool "Enable EMMC_BOOT flash/erase" |
| 118 | depends on FASTBOOT_FLASH_MMC |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 119 | help |
| 120 | The fastboot "flash" and "erase" commands normally does operations |
Patrick Delaunay | 3acbc7b | 2021-01-27 14:46:47 +0100 | [diff] [blame] | 121 | on eMMC userdata. Define this to enable the special commands to |
| 122 | flash/erase eMMC boot partition. |
| 123 | The default target name for updating eMMC boot partition 1/2 is |
| 124 | CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME. |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 125 | |
| 126 | config FASTBOOT_MMC_BOOT1_NAME |
| 127 | string "Target name for updating EMMC_BOOT1" |
Patrick Delaunay | 3acbc7b | 2021-01-27 14:46:47 +0100 | [diff] [blame] | 128 | depends on FASTBOOT_MMC_BOOT_SUPPORT |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 129 | default "mmc0boot0" |
| 130 | help |
| 131 | The fastboot "flash" and "erase" commands support operations on |
| 132 | EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on |
| 133 | the "fastboot flash" and "fastboot erase" commands match the value |
| 134 | defined here. |
| 135 | The default target name for updating EMMC_BOOT1 is "mmc0boot0". |
| 136 | |
Patrick Delaunay | 3acbc7b | 2021-01-27 14:46:47 +0100 | [diff] [blame] | 137 | config FASTBOOT_MMC_BOOT2_NAME |
| 138 | string "Target name for updating EMMC_BOOT2" |
| 139 | depends on FASTBOOT_MMC_BOOT_SUPPORT |
| 140 | default "mmc0boot1" |
| 141 | help |
| 142 | The fastboot "flash" and "erase" commands support operations on |
| 143 | EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on |
| 144 | the "fastboot flash" and "fastboot erase" commands match the value |
| 145 | defined here. |
| 146 | The default target name for updating EMMC_BOOT2 is "mmc0boot1". |
| 147 | |
Patrick Delaunay | 7596696 | 2021-01-27 14:46:46 +0100 | [diff] [blame] | 148 | config FASTBOOT_MMC_USER_SUPPORT |
| 149 | bool "Enable eMMC userdata partition flash/erase" |
| 150 | depends on FASTBOOT_FLASH_MMC |
| 151 | help |
| 152 | Define this to enable the support "flash" and "erase" command on |
| 153 | eMMC userdata. The "flash" command only update the MBR and GPT |
| 154 | header when CONFIG_EFI_PARTITION is supported. |
| 155 | The "erase" command erase all the userdata. |
| 156 | This occurs when the specified "partition name" on the |
| 157 | fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME. |
| 158 | |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 159 | config FASTBOOT_MMC_USER_NAME |
Patrick Delaunay | 7596696 | 2021-01-27 14:46:46 +0100 | [diff] [blame] | 160 | string "Target name for updating EMMC_USER" |
| 161 | depends on FASTBOOT_MMC_USER_SUPPORT |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 162 | default "mmc0" |
| 163 | help |
Patrick Delaunay | 7596696 | 2021-01-27 14:46:46 +0100 | [diff] [blame] | 164 | The fastboot "flash" and "erase" command supports EMMC_USER. |
| 165 | This occurs when the specified "EMMC_USER name" on the |
| 166 | "fastboot flash" and the "fastboot erase" commands match the value |
| 167 | defined here. |
mingming lee | 1fdbad0 | 2020-01-16 16:11:42 +0800 | [diff] [blame] | 168 | The default target name for erasing EMMC_USER is "mmc0". |
| 169 | |
Petr Kulhavy | 6f6c863 | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 170 | config FASTBOOT_GPT_NAME |
| 171 | string "Target name for updating GPT" |
Alex Kiernan | 42d8dd4 | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 172 | depends on FASTBOOT_FLASH_MMC && EFI_PARTITION |
Petr Kulhavy | 6f6c863 | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 173 | default "gpt" |
| 174 | help |
| 175 | The fastboot "flash" command supports writing the downloaded |
| 176 | image to the Protective MBR and the Primary GUID Partition |
| 177 | Table. (Additionally, this downloaded image is post-processed |
| 178 | to generate and write the Backup GUID Partition Table.) |
| 179 | This occurs when the specified "partition name" on the |
| 180 | "fastboot flash" command line matches the value defined here. |
| 181 | The default target name for updating GPT is "gpt". |
| 182 | |
| 183 | config FASTBOOT_MBR_NAME |
| 184 | string "Target name for updating MBR" |
Alex Kiernan | 42d8dd4 | 2018-05-29 15:30:42 +0000 | [diff] [blame] | 185 | depends on FASTBOOT_FLASH_MMC && DOS_PARTITION |
Petr Kulhavy | 6f6c863 | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 186 | default "mbr" |
| 187 | help |
| 188 | The fastboot "flash" command allows to write the downloaded image |
| 189 | to the Master Boot Record. This occurs when the "partition name" |
| 190 | specified on the "fastboot flash" command line matches the value |
| 191 | defined here. The default target name for updating MBR is "mbr". |
| 192 | |
Alex Kiernan | 3845b90 | 2018-05-29 15:30:54 +0000 | [diff] [blame] | 193 | config FASTBOOT_CMD_OEM_FORMAT |
| 194 | bool "Enable the 'oem format' command" |
| 195 | depends on FASTBOOT_FLASH_MMC && CMD_GPT |
| 196 | help |
| 197 | Add support for the "oem format" command from a client. This |
| 198 | relies on the env variable partitions to contain the list of |
| 199 | partitions as required by the gpt command. |
| 200 | |
Patrick Delaunay | b2f6b97 | 2021-01-27 14:46:48 +0100 | [diff] [blame] | 201 | config FASTBOOT_CMD_OEM_PARTCONF |
| 202 | bool "Enable the 'oem partconf' command" |
| 203 | depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT |
| 204 | help |
| 205 | Add support for the "oem partconf" command from a client. This set |
| 206 | the mmc boot-partition for the selecting eMMC device. |
| 207 | |
Patrick Delaunay | 0c0394b | 2021-01-27 14:46:49 +0100 | [diff] [blame] | 208 | config FASTBOOT_CMD_OEM_BOOTBUS |
| 209 | bool "Enable the 'oem bootbus' command" |
| 210 | depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT |
| 211 | help |
| 212 | Add support for the "oem bootbus" command from a client. This set |
| 213 | the mmc boot configuration for the selecting eMMC device. |
| 214 | |
Yann E. MORIN | c294873 | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 215 | endif # FASTBOOT |
Alex Kiernan | 312a10f | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 216 | |
| 217 | endmenu |