Kconfig.tpl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336
  1. menu "TPL configuration options"
  2. depends on TPL
  3. config TPL_SIZE_LIMIT
  4. hex "Maximum size of TPL image"
  5. default 0x0
  6. help
  7. Specifies the maximum length of the U-Boot TPL image.
  8. If this value is zero, it is ignored.
  9. config TPL_BINMAN_SYMBOLS
  10. bool "Support binman symbols in TPL"
  11. depends on TPL_FRAMEWORK && BINMAN
  12. default y
  13. help
  14. This enables use of symbols in TPL which refer to other entries in
  15. the same binman image as the TPL. These can be declared with the
  16. binman_sym_declare(type, entry, prop) macro and accessed by the
  17. binman_sym(type, entry, prop) macro defined in binman_sym.h.
  18. See tools/binman/binman.rst for a detailed explanation.
  19. config TPL_BINMAN_UBOOT_SYMBOLS
  20. bool "Declare binman symbols for U-Boot phases in TPL"
  21. depends on TPL_BINMAN_SYMBOLS
  22. default n if ARCH_IMX8M
  23. default y
  24. help
  25. This enables use of symbols in TPL which refer to U-Boot phases,
  26. enabling TPL to obtain the location and size of its next phase simply
  27. by calling spl_get_image_pos() and spl_get_image_size().
  28. For this to work, you must have all U-Boot phases in the same binman
  29. image, so binman can update TPL with the locations of everything.
  30. config TPL_FRAMEWORK
  31. bool "Support TPL based upon the common SPL framework"
  32. default y if SPL_FRAMEWORK
  33. help
  34. Enable the SPL framework under common/spl/ for TPL builds.
  35. This framework supports MMC, NAND and YMODEM and other methods
  36. loading of U-Boot's SPL stage. If unsure, say Y.
  37. config TPL_BANNER_PRINT
  38. bool "Enable output of the TPL banner 'U-Boot TPL ...'"
  39. depends on DEBUG_UART && TPL_SERIAL
  40. default y
  41. help
  42. If this option is enabled, TPL will print the banner with version
  43. info. Disabling this option could be useful to reduce TPL boot time
  44. (e.g. approx. 6 ms faster, when output on i.MX6 with 115200 baud).
  45. config TPL_HANDOFF
  46. bool "Pass hand-off information from TPL to SPL and U-Boot proper"
  47. depends on HANDOFF && TPL_BLOBLIST
  48. default y
  49. help
  50. This option enables TPL to write handoff information. This can be
  51. used to pass information like the size of SDRAM from TPL to U-Boot
  52. proper. The information is also available to SPL if it is useful
  53. there.
  54. config TPL_BOARD_INIT
  55. bool "Call board-specific initialization in TPL"
  56. help
  57. If this option is enabled, U-Boot will call the function
  58. spl_board_init() from board_init_r(). This function should be
  59. provided by the board.
  60. config TPL_BOOTCOUNT_LIMIT
  61. bool "Support bootcount in TPL"
  62. depends on TPL_ENV_SUPPORT
  63. help
  64. If this option is enabled, the TPL will support bootcount.
  65. For example, it may be useful to choose the device to boot.
  66. config TPL_SYS_MALLOC_SIMPLE
  67. bool
  68. prompt "Only use malloc_simple functions in the TPL"
  69. help
  70. Say Y here to only use the *_simple malloc functions from
  71. malloc_simple.c, rather then using the versions from dlmalloc.c;
  72. this will make the TPL binary smaller at the cost of more heap
  73. usage as the *_simple malloc functions do not re-use free-ed mem.
  74. config TPL_SEPARATE_BSS
  75. bool "BSS section is in a different memory region from text"
  76. default y if SPL_SEPARATE_BSS
  77. help
  78. Some platforms need a large BSS region in TPL and can provide this
  79. because RAM is already set up. In this case BSS can be moved to RAM.
  80. This option should then be enabled so that the correct device tree
  81. location is used. Normally we put the device tree at the end of BSS
  82. but with this option enabled, it goes at _image_binary_end.
  83. config TPL_LDSCRIPT
  84. string "Linker script for the TPL stage"
  85. default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
  86. default "arch/\$(ARCH)/cpu/u-boot-spl.lds"
  87. help
  88. The TPL stage will usually require a different linker-script
  89. (as it runs from a different memory region) than the regular
  90. U-Boot stage. Set this to the path of the linker-script to
  91. be used for TPL.
  92. May be left empty to trigger the Makefile infrastructure to
  93. fall back to the linker-script used for the SPL stage.
  94. config TPL_NEEDS_SEPARATE_STACK
  95. bool "TPL needs a separate initial stack-pointer"
  96. help
  97. Enable, if the TPL stage should not inherit its initial
  98. stack-pointer from the settings for the SPL stage.
  99. config TPL_POWER
  100. bool "Support power drivers"
  101. help
  102. Enable support for power control in TPL. This includes support
  103. for PMICs (Power-management Integrated Circuits) and some of the
  104. features provided by PMICs. In particular, voltage regulators can
  105. be used to enable/disable power and vary its voltage. That can be
  106. useful in TPL to turn on boot peripherals and adjust CPU voltage
  107. so that the clock speed can be increased. This enables the drivers
  108. in drivers/power, drivers/power/pmic and drivers/power/regulator
  109. as part of an TPL build.
  110. config TPL_TEXT_BASE
  111. hex "Base address for the .text section of the TPL stage"
  112. default 0
  113. help
  114. The base address for the .text section of the TPL stage.
  115. config TPL_MAX_SIZE
  116. hex "Maximum size (in bytes) for the TPL stage"
  117. default 0x2e000 if ROCKCHIP_RK3399
  118. default 0x8000 if ROCKCHIP_RK3288 || ROCKCHIP_RV1126
  119. default 0x7000 if ROCKCHIP_RK322X || ROCKCHIP_RK3328 || ROCKCHIP_RK3368
  120. default 0x2800 if ROCKCHIP_PX30
  121. default 0x0
  122. help
  123. The maximum size (in bytes) of the TPL stage.
  124. config TPL_STACK
  125. hex "Address of the initial stack-pointer for the TPL stage"
  126. depends on TPL_NEEDS_SEPARATE_STACK
  127. help
  128. The address of the initial stack-pointer for the TPL stage.
  129. Usually this will be the (aligned) top-of-stack.
  130. config TPL_READ_ONLY
  131. bool
  132. depends on TPL_OF_PLATDATA
  133. select TPL_OF_PLATDATA_NO_BIND
  134. select TPL_OF_PLATDATA_RT
  135. help
  136. Some platforms (e.g. x86 Apollo Lake) load SPL into a read-only
  137. section of memory. This means that of-platdata must make a copy (in
  138. writeable memory) of anything it wants to modify, such as
  139. device-private data.
  140. config TPL_BOOTROM_SUPPORT
  141. bool "Support returning to the BOOTROM (from TPL)"
  142. help
  143. Some platforms (e.g. the Rockchip RK3368) provide support in their
  144. ROM for loading the next boot-stage after performing basic setup
  145. from the TPL stage.
  146. Enable this option, to return to the BOOTROM through the
  147. BOOT_DEVICE_BOOTROM (or fall-through to the next boot device in the
  148. boot device list, if not implemented for a given board)
  149. config TPL_CRC32
  150. bool "Support CRC32 in TPL"
  151. default y if TPL_ENV_SUPPORT || TPL_BLOBLIST
  152. help
  153. Enable this to support CRC32 in uImages or FIT images within SPL.
  154. This is a 32-bit checksum value that can be used to verify images.
  155. For FIT images, this is the least secure type of checksum, suitable
  156. for detected accidental image corruption. For secure applications you
  157. should consider SHA1 or SHA256.
  158. config TPL_DRIVERS_MISC
  159. bool "Support misc drivers in TPL"
  160. help
  161. Enable miscellaneous drivers in TPL. These drivers perform various
  162. tasks that don't fall nicely into other categories, Enable this
  163. option to build the drivers in drivers/misc as part of an TPL
  164. build, for those that support building in TPL (not all drivers do).
  165. config TPL_ENV_SUPPORT
  166. bool "Support an environment"
  167. help
  168. Enable environment support in TPL. See SPL_ENV_SUPPORT for details.
  169. config TPL_GPIO
  170. bool "Support GPIO in TPL"
  171. help
  172. Enable support for GPIOs (General-purpose Input/Output) in TPL.
  173. GPIOs allow U-Boot to read the state of an input line (high or
  174. low) and set the state of an output line. This can be used to
  175. drive LEDs, control power to various system parts and read user
  176. input. GPIOs can be useful in TPL to enable a 'sign-of-life' LED,
  177. for example. Enable this option to build the drivers in
  178. drivers/gpio as part of an TPL build.
  179. config TPL_I2C
  180. bool "Support I2C"
  181. help
  182. Enable support for the I2C bus in TPL. See SPL_I2C for
  183. details.
  184. config TPL_LIBCOMMON_SUPPORT
  185. bool "Support common libraries"
  186. help
  187. Enable support for common U-Boot libraries within TPL. See
  188. SPL_LIBCOMMON_SUPPORT for details.
  189. config TPL_LIBGENERIC_SUPPORT
  190. bool "Support generic libraries"
  191. help
  192. Enable support for generic U-Boot libraries within TPL. See
  193. SPL_LIBGENERIC_SUPPORT for details.
  194. config TPL_MPC8XXX_INIT_DDR
  195. bool "Support MPC8XXX DDR init"
  196. help
  197. Enable support for DDR-SDRAM on the MPC8XXX family within TPL. See
  198. SPL_MPC8XXX_INIT_DDR for details.
  199. config TPL_MMC
  200. bool "Support MMC"
  201. depends on MMC
  202. help
  203. Enable support for MMC within TPL. See SPL_MMC for details.
  204. config TPL_NAND_SUPPORT
  205. bool "Support NAND flash"
  206. help
  207. Enable support for NAND in TPL. See SPL_NAND_SUPPORT for details.
  208. config TPL_PCI
  209. bool "Support PCI drivers"
  210. help
  211. Enable support for PCI in TPL. For platforms that need PCI to boot,
  212. or must perform some init using PCI in SPL, this provides the
  213. necessary driver support. This enables the drivers in drivers/pci
  214. as part of a TPL build.
  215. config TPL_PCH
  216. bool "Support PCH drivers"
  217. help
  218. Enable support for PCH (Platform Controller Hub) devices in TPL.
  219. These are used to set up GPIOs and the SPI peripheral early in
  220. boot. This enables the drivers in drivers/pch as part of a TPL
  221. build.
  222. config TPL_RAM_SUPPORT
  223. bool "Support booting from RAM"
  224. help
  225. Enable booting of an image in RAM. The image can be preloaded or
  226. it can be loaded by TPL directly into RAM (e.g. using USB).
  227. config TPL_RAM_DEVICE
  228. bool "Support booting from preloaded image in RAM"
  229. depends on TPL_RAM_SUPPORT
  230. help
  231. Enable booting of an image already loaded in RAM. The image has to
  232. be already in memory when TPL takes over, e.g. loaded by the boot
  233. ROM.
  234. config TPL_RTC
  235. bool "Support RTC drivers"
  236. help
  237. Enable RTC (Real-time Clock) support in TPL. This includes support
  238. for reading and setting the time. Some RTC devices also have some
  239. non-volatile (battery-backed) memory which is accessible if
  240. needed. This enables the drivers in drivers/rtc as part of an TPL
  241. build.
  242. config TPL_SERIAL
  243. bool "Support serial"
  244. select TPL_PRINTF
  245. select TPL_STRTO
  246. help
  247. Enable support for serial in TPL. See SPL_SERIAL for
  248. details.
  249. config TPL_SPI_FLASH_SUPPORT
  250. bool "Support SPI flash drivers"
  251. help
  252. Enable support for using SPI flash in TPL. See SPL_SPI_FLASH_SUPPORT
  253. for details.
  254. config TPL_SPI_FLASH_TINY
  255. bool "Enable low footprint TPL SPI Flash support"
  256. depends on TPL_SPI_FLASH_SUPPORT && !SPI_FLASH_BAR
  257. default y if SPI_FLASH
  258. help
  259. Enable lightweight TPL SPI Flash support that supports just reading
  260. data/images from flash. No support to write/erase flash. Enable
  261. this if you have TPL size limitations and don't need full-fledged
  262. SPI flash support.
  263. config TPL_SPI_LOAD
  264. bool "Support loading from SPI flash"
  265. depends on TPL_SPI_FLASH_SUPPORT
  266. help
  267. Enable support for loading next stage, U-Boot or otherwise, from
  268. SPI NOR in U-Boot TPL.
  269. config TPL_SPI
  270. bool "Support SPI drivers"
  271. help
  272. Enable support for using SPI in TPL. See SPL_SPI for
  273. details.
  274. config TPL_DM_SPI
  275. bool "Support SPI DM drivers in TPL"
  276. help
  277. Enable support for SPI DM drivers in TPL.
  278. config TPL_DM_SPI_FLASH
  279. bool "Support SPI DM FLASH drivers in TPL"
  280. help
  281. Enable support for SPI DM flash drivers in TPL.
  282. config TPL_YMODEM_SUPPORT
  283. bool "Support loading using Ymodem"
  284. depends on TPL_SERIAL
  285. help
  286. While loading from serial is slow it can be a useful backup when
  287. there is no other option. The Ymodem protocol provides a reliable
  288. means of transmitting U-Boot over a serial line for using in TPL,
  289. with a checksum to ensure correctness.
  290. endmenu