blob: 7330da216aae83a9c0ab708735fe36081ed440cb [file] [log] [blame]
Steve Rae437689f2016-08-15 17:26:26 -07001comment "FASTBOOT"
2
Yann E. MORIN3d2561f2016-11-13 22:26:13 +01003menuconfig FASTBOOT
4 bool "Fastboot support"
Tom Rinib5bf5622017-08-25 17:50:27 -04005 depends on USB_GADGET
Maxime Ripard6d7dfe22017-09-07 10:29:51 +02006 default y if ARCH_SUNXI && USB_MUSB_GADGET
Steve Rae437689f2016-08-15 17:26:26 -07007
Yann E. MORIN3d2561f2016-11-13 22:26:13 +01008if FASTBOOT
Steve Rae437689f2016-08-15 17:26:26 -07009
10config USB_FUNCTION_FASTBOOT
11 bool "Enable USB fastboot gadget"
Maxime Ripard6d7dfe22017-09-07 10:29:51 +020012 default y
13 select USB_GADGET_DOWNLOAD
14 imply ANDROID_BOOT_IMAGE
15 imply CMD_FASTBOOT
Steve Rae437689f2016-08-15 17:26:26 -070016 help
17 This enables the USB part of the fastboot gadget.
18
19config CMD_FASTBOOT
20 bool "Enable FASTBOOT command"
21 help
22 This enables the command "fastboot" which enables the Android
23 fastboot mode for the platform's USB device. Fastboot is a USB
24 protocol for downloading images, flashing and device control
25 used on Android devices.
26
Simon Glass663b0cc2017-08-04 16:35:06 -060027 See doc/README.android-fastboot for more information.
28
Steve Rae437689f2016-08-15 17:26:26 -070029if USB_FUNCTION_FASTBOOT
30
31config FASTBOOT_BUF_ADDR
32 hex "Define FASTBOOT buffer address"
Tom Rinib5bf5622017-08-25 17:50:27 -040033 default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
34 default 0x81000000 if ARCH_OMAP2PLUS
35 default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
36 default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
37 default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
38 ROCKCHIP_RK322X
39 default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
40 ROCKCHIP_RK3399
41 default 0x280000 if ROCKCHIP_RK3368
42 default 0x100000 if ARCH_ZYNQMP
Steve Rae437689f2016-08-15 17:26:26 -070043 help
44 The fastboot protocol requires a large memory buffer for
45 downloads. Define this to the starting RAM address to use for
46 downloaded images.
47
48config FASTBOOT_BUF_SIZE
49 hex "Define FASTBOOT buffer size"
Tom Rinib5bf5622017-08-25 17:50:27 -040050 default 0x8000000 if ARCH_ROCKCHIP
51 default 0x6000000 if ARCH_ZYNQMP
52 default 0x2000000 if ARCH_SUNXI
53 default 0x7000000
Steve Rae437689f2016-08-15 17:26:26 -070054 help
55 The fastboot protocol requires a large memory buffer for
56 downloads. This buffer should be as large as possible for a
57 platform. Define this to the size available RAM for fastboot.
58
Semen Protsenko97bb3f82016-10-24 18:41:10 +030059config FASTBOOT_USB_DEV
60 int "USB controller number"
61 default 0
62 help
63 Some boards have USB OTG controller other than 0. Define this
64 option so it can be used in compiled environment (e.g. in
65 CONFIG_BOOTCOMMAND).
66
Steve Rae437689f2016-08-15 17:26:26 -070067config FASTBOOT_FLASH
68 bool "Enable FASTBOOT FLASH command"
69 help
70 The fastboot protocol includes a "flash" command for writing
71 the downloaded image to a non-volatile storage device. Define
72 this to enable the "fastboot flash" command.
73
74config FASTBOOT_FLASH_MMC_DEV
75 int "Define FASTBOOT MMC FLASH default device"
Tom Rinib5bf5622017-08-25 17:50:27 -040076 depends on FASTBOOT_FLASH && MMC
Steve Rae437689f2016-08-15 17:26:26 -070077 help
78 The fastboot "flash" command requires additional information
79 regarding the non-volatile storage device. Define this to
80 the eMMC device that fastboot should use to store the image.
81
Petr Kulhavy4ed1eca2016-09-09 10:27:18 +020082config FASTBOOT_GPT_NAME
83 string "Target name for updating GPT"
84 depends on FASTBOOT_FLASH
85 default "gpt"
86 help
87 The fastboot "flash" command supports writing the downloaded
88 image to the Protective MBR and the Primary GUID Partition
89 Table. (Additionally, this downloaded image is post-processed
90 to generate and write the Backup GUID Partition Table.)
91 This occurs when the specified "partition name" on the
92 "fastboot flash" command line matches the value defined here.
93 The default target name for updating GPT is "gpt".
94
95config FASTBOOT_MBR_NAME
96 string "Target name for updating MBR"
97 depends on FASTBOOT_FLASH
98 default "mbr"
99 help
100 The fastboot "flash" command allows to write the downloaded image
101 to the Master Boot Record. This occurs when the "partition name"
102 specified on the "fastboot flash" command line matches the value
103 defined here. The default target name for updating MBR is "mbr".
104
Steve Rae437689f2016-08-15 17:26:26 -0700105endif # USB_FUNCTION_FASTBOOT
106
Yann E. MORIN3d2561f2016-11-13 22:26:13 +0100107endif # FASTBOOT