Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 1 | comment "FASTBOOT" |
| 2 | |
Yann E. MORIN | c294873 | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 3 | menuconfig FASTBOOT |
| 4 | bool "Fastboot support" |
Tom Rini | 48f6232 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 5 | depends on USB_GADGET |
Maxime Ripard | cfa3499 | 2017-09-07 10:29:51 +0200 | [diff] [blame] | 6 | default y if ARCH_SUNXI && USB_MUSB_GADGET |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 7 | |
Yann E. MORIN | c294873 | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 8 | if FASTBOOT |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 9 | |
| 10 | config USB_FUNCTION_FASTBOOT |
| 11 | bool "Enable USB fastboot gadget" |
Maxime Ripard | cfa3499 | 2017-09-07 10:29:51 +0200 | [diff] [blame] | 12 | default y |
| 13 | select USB_GADGET_DOWNLOAD |
| 14 | imply ANDROID_BOOT_IMAGE |
| 15 | imply CMD_FASTBOOT |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 16 | help |
| 17 | This enables the USB part of the fastboot gadget. |
| 18 | |
| 19 | config 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 Glass | 00fd59d | 2017-08-04 16:35:06 -0600 | [diff] [blame] | 27 | See doc/README.android-fastboot for more information. |
| 28 | |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 29 | if USB_FUNCTION_FASTBOOT |
| 30 | |
| 31 | config FASTBOOT_BUF_ADDR |
| 32 | hex "Define FASTBOOT buffer address" |
Tom Rini | 48f6232 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 33 | 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 Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 43 | 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 | |
| 48 | config FASTBOOT_BUF_SIZE |
| 49 | hex "Define FASTBOOT buffer size" |
Tom Rini | 48f6232 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 50 | default 0x8000000 if ARCH_ROCKCHIP |
| 51 | default 0x6000000 if ARCH_ZYNQMP |
| 52 | default 0x2000000 if ARCH_SUNXI |
| 53 | default 0x7000000 |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 54 | 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 Protsenko | 9af5ba8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 59 | config 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 Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 67 | config FASTBOOT_FLASH |
| 68 | bool "Enable FASTBOOT FLASH command" |
Maxime Ripard | 7c750fa | 2017-11-14 21:37:35 +0100 | [diff] [blame] | 69 | default y if ARCH_SUNXI |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 70 | help |
| 71 | The fastboot protocol includes a "flash" command for writing |
| 72 | the downloaded image to a non-volatile storage device. Define |
| 73 | this to enable the "fastboot flash" command. |
| 74 | |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 75 | choice |
| 76 | prompt "Flash provider for FASTBOOT" |
| 77 | depends on FASTBOOT_FLASH |
| 78 | |
| 79 | config FASTBOOT_FLASH_MMC |
| 80 | bool "FASTBOOT on MMC" |
| 81 | depends on MMC |
| 82 | |
| 83 | config FASTBOOT_FLASH_NAND |
| 84 | bool "FASTBOOT on NAND" |
| 85 | depends on NAND |
| 86 | |
| 87 | endchoice |
| 88 | |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 89 | config FASTBOOT_FLASH_MMC_DEV |
| 90 | int "Define FASTBOOT MMC FLASH default device" |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 91 | depends on FASTBOOT_FLASH_MMC |
Maxime Ripard | de86fc3 | 2017-08-23 10:12:22 +0200 | [diff] [blame] | 92 | default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 |
| 93 | default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 94 | help |
| 95 | The fastboot "flash" command requires additional information |
| 96 | regarding the non-volatile storage device. Define this to |
| 97 | the eMMC device that fastboot should use to store the image. |
| 98 | |
Benjamin Young | 7dec673 | 2017-10-13 14:29:20 -0700 | [diff] [blame] | 99 | config FASTBOOT_FLASH_NAND_DEV |
| 100 | int "Define FASTBOOT NAND FLASH default device" |
Patrick Delaunay | b0cce3f | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 101 | depends on FASTBOOT_FLASH_NAND |
Benjamin Young | 7dec673 | 2017-10-13 14:29:20 -0700 | [diff] [blame] | 102 | depends on CMD_MTDPARTS |
| 103 | default 0 if ARCH_SUNXI && NAND_SUNXI |
| 104 | help |
| 105 | The fastboot "flash" command requires additional information |
| 106 | regarding the non-volatile storage device. Define this to |
| 107 | the NAND device that fastboot should use to store the image. |
| 108 | |
Petr Kulhavy | 6f6c863 | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 109 | config FASTBOOT_GPT_NAME |
| 110 | string "Target name for updating GPT" |
| 111 | depends on FASTBOOT_FLASH |
| 112 | default "gpt" |
| 113 | help |
| 114 | The fastboot "flash" command supports writing the downloaded |
| 115 | image to the Protective MBR and the Primary GUID Partition |
| 116 | Table. (Additionally, this downloaded image is post-processed |
| 117 | to generate and write the Backup GUID Partition Table.) |
| 118 | This occurs when the specified "partition name" on the |
| 119 | "fastboot flash" command line matches the value defined here. |
| 120 | The default target name for updating GPT is "gpt". |
| 121 | |
| 122 | config FASTBOOT_MBR_NAME |
| 123 | string "Target name for updating MBR" |
| 124 | depends on FASTBOOT_FLASH |
| 125 | default "mbr" |
| 126 | help |
| 127 | The fastboot "flash" command allows to write the downloaded image |
| 128 | to the Master Boot Record. This occurs when the "partition name" |
| 129 | specified on the "fastboot flash" command line matches the value |
| 130 | defined here. The default target name for updating MBR is "mbr". |
| 131 | |
Steve Rae | e016f0b | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 132 | endif # USB_FUNCTION_FASTBOOT |
| 133 | |
Yann E. MORIN | c294873 | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 134 | endif # FASTBOOT |