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