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