blob: 9bbc5c661d4376a05ca21423063af89b8f0346fb [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 Kiernan312a10f2018-05-29 15:30:39 +000017if FASTBOOT
Steve Raee016f0b2016-08-15 17:26:26 -070018
19config FASTBOOT_BUF_ADDR
20 hex "Define FASTBOOT buffer address"
Tom Rini48f62322017-08-25 17:50:27 -040021 default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
22 default 0x81000000 if ARCH_OMAP2PLUS
23 default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
24 default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
25 default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
26 ROCKCHIP_RK322X
27 default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
28 ROCKCHIP_RK3399
29 default 0x280000 if ROCKCHIP_RK3368
30 default 0x100000 if ARCH_ZYNQMP
Steve Raee016f0b2016-08-15 17:26:26 -070031 help
32 The fastboot protocol requires a large memory buffer for
33 downloads. Define this to the starting RAM address to use for
34 downloaded images.
35
36config FASTBOOT_BUF_SIZE
37 hex "Define FASTBOOT buffer size"
Tom Rini48f62322017-08-25 17:50:27 -040038 default 0x8000000 if ARCH_ROCKCHIP
39 default 0x6000000 if ARCH_ZYNQMP
40 default 0x2000000 if ARCH_SUNXI
41 default 0x7000000
Steve Raee016f0b2016-08-15 17:26:26 -070042 help
43 The fastboot protocol requires a large memory buffer for
44 downloads. This buffer should be as large as possible for a
45 platform. Define this to the size available RAM for fastboot.
46
Semen Protsenko9af5ba82016-10-24 18:41:10 +030047config FASTBOOT_USB_DEV
48 int "USB controller number"
Alex Kiernan312a10f2018-05-29 15:30:39 +000049 depends on USB_FUNCTION_FASTBOOT
Semen Protsenko9af5ba82016-10-24 18:41:10 +030050 default 0
51 help
52 Some boards have USB OTG controller other than 0. Define this
53 option so it can be used in compiled environment (e.g. in
54 CONFIG_BOOTCOMMAND).
55
Steve Raee016f0b2016-08-15 17:26:26 -070056config FASTBOOT_FLASH
57 bool "Enable FASTBOOT FLASH command"
Maxime Ripard7c750fa2017-11-14 21:37:35 +010058 default y if ARCH_SUNXI
Alex Kiernan42d8dd42018-05-29 15:30:42 +000059 depends on MMC || (NAND && CMD_MTDPARTS)
Steve Raee016f0b2016-08-15 17:26:26 -070060 help
61 The fastboot protocol includes a "flash" command for writing
62 the downloaded image to a non-volatile storage device. Define
63 this to enable the "fastboot flash" command.
64
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010065choice
66 prompt "Flash provider for FASTBOOT"
67 depends on FASTBOOT_FLASH
68
69config FASTBOOT_FLASH_MMC
70 bool "FASTBOOT on MMC"
71 depends on MMC
72
73config FASTBOOT_FLASH_NAND
74 bool "FASTBOOT on NAND"
Alex Kiernan42d8dd42018-05-29 15:30:42 +000075 depends on NAND && CMD_MTDPARTS
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010076
77endchoice
78
Steve Raee016f0b2016-08-15 17:26:26 -070079config FASTBOOT_FLASH_MMC_DEV
80 int "Define FASTBOOT MMC FLASH default device"
Patrick Delaunayb0cce3f2017-12-07 18:26:17 +010081 depends on FASTBOOT_FLASH_MMC
Maxime Ripardde86fc32017-08-23 10:12:22 +020082 default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
83 default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
Steve Raee016f0b2016-08-15 17:26:26 -070084 help
85 The fastboot "flash" command requires additional information
86 regarding the non-volatile storage device. Define this to
87 the eMMC device that fastboot should use to store the image.
88
Petr Kulhavy6f6c8632016-09-09 10:27:18 +020089config FASTBOOT_GPT_NAME
90 string "Target name for updating GPT"
Alex Kiernan42d8dd42018-05-29 15:30:42 +000091 depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +020092 default "gpt"
93 help
94 The fastboot "flash" command supports writing the downloaded
95 image to the Protective MBR and the Primary GUID Partition
96 Table. (Additionally, this downloaded image is post-processed
97 to generate and write the Backup GUID Partition Table.)
98 This occurs when the specified "partition name" on the
99 "fastboot flash" command line matches the value defined here.
100 The default target name for updating GPT is "gpt".
101
102config FASTBOOT_MBR_NAME
103 string "Target name for updating MBR"
Alex Kiernan42d8dd42018-05-29 15:30:42 +0000104 depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
Petr Kulhavy6f6c8632016-09-09 10:27:18 +0200105 default "mbr"
106 help
107 The fastboot "flash" command allows to write the downloaded image
108 to the Master Boot Record. This occurs when the "partition name"
109 specified on the "fastboot flash" command line matches the value
110 defined here. The default target name for updating MBR is "mbr".
111
Yann E. MORINc2948732016-11-13 22:26:13 +0100112endif # FASTBOOT
Alex Kiernan312a10f2018-05-29 15:30:39 +0000113
114endmenu