1 menu "Fastboot support"
5 imply ANDROID_BOOT_IMAGE
8 Fastboot is a protocol used in Android devices for
9 communicating between the device and a computer during
10 the bootloader stage. It allows the user to flash the
11 device firmware and unlock the bootloader.
12 More information about the protocol and usecases:
13 https://android.googlesource.com/platform/system/core/+/refs/heads/master/fastboot/
15 config USB_FUNCTION_FASTBOOT
16 bool "Enable USB fastboot gadget"
18 default y if ARCH_SUNXI && USB_MUSB_GADGET
20 select USB_GADGET_DOWNLOAD
22 This enables the USB part of the fastboot gadget.
24 config UDP_FUNCTION_FASTBOOT
27 bool "Enable fastboot protocol over UDP"
29 This enables the fastboot protocol over UDP.
31 config UDP_FUNCTION_FASTBOOT_PORT
32 depends on UDP_FUNCTION_FASTBOOT
33 int "Define FASTBOOT UDP port"
36 The fastboot protocol requires a UDP port number.
38 config TCP_FUNCTION_FASTBOOT
41 bool "Enable fastboot protocol over TCP"
43 This enables the fastboot protocol over TCP.
47 config FASTBOOT_BUF_ADDR
48 hex "Define FASTBOOT buffer address"
49 default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
50 default 0x81000000 if ARCH_OMAP2PLUS
51 default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
52 default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
53 default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
55 default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
57 default 0x280000 if ROCKCHIP_RK3368
58 default 0x100000 if ARCH_ZYNQMP
61 The fastboot protocol requires a large memory buffer for
62 downloads. Define this to the starting RAM address to use for
65 config FASTBOOT_BUF_SIZE
66 hex "Define FASTBOOT buffer size"
67 default 0x8000000 if ARCH_ROCKCHIP
68 default 0x6000000 if ARCH_ZYNQMP
69 default 0x2000000 if ARCH_SUNXI
70 default 0x8192 if SANDBOX
73 The fastboot protocol requires a large memory buffer for
74 downloads. This buffer should be as large as possible for a
75 platform. Define this to the size available RAM for fastboot.
77 config FASTBOOT_USB_DEV
78 int "USB controller number"
79 depends on USB_FUNCTION_FASTBOOT
82 Some boards have USB OTG controller other than 0. Define this
83 option so it can be used in compiled environment (e.g. in
87 bool "Enable FASTBOOT FLASH command"
88 default y if ARCH_SUNXI || ARCH_ROCKCHIP
89 depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
92 The fastboot protocol includes a "flash" command for writing
93 the downloaded image to a non-volatile storage device. Define
94 this to enable the "fastboot flash" command.
96 config FASTBOOT_UUU_SUPPORT
97 bool "Enable UUU support"
99 This extends the fastboot protocol with the "UCmd" and "ACmd"
100 commands, which are used by NXP's "universal update utility" (UUU).
101 These commands allow running any shell command. Do not enable this
102 feature if you are using verified boot, as it will allow an attacker
103 to bypass any restrictions you have in place.
106 prompt "Flash provider for FASTBOOT"
107 depends on FASTBOOT_FLASH
109 config FASTBOOT_FLASH_MMC
110 bool "FASTBOOT on MMC"
113 config FASTBOOT_FLASH_NAND
114 bool "FASTBOOT on NAND"
115 depends on MTD_RAW_NAND && CMD_MTDPARTS
119 config FASTBOOT_FLASH_MMC_DEV
120 int "Define FASTBOOT MMC FLASH default device"
121 depends on FASTBOOT_FLASH_MMC
122 default 0 if ARCH_ROCKCHIP
123 default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
124 default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
126 The fastboot "flash" command requires additional information
127 regarding the non-volatile storage device. Define this to
128 the eMMC device that fastboot should use to store the image.
130 config FASTBOOT_FLASH_NAND_TRIMFFS
131 bool "Skip empty pages when flashing NAND"
132 depends on FASTBOOT_FLASH_NAND
134 When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
137 config FASTBOOT_MMC_BOOT_SUPPORT
138 bool "Enable EMMC_BOOT flash/erase"
139 depends on FASTBOOT_FLASH_MMC
141 The fastboot "flash" and "erase" commands normally does operations
142 on eMMC userdata. Define this to enable the special commands to
143 flash/erase eMMC boot partition.
144 The default target name for updating eMMC boot partition 1/2 is
145 CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME.
147 config FASTBOOT_MMC_BOOT1_NAME
148 string "Target name for updating EMMC_BOOT1"
149 depends on FASTBOOT_MMC_BOOT_SUPPORT
152 The fastboot "flash" and "erase" commands support operations on
153 EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
154 the "fastboot flash" and "fastboot erase" commands match the value
156 The default target name for updating EMMC_BOOT1 is "mmc0boot0".
158 config FASTBOOT_MMC_BOOT2_NAME
159 string "Target name for updating EMMC_BOOT2"
160 depends on FASTBOOT_MMC_BOOT_SUPPORT
163 The fastboot "flash" and "erase" commands support operations on
164 EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on
165 the "fastboot flash" and "fastboot erase" commands match the value
167 The default target name for updating EMMC_BOOT2 is "mmc0boot1".
169 config FASTBOOT_MMC_USER_SUPPORT
170 bool "Enable eMMC userdata partition flash/erase"
171 depends on FASTBOOT_FLASH_MMC
173 Define this to enable the support "flash" and "erase" command on
174 eMMC userdata. The "flash" command only update the MBR and GPT
175 header when CONFIG_EFI_PARTITION is supported.
176 The "erase" command erase all the userdata.
177 This occurs when the specified "partition name" on the
178 fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME.
180 config FASTBOOT_MMC_USER_NAME
181 string "Target name for updating EMMC_USER"
182 depends on FASTBOOT_MMC_USER_SUPPORT
185 The fastboot "flash" and "erase" command supports EMMC_USER.
186 This occurs when the specified "EMMC_USER name" on the
187 "fastboot flash" and the "fastboot erase" commands match the value
189 The default target name for erasing EMMC_USER is "mmc0".
191 config FASTBOOT_GPT_NAME
192 string "Target name for updating GPT"
193 depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
196 The fastboot "flash" command supports writing the downloaded
197 image to the Protective MBR and the Primary GUID Partition
198 Table. (Additionally, this downloaded image is post-processed
199 to generate and write the Backup GUID Partition Table.)
200 This occurs when the specified "partition name" on the
201 "fastboot flash" command line matches the value defined here.
202 The default target name for updating GPT is "gpt".
204 config FASTBOOT_MBR_NAME
205 string "Target name for updating MBR"
206 depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
209 The fastboot "flash" command allows to write the downloaded image
210 to the Master Boot Record. This occurs when the "partition name"
211 specified on the "fastboot flash" command line matches the value
212 defined here. The default target name for updating MBR is "mbr".
214 config FASTBOOT_CMD_OEM_FORMAT
215 bool "Enable the 'oem format' command"
216 depends on FASTBOOT_FLASH_MMC && CMD_GPT
218 Add support for the "oem format" command from a client. This
219 relies on the env variable partitions to contain the list of
220 partitions as required by the gpt command.
222 config FASTBOOT_CMD_OEM_PARTCONF
223 bool "Enable the 'oem partconf' command"
224 depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
226 Add support for the "oem partconf" command from a client. This set
227 the mmc boot-partition for the selecting eMMC device.
229 config FASTBOOT_CMD_OEM_BOOTBUS
230 bool "Enable the 'oem bootbus' command"
231 depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
233 Add support for the "oem bootbus" command from a client. This set
234 the mmc boot configuration for the selecting eMMC device.
236 config FASTBOOT_OEM_RUN
237 bool "Enable the 'oem run' command"
239 This extends the fastboot protocol with an "oem run" command. This
240 command allows running arbitrary U-Boot shell commands. Do not enable
241 this feature if you are using verified boot, as it will allow an
242 attacker to bypass any restrictions you have in place.