Kconfig 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182
  1. menu "Fastboot support"
  2. config FASTBOOT
  3. bool
  4. imply ANDROID_BOOT_IMAGE
  5. imply CMD_FASTBOOT
  6. config USB_FUNCTION_FASTBOOT
  7. bool "Enable USB fastboot gadget"
  8. depends on USB_GADGET
  9. default y if ARCH_SUNXI && USB_MUSB_GADGET
  10. select FASTBOOT
  11. select USB_GADGET_DOWNLOAD
  12. help
  13. This enables the USB part of the fastboot gadget.
  14. config UDP_FUNCTION_FASTBOOT
  15. depends on NET
  16. select FASTBOOT
  17. bool "Enable fastboot protocol over UDP"
  18. help
  19. This enables the fastboot protocol over UDP.
  20. if FASTBOOT
  21. config FASTBOOT_BUF_ADDR
  22. hex "Define FASTBOOT buffer address"
  23. default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
  24. default 0x81000000 if ARCH_OMAP2PLUS
  25. default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
  26. default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
  27. default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
  28. ROCKCHIP_RK322X
  29. default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
  30. ROCKCHIP_RK3399
  31. default 0x280000 if ROCKCHIP_RK3368
  32. default 0x100000 if ARCH_ZYNQMP
  33. default 0 if SANDBOX
  34. help
  35. The fastboot protocol requires a large memory buffer for
  36. downloads. Define this to the starting RAM address to use for
  37. downloaded images.
  38. config FASTBOOT_BUF_SIZE
  39. hex "Define FASTBOOT buffer size"
  40. default 0x8000000 if ARCH_ROCKCHIP
  41. default 0x6000000 if ARCH_ZYNQMP
  42. default 0x2000000 if ARCH_SUNXI
  43. default 0x8192 if SANDBOX
  44. default 0x7000000
  45. help
  46. The fastboot protocol requires a large memory buffer for
  47. downloads. This buffer should be as large as possible for a
  48. platform. Define this to the size available RAM for fastboot.
  49. config FASTBOOT_USB_DEV
  50. int "USB controller number"
  51. depends on USB_FUNCTION_FASTBOOT
  52. default 0
  53. help
  54. Some boards have USB OTG controller other than 0. Define this
  55. option so it can be used in compiled environment (e.g. in
  56. CONFIG_BOOTCOMMAND).
  57. config FASTBOOT_FLASH
  58. bool "Enable FASTBOOT FLASH command"
  59. default y if ARCH_SUNXI || ARCH_ROCKCHIP
  60. depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
  61. select IMAGE_SPARSE
  62. help
  63. The fastboot protocol includes a "flash" command for writing
  64. the downloaded image to a non-volatile storage device. Define
  65. this to enable the "fastboot flash" command.
  66. choice
  67. prompt "Flash provider for FASTBOOT"
  68. depends on FASTBOOT_FLASH
  69. config FASTBOOT_FLASH_MMC
  70. bool "FASTBOOT on MMC"
  71. depends on MMC
  72. config FASTBOOT_FLASH_NAND
  73. bool "FASTBOOT on NAND"
  74. depends on MTD_RAW_NAND && CMD_MTDPARTS
  75. endchoice
  76. config FASTBOOT_FLASH_MMC_DEV
  77. int "Define FASTBOOT MMC FLASH default device"
  78. depends on FASTBOOT_FLASH_MMC
  79. default 0 if ARCH_ROCKCHIP
  80. default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
  81. default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
  82. help
  83. The fastboot "flash" command requires additional information
  84. regarding the non-volatile storage device. Define this to
  85. the eMMC device that fastboot should use to store the image.
  86. config FASTBOOT_FLASH_NAND_TRIMFFS
  87. bool "Skip empty pages when flashing NAND"
  88. depends on FASTBOOT_FLASH_NAND
  89. help
  90. When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
  91. pages.
  92. config FASTBOOT_MMC_BOOT1_SUPPORT
  93. bool "Enable EMMC_BOOT1 flash/erase"
  94. depends on FASTBOOT_FLASH_MMC && EFI_PARTITION && ARCH_MEDIATEK
  95. help
  96. The fastboot "flash" and "erase" commands normally does operations
  97. on EMMC userdata. Define this to enable the special commands to
  98. flash/erase EMMC_BOOT1.
  99. The default target name for updating EMMC_BOOT1 is "mmc0boot0".
  100. config FASTBOOT_MMC_BOOT1_NAME
  101. string "Target name for updating EMMC_BOOT1"
  102. depends on FASTBOOT_MMC_BOOT1_SUPPORT
  103. default "mmc0boot0"
  104. help
  105. The fastboot "flash" and "erase" commands support operations on
  106. EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
  107. the "fastboot flash" and "fastboot erase" commands match the value
  108. defined here.
  109. The default target name for updating EMMC_BOOT1 is "mmc0boot0".
  110. config FASTBOOT_MMC_USER_NAME
  111. string "Target name for erasing EMMC_USER"
  112. depends on FASTBOOT_FLASH_MMC && EFI_PARTITION && ARCH_MEDIATEK
  113. default "mmc0"
  114. help
  115. The fastboot "erase" command supports erasing EMMC_USER. This occurs
  116. when the specified "EMMC_USER name" on the "fastboot erase" commands
  117. match the value defined here.
  118. The default target name for erasing EMMC_USER is "mmc0".
  119. config FASTBOOT_GPT_NAME
  120. string "Target name for updating GPT"
  121. depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
  122. default "gpt"
  123. help
  124. The fastboot "flash" command supports writing the downloaded
  125. image to the Protective MBR and the Primary GUID Partition
  126. Table. (Additionally, this downloaded image is post-processed
  127. to generate and write the Backup GUID Partition Table.)
  128. This occurs when the specified "partition name" on the
  129. "fastboot flash" command line matches the value defined here.
  130. The default target name for updating GPT is "gpt".
  131. config FASTBOOT_MBR_NAME
  132. string "Target name for updating MBR"
  133. depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
  134. default "mbr"
  135. help
  136. The fastboot "flash" command allows to write the downloaded image
  137. to the Master Boot Record. This occurs when the "partition name"
  138. specified on the "fastboot flash" command line matches the value
  139. defined here. The default target name for updating MBR is "mbr".
  140. config FASTBOOT_CMD_OEM_FORMAT
  141. bool "Enable the 'oem format' command"
  142. depends on FASTBOOT_FLASH_MMC && CMD_GPT
  143. help
  144. Add support for the "oem format" command from a client. This
  145. relies on the env variable partitions to contain the list of
  146. partitions as required by the gpt command.
  147. config FASTBOOT_USE_BCB_SET_REBOOT_FLAG
  148. bool "Use BCB by fastboot to set boot reason"
  149. depends on CMD_BCB && !ARCH_MESON && !ARCH_ROCKCHIP && !TARGET_KC1 && \
  150. !TARGET_SNIPER && !TARGET_AM57XX_EVM && !TARGET_DRA7XX_EVM
  151. default y
  152. help
  153. Fastboot could implement setting of reboot reason in a generic fashion
  154. via BCB commands. BCB commands are able to write reboot reason into
  155. command field of boot control block. In general case it is sufficient
  156. implementation if your platform supports BCB commands and doesn't
  157. require any specific reboot reason handling.
  158. endif # FASTBOOT
  159. endmenu