1312a10f1SAlex Kiernanmenu "Fastboot support" 2312a10f1SAlex Kiernan 3312a10f1SAlex Kiernanconfig FASTBOOT 4312a10f1SAlex Kiernan bool 5312a10f1SAlex Kiernan imply ANDROID_BOOT_IMAGE 6312a10f1SAlex Kiernan imply CMD_FASTBOOT 7312a10f1SAlex Kiernan 8312a10f1SAlex Kiernanconfig USB_FUNCTION_FASTBOOT 9312a10f1SAlex Kiernan bool "Enable USB fastboot gadget" 10312a10f1SAlex Kiernan depends on USB_GADGET 11312a10f1SAlex Kiernan default y if ARCH_SUNXI && USB_MUSB_GADGET 12312a10f1SAlex Kiernan select FASTBOOT 13312a10f1SAlex Kiernan select USB_GADGET_DOWNLOAD 14312a10f1SAlex Kiernan help 15312a10f1SAlex Kiernan This enables the USB part of the fastboot gadget. 16312a10f1SAlex Kiernan 17f73a7df9SAlex Kiernanconfig UDP_FUNCTION_FASTBOOT 18f73a7df9SAlex Kiernan depends on NET 19f73a7df9SAlex Kiernan select FASTBOOT 20f73a7df9SAlex Kiernan bool "Enable fastboot protocol over UDP" 21f73a7df9SAlex Kiernan help 22f73a7df9SAlex Kiernan This enables the fastboot protocol over UDP. 23f73a7df9SAlex Kiernan 24312a10f1SAlex Kiernanif FASTBOOT 25312a10f1SAlex Kiernan 26312a10f1SAlex Kiernanconfig FASTBOOT_BUF_ADDR 27312a10f1SAlex Kiernan hex "Define FASTBOOT buffer address" 28312a10f1SAlex Kiernan default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL 29312a10f1SAlex Kiernan default 0x81000000 if ARCH_OMAP2PLUS 30312a10f1SAlex Kiernan default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I 31312a10f1SAlex Kiernan default 0x22000000 if ARCH_SUNXI && MACH_SUN9I 32312a10f1SAlex Kiernan default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \ 33312a10f1SAlex Kiernan ROCKCHIP_RK322X 34312a10f1SAlex Kiernan default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \ 35312a10f1SAlex Kiernan ROCKCHIP_RK3399 36312a10f1SAlex Kiernan default 0x280000 if ROCKCHIP_RK3368 37312a10f1SAlex Kiernan default 0x100000 if ARCH_ZYNQMP 38*0a60a81bSJens Wiklander default 0 if SANDBOX 39312a10f1SAlex Kiernan help 40312a10f1SAlex Kiernan The fastboot protocol requires a large memory buffer for 41312a10f1SAlex Kiernan downloads. Define this to the starting RAM address to use for 42312a10f1SAlex Kiernan downloaded images. 43312a10f1SAlex Kiernan 44312a10f1SAlex Kiernanconfig FASTBOOT_BUF_SIZE 45312a10f1SAlex Kiernan hex "Define FASTBOOT buffer size" 46312a10f1SAlex Kiernan default 0x8000000 if ARCH_ROCKCHIP 47312a10f1SAlex Kiernan default 0x6000000 if ARCH_ZYNQMP 48312a10f1SAlex Kiernan default 0x2000000 if ARCH_SUNXI 49*0a60a81bSJens Wiklander default 0x8192 if SANDBOX 50312a10f1SAlex Kiernan default 0x7000000 51312a10f1SAlex Kiernan help 52312a10f1SAlex Kiernan The fastboot protocol requires a large memory buffer for 53312a10f1SAlex Kiernan downloads. This buffer should be as large as possible for a 54312a10f1SAlex Kiernan platform. Define this to the size available RAM for fastboot. 55312a10f1SAlex Kiernan 56312a10f1SAlex Kiernanconfig FASTBOOT_USB_DEV 57312a10f1SAlex Kiernan int "USB controller number" 58312a10f1SAlex Kiernan depends on USB_FUNCTION_FASTBOOT 59312a10f1SAlex Kiernan default 0 60312a10f1SAlex Kiernan help 61312a10f1SAlex Kiernan Some boards have USB OTG controller other than 0. Define this 62312a10f1SAlex Kiernan option so it can be used in compiled environment (e.g. in 63312a10f1SAlex Kiernan CONFIG_BOOTCOMMAND). 64312a10f1SAlex Kiernan 65312a10f1SAlex Kiernanconfig FASTBOOT_FLASH 66312a10f1SAlex Kiernan bool "Enable FASTBOOT FLASH command" 67312a10f1SAlex Kiernan default y if ARCH_SUNXI 6842d8dd44SAlex Kiernan depends on MMC || (NAND && CMD_MTDPARTS) 69c232d14dSAlex Kiernan select IMAGE_SPARSE 70312a10f1SAlex Kiernan help 71312a10f1SAlex Kiernan The fastboot protocol includes a "flash" command for writing 72312a10f1SAlex Kiernan the downloaded image to a non-volatile storage device. Define 73312a10f1SAlex Kiernan this to enable the "fastboot flash" command. 74312a10f1SAlex Kiernan 75312a10f1SAlex Kiernanchoice 76312a10f1SAlex Kiernan prompt "Flash provider for FASTBOOT" 77312a10f1SAlex Kiernan depends on FASTBOOT_FLASH 78312a10f1SAlex Kiernan 79312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_MMC 80312a10f1SAlex Kiernan bool "FASTBOOT on MMC" 81312a10f1SAlex Kiernan depends on MMC 82312a10f1SAlex Kiernan 83312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_NAND 84312a10f1SAlex Kiernan bool "FASTBOOT on NAND" 8542d8dd44SAlex Kiernan depends on NAND && CMD_MTDPARTS 86312a10f1SAlex Kiernan 87312a10f1SAlex Kiernanendchoice 88312a10f1SAlex Kiernan 89312a10f1SAlex Kiernanconfig FASTBOOT_FLASH_MMC_DEV 90312a10f1SAlex Kiernan int "Define FASTBOOT MMC FLASH default device" 91312a10f1SAlex Kiernan depends on FASTBOOT_FLASH_MMC 92312a10f1SAlex Kiernan default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1 93312a10f1SAlex Kiernan default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1 94312a10f1SAlex Kiernan help 95312a10f1SAlex Kiernan The fastboot "flash" command requires additional information 96312a10f1SAlex Kiernan regarding the non-volatile storage device. Define this to 97312a10f1SAlex Kiernan the eMMC device that fastboot should use to store the image. 98312a10f1SAlex Kiernan 994085b903SAlex Kiernanconfig FASTBOOT_FLASH_NAND_TRIMFFS 1004085b903SAlex Kiernan bool "Skip empty pages when flashing NAND" 1014085b903SAlex Kiernan depends on FASTBOOT_FLASH_NAND 1024085b903SAlex Kiernan help 1034085b903SAlex Kiernan When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff 1044085b903SAlex Kiernan pages. 1054085b903SAlex Kiernan 106312a10f1SAlex Kiernanconfig FASTBOOT_GPT_NAME 107312a10f1SAlex Kiernan string "Target name for updating GPT" 10842d8dd44SAlex Kiernan depends on FASTBOOT_FLASH_MMC && EFI_PARTITION 109312a10f1SAlex Kiernan default "gpt" 110312a10f1SAlex Kiernan help 111312a10f1SAlex Kiernan The fastboot "flash" command supports writing the downloaded 112312a10f1SAlex Kiernan image to the Protective MBR and the Primary GUID Partition 113312a10f1SAlex Kiernan Table. (Additionally, this downloaded image is post-processed 114312a10f1SAlex Kiernan to generate and write the Backup GUID Partition Table.) 115312a10f1SAlex Kiernan This occurs when the specified "partition name" on the 116312a10f1SAlex Kiernan "fastboot flash" command line matches the value defined here. 117312a10f1SAlex Kiernan The default target name for updating GPT is "gpt". 118312a10f1SAlex Kiernan 119312a10f1SAlex Kiernanconfig FASTBOOT_MBR_NAME 120312a10f1SAlex Kiernan string "Target name for updating MBR" 12142d8dd44SAlex Kiernan depends on FASTBOOT_FLASH_MMC && DOS_PARTITION 122312a10f1SAlex Kiernan default "mbr" 123312a10f1SAlex Kiernan help 124312a10f1SAlex Kiernan The fastboot "flash" command allows to write the downloaded image 125312a10f1SAlex Kiernan to the Master Boot Record. This occurs when the "partition name" 126312a10f1SAlex Kiernan specified on the "fastboot flash" command line matches the value 127312a10f1SAlex Kiernan defined here. The default target name for updating MBR is "mbr". 128312a10f1SAlex Kiernan 1293845b906SAlex Kiernanconfig FASTBOOT_CMD_OEM_FORMAT 1303845b906SAlex Kiernan bool "Enable the 'oem format' command" 1313845b906SAlex Kiernan depends on FASTBOOT_FLASH_MMC && CMD_GPT 1323845b906SAlex Kiernan help 1333845b906SAlex Kiernan Add support for the "oem format" command from a client. This 1343845b906SAlex Kiernan relies on the env variable partitions to contain the list of 1353845b906SAlex Kiernan partitions as required by the gpt command. 1363845b906SAlex Kiernan 137312a10f1SAlex Kiernanendif # FASTBOOT 138312a10f1SAlex Kiernan 139312a10f1SAlex Kiernanendmenu 140