xref: /openbmc/u-boot/drivers/fastboot/Kconfig (revision c232d14d)
1menu "Fastboot support"
2
3config FASTBOOT
4	bool
5	imply ANDROID_BOOT_IMAGE
6	imply CMD_FASTBOOT
7
8config USB_FUNCTION_FASTBOOT
9	bool "Enable USB fastboot gadget"
10	depends on USB_GADGET
11	default y if ARCH_SUNXI && USB_MUSB_GADGET
12	select FASTBOOT
13	select USB_GADGET_DOWNLOAD
14	help
15	  This enables the USB part of the fastboot gadget.
16
17if FASTBOOT
18
19config FASTBOOT_BUF_ADDR
20	hex "Define FASTBOOT buffer address"
21	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
31	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"
38	default 0x8000000 if ARCH_ROCKCHIP
39	default 0x6000000 if ARCH_ZYNQMP
40	default 0x2000000 if ARCH_SUNXI
41	default 0x7000000
42	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
47config FASTBOOT_USB_DEV
48	int "USB controller number"
49	depends on USB_FUNCTION_FASTBOOT
50	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
56config FASTBOOT_FLASH
57	bool "Enable FASTBOOT FLASH command"
58	default y if ARCH_SUNXI
59	depends on MMC || (NAND && CMD_MTDPARTS)
60	select IMAGE_SPARSE
61	help
62	  The fastboot protocol includes a "flash" command for writing
63	  the downloaded image to a non-volatile storage device. Define
64	  this to enable the "fastboot flash" command.
65
66choice
67	prompt "Flash provider for FASTBOOT"
68	depends on FASTBOOT_FLASH
69
70config FASTBOOT_FLASH_MMC
71	bool "FASTBOOT on MMC"
72	depends on MMC
73
74config FASTBOOT_FLASH_NAND
75	bool "FASTBOOT on NAND"
76	depends on NAND && CMD_MTDPARTS
77
78endchoice
79
80config FASTBOOT_FLASH_MMC_DEV
81	int "Define FASTBOOT MMC FLASH default device"
82	depends on FASTBOOT_FLASH_MMC
83	default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
84	default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
85	help
86	  The fastboot "flash" command requires additional information
87	  regarding the non-volatile storage device. Define this to
88	  the eMMC device that fastboot should use to store the image.
89
90config FASTBOOT_FLASH_NAND_TRIMFFS
91	bool "Skip empty pages when flashing NAND"
92	depends on FASTBOOT_FLASH_NAND
93	help
94	  When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
95	  pages.
96
97config FASTBOOT_GPT_NAME
98	string "Target name for updating GPT"
99	depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
100	default "gpt"
101	help
102	  The fastboot "flash" command supports writing the downloaded
103	  image to the Protective MBR and the Primary GUID Partition
104	  Table. (Additionally, this downloaded image is post-processed
105	  to generate and write the Backup GUID Partition Table.)
106	  This occurs when the specified "partition name" on the
107	  "fastboot flash" command line matches the value defined here.
108	  The default target name for updating GPT is "gpt".
109
110config FASTBOOT_MBR_NAME
111	string "Target name for updating MBR"
112	depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
113	default "mbr"
114	help
115	  The fastboot "flash" command allows to write the downloaded image
116	  to the Master Boot Record. This occurs when the "partition name"
117	  specified on the "fastboot flash" command line matches the value
118	  defined here. The default target name for updating MBR is "mbr".
119
120endif # FASTBOOT
121
122endmenu
123