blob: a3df9aa3d0f858cf662924e463e7299db2730b3e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
menu "Fastboot support"
config FASTBOOT
bool
imply ANDROID_BOOT_IMAGE
imply CMD_FASTBOOT
help
Fastboot is a protocol used in Android devices for
communicating between the device and a computer during
the bootloader stage. It allows the user to flash the
device firmware and unlock the bootloader.
More information about the protocol and usecases:
https://android.googlesource.com/platform/system/core/+/refs/heads/master/fastboot/
config USB_FUNCTION_FASTBOOT
bool "Enable USB fastboot gadget"
depends on USB_GADGET
default y if ARCH_SUNXI && USB_MUSB_GADGET
select FASTBOOT
select USB_GADGET_DOWNLOAD
help
This enables the USB part of the fastboot gadget.
config UDP_FUNCTION_FASTBOOT
depends on NET
select FASTBOOT
bool "Enable fastboot protocol over UDP"
help
This enables the fastboot protocol over UDP.
config UDP_FUNCTION_FASTBOOT_PORT
depends on UDP_FUNCTION_FASTBOOT
int "Define FASTBOOT UDP port"
default 5554
help
The fastboot protocol requires a UDP port number.
config TCP_FUNCTION_FASTBOOT
depends on NET
select FASTBOOT
bool "Enable fastboot protocol over TCP"
help
This enables the fastboot protocol over TCP.
if FASTBOOT
config FASTBOOT_BUF_ADDR
hex "Define FASTBOOT buffer address"
default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
default 0x81000000 if ARCH_OMAP2PLUS
default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
ROCKCHIP_RK322X
default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
ROCKCHIP_RK3399
default 0x280000 if ROCKCHIP_RK3368
default 0x100000 if ARCH_ZYNQMP
default 0 if SANDBOX
help
The fastboot protocol requires a large memory buffer for
downloads. Define this to the starting RAM address to use for
downloaded images.
config FASTBOOT_BUF_SIZE
hex "Define FASTBOOT buffer size"
default 0x8000000 if ARCH_ROCKCHIP
default 0x6000000 if ARCH_ZYNQMP
default 0x2000000 if ARCH_SUNXI
default 0x8192 if SANDBOX
default 0x7000000
help
The fastboot protocol requires a large memory buffer for
downloads. This buffer should be as large as possible for a
platform. Define this to the size available RAM for fastboot.
config FASTBOOT_USB_DEV
int "USB controller number"
depends on USB_FUNCTION_FASTBOOT
default 0
help
Some boards have USB OTG controller other than 0. Define this
option so it can be used in compiled environment (e.g. in
CONFIG_BOOTCOMMAND).
config FASTBOOT_FLASH
bool "Enable FASTBOOT FLASH command"
default y if ARCH_SUNXI || ARCH_ROCKCHIP
depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
select IMAGE_SPARSE
help
The fastboot protocol includes a "flash" command for writing
the downloaded image to a non-volatile storage device. Define
this to enable the "fastboot flash" command.
config FASTBOOT_UUU_SUPPORT
bool "Enable UUU support"
help
This extends the fastboot protocol with the "UCmd" and "ACmd"
commands, which are used by NXP's "universal update utility" (UUU).
These commands allow running any shell command. Do not enable this
feature if you are using verified boot, as it will allow an attacker
to bypass any restrictions you have in place.
choice
prompt "Flash provider for FASTBOOT"
depends on FASTBOOT_FLASH
config FASTBOOT_FLASH_MMC
bool "FASTBOOT on MMC"
depends on MMC
config FASTBOOT_FLASH_NAND
bool "FASTBOOT on NAND"
depends on MTD_RAW_NAND && CMD_MTDPARTS
endchoice
config FASTBOOT_FLASH_MMC_DEV
int "Define FASTBOOT MMC FLASH default device"
depends on FASTBOOT_FLASH_MMC
default 0 if ARCH_ROCKCHIP
default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
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_FLASH_NAND_TRIMFFS
bool "Skip empty pages when flashing NAND"
depends on FASTBOOT_FLASH_NAND
help
When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
pages.
config FASTBOOT_MMC_BOOT_SUPPORT
bool "Enable EMMC_BOOT flash/erase"
depends on FASTBOOT_FLASH_MMC
help
The fastboot "flash" and "erase" commands normally does operations
on eMMC userdata. Define this to enable the special commands to
flash/erase eMMC boot partition.
The default target name for updating eMMC boot partition 1/2 is
CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME.
config FASTBOOT_MMC_BOOT1_NAME
string "Target name for updating EMMC_BOOT1"
depends on FASTBOOT_MMC_BOOT_SUPPORT
default "mmc0boot0"
help
The fastboot "flash" and "erase" commands support operations on
EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
the "fastboot flash" and "fastboot erase" commands match the value
defined here.
The default target name for updating EMMC_BOOT1 is "mmc0boot0".
config FASTBOOT_MMC_BOOT2_NAME
string "Target name for updating EMMC_BOOT2"
depends on FASTBOOT_MMC_BOOT_SUPPORT
default "mmc0boot1"
help
The fastboot "flash" and "erase" commands support operations on
EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on
the "fastboot flash" and "fastboot erase" commands match the value
defined here.
The default target name for updating EMMC_BOOT2 is "mmc0boot1".
config FASTBOOT_MMC_USER_SUPPORT
bool "Enable eMMC userdata partition flash/erase"
depends on FASTBOOT_FLASH_MMC
help
Define this to enable the support "flash" and "erase" command on
eMMC userdata. The "flash" command only update the MBR and GPT
header when CONFIG_EFI_PARTITION is supported.
The "erase" command erase all the userdata.
This occurs when the specified "partition name" on the
fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME.
config FASTBOOT_MMC_USER_NAME
string "Target name for updating EMMC_USER"
depends on FASTBOOT_MMC_USER_SUPPORT
default "mmc0"
help
The fastboot "flash" and "erase" command supports EMMC_USER.
This occurs when the specified "EMMC_USER name" on the
"fastboot flash" and the "fastboot erase" commands match the value
defined here.
The default target name for erasing EMMC_USER is "mmc0".
config FASTBOOT_GPT_NAME
string "Target name for updating GPT"
depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
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_MMC && DOS_PARTITION
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".
config FASTBOOT_CMD_OEM_FORMAT
bool "Enable the 'oem format' command"
depends on FASTBOOT_FLASH_MMC && CMD_GPT
help
Add support for the "oem format" command from a client. This
relies on the env variable partitions to contain the list of
partitions as required by the gpt command.
config FASTBOOT_CMD_OEM_PARTCONF
bool "Enable the 'oem partconf' command"
depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
help
Add support for the "oem partconf" command from a client. This set
the mmc boot-partition for the selecting eMMC device.
config FASTBOOT_CMD_OEM_BOOTBUS
bool "Enable the 'oem bootbus' command"
depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
help
Add support for the "oem bootbus" command from a client. This set
the mmc boot configuration for the selecting eMMC device.
config FASTBOOT_OEM_RUN
bool "Enable the 'oem run' command"
help
This extends the fastboot protocol with an "oem run" command. This
command allows running arbitrary U-Boot shell commands. Do not enable
this feature if you are using verified boot, as it will allow an
attacker to bypass any restrictions you have in place.
endif # FASTBOOT
endmenu
|