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
71 sbl_SOCLIST = am65xx j721e j7200 am64x
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_DISABLE_PARALLEL_MAKE = yes
90 ############################
91 # sbl package
92 # List of components included under sbl
93 # The components included here are built and will be part of sbl
94 ############################
96 ifeq ($(SOC), am64x)
97 sbl_LIB_LIST = sbl_lib_ospi_nondma
98 else
99 ifeq ($(SOC), j7200)
100 sbl_LIB_LIST = sbl_lib_ospi_nondma sbl_lib_cust
101 else
102 sbl_LIB_LIST = sbl_lib_mmcsd sbl_lib_ospi sbl_lib_uart sbl_lib_hyperflash sbl_lib_cust
103 sbl_LIB_LIST += sbl_lib_ospi_nondma
104 endif
105 endif
107 ############################
108 # sbl example
109 # List of examples under sbl (+= is used at each example definition)
110 # All the tests mentioned in list are built when test target is called
111 # List below all examples for allowed values
112 ############################
113 ifeq ($(SOC),$(filter $(SOC), am64x j7200))
114 sbl_EXAMPLE_LIST = sbl_ospi_img
115 else
116 sbl_EXAMPLE_LIST = sbl_mmcsd_img sbl_ospi_img sbl_hyperflash_img sbl_uart_img
117 sbl_EXAMPLE_LIST += sbl_mmcsd_img_hs sbl_ospi_img_hs sbl_hyperflash_img_hs sbl_uart_img_hs
118 endif
120 #
121 # SBL Modules
122 #
124 # SBL MMCSD LIB
125 sbl_lib_mmcsd_COMP_LIST = sbl_lib_mmcsd
126 sbl_lib_mmcsd_RELPATH = ti/boot/sbl
127 export sbl_lib_mmcsd_OBJPATH = ti/boot/sbl/mmcsd
128 sbl_lib_mmcsd_LIBNAME = sbl_lib_mmcsd
129 sbl_lib_mmcsd_PATH = $(PDK_SBL_COMP_PATH)
130 sbl_lib_mmcsd_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/mmcsd
131 sbl_lib_mmcsd_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=mmcsd SBL_USE_DMA=yes
132 export sbl_lib_mmcsd_MAKEFILE
133 export sbl_lib_mmcsd_LIBNAME
134 export sbl_lib_mmcsd_LIBPATH
135 sbl_lib_mmcsd_BOARD_DEPENDENCY = yes
136 sbl_lib_mmcsd_SOC_DEPENDENCY = yes
137 sbl_lib_mmcsd_CORE_DEPENDENCY = no
138 export sbl_lib_mmcsd_COMP_LIST
139 export sbl_lib_mmcsd_BOARD_DEPENDENCY
140 export sbl_lib_mmcsd_CORE_DEPENDENCY
141 sbl_lib_mmcsd_PKG_LIST = sbl_lib_mmcsd
142 sbl_lib_mmcsd_INCLUDE = $(sbl_lib_mmcsd_PATH)
143 sbl_lib_mmcsd_SOCLIST = $(sbl_SOCLIST)
144 sbl_lib_mmcsd_BOARDLIST = $(sbl_BOARDLIST)
145 export sbl_lib_mmcsd_SOCLIST
146 export sbl_lib_mmcsd_BOARDLIST
147 sbl_lib_mmcsd_$(SOC)_CORELIST = mcu1_0
148 export sbl_lib_mmcsd_$(SOC)_CORELIST
150 # SBL OSPI LIB
151 sbl_lib_ospi_COMP_LIST = sbl_lib_ospi
152 sbl_lib_ospi_RELPATH = ti/boot/sbl
153 export sbl_lib_ospi_OBJPATH = ti/boot/sbl/ospi
154 sbl_lib_ospi_LIBNAME = sbl_lib_ospi
155 sbl_lib_ospi_PATH = $(PDK_SBL_COMP_PATH)
156 sbl_lib_ospi_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/ospi
157 sbl_lib_ospi_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=ospi SBL_USE_DMA=yes
158 export sbl_lib_ospi_MAKEFILE
159 export sbl_lib_ospi_LIBNAME
160 export sbl_lib_ospi_LIBPATH
161 sbl_lib_ospi_BOARD_DEPENDENCY = yes
162 sbl_lib_ospi_SOC_DEPENDENCY = yes
163 sbl_lib_ospi_CORE_DEPENDENCY = no
164 export sbl_lib_ospi_COMP_LIST
165 export sbl_lib_ospi_BOARD_DEPENDENCY
166 export sbl_lib_ospi_CORE_DEPENDENCY
167 sbl_lib_ospi_PKG_LIST = sbl_lib_ospi
168 sbl_lib_ospi_INCLUDE = $(sbl_lib_ospi_PATH)
169 sbl_lib_ospi_SOCLIST = $(sbl_SOCLIST)
170 sbl_lib_ospi_BOARDLIST = $(sbl_BOARDLIST)
171 export sbl_lib_ospi_SOCLIST
172 export sbl_lib_ospi_BOARDLIST
173 sbl_lib_ospi_$(SOC)_CORELIST = mcu1_0
174 export sbl_lib_ospi_$(SOC)_CORELIST
176 # SBL OSPI LIB with NON-DMA - Needed for HS SBL
177 export sbl_lib_ospi_nondma_COMP_LIST = sbl_lib_ospi_nondma
178 sbl_lib_ospi_nondma_RELPATH = ti/boot/sbl
179 export sbl_lib_ospi_nondma_OBJPATH = ti/boot/sbl/ospi_nondma
180 sbl_lib_ospi_nondma_PATH = $(PDK_SBL_COMP_PATH)
181 export sbl_lib_ospi_nondma_LIBNAME = sbl_lib_ospi_nondma
182 export sbl_lib_ospi_nondma_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/ospi
183 export sbl_lib_ospi_nondma_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=ospi SBL_USE_DMA=no
184 export sbl_lib_ospi_nondma_BOARD_DEPENDENCY = yes
185 export sbl_lib_ospi_nondma_SOC_DEPENDENCY = yes
186 export sbl_lib_ospi_nondma_CORE_DEPENDENCY = no
187 sbl_lib_ospi_nondma_PKG_LIST = sbl_lib_ospi_nondma
188 sbl_lib_ospi_nondma_INCLUDE = $(sbl_lib_ospi_nondma_PATH)
189 export sbl_lib_ospi_nondma_SOCLIST = $(sbl_SOCLIST)
190 export sbl_lib_ospi_nondma_BOARDLIST = $(sbl_BOARDLIST)
191 export sbl_lib_ospi_nondma_$(SOC)_CORELIST = mcu1_0
193 # SBL HYPERFLASH LIB
194 sbl_lib_hyperflash_COMP_LIST = sbl_lib_hyperflash
195 sbl_lib_hyperflash_RELPATH = ti/boot/sbl
196 export sbl_lib_hyperflash_OBJPATH = ti/boot/sbl/hyperflash
197 sbl_lib_hyperflash_LIBNAME = sbl_lib_hyperflash
198 sbl_lib_hyperflash_PATH = $(PDK_SBL_COMP_PATH)
199 sbl_lib_hyperflash_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/hyperflash
200 sbl_lib_hyperflash_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=hyperflash SBL_USE_DMA=yes
201 export sbl_lib_hyperflash_MAKEFILE
202 export sbl_lib_hyperflash_LIBNAME
203 export sbl_lib_hyperflash_LIBPATH
204 sbl_lib_hyperflash_BOARD_DEPENDENCY = yes
205 sbl_lib_hyperflash_SOC_DEPENDENCY = yes
206 sbl_lib_hyperflash_CORE_DEPENDENCY = no
207 export sbl_lib_hyperflash_COMP_LIST
208 export sbl_lib_hyperflash_BOARD_DEPENDENCY
209 export sbl_lib_hyperflash_CORE_DEPENDENCY
210 sbl_lib_hyperflash_PKG_LIST = sbl_lib_hyperflash
211 sbl_lib_hyperflash_INCLUDE = $(sbl_lib_hyperflash_PATH)
212 sbl_lib_hyperflash_SOCLIST = j721e
213 sbl_lib_hyperflash_BOARDLIST = j721e_evm
214 export sbl_lib_hyperflash_SOCLIST
215 export sbl_lib_hyperflash_BOARDLIST
216 sbl_lib_hyperflash_$(SOC)_CORELIST = mcu1_0
217 export sbl_lib_hyperflash_$(SOC)_CORELIST
219 # SBL UART LIB
220 sbl_lib_uart_COMP_LIST = sbl_lib_uart
221 sbl_lib_uart_RELPATH = ti/boot/sbl
222 export sbl_lib_uart_OBJPATH = ti/boot/sbl/uart
223 sbl_lib_uart_LIBNAME = sbl_lib_uart
224 sbl_lib_uart_PATH = $(PDK_SBL_COMP_PATH)
225 sbl_lib_uart_LIBNAME = sbl_lib_uart
226 sbl_lib_uart_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/uart
227 sbl_lib_uart_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk BOOTMODE=uart SBL_USE_DMA=yes
228 export sbl_lib_uart_MAKEFILE
229 export sbl_lib_uart_LIBNAME
230 export sbl_lib_uart_LIBPATH
231 sbl_lib_uart_BOARD_DEPENDENCY = yes
232 sbl_lib_uart_SOC_DEPENDENCY = yes
233 sbl_lib_uart_CORE_DEPENDENCY = no
234 export sbl_lib_uart_COMP_LIST
235 export sbl_lib_uart_BOARD_DEPENDENCY
236 export sbl_lib_uart_CORE_DEPENDENCY
237 sbl_lib_uart_PKG_LIST = sbl_lib_uart
238 sbl_lib_uart_INCLUDE = $(sbl_lib_uart_PATH)
239 sbl_lib_uart_SOCLIST = $(sbl_SOCLIST)
240 sbl_lib_uart_BOARDLIST = $(sbl_BOARDLIST)
241 export sbl_lib_uart_SOCLIST
242 export sbl_lib_uart_BOARDLIST
243 sbl_lib_uart_$(SOC)_CORELIST = mcu1_0
244 export sbl_lib_uart_$(SOC)_CORELIST
246 #
247 # SBL Examples
248 #
249 # SBL MMCSD Image
250 sbl_mmcsd_img_COMP_LIST = sbl_mmcsd_img
251 sbl_mmcsd_img_RELPATH = ti/boot/sbl/board/k3
252 sbl_mmcsd_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/mmcsd/bin
253 sbl_mmcsd_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
254 sbl_mmcsd_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=mmcsd SBL_USE_DMA=yes BUILD_HS=no
255 export sbl_mmcsd_img_MAKEFILE
256 export sbl_mmcsd_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
257 sbl_mmcsd_img_BOARD_DEPENDENCY = yes
258 sbl_mmcsd_img_SOC_DEPENDENCY = yes
259 sbl_mmcsd_img_CORE_DEPENDENCY = no
260 export sbl_mmcsd_img_COMP_LIST
261 export sbl_mmcsd_img_BOARD_DEPENDENCY
262 export sbl_mmcsd_img_SOC_DEPENDENCY
263 export sbl_mmcsd_img_CORE_DEPENDENCY
264 sbl_mmcsd_img_PKG_LIST = sbl
265 sbl_mmcsd_img_INCLUDE = $(sbl_mmcsd_img_PATH)
266 sbl_mmcsd_img_BOARDLIST = $(sbl_BOARDLIST)
267 export sbl_mmcsd_img_BOARDLIST
268 sbl_mmcsd_img_$(SOC)_CORELIST = mcu1_0
269 export sbl_mmcsd_img_$(SOC)_CORELIST
270 sbl_mmcsd_img_SBL_IMAGEGEN = yes
271 export sbl_mmcsd_img_SBL_IMAGEGEN
273 # SBL MMCSD Image - For HS build
274 export sbl_mmcsd_img_hs_COMP_LIST = sbl_mmcsd_img_hs
275 sbl_mmcsd_img_hs_RELPATH = ti/boot/sbl/board/k3
276 sbl_mmcsd_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/mmcsd/bin
277 #Note: The below variable is purposefully set to build folder - different than
278 #non-hs app.
279 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
280 #creates lto_$APPNAME optimization file in the directory in which -C is called
281 #Because of this multiple lto_ files with same name can be created if app name
282 #and app path are same
283 sbl_mmcsd_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
284 export sbl_mmcsd_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=mmcsd SBL_USE_DMA=yes BUILD_HS=yes
285 export sbl_mmcsd_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
286 export sbl_mmcsd_img_hs_BOARD_DEPENDENCY = yes
287 export sbl_mmcsd_img_hs_SOC_DEPENDENCY = yes
288 export sbl_mmcsd_img_hs_CORE_DEPENDENCY = no
289 sbl_mmcsd_img_hs_PKG_LIST = sbl
290 sbl_mmcsd_img_hs_INCLUDE = $(sbl_mmcsd_img_hs_PATH)
291 export sbl_mmcsd_img_hs_BOARDLIST = $(sbl_BOARDLIST)
292 export sbl_mmcsd_img_hs_$(SOC)_CORELIST = mcu1_0
293 export sbl_mmcsd_img_hs_SBL_IMAGEGEN = yes
295 # SBL OSPI Image
296 sbl_ospi_img_COMP_LIST = sbl_ospi_img
297 sbl_ospi_img_RELPATH = ti/boot/sbl/board/k3
298 sbl_ospi_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/ospi/bin
299 sbl_ospi_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
300 ifeq ($(SOC),$(filter $(SOC), am64x j7200))
301 sbl_ospi_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=no BUILD_HS=no
302 else
303 sbl_ospi_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=yes BUILD_HS=no
304 endif
305 export sbl_ospi_img_MAKEFILE
306 export sbl_ospi_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
307 sbl_ospi_img_BOARD_DEPENDENCY = yes
308 sbl_ospi_img_SOC_DEPENDENCY = yes
309 sbl_ospi_img_CORE_DEPENDENCY = no
310 export sbl_ospi_img_COMP_LIST
311 export sbl_ospi_img_BOARD_DEPENDENCY
312 export sbl_ospi_img_SOC_DEPENDENCY
313 export sbl_ospi_img_CORE_DEPENDENCY
314 sbl_ospi_img_PKG_LIST = sbl
315 sbl_ospi_img_INCLUDE = $(sbl_ospi_img_PATH)
316 sbl_ospi_img_BOARDLIST = $(sbl_BOARDLIST)
317 export sbl_ospi_img_BOARDLIST
318 sbl_ospi_img_$(SOC)_CORELIST = mcu1_0
319 export sbl_ospi_img_$(SOC)_CORELIST
320 sbl_ospi_img_SBL_IMAGEGEN = yes
321 export sbl_ospi_img_SBL_IMAGEGEN
323 # SBL OSPI Image - For HS build
324 export sbl_ospi_img_hs_COMP_LIST = sbl_ospi_img_hs
325 sbl_ospi_img_hs_RELPATH = ti/boot/sbl/board/k3
326 sbl_ospi_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/ospi/bin
327 #Note: The below variable is purposefully set to build folder - different than
328 #non-hs app.
329 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
330 #creates lto_$APPNAME optimization file in the directory in which -C is called
331 #Because of this multiple lto_ files with same name can be created if app name
332 #and app path are same
333 sbl_ospi_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
334 export sbl_ospi_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=ospi SBL_USE_DMA=no BUILD_HS=yes
335 export sbl_ospi_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
336 export sbl_ospi_img_hs_BOARD_DEPENDENCY = yes
337 export sbl_ospi_img_hs_SOC_DEPENDENCY = yes
338 export sbl_ospi_img_hs_CORE_DEPENDENCY = no
339 sbl_ospi_img_hs_PKG_LIST = sbl
340 sbl_ospi_img_hs_INCLUDE = $(sbl_ospi_img_hs_PATH)
341 export sbl_ospi_img_hs_BOARDLIST = $(sbl_BOARDLIST)
342 export sbl_ospi_img_hs_$(SOC)_CORELIST = mcu1_0
343 export sbl_ospi_img_hs_SBL_IMAGEGEN = yes
345 # SBL HYPERFLASH Image
346 sbl_hyperflash_img_COMP_LIST = sbl_hyperflash_img
347 sbl_hyperflash_img_RELPATH = ti/boot/sbl/board/k3
348 sbl_hyperflash_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/hyperflash/bin
349 sbl_hyperflash_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
350 sbl_hyperflash_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=hyperflash SBL_USE_DMA=yes BUILD_HS=no
351 export sbl_hyperflash_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
352 export sbl_hyperflash_img_MAKEFILE
353 sbl_hyperflash_img_BOARD_DEPENDENCY = yes
354 sbl_hyperflash_img_SOC_DEPENDENCY = yes
355 sbl_hyperflash_img_CORE_DEPENDENCY = no
356 export sbl_hyperflash_img_COMP_LIST
357 export sbl_hyperflash_img_BOARD_DEPENDENCY
358 export sbl_hyperflash_img_SOC_DEPENDENCY
359 export sbl_hyperflash_img_CORE_DEPENDENCY
360 sbl_hyperflash_img_PKG_LIST = sbl
361 sbl_hyperflash_img_INCLUDE = $(sbl_hyperflash_img_PATH)
362 sbl_hyperflash_img_BOARDLIST = j721e_evm
363 export sbl_hyperflash_img_BOARDLIST
364 sbl_hyperflash_img_$(SOC)_CORELIST = mcu1_0
365 export sbl_hyperflash_img_$(SOC)_CORELIST
366 sbl_hyperflash_img_SBL_IMAGEGEN = yes
367 export sbl_hyperflash_img_SBL_IMAGEGEN
369 # SBL HYPERFLASH Image - For HS build
370 export sbl_hyperflash_img_hs_COMP_LIST = sbl_hyperflash_img_hs
371 sbl_hyperflash_img_hs_RELPATH = ti/boot/sbl/board/k3
372 sbl_hyperflash_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/hyperflash/bin
373 #Note: The below variable is purposefully set to build folder - different than
374 #non-hs app.
375 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
376 #creates lto_$APPNAME optimization file in the directory in which -C is called
377 #Because of this multiple lto_ files with same name can be created if app name
378 #and app path are same
379 sbl_hyperflash_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
380 export sbl_hyperflash_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=hyperflash SBL_USE_DMA=yes BUILD_HS=yes
381 export sbl_hyperflash_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
382 export sbl_hyperflash_img_hs_BOARD_DEPENDENCY = yes
383 export sbl_hyperflash_img_SOC_DEPENDENCY = yes
384 export sbl_hyperflash_img_hs_CORE_DEPENDENCY = no
385 sbl_hyperflash_img_hs_PKG_LIST = sbl
386 sbl_hyperflash_img_hs_INCLUDE = $(sbl_hyperflash_img_hs_PATH)
387 export sbl_hyperflash_img_hs_BOARDLIST = j721e_evm
388 export sbl_hyperflash_img_hs_$(SOC)_CORELIST = mcu1_0
389 export sbl_hyperflash_img_hs_SBL_IMAGEGEN = yes
391 # SBL UART Image
392 sbl_uart_img_COMP_LIST = sbl_uart_img
393 sbl_uart_img_RELPATH = ti/boot/sbl/board/k3
394 sbl_uart_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/uart/bin
395 sbl_uart_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
396 sbl_uart_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=uart SBL_USE_DMA=yes BUILD_HS=no
397 export sbl_uart_img_MAKEFILE
398 export sbl_uart_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
399 sbl_uart_img_BOARD_DEPENDENCY = yes
400 sbl_uart_img_SOC_DEPENDENCY = yes
401 sbl_uart_img_CORE_DEPENDENCY = no
402 export sbl_uart_img_COMP_LIST
403 export sbl_uart_img_BOARD_DEPENDENCY
404 export sbl_uart_img_SOC_DEPENDENCY
405 export sbl_uart_img_CORE_DEPENDENCY
406 sbl_uart_img_PKG_LIST = sbl
407 sbl_uart_img_INCLUDE = $(sbl_uart_img_PATH)
408 sbl_uart_img_BOARDLIST = $(sbl_BOARDLIST)
409 export sbl_uart_img_BOARDLIST
410 sbl_uart_img_$(SOC)_CORELIST = mcu1_0
411 export sbl_uart_img_$(SOC)_CORELIST
412 sbl_uart_img_SBL_IMAGEGEN = yes
413 export sbl_uart_img_SBL_IMAGEGEN
415 # SBL UART Image - For HS build
416 export sbl_uart_img_hs_COMP_LIST = sbl_uart_img_hs
417 sbl_uart_img_hs_RELPATH = ti/boot/sbl/board/k3
418 sbl_uart_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/uart/bin
419 #Note: The below variable is purposefully set to build folder - different than
420 #non-hs app.
421 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
422 #creates lto_$APPNAME optimization file in the directory in which -C is called
423 #Because of this multiple lto_ files with same name can be created if app name
424 #and app path are same
425 sbl_uart_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
426 export sbl_uart_img_hs_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk BOOTMODE=uart SBL_USE_DMA=yes BUILD_HS=yes
427 export sbl_uart_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
428 export sbl_uart_img_hs_BOARD_DEPENDENCY = yes
429 export sbl_uart_img_hs_SOC_DEPENDENCY = yes
430 export sbl_uart_img_hs_CORE_DEPENDENCY = no
431 sbl_uart_img_hs_PKG_LIST = sbl
432 sbl_uart_img_hs_INCLUDE = $(sbl_uart_img_hs_PATH)
433 export sbl_uart_img_hs_BOARDLIST = $(sbl_BOARDLIST)
434 export sbl_uart_img_hs_$(SOC)_CORELIST = mcu1_0
435 export sbl_uart_img_hs_SBL_IMAGEGEN = yes
437 # Individual Core Boot Test
438 sbl_boot_test_COMP_LIST = sbl_boot_test
439 sbl_boot_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
440 sbl_boot_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
441 sbl_boot_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
442 sbl_boot_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_boot_test.mk
443 export sbl_boot_test_MAKEFILE
444 sbl_boot_test_BOARD_DEPENDENCY = no
445 sbl_boot_test_SOC_DEPENDENCY = no
446 sbl_boot_test_CORE_DEPENDENCY = no
447 export sbl_boot_test_COMP_LIST
448 export sbl_boot_test_BOARD_DEPENDENCY
449 export sbl_boot_test_SOC_DEPENDENCY
450 export sbl_boot_test_CORE_DEPENDENCY
451 sbl_boot_test_PKG_LIST = sbl_boot_test
452 sbl_boot_test_INCLUDE = $(sbl_boot_test_PATH)
453 sbl_boot_test_BOARDLIST = $(sbl_BOARDLIST)
454 export sbl_boot_test_BOARDLIST
455 sbl_boot_test_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST)
456 export sbl_boot_test_$(SOC)_CORELIST
457 sbl_EXAMPLE_LIST += sbl_boot_test
458 sbl_boot_test_SBL_APPIMAGEGEN = yes
459 export sbl_boot_test_SBL_APPIMAGEGEN
461 # Multicore AMP Boot Test
462 sbl_multicore_amp_COMP_LIST = sbl_multicore_amp
463 sbl_multicore_amp_RELPATH = ti/boot/sbl/example/k3MulticoreApp
464 sbl_multicore_amp_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
465 sbl_multicore_amp_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
466 sbl_multicore_amp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_amp.mk
467 export sbl_multicore_amp_MAKEFILE
468 # SBL multicore amp depends on sbl_boot_test for all the cores
469 sbl_multicore_amp_DEPENDS_ON=sbl_boot_test
470 export sbl_multicore_amp_DEPENDS_ON
471 sbl_multicore_amp_BOARD_DEPENDENCY = no
472 sbl_multicore_amp_SOC_DEPENDENCY = no
473 sbl_multicore_amp_CORE_DEPENDENCY = no
474 export sbl_multicore_amp_COMP_LIST
475 export sbl_multicore_amp_BOARD_DEPENDENCY
476 export sbl_multicore_amp_SOC_DEPENDENCY
477 export sbl_multicore_amp_CORE_DEPENDENCY
478 sbl_multicore_amp_PKG_LIST = sbl_multicore_amp
479 sbl_multicore_amp_INCLUDE = $(sbl_multicore_amp_PATH)
480 sbl_multicore_amp_BOARDLIST = $(sbl_BOARDLIST)
481 export sbl_multicore_amp_BOARDLIST
482 sbl_multicore_amp_$(SOC)_CORELIST = $($(SOC)_LASTCORE)
483 export sbl_multicore_amp_$(SOC)_CORELIST
484 sbl_EXAMPLE_LIST += sbl_multicore_amp
485 sbl_multicore_amp_SBL_APPIMAGEGEN = no
486 export sbl_multicore_amp_SBL_APPIMAGEGEN
488 # R5 Lockstep and MPU SMP Boot Test
489 sbl_smp_test_COMP_LIST = sbl_smp_test
490 sbl_smp_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
491 sbl_smp_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
492 sbl_smp_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
493 sbl_smp_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_smp_test.mk BOOTMODE=mmcsd
494 export sbl_smp_test_MAKEFILE
495 sbl_smp_test_BOARD_DEPENDENCY = no
496 sbl_smp_test_SOC_DEPENDENCY = no
497 sbl_smp_test_CORE_DEPENDENCY = no
498 export sbl_smp_test_COMP_LIST
499 export sbl_smp_test_BOARD_DEPENDENCY
500 export sbl_smp_test_SOC_DEPENDENCY
501 export sbl_smp_test_CORE_DEPENDENCY
502 sbl_smp_test_PKG_LIST = sbl_smp_test
503 sbl_smp_test_INCLUDE = $(sbl_smp_test_PATH)
504 sbl_smp_test_BOARDLIST = $(sbl_BOARDLIST)
505 export sbl_smp_test_BOARDLIST
506 sbl_smp_test_$(SOC)_CORELIST = $($(SOC)_smp_CORELIST)
507 export sbl_smp_test_$(SOC)_CORELIST
508 ifneq ($(SOC),$(filter $(SOC), am64x j7200))
509 sbl_EXAMPLE_LIST += sbl_smp_test
510 endif
511 sbl_smp_test_SBL_APPIMAGEGEN = yes
512 export sbl_smp_test_SBL_APPIMAGEGEN
514 # Multicore SMP Boot Test
515 sbl_multicore_smp_COMP_LIST = sbl_multicore_smp
516 sbl_multicore_smp_RELPATH = ti/boot/sbl/example/k3MulticoreApp
517 sbl_multicore_smp_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
518 sbl_multicore_smp_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
519 sbl_multicore_smp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_smp.mk
520 export sbl_multicore_smp_MAKEFILE
521 # SBL multicore smp depends on sbl_smp_test for all the cores
522 sbl_multicore_smp_DEPENDS_ON=sbl_smp_test
523 export sbl_multicore_smp_DEPENDS_ON
524 sbl_multicore_smp_BOARD_DEPENDENCY = no
525 sbl_multicore_smp_SOC_DEPENDENCY = no
526 sbl_multicore_smp_CORE_DEPENDENCY = no
527 export sbl_multicore_smp_COMP_LIST
528 export sbl_multicore_smp_BOARD_DEPENDENCY
529 export sbl_multicore_smp_SOC_DEPENDENCY
530 export sbl_multicore_smp_CORE_DEPENDENCY
531 sbl_multicore_smp_PKG_LIST = sbl_multicore_smp
532 sbl_multicore_smp_INCLUDE = $(sbl_multicore_smp_PATH)
533 sbl_multicore_smp_BOARDLIST = $(sbl_BOARDLIST)
534 export sbl_multicore_smp_BOARDLIST
535 sbl_multicore_smp_$(SOC)_CORELIST := $($(SOC)_LASTCORE)
536 export sbl_multicore_smp_$(SOC)_CORELIST
537 ifneq ($(SOC),$(filter $(SOC), am64x j7200))
538 sbl_EXAMPLE_LIST += sbl_multicore_smp
539 endif
540 sbl_multicore_smp_SBL_APPIMAGEGEN = no
541 export sbl_multicore_smp_SBL_APPIMAGEGEN
543 # R5 boot XIP Test
544 sbl_boot_xip_test_COMP_LIST = sbl_boot_xip_test
545 sbl_boot_xip_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
546 sbl_boot_xip_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
547 sbl_boot_xip_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
548 sbl_boot_xip_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_mcu0_boot_xip_test.mk
549 export sbl_boot_xip_test_MAKEFILE
550 sbl_boot_xip_test_BOARD_DEPENDENCY = no
551 sbl_boot_xip_test_SOC_DEPENDENCY = no
552 sbl_boot_xip_test_CORE_DEPENDENCY = no
553 export sbl_boot_xip_test_COMP_LIST
554 export sbl_boot_xip_test_BOARD_DEPENDENCY
555 export sbl_boot_xip_test_SOC_DEPENDENCY
556 export sbl_boot_xip_test_CORE_DEPENDENCY
557 sbl_boot_xip_test_PKG_LIST = sbl_boot_xip_test
558 sbl_boot_xip_test_INCLUDE = $(sbl_boot_xip_test_PATH)
559 sbl_boot_xip_test_BOARDLIST = $(sbl_BOARDLIST)
560 export sbl_boot_xip_test_BOARDLIST
561 sbl_boot_xip_test_$(SOC)_CORELIST = mcu1_0
562 export sbl_boot_xip_test_$(SOC)_CORELIST
563 ifneq ($(SOC),$(filter $(SOC), am64x j7200))
564 sbl_EXAMPLE_LIST += sbl_boot_xip_test
565 endif
566 sbl_boot_xip_test_SBL_APPIMAGEGEN = yes
567 sbl_boot_xip_test_SBL_APP_BINIMAGEGEN = yes
568 sbl_boot_xip_test_SBL_APP_BIN_SECTIONS = --only-section .rstvectors --only-section .sbl_mcu_1_0_resetvector
569 export sbl_boot_xip_test_SBL_APPIMAGEGEN
570 export sbl_boot_xip_test_SBL_APP_BINIMAGEGEN
571 export sbl_boot_xip_test_SBL_APP_BIN_SECTIONS
573 # R5 boot XIP entry
574 sbl_boot_xip_entry_COMP_LIST = sbl_boot_xip_entry
575 sbl_boot_xip_entry_RELPATH = ti/boot/sbl/example/k3MulticoreApp
576 sbl_boot_xip_entry_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
577 sbl_boot_xip_entry_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
578 sbl_boot_xip_entry_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_mcu0_boot_xip_entry.mk
579 export sbl_boot_xip_entry_MAKEFILE
580 sbl_boot_xip_entry_BOARD_DEPENDENCY = no
581 sbl_boot_xip_entry_SOC_DEPENDENCY = no
582 sbl_boot_xip_entry_CORE_DEPENDENCY = no
583 export sbl_boot_xip_entry_COMP_LIST
584 export sbl_boot_xip_entry_BOARD_DEPENDENCY
585 export sbl_boot_xip_entry_SOC_DEPENDENCY
586 export sbl_boot_xip_entry_CORE_DEPENDENCY
587 sbl_boot_xip_entry_PKG_LIST = sbl_boot_xip_entry
588 sbl_boot_xip_entry_INCLUDE = $(sbl_boot_xip_entry_PATH)
589 sbl_boot_xip_entry_BOARDLIST = $(sbl_BOARDLIST)
590 export sbl_boot_xip_entry_BOARDLIST
591 sbl_boot_xip_entry_$(SOC)_CORELIST = mcu1_0
592 export sbl_boot_xip_entry_$(SOC)_CORELIST
593 ifneq ($(SOC),$(filter $(SOC), am64x j7200))
594 sbl_EXAMPLE_LIST += sbl_boot_xip_entry
595 endif
596 sbl_boot_xip_entry_SBL_APPIMAGEGEN = yes
597 export sbl_boot_xip_entry_SBL_APPIMAGEGEN
599 # Display profiling info before MCU1_0 boot
600 # increases delay time, between end of SBL
601 # and start of app, but useful for
602 # debugging and tuning performace knobs
603 #SBL_CFLAGS += -DSBL_DISPLAY_PROFILE_INFO
605 ifeq ($(SOC), am64x)
606 SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER -DDISABLE_ATCM
607 endif
609 ifeq ($(SOC), j7200)
610 #SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER -DVLAB_SIM
611 SBL_CFLAGS += -DSBL_SKIP_PINMUX_ENABLE -DSBL_BYPASS_OSPI_DRIVER -DVLAB_SIM
612 endif
614 ###### Use boot_perf_benchmark example#######
615 ###### to fine tune the perf knobs #########
617 ###########START BOOT PERF KNOBS#############
618 # SBL log level
619 # no logs = 0, only errors =1, normal logs = 2, all logs = 3
620 SBL_CFLAGS += -DSBL_LOG_LEVEL=2
622 SBL_CFLAGS += -DSBL_ENABLE_PLL
623 SBL_CFLAGS += -DSBL_ENABLE_CLOCKS
625 ifneq ($(SOC), j7200)
626 SBL_CFLAGS += -DSBL_ENABLE_DDR
627 endif
628 ############################################
629 # DISABLING the options above this caption
630 # improves boot time at the cost of moving
631 # PLL, LPSC and DDR init to the app
632 #
633 # ENABLING the options below this caption
634 # improves boot time by skipping stuff SBL
635 # usually does.
636 ###########################################
637 # If enabled, the SBL will branch to the start
638 # of MCU_0 app without resetting the core
639 # if csl defaults are godd enough this enables
640 # app to skip redoing mcu initialization
641 #SBL_CFLAGS += -DSBL_SKIP_MCU_RESET
643 # If enabled, SBL will skip initializing
644 # sysfw. The SBL will only load it.
645 # No SCI Client APIs will work. Saves
646 # boot time. When this is enabled
647 # make sure that SBL_SKIP_MCU_RESET is also
648 # enabled, as resetting a core needs SYSFW
649 # to be running.
650 # SBL_CFLAGS += -DSBL_SKIP_SYSFW_INIT
652 # If enabled, SBL will skip calling
653 # Sciclient_boardCfg* API. Enabling
654 # it saves boot time, can affect
655 # functionality. The app must call the
656 # Sciclient_boardCfg* APIs that the SBL
657 # skips. Like for eg, if SBL skips calling
658 # Sciclient_boardCfgPm, then Sciclient_boardCfgRm
659 # and Sciclient_boardCfgSec must also
660 # be skipped.
661 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_BOARD
662 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_RM
663 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_SEC
664 #SBL_CFLAGS += -DSBL_SKIP_BRD_CFG_PM
666 # If enabled, SBL will only enable the Clocks
667 # and PLLs for the MCU domain. Clocks and PLLs
668 # for the Main domaincan be initialized by the
669 # app to save boot time or if the application
670 # usecase demands it.
671 #SBL_CFLAGS += -DSBL_ENABLE_DEV_GRP_MCU
673 # If enabled, SBL will not leave the OSPI
674 # flash in XIP mode, so that the MAIN
675 # domain Cortex-A code (HLOS) can reset
676 # the flash and take control of it, if
677 # needed.
678 #SBL_CFLAGS += -DSBL_HLOS_OWNS_FLASH
680 # If enabled, SBL will skip any PINMUX
681 # init being used in the bootloader and
682 # expect that it will be handled by
683 # another app.
684 #SBL_CFLAGS += -DSBL_SKIP_PINMUX_ENABLE
686 # If enabled, SBL will skip handling the
687 # SoC Late Init functions normally contained
688 # in SBL_SocLateInit()
689 #SBL_CFLAGS += -DSBL_SKIP_LATE_INIT
691 # If enabled, the SBL will configure & use
692 # resources in the MCU domain ONLY to
693 # enable MCU-only code to run.
694 #SBL_CFLAGS += -DSBL_USE_MCU_DOMAIN_ONLY
696 # If enabled, the SBL will skip configuring ATCM memory
697 #SBL_CFLAGS += -DDISABLE_ATCM
699 # If enabled for OSPI boot the SBL will bypass the
700 # OSPI driver completely and let ROM copy the sysftw/application
701 # from flash.
702 #SBL_CFLAGS += -DSBL_BYPASS_OSPI_DRIVER
704 # If enabled the SBL image is built for running on VLAB simulation.
705 #SBL_CFLAGS += -DVLAB_SIM
707 ###########END BOOT PERF KNOBS#############
709 # Example - Building Custom SBL Images
710 # Build and SBl with custom flags to change
711 # different build configurations
712 CUST_SBL_TEST_SOCS = am65xx j721e j7200 am64x_evm
713 CUST_SBL_TEST_BOARDS = am65xx_evm j721e_evm j7200_evm am64x_evm
714 #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 "
715 #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 "
716 #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"
717 #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"
718 ifeq ($(SOC), j7200)
719 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 -DVLAB_SIM"
720 else
721 ifeq ($(findstring j7,$(SOC)),j7)
722 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"
723 # Custom example: Early CAN response (NOTE: before using the line below, comment out the line above)
724 #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"
725 else
726 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"
727 endif
728 #Custom configuration for AM64x OSPI Boot
729 #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"
730 endif
732 # SBL Custom LIB
733 sbl_lib_cust_COMP_LIST = sbl_lib_cust
734 sbl_lib_cust_RELPATH = ti/boot/sbl
735 export sbl_lib_cust_OBJPATH = ti/boot/sbl/cust
736 sbl_lib_cust_LIBNAME = sbl_lib_cust
737 sbl_lib_cust_PATH = $(PDK_SBL_COMP_PATH)
738 sbl_lib_cust_LIBNAME = sbl_lib_cust
739 sbl_lib_cust_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/cust
740 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)
741 export sbl_lib_cust_MAKEFILE
742 export sbl_lib_cust_LIBNAME
743 export sbl_lib_cust_LIBPATH
744 sbl_lib_cust_BOARD_DEPENDENCY = yes
745 sbl_lib_cust_SOC_DEPENDENCY = yes
746 sbl_lib_cust_CORE_DEPENDENCY = no
747 export sbl_lib_cust_COMP_LIST
748 export sbl_lib_cust_BOARD_DEPENDENCY
749 export sbl_lib_cust_CORE_DEPENDENCY
750 sbl_lib_cust_PKG_LIST = sbl_lib_cust
751 sbl_lib_cust_INCLUDE = $(sbl_lib_cust_PATH)
752 sbl_lib_cust_SOCLIST = $(CUST_SBL_TEST_SOCS)
753 sbl_lib_cust_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
754 export sbl_lib_cust_SOCLIST
755 export sbl_lib_cust_BOARDLIST
756 sbl_lib_cust_$(SOC)_CORELIST = mcu1_0
757 export sbl_lib_cust_$(SOC)_CORELIST
759 # SBL custom image
760 sbl_cust_img_COMP_LIST = sbl_cust_img
761 sbl_cust_img_RELPATH = ti/boot/sbl/board/k3
762 sbl_cust_img_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)/cust/bin
763 sbl_cust_img_PATH = $(PDK_SBL_COMP_PATH)/board/k3
764 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)
765 export sbl_cust_img_MAKEFILE
766 export sbl_cust_img_SBL_CERT_KEY=$(SBL_CERT_KEY)
767 sbl_cust_img_BOARD_DEPENDENCY = yes
768 sbl_cust_img_SOC_DEPENDENCY = yes
769 sbl_cust_img_CORE_DEPENDENCY = no
770 export sbl_cust_img_COMP_LIST
771 export sbl_cust_img_BOARD_DEPENDENCY
772 export sbl_cust_img_SOC_DEPENDENCY
773 export sbl_cust_img_CORE_DEPENDENCY
774 sbl_cust_img_PKG_LIST = sbl
775 sbl_cust_img_INCLUDE = $(sbl_cust_img_PATH)
776 sbl_cust_img_SOCLIST = $(CUST_SBL_TEST_SOCS)
777 sbl_cust_img_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
778 export sbl_cust_img_SOCLIST
779 export sbl_cust_img_BOARDLIST
780 sbl_cust_img_$(SOC)_CORELIST = mcu1_0
781 export sbl_cust_img_$(SOC)_CORELIST
782 ifneq ($(SOC), am64x)
783 sbl_EXAMPLE_LIST += sbl_cust_img
784 endif
785 sbl_cust_img_SBL_IMAGEGEN = yes
786 export sbl_cust_img_SBL_IMAGEGEN
788 # SBL custom image - For HS build
789 export sbl_cust_img_hs_COMP_LIST = sbl_cust_img_hs
790 sbl_cust_img_hs_RELPATH = ti/boot/sbl/board/k3
791 sbl_cust_img_hs_CUSTOM_BINPATH = $(PDK_SBL_COMP_PATH)/binary/$(BOARD)_hs/cust/bin
792 #Note: The below variable is purposefully set to build folder - different than
793 #non-hs app.
794 #The APPNAME or app -C directory (_PATH variable) should be unique as the complier
795 #creates lto_$APPNAME optimization file in the directory in which -C is called
796 #Because of this multiple lto_ files with same name can be created if app name
797 #and app path are same
798 sbl_cust_img_hs_PATH = $(PDK_SBL_COMP_PATH)/build
799 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
800 export sbl_cust_img_hs_SBL_CERT_KEY=$(SBL_CERT_KEY_HS)
801 export sbl_cust_img_hs_BOARD_DEPENDENCY = yes
802 export sbl_cust_img_hs_SOC_DEPENDENCY = yes
803 export sbl_cust_img_hs_CORE_DEPENDENCY = no
804 sbl_cust_img_hs_PKG_LIST = sbl
805 sbl_cust_img_hs_INCLUDE = $(sbl_cust_img_hs_PATH)
806 export sbl_cust_img_hs_SOCLIST = $(CUST_SBL_TEST_SOCS)
807 export sbl_cust_img_hs_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
808 export sbl_cust_img_hs_$(SOC)_CORELIST = mcu1_0
809 export sbl_cust_img_hs_SBL_IMAGEGEN = yes
810 ifneq ($(SOC),$(filter $(SOC), am64x j7200))
811 sbl_EXAMPLE_LIST += sbl_cust_img_hs
812 endif
814 # R5 boot performance Test - works only with custom SBL
815 sbl_boot_perf_test_COMP_LIST = sbl_boot_perf_test
816 sbl_boot_perf_test_RELPATH = ti/boot/sbl/example/k3MulticoreApp
817 sbl_boot_perf_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp/binary
818 sbl_boot_perf_test_PATH = $(PDK_SBL_COMP_PATH)/example/k3MulticoreApp
819 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)
820 export sbl_boot_perf_test_MAKEFILE
821 sbl_boot_perf_test_BOARD_DEPENDENCY = no
822 sbl_boot_perf_test_SOC_DEPENDENCY = no
823 sbl_boot_perf_test_CORE_DEPENDENCY = no
824 export sbl_boot_perf_test_COMP_LIST
825 export sbl_boot_perf_test_BOARD_DEPENDENCY
826 export sbl_boot_perf_test_SOC_DEPENDENCY
827 export sbl_boot_perf_test_CORE_DEPENDENCY
828 sbl_boot_perf_test_PKG_LIST = sbl_boot_perf_test
829 sbl_boot_perf_test_INCLUDE = $(sbl_boot_perf_test_PATH)
830 sbl_boot_perf_test_SOCLIST = $(CUST_SBL_TEST_SOCS)
831 sbl_boot_perf_test_BOARDLIST = $(CUST_SBL_TEST_BOARDS)
832 export sbl_boot_perf_test_SOCLIST
833 export sbl_boot_perf_test_BOARDLIST
834 sbl_boot_perf_test_$(SOC)_CORELIST = mcu1_0
835 export sbl_boot_perf_test_$(SOC)_CORELIST
836 ifneq ($(SOC), am64x)
837 sbl_EXAMPLE_LIST += sbl_boot_perf_test
838 endif
839 sbl_boot_perf_test_SBL_APPIMAGEGEN = yes
840 export sbl_boot_perf_test_SBL_APPIMAGEGEN
842 # SBL not supported for any profile
843 # other than release
844 ifneq ($(BUILD_PROFILE), release)
845 sbl_LIB_LIST =
846 sbl_EXAMPLE_LIST =
847 SBL_CFLAGS =
848 endif # ifneq ($(BUILD_PROFILE), release)
850 export sbl_LIB_LIST
851 export sbl_EXAMPLE_LIST
852 export SBL_CFLAGS
854 sbl_component_make_include := 1
855 endif