blob: d5e4a02098a2da23f1b3ce4a1b4257c684e5f8d9 [file] [log] [blame]
Alex Kiernan312a10f2018-05-29 15:30:39 +00001menu "Fastboot support"
Steve Raee016f0b2016-08-15 17:26:26 -07002
Alex Kiernan312a10f2018-05-29 15:30:39 +00003config FASTBOOT
4 bool
5 imply ANDROID_BOOT_IMAGE
6 imply CMD_FASTBOOT
Steve Raee016f0b2016-08-15 17:26:26 -07007
8config USB_FUNCTION_FASTBOOT
9 bool "Enable USB fastboot gadget"
Alex Kiernan312a10f2018-05-29 15:30:39 +000010 depends on USB_GADGET
11 default y if ARCH_SUNXI && USB_MUSB_GADGET
12 select FASTBOOT
Maxime Ripardcfa34992017-09-07 10:29:51 +020013 select USB_GADGET_DOWNLOAD
Steve Raee016f0b2016-08-15 17:26:26 -070014 help
15 This enables the USB part of the fastboot gadget.
16
Alex Kiernanf73a7df2018-05-29 15:30:53 +000017config 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 Kiernan312a10f2018-05-29 15:30:39 +000024if FASTBOOT
Steve Raee016f0b2016-08-15 17:26:26 -070025
26config FASTBOOT_BUF_ADDR
27 hex "Define FASTBOOT buffer address"
Tom Rini48f62322017-08-25 17:50:27 -040028 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 Wiklander0a60a812018-09-25 16:40:23 +020038 default 0 if SANDBOX
Steve Raee016f0b2016-08-15 17:26:26 -070039 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
44config FASTBOOT_BUF_SIZE
45 hex "Define FASTBOOT buffer size"
Tom Rini48f62322017-08-25 17:50:27 -040046 default 0x8000000 if ARCH_ROCKCHIP
47 default 0x6000000 if ARCH_ZYNQMP
48 default 0x2000000 if ARCH_SUNXI
Jens Wiklander0a60a812018-09-25 16:40:23 +020049 default 0x8192 if SANDBOX
Tom Rini48f62322017-08-25 17:50:27 -040050 default 0x7000000
Steve Raee016f0b2016-08-15 17:26:26 -070051 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 Protsenko9af5ba82016-10-24 18:41:10 +030056config FASTBOOT_USB_DEV
57 int "USB controller number"
Alex Kiernan312a10f2018-05-29 15:30:39 +000058 depends on USB_FUNCTION_FASTBOOT
Semen Protsenko9af5ba82016-10-24 18:41:10 +030059 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 Raee016f0b2016-08-15 17:26:26 -070065config FASTBOOT_FLASH
66 bool "Enable FASTBOOT FLASH command"
Jagan Tekia9af59a2019-11-19 13:56:18 +053067 default y if ARCH_SUNXI || ARCH_ROCKCHIP
Miquel Raynal88718be2019-10-03 19:50:03 +020068 depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
Alex Kiernanc232d142018-05-29 15:30:52 +000069 select IMAGE_SPARSE
Steve Raee016f0b2016-08-15 17:26:26 -070070 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 Schocherbc820d52021-02-10 09:29:03 +010075config FASTBOOT_UUU_SUPPORT
76 bool "Enable FASTBOOT i.MX UUU special command"
Heiko Schocherbc820d52021-02-10 09:29:03 +010077 help
78 The fastboot protocol includes "UCmd" and "ACmd" command.
79 Be aware that you provide full access to any U-Boot command,
80 including working with memory and may open a huge backdoor,
81 when enabling this option.
82
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010083choice
84 prompt "Flash provider for FASTBOOT"
85 depends on FASTBOOT_FLASH
86
87config FASTBOOT_FLASH_MMC
88 bool "FASTBOOT on MMC"
89 depends on MMC
90
91config FASTBOOT_FLASH_NAND
92 bool "FASTBOOT on NAND"
Miquel Raynal88718be2019-10-03 19:50:03 +020093 depends on MTD_RAW_NAND && CMD_MTDPARTS
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010094
95endchoice
96
Steve Raee016f0b2016-08-15 17:26:26 -070097config FASTBOOT_FLASH_MMC_DEV
98 int "Define FASTBOOT MMC FLASH default device"
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010099 depends on FASTBOOT_FLASH_MMC
Jagan Tekia9af59a2019-11-19 13:56:18 +0530100 default 0 if ARCH_ROCKCHIP
Maxime Ripardde86fc32017-08-23 10:12:22 +0200101 default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
102 default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
Steve Raee016f0b2016-08-15 17:26:26 -0700103 help
104 The fastboot "flash" command requires additional information
105 regarding the non-volatile storage device. Define this to
106 the eMMC device that fastboot should use to store the image.
107
Alex Kiernan4085b902018-05-29 15:30:51 +0000108config FASTBOOT_FLASH_NAND_TRIMFFS
109 bool "Skip empty pages when flashing NAND"
110 depends on FASTBOOT_FLASH_NAND
111 help
112 When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
113 pages.
114
Patrick Delaunay3acbc7b2021-01-27 14:46:47 +0100115config FASTBOOT_MMC_BOOT_SUPPORT
116 bool "Enable EMMC_BOOT flash/erase"
117 depends on FASTBOOT_FLASH_MMC
mingming lee1fdbad02020-01-16 16:11:42 +0800118 help
119 The fastboot "flash" and "erase" commands normally does operations
Patrick Delaunay3acbc7b2021-01-27 14:46:47 +0100120 on eMMC userdata. Define this to enable the special commands to
121 flash/erase eMMC boot partition.
122 The default target name for updating eMMC boot partition 1/2 is
123 CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME.
mingming lee1fdbad02020-01-16 16:11:42 +0800124
125config FASTBOOT_MMC_BOOT1_NAME
126 string "Target name for updating EMMC_BOOT1"
Patrick Delaunay3acbc7b2021-01-27 14:46:47 +0100127 depends on FASTBOOT_MMC_BOOT_SUPPORT
mingming lee1fdbad02020-01-16 16:11:42 +0800128 default "mmc0boot0"
129 help
130 The fastboot "flash" and "erase" commands support operations on
131 EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
132 the "fastboot flash" and "fastboot erase" commands match the value
133 defined here.
134 The default target name for updating EMMC_BOOT1 is "mmc0boot0".
135
Patrick Delaunay3acbc7b2021-01-27 14:46:47 +0100136config FASTBOOT_MMC_BOOT2_NAME
137 string "Target name for updating EMMC_BOOT2"
138 depends on FASTBOOT_MMC_BOOT_SUPPORT
139 default "mmc0boot1"
140 help
141 The fastboot "flash" and "erase" commands support operations on
142 EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on
143 the "fastboot flash" and "fastboot erase" commands match the value
144 defined here.
145 The default target name for updating EMMC_BOOT2 is "mmc0boot1".
146
Patrick Delaunay75966962021-01-27 14:46:46 +0100147config FASTBOOT_MMC_USER_SUPPORT
148 bool "Enable eMMC userdata partition flash/erase"
149 depends on FASTBOOT_FLASH_MMC
150 help
151 Define this to enable the support "flash" and "erase" command on
152 eMMC userdata. The "flash" command only update the MBR and GPT
153 header when CONFIG_EFI_PARTITION is supported.
154 The "erase" command erase all the userdata.
155 This occurs when the specified "partition name" on the
156 fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME.
157
mingming lee1fdbad02020-01-16 16:11:42 +0800158config FASTBOOT_MMC_USER_NAME
Patrick Delaunay75966962021-01-27 14:46:46 +0100159 string "Target name for updating EMMC_USER"
160 depends on FASTBOOT_MMC_USER_SUPPORT
mingming lee1fdbad02020-01-16 16:11:42 +0800161 default "mmc0"
162 help
Patrick Delaunay75966962021-01-27 14:46:46 +0100163 The fastboot "flash" and "erase" command supports EMMC_USER.
164 This occurs when the specified "EMMC_USER name" on the
165 "fastboot flash" and the "fastboot erase" commands match the value
166 defined here.
mingming lee1fdbad02020-01-16 16:11:42 +0800167 The default target name for erasing EMMC_USER is "mmc0".
168
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200169config FASTBOOT_GPT_NAME
170 string "Target name for updating GPT"
Alex Kiernan42d8dd42018-05-29 15:30:42 +0000171 depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200172 default "gpt"
173 help
174 The fastboot "flash" command supports writing the downloaded
175 image to the Protective MBR and the Primary GUID Partition
176 Table. (Additionally, this downloaded image is post-processed
177 to generate and write the Backup GUID Partition Table.)
178 This occurs when the specified "partition name" on the
179 "fastboot flash" command line matches the value defined here.
180 The default target name for updating GPT is "gpt".
181
182config FASTBOOT_MBR_NAME
183 string "Target name for updating MBR"
Alex Kiernan42d8dd42018-05-29 15:30:42 +0000184 depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200185 default "mbr"
186 help
187 The fastboot "flash" command allows to write the downloaded image
188 to the Master Boot Record. This occurs when the "partition name"
189 specified on the "fastboot flash" command line matches the value
190 defined here. The default target name for updating MBR is "mbr".
191
Alex Kiernan3845b902018-05-29 15:30:54 +0000192config FASTBOOT_CMD_OEM_FORMAT
193 bool "Enable the 'oem format' command"
194 depends on FASTBOOT_FLASH_MMC && CMD_GPT
195 help
196 Add support for the "oem format" command from a client. This
197 relies on the env variable partitions to contain the list of
198 partitions as required by the gpt command.
199
Patrick Delaunayb2f6b972021-01-27 14:46:48 +0100200config FASTBOOT_CMD_OEM_PARTCONF
201 bool "Enable the 'oem partconf' command"
202 depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
203 help
204 Add support for the "oem partconf" command from a client. This set
205 the mmc boot-partition for the selecting eMMC device.
206
Patrick Delaunay0c0394b2021-01-27 14:46:49 +0100207config FASTBOOT_CMD_OEM_BOOTBUS
208 bool "Enable the 'oem bootbus' command"
209 depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
210 help
211 Add support for the "oem bootbus" command from a client. This set
212 the mmc boot configuration for the selecting eMMC device.
213
Yann E. MORINc2948732016-11-13 22:26:13 +0100214endif # FASTBOOT
Alex Kiernan312a10f2018-05-29 15:30:39 +0000215
216endmenu