blob: bc25ea1d9c7ac8452c2a2b894d91e90dff23be13 [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
Steve Raee016f0b2016-08-15 17:26:26 -070038 help
39 The fastboot protocol requires a large memory buffer for
40 downloads. Define this to the starting RAM address to use for
41 downloaded images.
42
43config FASTBOOT_BUF_SIZE
44 hex "Define FASTBOOT buffer size"
Tom Rini48f62322017-08-25 17:50:27 -040045 default 0x8000000 if ARCH_ROCKCHIP
46 default 0x6000000 if ARCH_ZYNQMP
47 default 0x2000000 if ARCH_SUNXI
48 default 0x7000000
Steve Raee016f0b2016-08-15 17:26:26 -070049 help
50 The fastboot protocol requires a large memory buffer for
51 downloads. This buffer should be as large as possible for a
52 platform. Define this to the size available RAM for fastboot.
53
Semen Protsenko9af5ba82016-10-24 18:41:10 +030054config FASTBOOT_USB_DEV
55 int "USB controller number"
Alex Kiernan312a10f2018-05-29 15:30:39 +000056 depends on USB_FUNCTION_FASTBOOT
Semen Protsenko9af5ba82016-10-24 18:41:10 +030057 default 0
58 help
59 Some boards have USB OTG controller other than 0. Define this
60 option so it can be used in compiled environment (e.g. in
61 CONFIG_BOOTCOMMAND).
62
Steve Raee016f0b2016-08-15 17:26:26 -070063config FASTBOOT_FLASH
64 bool "Enable FASTBOOT FLASH command"
Maxime Ripard7c750fa2017-11-14 21:37:35 +010065 default y if ARCH_SUNXI
Alex Kiernan42d8dd42018-05-29 15:30:42 +000066 depends on MMC || (NAND && CMD_MTDPARTS)
Alex Kiernanc232d142018-05-29 15:30:52 +000067 select IMAGE_SPARSE
Steve Raee016f0b2016-08-15 17:26:26 -070068 help
69 The fastboot protocol includes a "flash" command for writing
70 the downloaded image to a non-volatile storage device. Define
71 this to enable the "fastboot flash" command.
72
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010073choice
74 prompt "Flash provider for FASTBOOT"
75 depends on FASTBOOT_FLASH
76
77config FASTBOOT_FLASH_MMC
78 bool "FASTBOOT on MMC"
79 depends on MMC
80
81config FASTBOOT_FLASH_NAND
82 bool "FASTBOOT on NAND"
Alex Kiernan42d8dd42018-05-29 15:30:42 +000083 depends on NAND && CMD_MTDPARTS
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010084
85endchoice
86
Steve Raee016f0b2016-08-15 17:26:26 -070087config FASTBOOT_FLASH_MMC_DEV
88 int "Define FASTBOOT MMC FLASH default device"
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010089 depends on FASTBOOT_FLASH_MMC
Maxime Ripardde86fc32017-08-23 10:12:22 +020090 default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
91 default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
Steve Raee016f0b2016-08-15 17:26:26 -070092 help
93 The fastboot "flash" command requires additional information
94 regarding the non-volatile storage device. Define this to
95 the eMMC device that fastboot should use to store the image.
96
Alex Kiernan4085b902018-05-29 15:30:51 +000097config FASTBOOT_FLASH_NAND_TRIMFFS
98 bool "Skip empty pages when flashing NAND"
99 depends on FASTBOOT_FLASH_NAND
100 help
101 When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
102 pages.
103
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200104config FASTBOOT_GPT_NAME
105 string "Target name for updating GPT"
Alex Kiernan42d8dd42018-05-29 15:30:42 +0000106 depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200107 default "gpt"
108 help
109 The fastboot "flash" command supports writing the downloaded
110 image to the Protective MBR and the Primary GUID Partition
111 Table. (Additionally, this downloaded image is post-processed
112 to generate and write the Backup GUID Partition Table.)
113 This occurs when the specified "partition name" on the
114 "fastboot flash" command line matches the value defined here.
115 The default target name for updating GPT is "gpt".
116
117config FASTBOOT_MBR_NAME
118 string "Target name for updating MBR"
Alex Kiernan42d8dd42018-05-29 15:30:42 +0000119 depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200120 default "mbr"
121 help
122 The fastboot "flash" command allows to write the downloaded image
123 to the Master Boot Record. This occurs when the "partition name"
124 specified on the "fastboot flash" command line matches the value
125 defined here. The default target name for updating MBR is "mbr".
126
Alex Kiernan3845b902018-05-29 15:30:54 +0000127config FASTBOOT_CMD_OEM_FORMAT
128 bool "Enable the 'oem format' command"
129 depends on FASTBOOT_FLASH_MMC && CMD_GPT
130 help
131 Add support for the "oem format" command from a client. This
132 relies on the env variable partitions to contain the list of
133 partitions as required by the gpt command.
134
Yann E. MORINc2948732016-11-13 22:26:13 +0100135endif # FASTBOOT
Alex Kiernan312a10f2018-05-29 15:30:39 +0000136
137endmenu