1 #
2 # Copyright (c) 2018, Texas Instruments Incorporated
3 # All rights reserved.
4 #
5 # Redistribution and use in source and binary forms, with or without
6 # modification, are permitted provided that the following conditions
7 # are met:
8 #
9 # * Redistributions of source code must retain the above copyright
10 # notice, this list of conditions and the following disclaimer.
11 #
12 # * Redistributions in binary form must reproduce the above copyright
13 # notice, this list of conditions and the following disclaimer in the
14 # documentation and/or other materials provided with the distribution.
15 #
16 # * Neither the name of Texas Instruments Incorporated nor the names of
17 # its contributors may be used to endorse or promote products derived
18 # from this software without specific prior written permission.
19 #
20 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 # CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 # EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 #
33 # File: sbl_component.mk
34 # This file is component include make file of SBL.
35 # List of variables set in this file and their purpose:
36 # <mod>_RELPATH - This is the relative path of the module, typically from
37 # top-level directory of the package
38 # <mod>_PATH - This is the absolute path of the module. It derives from
39 # absolute path of the top-level directory (set in env.mk)
40 # and relative path set above
41 # <mod>_INCLUDE - This is the path that has interface header files of the
42 # module. This can be multiple directories (space separated)
43 # <mod>_PKG_LIST - Names of the modules (and sub-modules) that are a part
44 # part of this module, including itself.
45 # <mod>_BOARD_DEPENDENCY - "yes": means the code for this module depends on
46 # platform and the compiled obj/lib has to be kept
47 # under <platform> directory
48 # "no" or "" or if this variable is not defined: means
49 # this module has no platform dependent code and hence
50 # the obj/libs are not kept under <platform> dir.
51 # <mod>_CORE_DEPENDENCY - "yes": means the code for this module depends on
52 # core and the compiled obj/lib has to be kept
53 # under <core> directory
54 # "no" or "" or if this variable is not defined: means
55 # this module has no core dependent code and hence
56 # the obj/libs are not kept under <core> dir.
57 # <mod>_APP_STAGE_FILES - List of source files that belongs to the module
58 # <mod>, but that needs to be compiled at application
59 # build stage (in the context of the app). This is
60 # primarily for link time configurations or if the
61 # source file is dependent on options/defines that are
62 # application dependent. This can be left blank or
63 # not defined at all, in which case, it means there
64 # no source files in the module <mod> that are required
65 # to be compiled in the application build stage.
66 #
67 ifeq ($(sbl_component_make_include), )
69 sbl_BOARDLIST = am65xx_evm am65xx_idk j721e_evm j7200_evm am64x_evm tpr12_evm
71 sbl_SOCLIST = am65xx j721e j7200 am64x tpr12
73 am65xx_smp_CORELIST := mcu1_0 mpu1_0 mpu2_0
74 sbl_am65xx_CORELIST := mcu1_0 mcu1_1 mpu1_0 mpu1_1 mpu2_0 mpu2_1
75 am65xx_LASTCORE := $(word $(words $(sbl_am65xx_CORELIST)), $(sbl_am65xx_CORELIST))
77 j721e_smp_CORELIST := mcu1_0 mcu2_0 mcu3_0 mpu1_0
78 sbl_j721e_CORELIST := mcu1_0 mcu1_1 mcu2_0 mcu2_1 mcu3_0 mcu3_1 mpu1_0 mpu1_1
79 j721e_LASTCORE := $(word $(words $(sbl_j721e_CORELIST)), $(sbl_j721e_CORELIST))
81 j7200_smp_CORELIST := mcu1_0 mcu2_0 mpu1_0
82 sbl_j7200_CORELIST := mcu1_0 mcu1_1 mcu2_0 mcu2_1 mpu1_0 mpu1_1
83 j7200_LASTCORE := $(word $(words $(sbl_j7200_CORELIST)), $(sbl_j7200_CORELIST))
85 am64x_smp_CORELIST := mcu1_0 mcu2_0 mpu1_0
86 sbl_am64x_CORELIST := mpu1_0 mcu1_0 mcu1_1 mcu2_0 mcu2_1 mpu1_0 mpu1_1
87 am64x_LASTCORE := $(word $(words $(sbl_am64x_CORELIST)), $(sbl_am64x_CORELIST))
89 sbl_tpr12_CORELIST := mcu1_0 mcu1_1 c66xdsp_1
90 tpr12_LASTCORE := $(word $(words $(sbl_tpr12_CORELIST)), $(sbl_tpr12_CORELIST))
93 sbl_DISABLE_PARALLEL_MAKE = yes
94 ############################
95 # sbl package
96 # List of components included under sbl
97 # The components included here are built and will be part of sbl
98 ############################
100 ifeq ($(SOC), am64x)
101 sbl_LIB_LIST = sbl_lib_ospi_nondma
102 else
103 ifeq ($(SOC), j7200)
104 sbl_LIB_LIST = sbl_lib_mmcsd sbl_lib_ospi_nondma sbl_lib_uart sbl_lib_cust
105 else
106 ifeq ($(SOC), tpr12)
107 sbl_LIB_LIST = sbl_lib_uart
108 else
109 sbl_LIB_LIST = sbl_lib_mmcsd sbl_lib_ospi sbl_lib_uart sbl_lib_hyperflash sbl_lib_cust
110 sbl_LIB_LIST += sbl_lib_ospi_nondma
111 endif
112 endif
113 endif
115 ############################
116 # sbl example
117 # List of examples under sbl (+= is used at each example definition)
118 # All the tests mentioned in list are built when test target is called
119 # List below all examples for allowed values
120 ############################
121 ifeq ($(SOC),$(filter $(SOC), am64x))
122 sbl_EXAMPLE_LIST = sbl_ospi_img
123 else
124 ifeq ($(SOC), j7200)
125 sbl_EXAMPLE_LIST = sbl_mmcsd_img sbl_ospi_img sbl_uart_img
126 else
127 ifeq ($(SOC), tpr12)
128 sbl_EXAMPLE_LIST = sbl_uart_img
129 else
130 sbl_EXAMPLE_LIST = sbl_mmcsd_img sbl_ospi_img sbl_hyperflash_img sbl_uart_img
131 sbl_EXAMPLE_LIST += sbl_mmcsd_img_hs sbl_ospi_img_hs sbl_hyperflash_img_hs sbl_uart_img_hs
132 endif
133 endif
134 endif
137 #
138 # SBL Modules
139 #
141 # SBL MMCSD LIB
142 sbl_lib_mmcsd_COMP_LIST = sbl_lib_mmcsd
143 sbl_lib_mmcsd_RELPATH = ti/boot/sbl
144 export sbl_lib_mmcsd_OBJPATH = ti/boot/sbl/mmcsd
145 sbl_lib_mmcsd_LIBNAME = sbl_lib_mmcsd
146 sbl_lib_mmcsd_PATH = $(PDK_SBL_COMP_PATH)
147 sbl_lib_mmcsd_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/mmcsd
148 sbl_lib_mmcsd_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=mmcsd SBL_USE_DMA=yes
149 export sbl_lib_mmcsd_MAKEFILE
150 export sbl_lib_mmcsd_LIBNAME
151 export sbl_lib_mmcsd_LIBPATH
152 sbl_lib_mmcsd_BOARD_DEPENDENCY = yes
153 sbl_lib_mmcsd_SOC_DEPENDENCY = yes
154 sbl_lib_mmcsd_CORE_DEPENDENCY = no
155 export sbl_lib_mmcsd_COMP_LIST
156 export sbl_lib_mmcsd_BOARD_DEPENDENCY
157 export sbl_lib_mmcsd_CORE_DEPENDENCY
158 sbl_lib_mmcsd_PKG_LIST = sbl_lib_mmcsd
159 sbl_lib_mmcsd_INCLUDE = $(sbl_lib_mmcsd_PATH)
160 sbl_lib_mmcsd_SOCLIST = $(sbl_SOCLIST)
161 sbl_lib_mmcsd_BOARDLIST = $(sbl_BOARDLIST)
162 export sbl_lib_mmcsd_SOCLIST
163 export sbl_lib_mmcsd_BOARDLIST
164 sbl_lib_mmcsd_$(SOC)_CORELIST = mcu1_0
165 export sbl_lib_mmcsd_$(SOC)_CORELIST
167 # SBL OSPI LIB
168 sbl_lib_ospi_COMP_LIST = sbl_lib_ospi
169 sbl_lib_ospi_RELPATH = ti/boot/sbl
170 export sbl_lib_ospi_OBJPATH = ti/boot/sbl/ospi
171 sbl_lib_ospi_LIBNAME = sbl_lib_ospi
172 sbl_lib_ospi_PATH = $(PDK_SBL_COMP_PATH)
173 sbl_lib_ospi_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/ospi
174 sbl_lib_ospi_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=ospi SBL_USE_DMA=yes
175 export sbl_lib_ospi_MAKEFILE
176 export sbl_lib_ospi_LIBNAME
177 export sbl_lib_ospi_LIBPATH
178 sbl_lib_ospi_BOARD_DEPENDENCY = yes
179 sbl_lib_ospi_SOC_DEPENDENCY = yes
180 sbl_lib_ospi_CORE_DEPENDENCY = no
181 export sbl_lib_ospi_COMP_LIST
182 export sbl_lib_ospi_BOARD_DEPENDENCY
183 export sbl_lib_ospi_CORE_DEPENDENCY
184 sbl_lib_ospi_PKG_LIST = sbl_lib_ospi
185 sbl_lib_ospi_INCLUDE = $(sbl_lib_ospi_PATH)
186 sbl_lib_ospi_SOCLIST = $(sbl_SOCLIST)
187 sbl_lib_ospi_BOARDLIST = $(sbl_BOARDLIST)
188 export sbl_lib_ospi_SOCLIST
189 export sbl_lib_ospi_BOARDLIST
190 sbl_lib_ospi_$(SOC)_CORELIST = mcu1_0
191 export sbl_lib_ospi_$(SOC)_CORELIST
193 # SBL OSPI LIB with NON-DMA - Needed for HS SBL
194 export sbl_lib_ospi_nondma_COMP_LIST = sbl_lib_ospi_nondma
195 sbl_lib_ospi_nondma_RELPATH = ti/boot/sbl
196 export sbl_lib_ospi_nondma_OBJPATH = ti/boot/sbl/ospi_nondma
197 sbl_lib_ospi_nondma_PATH = $(PDK_SBL_COMP_PATH)
198 export sbl_lib_ospi_nondma_LIBNAME = sbl_lib_ospi_nondma
199 export sbl_lib_ospi_nondma_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/ospi
200 export sbl_lib_ospi_nondma_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=ospi SBL_USE_DMA=no
201 export sbl_lib_ospi_nondma_BOARD_DEPENDENCY = yes
202 export sbl_lib_ospi_nondma_SOC_DEPENDENCY = yes
203 export sbl_lib_ospi_nondma_CORE_DEPENDENCY = no
204 sbl_lib_ospi_nondma_PKG_LIST = sbl_lib_ospi_nondma
205 sbl_lib_ospi_nondma_INCLUDE = $(sbl_lib_ospi_nondma_PATH)
206 export sbl_lib_ospi_nondma_SOCLIST = $(sbl_SOCLIST)
207 export sbl_lib_ospi_nondma_BOARDLIST = $(sbl_BOARDLIST)
208 export sbl_lib_ospi_nondma_$(SOC)_CORELIST = mcu1_0
210 # SBL HYPERFLASH LIB
211 sbl_lib_hyperflash_COMP_LIST = sbl_lib_hyperflash
212 sbl_lib_hyperflash_RELPATH = ti/boot/sbl
213 export sbl_lib_hyperflash_OBJPATH = ti/boot/sbl/hyperflash
214 sbl_lib_hyperflash_LIBNAME = sbl_lib_hyperflash
215 sbl_lib_hyperflash_PATH = $(PDK_SBL_COMP_PATH)
216 sbl_lib_hyperflash_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/hyperflash
217 sbl_lib_hyperflash_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=hyperflash SBL_USE_DMA=yes
218 export sbl_lib_hyperflash_MAKEFILE
219 export sbl_lib_hyperflash_LIBNAME
220 export sbl_lib_hyperflash_LIBPATH
221 sbl_lib_hyperflash_BOARD_DEPENDENCY = yes
222 sbl_lib_hyperflash_SOC_DEPENDENCY = yes
223 sbl_lib_hyperflash_CORE_DEPENDENCY = no
224 export sbl_lib_hyperflash_COMP_LIST
225 export sbl_lib_hyperflash_BOARD_DEPENDENCY
226 export sbl_lib_hyperflash_CORE_DEPENDENCY
227 sbl_lib_hyperflash_PKG_LIST = sbl_lib_hyperflash
228 sbl_lib_hyperflash_INCLUDE = $(sbl_lib_hyperflash_PATH)
229 sbl_lib_hyperflash_SOCLIST = j721e
230 sbl_lib_hyperflash_BOARDLIST = j721e_evm
231 export sbl_lib_hyperflash_SOCLIST
232 export sbl_lib_hyperflash_BOARDLIST
233 sbl_lib_hyperflash_$(SOC)_CORELIST = mcu1_0
234 export sbl_lib_hyperflash_$(SOC)_CORELIST
236 # SBL UART LIB
237 sbl_lib_uart_COMP_LIST = sbl_lib_uart
238 sbl_lib_uart_RELPATH = ti/boot/sbl
239 export sbl_lib_uart_OBJPATH = ti/boot/sbl/uart
240 sbl_lib_uart_LIBNAME = sbl_lib_uart
241 sbl_lib_uart_PATH = $(PDK_SBL_COMP_PATH)
242 sbl_lib_uart_LIBNAME = sbl_lib_uart
243 sbl_lib_uart_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/uart
244 sbl_lib_uart_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=uart SBL_USE_DMA=yes
245 export sbl_lib_uart_MAKEFILE
246 export sbl_lib_uart_LIBNAME
247 export sbl_lib_uart_LIBPATH
248 sbl_lib_uart_BOARD_DEPENDENCY = yes
249 sbl_lib_uart_SOC_DEPENDENCY = yes
250 sbl_lib_uart_CORE_DEPENDENCY = no
251 export sbl_lib_uart_COMP_LIST
252 export sbl_lib_uart_BOARD_DEPENDENCY
253 export sbl_lib_uart_CORE_DEPENDENCY
254 sbl_lib_uart_PKG_LIST = sbl_lib_uart
255 sbl_lib_uart_INCLUDE = $(sbl_lib_uart_PATH)
256 sbl_lib_uart_SOCLIST = $(sbl_SOCLIST)
257 sbl_lib_uart_BOARDLIST = $(sbl_BOARDLIST)
258 export sbl_lib_uart_SOCLIST
259 export sbl_lib_uart_BOARDLIST
260 sbl_lib_uart_$(SOC)_CORELIST = mcu1_0
261 export sbl_lib_uart_$(SOC)_CORELIST
263 #
264 # SBL Examples
265 #
266 # SBL MMCSD Image
267 sbl_mmcsd_img_COMP_LIST = sbl_mmcsd_img
268 sbl_mmcsd_img_RELPATH = ti/boot/sbl/board/k3
269 sbl_mmcsd_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/mmcsd/bin
270 sbl_mmcsd_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
271 sbl_mmcsd_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=mmcsd SBL_USE_DMA=yes BUILD_HS=no
272 export sbl_mmcsd_img_MAKEFILE
273 export sbl_mmcsd_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
274 sbl_mmcsd_img_BOARD_DEPENDENCY = yes
275 sbl_mmcsd_img_SOC_DEPENDENCY = yes
276 sbl_mmcsd_img_CORE_DEPENDENCY = no
277 export sbl_mmcsd_img_COMP_LIST
278 export sbl_mmcsd_img_BOARD_DEPENDENCY
279 export sbl_mmcsd_img_SOC_DEPENDENCY
280 export sbl_mmcsd_img_CORE_DEPENDENCY
281 sbl_mmcsd_img_PKG_LIST = sbl
282 sbl_mmcsd_img_INCLUDE = $(sbl_mmcsd_img_PATH)
283 sbl_mmcsd_img_BOARDLIST = $(sbl_BOARDLIST)
284 export sbl_mmcsd_img_BOARDLIST
285 sbl_mmcsd_img_$(SOC)_CORELIST = mcu1_0
286 export sbl_mmcsd_img_$(SOC)_CORELIST
287 sbl_mmcsd_img_SBL_IMAGEGEN = yes
288 export sbl_mmcsd_img_SBL_IMAGEGEN
290 # SBL MMCSD Image - For HS build
291 export sbl_mmcsd_img_hs_COMP_LIST = sbl_mmcsd_img_hs
292 sbl_mmcsd_img_hs_RELPATH = ti/boot/sbl/board/k3
293 sbl_mmcsd_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/mmcsd/bin
294 #Note: The below variable is purposefully set to build folder - different than
295 #non-hs app.
296 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
297 #creates lto_$APPNAME optimization file in the directory in which -C is called
298 #Because of this multiple lto_ files with same name can be created if app name
299 #and app path are same
300 sbl_mmcsd_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
301 export sbl_mmcsd_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=mmcsd SBL_USE_DMA=yes BUILD_HS=yes
302 export sbl_mmcsd_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
303 export sbl_mmcsd_img_hs_BOARD_DEPENDENCY = yes
304 export sbl_mmcsd_img_hs_SOC_DEPENDENCY = yes
305 export sbl_mmcsd_img_hs_CORE_DEPENDENCY = no
306 sbl_mmcsd_img_hs_PKG_LIST = sbl
307 sbl_mmcsd_img_hs_INCLUDE = $(sbl_mmcsd_img_hs_PATH)
308 export sbl_mmcsd_img_hs_BOARDLIST = $(sbl_BOARDLIST)
309 export sbl_mmcsd_img_hs_$(SOC)_CORELIST = mcu1_0
310 export sbl_mmcsd_img_hs_SBL_IMAGEGEN = yes
312 # SBL OSPI Image
313 sbl_ospi_img_COMP_LIST = sbl_ospi_img
314 sbl_ospi_img_RELPATH = ti/boot/sbl/board/k3
315 sbl_ospi_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/ospi/bin
316 sbl_ospi_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
317 ifeq ($(SOC),$(filter $(SOC), am64x j7200))
318 sbl_ospi_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=no BUILD_HS=no
319 else
320 sbl_ospi_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=yes BUILD_HS=no
321 endif
322 export sbl_ospi_img_MAKEFILE
323 export sbl_ospi_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
324 sbl_ospi_img_BOARD_DEPENDENCY = yes
325 sbl_ospi_img_SOC_DEPENDENCY = yes
326 sbl_ospi_img_CORE_DEPENDENCY = no
327 export sbl_ospi_img_COMP_LIST
328 export sbl_ospi_img_BOARD_DEPENDENCY
329 export sbl_ospi_img_SOC_DEPENDENCY
330 export sbl_ospi_img_CORE_DEPENDENCY
331 sbl_ospi_img_PKG_LIST = sbl
332 sbl_ospi_img_INCLUDE = $(sbl_ospi_img_PATH)
333 sbl_ospi_img_BOARDLIST = $(sbl_BOARDLIST)
334 export sbl_ospi_img_BOARDLIST
335 sbl_ospi_img_$(SOC)_CORELIST = mcu1_0
336 export sbl_ospi_img_$(SOC)_CORELIST
337 sbl_ospi_img_SBL_IMAGEGEN = yes
338 export sbl_ospi_img_SBL_IMAGEGEN
340 # SBL OSPI Image - For HS build
341 export sbl_ospi_img_hs_COMP_LIST = sbl_ospi_img_hs
342 sbl_ospi_img_hs_RELPATH = ti/boot/sbl/board/k3
343 sbl_ospi_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/ospi/bin
344 #Note: The below variable is purposefully set to build folder - different than
345 #non-hs app.
346 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
347 #creates lto_$APPNAME optimization file in the directory in which -C is called
348 #Because of this multiple lto_ files with same name can be created if app name
349 #and app path are same
350 sbl_ospi_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
351 export sbl_ospi_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=no BUILD_HS=yes
352 export sbl_ospi_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
353 export sbl_ospi_img_hs_BOARD_DEPENDENCY = yes
354 export sbl_ospi_img_hs_SOC_DEPENDENCY = yes
355 export sbl_ospi_img_hs_CORE_DEPENDENCY = no
356 sbl_ospi_img_hs_PKG_LIST = sbl
357 sbl_ospi_img_hs_INCLUDE = $(sbl_ospi_img_hs_PATH)
358 export sbl_ospi_img_hs_BOARDLIST = $(sbl_BOARDLIST)
359 export sbl_ospi_img_hs_$(SOC)_CORELIST = mcu1_0
360 export sbl_ospi_img_hs_SBL_IMAGEGEN = yes
362 # SBL HYPERFLASH Image
363 sbl_hyperflash_img_COMP_LIST = sbl_hyperflash_img
364 sbl_hyperflash_img_RELPATH = ti/boot/sbl/board/k3
365 sbl_hyperflash_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/hyperflash/bin
366 sbl_hyperflash_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
367 sbl_hyperflash_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=hyperflash SBL_USE_DMA=yes BUILD_HS=no
368 export sbl_hyperflash_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
369 export sbl_hyperflash_img_MAKEFILE
370 sbl_hyperflash_img_BOARD_DEPENDENCY = yes
371 sbl_hyperflash_img_SOC_DEPENDENCY = yes
372 sbl_hyperflash_img_CORE_DEPENDENCY = no
373 export sbl_hyperflash_img_COMP_LIST
374 export sbl_hyperflash_img_BOARD_DEPENDENCY
375 export sbl_hyperflash_img_SOC_DEPENDENCY
376 export sbl_hyperflash_img_CORE_DEPENDENCY
377 sbl_hyperflash_img_PKG_LIST = sbl
378 sbl_hyperflash_img_INCLUDE = $(sbl_hyperflash_img_PATH)
379 sbl_hyperflash_img_BOARDLIST = j721e_evm
380 export sbl_hyperflash_img_BOARDLIST
381 sbl_hyperflash_img_$(SOC)_CORELIST = mcu1_0
382 export sbl_hyperflash_img_$(SOC)_CORELIST
383 sbl_hyperflash_img_SBL_IMAGEGEN = yes
384 export sbl_hyperflash_img_SBL_IMAGEGEN
386 # SBL HYPERFLASH Image - For HS build
387 export sbl_hyperflash_img_hs_COMP_LIST = sbl_hyperflash_img_hs
388 sbl_hyperflash_img_hs_RELPATH = ti/boot/sbl/board/k3
389 sbl_hyperflash_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/hyperflash/bin
390 #Note: The below variable is purposefully set to build folder - different than
391 #non-hs app.
392 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
393 #creates lto_$APPNAME optimization file in the directory in which -C is called
394 #Because of this multiple lto_ files with same name can be created if app name
395 #and app path are same
396 sbl_hyperflash_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
397 export sbl_hyperflash_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=hyperflash SBL_USE_DMA=yes BUILD_HS=yes
398 export sbl_hyperflash_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
399 export sbl_hyperflash_img_hs_BOARD_DEPENDENCY = yes
400 export sbl_hyperflash_img_SOC_DEPENDENCY = yes
401 export sbl_hyperflash_img_hs_CORE_DEPENDENCY = no
402 sbl_hyperflash_img_hs_PKG_LIST = sbl
403 sbl_hyperflash_img_hs_INCLUDE = $(sbl_hyperflash_img_hs_PATH)
404 export sbl_hyperflash_img_hs_BOARDLIST = j721e_evm
405 export sbl_hyperflash_img_hs_$(SOC)_CORELIST = mcu1_0
406 export sbl_hyperflash_img_hs_SBL_IMAGEGEN = yes
408 # SBL UART Image
409 sbl_uart_img_COMP_LIST = sbl_uart_img
410 ifeq ($(SOC), tpr12)
411 sbl_uart_img_RELPATH = ti/boot/sbl/board/evmTPR12
412 else
413 sbl_uart_img_RELPATH = ti/boot/sbl/board/k3
414 endif
415 sbl_uart_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/uart/bin
416 ifeq ($(SOC), tpr12)
417 sbl_uart_img_PATH = $(PDK_SBL_COMP_PATH)/board/evmTPR12
418 else
419 sbl_uart_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
420 endif
421 sbl_uart_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=uart SBL_USE_DMA=yes BUILD_HS=no
422 export sbl_uart_img_MAKEFILE
423 export sbl_uart_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
424 sbl_uart_img_BOARD_DEPENDENCY = yes
425 sbl_uart_img_SOC_DEPENDENCY = yes
426 sbl_uart_img_CORE_DEPENDENCY = no
427 export sbl_uart_img_COMP_LIST
428 export sbl_uart_img_BOARD_DEPENDENCY
429 export sbl_uart_img_SOC_DEPENDENCY
430 export sbl_uart_img_CORE_DEPENDENCY
431 sbl_uart_img_PKG_LIST = sbl
432 sbl_uart_img_INCLUDE = $(sbl_uart_img_PATH)
433 sbl_uart_img_BOARDLIST = $(sbl_BOARDLIST)
434 export sbl_uart_img_BOARDLIST
435 sbl_uart_img_$(SOC)_CORELIST = mcu1_0
436 export sbl_uart_img_$(SOC)_CORELIST
437 sbl_uart_img_SBL_IMAGEGEN = yes
438 export sbl_uart_img_SBL_IMAGEGEN
440 # SBL UART Image - For HS build
441 export sbl_uart_img_hs_COMP_LIST = sbl_uart_img_hs
442 sbl_uart_img_hs_RELPATH = ti/boot/sbl/board/k3
443 sbl_uart_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/uart/bin
444 #Note: The below variable is purposefully set to build folder - different than
445 #non-hs app.
446 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
447 #creates lto_$APPNAME optimization file in the directory in which -C is called
448 #Because of this multiple lto_ files with same name can be created if app name
449 #and app path are same
450 sbl_uart_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
451 export sbl_uart_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=uart SBL_USE_DMA=yes BUILD_HS=yes
452 export sbl_uart_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
453 export sbl_uart_img_hs_BOARD_DEPENDENCY = yes
454 export sbl_uart_img_hs_SOC_DEPENDENCY = yes
455 export sbl_uart_img_hs_CORE_DEPENDENCY = no
456 sbl_uart_img_hs_PKG_LIST = sbl
457 sbl_uart_img_hs_INCLUDE = $(sbl_uart_img_hs_PATH)
458 export sbl_uart_img_hs_BOARDLIST = $(sbl_BOARDLIST)
459 export sbl_uart_img_hs_$(SOC)_CORELIST = mcu1_0
460 export sbl_uart_img_hs_SBL_IMAGEGEN = yes
462 # Individual Core Boot Test (Ordered)
463 sbl_boot_test_ordered_COMP_LIST = sbl_boot_test_ordered
464 sbl_boot_test_ordered_RELPATH = ti/boot/sbl/example/k3MulticoreApp
465 sbl_boot_test_ordered_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
466 sbl_boot_test_ordered_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
467 sbl_boot_test_ordered_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_boot_test_ordered.mk
468 export sbl_boot_test_ordered_MAKEFILE
469 sbl_boot_test_ordered_BOARD_DEPENDENCY = no
470 sbl_boot_test_ordered_SOC_DEPENDENCY = no
471 sbl_boot_test_ordered_CORE_DEPENDENCY = no
472 export sbl_boot_test_ordered_COMP_LIST
473 export sbl_boot_test_ordered_BOARD_DEPENDENCY
474 export sbl_boot_test_ordered_SOC_DEPENDENCY
475 export sbl_boot_test_ordered_CORE_DEPENDENCY
476 sbl_boot_test_ordered_PKG_LIST = sbl_boot_test_ordered
477 sbl_boot_test_ordered_INCLUDE = $(sbl_boot_test_ordered_PATH)
478 sbl_boot_test_ordered_BOARDLIST = $(sbl_BOARDLIST)
479 export sbl_boot_test_ordered_BOARDLIST
480 sbl_boot_test_ordered_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST)
481 export sbl_boot_test_ordered_$(SOC)_CORELIST
482 ifneq ($(SOC), tpr12)
483 sbl_EXAMPLE_LIST += sbl_boot_test_ordered
484 endif
485 sbl_boot_test_ordered_SBL_APPIMAGEGEN = yes
486 export sbl_boot_test_ordered_SBL_APPIMAGEGEN
488 # Multicore AMP Boot Test (Ordered)
489 sbl_multicore_amp_ordered_COMP_LIST = sbl_multicore_amp_ordered
490 sbl_multicore_amp_ordered_RELPATH = ti/boot/sbl/example/k3MulticoreApp
491 sbl_multicore_amp_ordered_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
492 sbl_multicore_amp_ordered_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
493 sbl_multicore_amp_ordered_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_amp_ordered.mk
494 export sbl_multicore_amp_ordered_MAKEFILE
495 # SBL multicore amp depends on sbl_boot_test for all the cores
496 sbl_multicore_amp_ordered_DEPENDS_ON=sbl_boot_test_ordered
497 export sbl_multicore_amp_ordered_DEPENDS_ON
498 sbl_multicore_amp_ordered_BOARD_DEPENDENCY = no
499 sbl_multicore_amp_ordered_SOC_DEPENDENCY = no
500 sbl_multicore_amp_ordered_CORE_DEPENDENCY = no
501 export sbl_multicore_amp_ordered_COMP_LIST
502 export sbl_multicore_amp_ordered_BOARD_DEPENDENCY
503 export sbl_multicore_amp_ordered_SOC_DEPENDENCY
504 export sbl_multicore_amp_ordered_CORE_DEPENDENCY
505 sbl_multicore_amp_ordered_PKG_LIST = sbl_multicore_amp_ordered
506 sbl_multicore_amp_ordered_INCLUDE = $(sbl_multicore_amp_ordered_PATH)
507 sbl_multicore_amp_ordered_BOARDLIST = $(sbl_BOARDLIST)
508 export sbl_multicore_amp_ordered_BOARDLIST
509 sbl_multicore_amp_ordered_$(SOC)_CORELIST = $($(SOC)_LASTCORE)
510 export sbl_multicore_amp_ordered_$(SOC)_CORELIST
511 ifneq ($(SOC), tpr12)
512 sbl_EXAMPLE_LIST += sbl_multicore_amp_ordered
513 endif
514 sbl_multicore_amp_ordered_SBL_APPIMAGEGEN = no
515 export sbl_multicore_amp_ordered_SBL_APPIMAGEGEN
517 # Individual Core Boot Test
518 sbl_boot_test_COMP_LIST = sbl_boot_test
519 sbl_boot_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
520 sbl_boot_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
521 sbl_boot_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
522 sbl_boot_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_boot_test.mk
523 export sbl_boot_test_MAKEFILE
524 sbl_boot_test_BOARD_DEPENDENCY = no
525 sbl_boot_test_SOC_DEPENDENCY = no
526 sbl_boot_test_CORE_DEPENDENCY = no
527 export sbl_boot_test_COMP_LIST
528 export sbl_boot_test_BOARD_DEPENDENCY
529 export sbl_boot_test_SOC_DEPENDENCY
530 export sbl_boot_test_CORE_DEPENDENCY
531 sbl_boot_test_PKG_LIST = sbl_boot_test
532 sbl_boot_test_INCLUDE = $(sbl_boot_test_PATH)
533 sbl_boot_test_BOARDLIST = $(sbl_BOARDLIST)
534 export sbl_boot_test_BOARDLIST
535 sbl_boot_test_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST)
536 export sbl_boot_test_$(SOC)_CORELIST
537 ifneq ($(SOC), tpr12)
538 sbl_EXAMPLE_LIST += sbl_boot_test
539 endif
540 sbl_boot_test_SBL_APPIMAGEGEN = yes
541 export sbl_boot_test_SBL_APPIMAGEGEN
543 # Multicore AMP Boot Test
544 sbl_multicore_amp_COMP_LIST = sbl_multicore_amp
545 sbl_multicore_amp_RELPATH = ti/boot/sbl/example/k3MulticoreApp
546 sbl_multicore_amp_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
547 sbl_multicore_amp_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
548 sbl_multicore_amp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_amp.mk
549 export sbl_multicore_amp_MAKEFILE
550 # SBL multicore amp depends on sbl_boot_test for all the cores
551 sbl_multicore_amp_DEPENDS_ON=sbl_boot_test
552 export sbl_multicore_amp_DEPENDS_ON
553 sbl_multicore_amp_BOARD_DEPENDENCY = no
554 sbl_multicore_amp_SOC_DEPENDENCY = no
555 sbl_multicore_amp_CORE_DEPENDENCY = no
556 export sbl_multicore_amp_COMP_LIST
557 export sbl_multicore_amp_BOARD_DEPENDENCY
558 export sbl_multicore_amp_SOC_DEPENDENCY
559 export sbl_multicore_amp_CORE_DEPENDENCY
560 sbl_multicore_amp_PKG_LIST = sbl_multicore_amp
561 sbl_multicore_amp_INCLUDE = $(sbl_multicore_amp_PATH)
562 sbl_multicore_amp_BOARDLIST = $(sbl_BOARDLIST)
563 export sbl_multicore_amp_BOARDLIST
564 sbl_multicore_amp_$(SOC)_CORELIST = $($(SOC)_LASTCORE)
565 export sbl_multicore_amp_$(SOC)_CORELIST
566 ifneq ($(SOC), tpr12)
567 sbl_EXAMPLE_LIST += sbl_multicore_amp
568 endif
569 sbl_multicore_amp_SBL_APPIMAGEGEN = no
570 export sbl_multicore_amp_SBL_APPIMAGEGEN
572 # R5 Lockstep and MPU SMP Boot Test
573 sbl_smp_test_COMP_LIST = sbl_smp_test
574 sbl_smp_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
575 sbl_smp_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
576 sbl_smp_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
577 sbl_smp_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_smp_test.mk BOOTMODE=mmcsd
578 export sbl_smp_test_MAKEFILE
579 sbl_smp_test_BOARD_DEPENDENCY = no
580 sbl_smp_test_SOC_DEPENDENCY = no
581 sbl_smp_test_CORE_DEPENDENCY = no
582 export sbl_smp_test_COMP_LIST
583 export sbl_smp_test_BOARD_DEPENDENCY
584 export sbl_smp_test_SOC_DEPENDENCY
585 export sbl_smp_test_CORE_DEPENDENCY
586 sbl_smp_test_PKG_LIST = sbl_smp_test
587 sbl_smp_test_INCLUDE = $(sbl_smp_test_PATH)
588 sbl_smp_test_BOARDLIST = $(sbl_BOARDLIST)
589 export sbl_smp_test_BOARDLIST
590 sbl_smp_test_$(SOC)_CORELIST = $($(SOC)_smp_CORELIST)
591 export sbl_smp_test_$(SOC)_CORELIST
592 ifneq ($(SOC),$(filter $(SOC), am64x tpr12))
593 sbl_EXAMPLE_LIST += sbl_smp_test
594 endif
595 sbl_smp_test_SBL_APPIMAGEGEN = yes
596 export sbl_smp_test_SBL_APPIMAGEGEN
598 # Multicore SMP Boot Test
599 sbl_multicore_smp_COMP_LIST = sbl_multicore_smp
600 sbl_multicore_smp_RELPATH = ti/boot/sbl/example/k3MulticoreApp
601 sbl_multicore_smp_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
602 sbl_multicore_smp_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
603 sbl_multicore_smp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_smp.mk
604 export sbl_multicore_smp_MAKEFILE
605 # SBL multicore smp depends on sbl_smp_test for all the cores
606 sbl_multicore_smp_DEPENDS_ON=sbl_smp_test
607 export sbl_multicore_smp_DEPENDS_ON
608 sbl_multicore_smp_BOARD_DEPENDENCY = no
609 sbl_multicore_smp_SOC_DEPENDENCY = no
610 sbl_multicore_smp_CORE_DEPENDENCY = no
611 export sbl_multicore_smp_COMP_LIST
612 export sbl_multicore_smp_BOARD_DEPENDENCY
613 export sbl_multicore_smp_SOC_DEPENDENCY
614 export sbl_multicore_smp_CORE_DEPENDENCY
615 sbl_multicore_smp_PKG_LIST = sbl_multicore_smp
616 sbl_multicore_smp_INCLUDE = $(sbl_multicore_smp_PATH)
617 sbl_multicore_smp_BOARDLIST = $(sbl_BOARDLIST)
618 export sbl_multicore_smp_BOARDLIST
619 sbl_multicore_smp_$(SOC)_CORELIST := $($(SOC)_LASTCORE)
620 export sbl_multicore_smp_$(SOC)_CORELIST
621 ifneq ($(SOC),$(filter $(SOC), am64x tpr12))
622 sbl_EXAMPLE_LIST += sbl_multicore_smp
623 endif
624 sbl_multicore_smp_SBL_APPIMAGEGEN = no
625 export sbl_multicore_smp_SBL_APPIMAGEGEN
627 # R5 boot XIP Test
628 sbl_boot_xip_test_COMP_LIST = sbl_boot_xip_test
629 sbl_boot_xip_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
630 sbl_boot_xip_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
631 sbl_boot_xip_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
632 sbl_boot_xip_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_mcu0_boot_xip_test.mk
633 export sbl_boot_xip_test_MAKEFILE
634 sbl_boot_xip_test_BOARD_DEPENDENCY = no
635 sbl_boot_xip_test_SOC_DEPENDENCY = no
636 sbl_boot_xip_test_CORE_DEPENDENCY = no
637 export sbl_boot_xip_test_COMP_LIST
638 export sbl_boot_xip_test_BOARD_DEPENDENCY
639 export sbl_boot_xip_test_SOC_DEPENDENCY
640 export sbl_boot_xip_test_CORE_DEPENDENCY
641 sbl_boot_xip_test_PKG_LIST = sbl_boot_xip_test
642 sbl_boot_xip_test_INCLUDE = $(sbl_boot_xip_test_PATH)
643 sbl_boot_xip_test_BOARDLIST = $(sbl_BOARDLIST)
644 export sbl_boot_xip_test_BOARDLIST
645 sbl_boot_xip_test_$(SOC)_CORELIST = mcu1_0
646 export sbl_boot_xip_test_$(SOC)_CORELIST
647 ifneq ($(SOC),$(filter $(SOC), am64x tpr12))
648 sbl_EXAMPLE_LIST += sbl_boot_xip_test
649 endif
650 sbl_boot_xip_test_SBL_APPIMAGEGEN = yes
651 sbl_boot_xip_test_SBL_APP_BINIMAGEGEN = yes
652 sbl_boot_xip_test_SBL_APP_BIN_SECTIONS = --only-section .rstvectors --only-section .sbl_mcu_1_0_resetvector
653 export sbl_boot_xip_test_SBL_APPIMAGEGEN
654 export sbl_boot_xip_test_SBL_APP_BINIMAGEGEN
655 export sbl_boot_xip_test_SBL_APP_BIN_SECTIONS
657 # R5 boot XIP entry
658 sbl_boot_xip_entry_COMP_LIST = sbl_boot_xip_entry
659 sbl_boot_xip_entry_RELPATH = ti/boot/sbl/example/k3MulticoreApp
660 sbl_boot_xip_entry_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
661 sbl_boot_xip_entry_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
662 sbl_boot_xip_entry_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_mcu0_boot_xip_entry.mk
663 export sbl_boot_xip_entry_MAKEFILE
664 sbl_boot_xip_entry_BOARD_DEPENDENCY = no
665 sbl_boot_xip_entry_SOC_DEPENDENCY = no
666 sbl_boot_xip_entry_CORE_DEPENDENCY = no
667 export sbl_boot_xip_entry_COMP_LIST
668 export sbl_boot_xip_entry_BOARD_DEPENDENCY
669 export sbl_boot_xip_entry_SOC_DEPENDENCY
670 export sbl_boot_xip_entry_CORE_DEPENDENCY
671 sbl_boot_xip_entry_PKG_LIST = sbl_boot_xip_entry
672 sbl_boot_xip_entry_INCLUDE = $(sbl_boot_xip_entry_PATH)
673 sbl_boot_xip_entry_BOARDLIST = $(sbl_BOARDLIST)
674 export sbl_boot_xip_entry_BOARDLIST
675 sbl_boot_xip_entry_$(SOC)_CORELIST = mcu1_0
676 export sbl_boot_xip_entry_$(SOC)_CORELIST
677 ifneq ($(SOC),$(filter $(SOC), am64x tpr12))
678 sbl_EXAMPLE_LIST += sbl_boot_xip_entry
679 endif
680 sbl_boot_xip_entry_SBL_APPIMAGEGEN = yes
681 export sbl_boot_xip_entry_SBL_APPIMAGEGEN
683 # Display profiling info before MCU1_0 boot
684 # increases delay time, between end of SBL
685 # and start of app, but useful for
686 # debugging and tuning performace knobs
687 #SBL_CFLAGS += -DSBL_DISPLAY_PROFILE_INFO
689 ifeq ($(SOC), am64x)
690 SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER -DDISABLE_ATCM
691 endif
693 ifeq ($(SOC), j7200)
694 SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER
695 endif
697 ###### Use boot_perf_benchmark example#######
698 ###### to fine tune the perf knobs #########
700 ###########START BOOT PERF KNOBS#############
701 # SBL log level
702 # no logs = 0, only errors =1, normal logs = 2, all logs = 3
704 ifeq ($(SOC), tpr12)
705 SBL_CFLAGS += -DSBL_LOG_LEVEL=0
706 else
707 SBL_CFLAGS += -DSBL_LOG_LEVEL=2
708 endif
710 SBL_CFLAGS += -DSBL_ENABLE_PLL
711 SBL_CFLAGS += -DSBL_ENABLE_CLOCKS
713 ifneq ($(SOC), j7200)
714 SBL_CFLAGS += -DSBL_ENABLE_DDR
715 endif
716 ############################################
717 # DISABLING the options above this caption
718 # improves boot time at the cost of moving
719 # PLL, LPSC and DDR init to the app
720 #
721 # ENABLING the options below this caption
722 # improves boot time by skipping stuff SBL
723 # usually does.
724 ###########################################
725 # If enabled, the SBL will branch to the start
726 # of MCU_0 app without resetting the core
727 # if csl defaults are godd enough this enables
728 # app to skip redoing mcu initialization
729 #SBL_CFLAGS += -DSBL_SKIP_MCU_RESET
731 # If enabled, SBL will skip initializing
732 # sysfw. The SBL will only load it.
733 # No SCI Client APIs will work. Saves
734 # boot time. When this is enabled
735 # make sure that SBL_SKIP_MCU_RESET is also
736 # enabled, as resetting a core needs SYSFW
737 # to be running.
738 # SBL_CFLAGS += -DSBL_SKIP_SYSFW_INIT
740 # If enabled, SBL will skip calling
741 # Sciclient_boardCfg* API. Enabling
742 # it saves boot time, can affect
743 # functionality. The app must call the
744 # Sciclient_boardCfg* APIs that the SBL
745 # skips. Like for eg, if SBL skips calling
746 # Sciclient_boardCfgPm, then Sciclient_boardCfgRm
747 # and Sciclient_boardCfgSec must also
748 # be skipped.
749 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_BOARD
750 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_RM
751 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_SEC
752 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_PM
754 # If enabled, SBL will only enable the Clocks
755 # and PLLs for the MCU domain. Clocks and PLLs
756 # for the Main domaincan be initialized by the
757 # app to save boot time or if the application
758 # usecase demands it.
759 #SBL_CFLAGS += -DSBL_ENABLE_DEV_GRP_MCU
761 # If enabled, SBL will not leave the OSPI
762 # flash in XIP mode, so that the MAIN
763 # domain Cortex-A code (HLOS) can reset
764 # the flash and take control of it, if
765 # needed.
766 #SBL_CFLAGS += -DSBL_HLOS_OWNS_FLASH
768 # If enabled, SBL will skip any PINMUX
769 # init being used in the bootloader and
770 # expect that it will be handled by
771 # another app.
772 #SBL_CFLAGS += -DSBL_SKIP_PINMUX_ENABLE
774 # If enabled, SBL will skip handling the
775 # SoC Late Init functions normally contained
776 # in SBL_SocLateInit()
777 #SBL_CFLAGS += -DSBL_SKIP_LATE_INIT
779 # If enabled, the SBL will configure & use
780 # resources in the MCU domain ONLY to
781 # enable MCU-only code to run.
782 #SBL_CFLAGS += -DSBL_USE_MCU_DOMAIN_ONLY
784 # If enabled, the SBL will skip configuring ATCM memory
785 #SBL_CFLAGS += -DDISABLE_ATCM
787 # If enabled for OSPI boot the SBL will bypass the
788 # OSPI driver completely and let ROM copy the sysftw/application
789 # from flash.
790 #SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER
792 # If enabled the SBL image is built for running on VLAB simulation.
793 #SBL_CFLAGS += -DVLAB_SIM
795 ###########END BOOT PERF KNOBS#############
797 # Example - Building Custom SBL Images
798 # Build and SBl with custom flags to change
799 # different build configurations
800 CUST_SBL_TEST_SOCS = am65xx j721e j7200 am64x_evm
801 CUST_SBL_TEST_BOARDS = am65xx_evm j721e_evm j7200_evm am64x_evm
802 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=1 -DSBL_LOG_LEVEL=0 -DSBL_SCRATCH_MEM_START=0x70100000 -DSBL_SCRATCH_MEM_SIZE=0xF0000 -DSBL_SKIP_MCU_RESET -DBOOT_OSPI "
803 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=1 -DSBL_LOG_LEVEL=0 -DSBL_SCRATCH_MEM_START=0x70100000 -DSBL_SKIP_MCU_RESET -DSBL_SKIP_BRD_CFG_PM -DBOOT_OSPI "
804 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=0 -DSBL_SCRATCH_MEM_START=0x70100000 -DSBL_SCRATCH_MEM_SIZE=0xF0000 -DSBL_SKIP_SYSFW_INIT -DSBL_SKIP_MCU_RESET -DBOOT_OSPI"
805 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=1 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0xB8000000 -DSBL_SCRATCH_MEM_SIZE=0x4000000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_ENABLE_DDR -DSBL_SKIP_MCU_RESET -DBOOT_OSPI"
806 ifeq ($(SOC), j7200)
807 CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=2 -DSBL_SCRATCH_MEM_START=0x41cc0000 -DSBL_SCRATCH_MEM_SIZE=0x40000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_SKIP_MCU_RESET -DBOOT_OSPI -DSBL_SKIP_PINMUX_ENABLE -DSBL_BYPASS_OSPI_DRIVER"
808 else
809 ifeq ($(findstring j7,$(SOC)),j7)
810 CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0x41cc0000 -DSBL_SCRATCH_MEM_SIZE=0x40000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_SKIP_MCU_RESET -DBOOT_OSPI -DSBL_ENABLE_DEV_GRP_MCU -DSBL_HLOS_OWNS_FLASH"
811 # Custom example: Early CAN response (NOTE: before using the line below, comment out the line above)
812 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0x41cc0000 -DSBL_SCRATCH_MEM_SIZE=0x40000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_SKIP_MCU_RESET -DBOOT_OSPI -DSBL_ENABLE_DEV_GRP_MCU -DSBL_HLOS_OWNS_FLASH -DSBL_SKIP_PINMUX_ENABLE -DSBL_SKIP_LATE_INIT -DSBL_USE_MCU_DOMAIN_ONLY"
813 else
814 CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=1 -DSBL_SCRATCH_MEM_START=0x70100000 -DSBL_SCRATCH_MEM_SIZE=0xF0000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DSBL_SKIP_MCU_RESET -DBOOT_OSPI -DSBL_ENABLE_DEV_GRP_MCU -DSBL_HLOS_OWNS_FLASH"
815 endif
816 #Custom configuration for AM64x OSPI Boot
817 #CUST_SBL_TEST_FLAGS =" -DSBL_USE_DMA=0 -DSBL_LOG_LEVEL=3 -DSBL_SCRATCH_MEM_START=0x70100000 -DSBL_SCRATCH_MEM_SIZE=0xF0000 -DSBL_ENABLE_PLL -DSBL_ENABLE_CLOCKS -DBOOT_OSPI -DSBL_ENABLE_DDR -DDISABLE_ATCM -DSBL_BYPASS_OSPI_DRIVER"
818 endif
820 # SBL Custom LIB
821 sbl_lib_cust_COMP_LIST = sbl_lib_cust
822 sbl_lib_cust_RELPATH = ti/boot/sbl
823 export sbl_lib_cust_OBJPATH = ti/boot/sbl/cust
824 sbl_lib_cust_LIBNAME = sbl_lib_cust
825 sbl_lib_cust_PATH = $(PDK_SBL_COMP_PATH)
826 sbl_lib_cust_LIBNAME = sbl_lib_cust
827 sbl_lib_cust_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/cust
828 sbl_lib_cust_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=cust SBL_USE_DMA=no CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS)
829 export sbl_lib_cust_MAKEFILE
830 export sbl_lib_cust_LIBNAME
831 export sbl_lib_cust_LIBPATH
832 sbl_lib_cust_BOARD_DEPENDENCY = yes
833 sbl_lib_cust_SOC_DEPENDENCY = yes
834 sbl_lib_cust_CORE_DEPENDENCY = no
835 export sbl_lib_cust_COMP_LIST
836 export sbl_lib_cust_BOARD_DEPENDENCY
837 export sbl_lib_cust_CORE_DEPENDENCY
838 sbl_lib_cust_PKG_LIST = sbl_lib_cust
839 sbl_lib_cust_INCLUDE = $(sbl_lib_cust_PATH)
840 sbl_lib_cust_SOCLIST = $(CUST_SBL_TEST_SOCS)
841 sbl_lib_cust_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
842 export sbl_lib_cust_SOCLIST
843 export sbl_lib_cust_BOARDLIST
844 sbl_lib_cust_$(SOC)_CORELIST = mcu1_0
845 export sbl_lib_cust_$(SOC)_CORELIST
847 # SBL custom image
848 sbl_cust_img_COMP_LIST = sbl_cust_img
849 sbl_cust_img_RELPATH = ti/boot/sbl/board/k3
850 sbl_cust_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/cust/bin
851 sbl_cust_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
852 sbl_cust_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=cust SBL_USE_DMA=no BUILD_HS=no CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS)
853 export sbl_cust_img_MAKEFILE
854 export sbl_cust_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
855 sbl_cust_img_BOARD_DEPENDENCY = yes
856 sbl_cust_img_SOC_DEPENDENCY = yes
857 sbl_cust_img_CORE_DEPENDENCY = no
858 export sbl_cust_img_COMP_LIST
859 export sbl_cust_img_BOARD_DEPENDENCY
860 export sbl_cust_img_SOC_DEPENDENCY
861 export sbl_cust_img_CORE_DEPENDENCY
862 sbl_cust_img_PKG_LIST = sbl
863 sbl_cust_img_INCLUDE = $(sbl_cust_img_PATH)
864 sbl_cust_img_SOCLIST = $(CUST_SBL_TEST_SOCS)
865 sbl_cust_img_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
866 export sbl_cust_img_SOCLIST
867 export sbl_cust_img_BOARDLIST
868 sbl_cust_img_$(SOC)_CORELIST = mcu1_0
869 export sbl_cust_img_$(SOC)_CORELIST
870 ifneq ($(SOC), am64x tpr12)
871 sbl_EXAMPLE_LIST += sbl_cust_img
872 endif
873 sbl_cust_img_SBL_IMAGEGEN = yes
874 export sbl_cust_img_SBL_IMAGEGEN
876 # SBL custom image - For HS build
877 export sbl_cust_img_hs_COMP_LIST = sbl_cust_img_hs
878 sbl_cust_img_hs_RELPATH = ti/boot/sbl/board/k3
879 sbl_cust_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/cust/bin
880 #Note: The below variable is purposefully set to build folder - different than
881 #non-hs app.
882 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
883 #creates lto_$APPNAME optimization file in the directory in which -C is called
884 #Because of this multiple lto_ files with same name can be created if app name
885 #and app path are same
886 sbl_cust_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
887 export sbl_cust_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS) BOOTMODE=cust SBL_USE_DMA=no BUILD_HS=yes
888 export sbl_cust_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
889 export sbl_cust_img_hs_BOARD_DEPENDENCY = yes
890 export sbl_cust_img_hs_SOC_DEPENDENCY = yes
891 export sbl_cust_img_hs_CORE_DEPENDENCY = no
892 sbl_cust_img_hs_PKG_LIST = sbl
893 sbl_cust_img_hs_INCLUDE = $(sbl_cust_img_hs_PATH)
894 export sbl_cust_img_hs_SOCLIST = $(CUST_SBL_TEST_SOCS)
895 export sbl_cust_img_hs_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
896 export sbl_cust_img_hs_$(SOC)_CORELIST = mcu1_0
897 export sbl_cust_img_hs_SBL_IMAGEGEN = yes
898 ifneq ($(SOC),$(filter $(SOC), am64x j7200 tpr12))
899 sbl_EXAMPLE_LIST += sbl_cust_img_hs
900 endif
902 # R5 boot performance Test - works only with custom SBL
903 sbl_boot_perf_test_COMP_LIST = sbl_boot_perf_test
904 sbl_boot_perf_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
905 sbl_boot_perf_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
906 sbl_boot_perf_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
907 sbl_boot_perf_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_mcu0_boot_perf_test.mk BOOTMODE=cust CUST_SBL_FLAGS=$(CUST_SBL_TEST_FLAGS)
908 export sbl_boot_perf_test_MAKEFILE
909 sbl_boot_perf_test_BOARD_DEPENDENCY = no
910 sbl_boot_perf_test_SOC_DEPENDENCY = no
911 sbl_boot_perf_test_CORE_DEPENDENCY = no
912 export sbl_boot_perf_test_COMP_LIST
913 export sbl_boot_perf_test_BOARD_DEPENDENCY
914 export sbl_boot_perf_test_SOC_DEPENDENCY
915 export sbl_boot_perf_test_CORE_DEPENDENCY
916 sbl_boot_perf_test_PKG_LIST = sbl_boot_perf_test
917 sbl_boot_perf_test_INCLUDE = $(sbl_boot_perf_test_PATH)
918 sbl_boot_perf_test_SOCLIST = $(CUST_SBL_TEST_SOCS)
919 sbl_boot_perf_test_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
920 export sbl_boot_perf_test_SOCLIST
921 export sbl_boot_perf_test_BOARDLIST
922 sbl_boot_perf_test_$(SOC)_CORELIST = mcu1_0
923 export sbl_boot_perf_test_$(SOC)_CORELIST
924 ifneq ($(SOC), am64x tpr12)
925 sbl_EXAMPLE_LIST += sbl_boot_perf_test
926 endif
927 sbl_boot_perf_test_SBL_APPIMAGEGEN = yes
928 export sbl_boot_perf_test_SBL_APPIMAGEGEN
930 # TPR12 QT Test Bench image
931 ifeq ($(SOC), tpr12)
932 sbl_r4tb_COMP_LIST = sbl_r4tb
933 sbl_r4tb_RELPATH = ti/boot/sbl/example/tpr12MulticoreApp/r4_tb
934 sbl_r4tb_BINPATH = $(PDK_SBL_COMP_PATH)/example/tpr12MulticoreApp/r4_tb/obj
935 sbl_r4tb_PATH = $(PDK_SBL_COMP_PATH)/example/tpr12MulticoreApp/r4_tb
936 sbl_r4tb_MAKEFILE = -f$(sbl_r4tb_PATH)/makefile all R4_TB_PATH:=${sbl_r4tb_PATH} R4_CODEGEN_INSTALL_PATH:=${TOOLCHAIN_PATH_R5}
937 export sbl_r4tb_MAKEFILE
938 sbl_r4tb_BOARD_DEPENDENCY = no
939 sbl_r4tb_SOC_DEPENDENCY = no
940 sbl_r4tb_CORE_DEPENDENCY = no
941 export sbl_r4tb_COMP_LIST
942 export sbl_r4tb_BOARD_DEPENDENCY
943 export sbl_r4tb_SOC_DEPENDENCY
944 export sbl_r4tb_CORE_DEPENDENCY
945 sbl_r4tb_PKG_LIST = sbl_r4tb
946 sbl_r4tb_INCLUDE = $(sbl_r4tb_PATH)
947 sbl_r4tb_BOARDLIST = tpr12_evm
948 export sbl_r4tb_BOARDLIST
949 sbl_r4tb_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST)
950 export sbl_r4tb_$(SOC)_CORELIST
951 sbl_r4tb_SBL_APPIMAGEGEN = no
952 export sbl_r4tb_SBL_APPIMAGEGEN
953 endif
955 ifeq ($(SOC), tpr12)
956 # R5 Lockstep and DSP Boot Test
957 sbl_tpr12_test_COMP_LIST = sbl_tpr12_test
958 sbl_tpr12_test_RELPATH = ti/boot/sbl/example/tpr12MulticoreApp
959 sbl_tpr12_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/tpr12MulticoreApp/binary
960 sbl_tpr12_test_PATH = $(PDK_SBL_COMP_PATH)/example/tpr12MulticoreApp
961 sbl_tpr12_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_tpr12_test.mk BOOTMODE=uart
962 export sbl_tpr12_test_MAKEFILE
963 sbl_tpr12_test_BOARD_DEPENDENCY = no
964 sbl_tpr12_test_SOC_DEPENDENCY = no
965 sbl_tpr12_test_CORE_DEPENDENCY = no
966 export sbl_tpr12_test_COMP_LIST
967 export sbl_tpr12_test_BOARD_DEPENDENCY
968 export sbl_tpr12_test_SOC_DEPENDENCY
969 export sbl_tpr12_test_CORE_DEPENDENCY
970 sbl_tpr12_test_PKG_LIST = sbl_tpr12_test
971 sbl_tpr12_test_INCLUDE = $(sbl_tpr12_test_PATH)
972 sbl_tpr12_test_BOARDLIST = $(sbl_BOARDLIST)
973 export sbl_tpr12_test_BOARDLIST
974 sbl_tpr12_test_$(SOC)_CORELIST = $(sbl_tpr12_CORELIST)
975 export sbl_tpr12_test_$(SOC)_CORELIST
976 sbl_EXAMPLE_LIST += sbl_tpr12_test
977 sbl_tpr12_test_SBL_APPIMAGEGEN = no
978 export sbl_tpr12_test_SBL_APPIMAGEGEN
979 endif
981 # SBL not supported for any profile
982 # other than release
983 ifneq ($(BUILD_PROFILE), release)
984 ifneq ($(SOC), tpr12)
985 sbl_LIB_LIST =
986 sbl_EXAMPLE_LIST =
987 SBL_CFLAGS =
988 endif # TPR12 Debug SBL build support
989 endif # ifneq ($(BUILD_PROFILE), release)
991 export sbl_LIB_LIST
992 export sbl_EXAMPLE_LIST
993 export SBL_CFLAGS
995 sbl_component_make_include := 1
996 endif