Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 1 | menu "Fastboot support" |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 2 | |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 3 | config FASTBOOT |
| 4 | bool |
| 5 | imply ANDROID_BOOT_IMAGE |
| 6 | imply CMD_FASTBOOT |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 7 | |
| 8 | config USB_FUNCTION_FASTBOOT |
| 9 | bool "Enable USB fastboot gadget" |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 10 | depends on USB_GADGET |
| 11 | default y if ARCH_SUNXI && USB_MUSB_GADGET |
| 12 | select FASTBOOT |
Maxime Ripard | 6d7dfe2 | 2017-09-07 10:29:51 +0200 | [diff] [blame] | 13 | select USB_GADGET_DOWNLOAD |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 14 | help |
| 15 | This enables the USB part of the fastboot gadget. |
| 16 | |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 17 | if FASTBOOT |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 18 | |
| 19 | config FASTBOOT_BUF_ADDR |
| 20 | hex "Define FASTBOOT buffer address" |
Tom Rini | b5bf562 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 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 |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 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 | |
| 36 | config FASTBOOT_BUF_SIZE |
| 37 | hex "Define FASTBOOT buffer size" |
Tom Rini | b5bf562 | 2017-08-25 17:50:27 -0400 | [diff] [blame] | 38 | default 0x8000000 if ARCH_ROCKCHIP |
| 39 | default 0x6000000 if ARCH_ZYNQMP |
| 40 | default 0x2000000 if ARCH_SUNXI |
| 41 | default 0x7000000 |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 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 | |
Semen Protsenko | 97bb3f8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 47 | config FASTBOOT_USB_DEV |
| 48 | int "USB controller number" |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 49 | depends on USB_FUNCTION_FASTBOOT |
Semen Protsenko | 97bb3f8 | 2016-10-24 18:41:10 +0300 | [diff] [blame] | 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 | |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 56 | config FASTBOOT_FLASH |
| 57 | bool "Enable FASTBOOT FLASH command" |
Maxime Ripard | db0cd67 | 2017-11-14 21:37:35 +0100 | [diff] [blame] | 58 | default y if ARCH_SUNXI |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 59 | help |
| 60 | The fastboot protocol includes a "flash" command for writing |
| 61 | the downloaded image to a non-volatile storage device. Define |
| 62 | this to enable the "fastboot flash" command. |
| 63 | |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 64 | choice |
| 65 | prompt "Flash provider for FASTBOOT" |
| 66 | depends on FASTBOOT_FLASH |
| 67 | |
| 68 | config FASTBOOT_FLASH_MMC |
| 69 | bool "FASTBOOT on MMC" |
| 70 | depends on MMC |
| 71 | |
| 72 | config FASTBOOT_FLASH_NAND |
| 73 | bool "FASTBOOT on NAND" |
| 74 | depends on NAND |
| 75 | |
| 76 | endchoice |
| 77 | |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 78 | config FASTBOOT_FLASH_MMC_DEV |
| 79 | int "Define FASTBOOT MMC FLASH default device" |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 80 | depends on FASTBOOT_FLASH_MMC |
Maxime Ripard | 65cefba | 2017-08-23 10:12:22 +0200 | [diff] [blame] | 81 | default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 |
| 82 | default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 |
Steve Rae | 437689f | 2016-08-15 17:26:26 -0700 | [diff] [blame] | 83 | help |
| 84 | The fastboot "flash" command requires additional information |
| 85 | regarding the non-volatile storage device. Define this to |
| 86 | the eMMC device that fastboot should use to store the image. |
| 87 | |
Benjamin Young | 46423eb | 2017-10-13 14:29:20 -0700 | [diff] [blame] | 88 | config FASTBOOT_FLASH_NAND_DEV |
| 89 | int "Define FASTBOOT NAND FLASH default device" |
Patrick Delaunay | 99a8e03 | 2017-12-07 18:26:17 +0100 | [diff] [blame] | 90 | depends on FASTBOOT_FLASH_NAND |
Benjamin Young | 46423eb | 2017-10-13 14:29:20 -0700 | [diff] [blame] | 91 | depends on CMD_MTDPARTS |
| 92 | default 0 if ARCH_SUNXI && NAND_SUNXI |
| 93 | help |
| 94 | The fastboot "flash" command requires additional information |
| 95 | regarding the non-volatile storage device. Define this to |
| 96 | the NAND device that fastboot should use to store the image. |
| 97 | |
Petr Kulhavy | 4ed1eca | 2016-09-09 10:27:18 +0200 | [diff] [blame] | 98 | config FASTBOOT_GPT_NAME |
| 99 | string "Target name for updating GPT" |
| 100 | depends on FASTBOOT_FLASH |
| 101 | default "gpt" |
| 102 | help |
| 103 | The fastboot "flash" command supports writing the downloaded |
| 104 | image to the Protective MBR and the Primary GUID Partition |
| 105 | Table. (Additionally, this downloaded image is post-processed |
| 106 | to generate and write the Backup GUID Partition Table.) |
| 107 | This occurs when the specified "partition name" on the |
| 108 | "fastboot flash" command line matches the value defined here. |
| 109 | The default target name for updating GPT is "gpt". |
| 110 | |
| 111 | config FASTBOOT_MBR_NAME |
| 112 | string "Target name for updating MBR" |
| 113 | depends on FASTBOOT_FLASH |
| 114 | default "mbr" |
| 115 | help |
| 116 | The fastboot "flash" command allows to write the downloaded image |
| 117 | to the Master Boot Record. This occurs when the "partition name" |
| 118 | specified on the "fastboot flash" command line matches the value |
| 119 | defined here. The default target name for updating MBR is "mbr". |
| 120 | |
Yann E. MORIN | 3d2561f | 2016-11-13 22:26:13 +0100 | [diff] [blame] | 121 | endif # FASTBOOT |
Alex Kiernan | 65de955 | 2018-05-29 15:30:39 +0000 | [diff] [blame] | 122 | |
| 123 | endmenu |