]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - keystone-rtos/sbl.git/blob - sbl_component.mk
PRSDK-3644: Adds support for booting R5 ond A53n AM65xx SOC
[keystone-rtos/sbl.git] / sbl_component.mk
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
71 sbl_SOCLIST = am65xx
73 sbl_am65xx_CORELIST = mcu1_0 mcu1_1 mpu1_0 mpu1_1 mpu2_0 mpu2_1
75 ############################
76 # sbl package
77 # List of components included under sbl
78 # The components included here are built and will be part of sbl
79 ############################
80 sbl_LIB_LIST = sbl_lib_$(BOOTMODE)
82 ############################
83 # sbl example
84 # List of examples under sbl (+= is used at each example definition)
85 # All the tests mentioned in list are built when test target is called
86 # List below all examples for allowed values
87 ############################
88 sbl_EXAMPLE_LIST =
90 #
91 # SBL Modules
92 #
94 # SBL LIB
95 sbl_lib_$(BOOTMODE)_COMP_LIST = sbl_lib_$(BOOTMODE)
96 sbl_lib_$(BOOTMODE)_RELPATH = ti/boot/sbl
97 sbl_lib_$(BOOTMODE)_PATH = $(PDK_SBL_COMP_PATH)
98 sbl_lib_$(BOOTMODE)_LIBNAME = sbl_lib_$(BOOTMODE)
99 sbl_lib_$(BOOTMODE)_OBJPATH = $(PDK_SBL_COMP_PATH)/obj/$(BOOTMODE)
100 sbl_lib_$(BOOTMODE)_LIBPATH = $(PDK_SBL_COMP_PATH)/lib/$(BOOTMODE)
101 sbl_lib_$(BOOTMODE)_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_lib.mk
102 export sbl_lib_$(BOOTMODE)_MAKEFILE
103 export sbl_lib_$(BOOTMODE)_LIBNAME
104 export sbl_lib_$(BOOTMODE)_LIBPATH
105 sbl_lib_$(BOOTMODE)_BOARD_DEPENDENCY = yes
106 sbl_lib_$(BOOTMODE)_SOC_DEPENDENCY = yes
107 sbl_lib_$(BOOTMODE)_CORE_DEPENDENCY = yes
108 export sbl_lib_$(BOOTMODE)_COMP_LIST
109 export sbl_lib_$(BOOTMODE)_BOARD_DEPENDENCY
110 export sbl_lib_$(BOOTMODE)_CORE_DEPENDENCY
111 sbl_lib_$(BOOTMODE)_PKG_LIST = sbl_lib_$(BOOTMODE)
112 sbl_lib_$(BOOTMODE)_INCLUDE = $(sbl_lib_$(BOOTMODE)_PATH)
113 sbl_lib_$(BOOTMODE)_SOCLIST = $(sbl_SOCLIST)
114 sbl_lib_$(BOOTMODE)_BOARDLIST = $(sbl_BOARDLIST)
115 export sbl_lib_$(BOOTMODE)_SOCLIST
116 export sbl_lib_$(BOOTMODE)_BOARDLIST
117 sbl_lib_$(BOOTMODE)_$(SOC)_CORELIST = mcu1_0
118 export sbl_lib_$(BOOTMODE)_$(SOC)_CORELIST
121 # SBL Examples
123 # SBL Image
124 sbl_$(BOOTMODE)_img_COMP_LIST = sbl_$(BOOTMODE)_img
125 sbl_$(BOOTMODE)_img_RELPATH = ti/boot/sbl/board/$(BOARD)
126 sbl_$(BOOTMODE)_img_OBJPATH = $(PDK_SBL_COMP_PATH)/obj/$(BOOTMODE)
127 sbl_$(BOOTMODE)_img_BINPATH = $(PDK_SBL_COMP_PATH)/img/$(BOOTMODE)
128 sbl_$(BOOTMODE)_img_PATH = $(PDK_SBL_COMP_PATH)/board/$(BOARD)
129 sbl_$(BOOTMODE)_img_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_img.mk
130 export sbl_$(BOOTMODE)_img_MAKEFILE
131 sbl_$(BOOTMODE)_img_BOARD_DEPENDENCY = yes
132 sbl_$(BOOTMODE)_img_CORE_DEPENDENCY = no
133 export sbl_$(BOOTMODE)_img_COMP_LIST
134 export sbl_$(BOOTMODE)_img_BOARD_DEPENDENCY
135 export sbl_$(BOOTMODE)_img_CORE_DEPENDENCY
136 sbl_$(BOOTMODE)_img_PKG_LIST = sbl
137 sbl_$(BOOTMODE)_img_INCLUDE = $(sbl_$(BOOTMODE)_img_PATH)
138 sbl_$(BOOTMODE)_img_BOARDLIST = $(sbl_BOARDLIST)
139 export sbl_$(BOOTMODE)_img_BOARDLIST
140 sbl_$(BOOTMODE)_img_$(SOC)_CORELIST = mcu1_0
141 export sbl_$(BOOTMODE)_img_$(SOC)_CORELIST
142 sbl_EXAMPLE_LIST += sbl_$(BOOTMODE)_img
143 ifeq ($(OS),Windows_NT)
144 sbl_$(BOOTMODE)_img_SBL_IMAGEGEN = no
145 else
146 sbl_$(BOOTMODE)_img_SBL_IMAGEGEN = yes
147 endif
148 export sbl_$(BOOTMODE)_img_SBL_IMAGEGEN
150 # Individual Core Boot Test
151 sbl_boot_test_COMP_LIST = sbl_boot_test
152 sbl_boot_test_RELPATH = ti/boot/sbl/example/ampMulticoreApp
153 sbl_boot_test_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj
154 sbl_boot_test_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img
155 sbl_boot_test_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp
156 sbl_boot_test_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_boot_test.mk
157 export sbl_boot_test_MAKEFILE
158 sbl_boot_test_BOARD_DEPENDENCY = yes
159 sbl_boot_test_CORE_DEPENDENCY = no
160 export sbl_boot_test_COMP_LIST
161 export sbl_boot_test_BOARD_DEPENDENCY
162 export sbl_boot_test_CORE_DEPENDENCY
163 sbl_boot_test_PKG_LIST = sbl_boot_test
164 sbl_boot_test_INCLUDE = $(sbl_boot_test_PATH)
165 sbl_boot_test_BOARDLIST = am65xx_evm
166 export sbl_boot_test_BOARDLIST
167 sbl_boot_test_$(SOC)_CORELIST = $(sbl_$(SOC)_CORELIST)
168 export sbl_boot_test_$(SOC)_CORELIST
169 sbl_EXAMPLE_LIST += sbl_boot_test
170 sbl_boot_test_SBL_APPIMAGEGEN = yes
171 export sbl_boot_test_SBL_APPIMAGEGEN
173 # Multicore AMP Boot Test
174 sbl_multicore_amp_COMP_LIST = sbl_multicore_amp
175 sbl_multicore_amp_RELPATH = ti/boot/sbl/example/ampMulticoreApp
176 sbl_multicore_amp_OBJPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/obj
177 sbl_multicore_amp_BINPATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp/img
178 sbl_multicore_amp_PATH = $(PDK_SBL_COMP_PATH)/example/ampMulticoreApp
179 sbl_multicore_amp_MAKEFILE = -f$(PDK_SBL_COMP_PATH)/build/sbl_multicore_amp.mk
180 export sbl_multicore_amp_MAKEFILE
181 sbl_multicore_amp_BOARD_DEPENDENCY = yes
182 sbl_multicore_amp_CORE_DEPENDENCY = no
183 export sbl_multicore_amp_COMP_LIST
184 export sbl_multicore_amp_BOARD_DEPENDENCY
185 export sbl_multicore_amp_CORE_DEPENDENCY
186 sbl_multicore_amp_PKG_LIST = sbl_multicore_amp
187 sbl_multicore_amp_INCLUDE = $(sbl_multicore_amp_PATH)
188 sbl_multicore_amp_BOARDLIST = am65xx_evm
189 export sbl_multicore_amp_BOARDLIST
190 sbl_multicore_amp_$(SOC)_CORELIST := $(word $(words $(sbl_am65xx_CORELIST)), $(sbl_am65xx_CORELIST))
191 export sbl_multicore_amp_$(SOC)_CORELIST
192 sbl_EXAMPLE_LIST += sbl_multicore_amp
193 sbl_multicore_amp_SBL_APPIMAGEGEN = no
194 export sbl_multicore_amp_SBL_APPIMAGEGEN
196 PDK_CFLAGS += -DOSAL_NONOS_CONFIGNUM_SEMAPHORE=16
198 SBL_CFLAGS =
200 # BOOTMODE specific CFLAGS
201 ifeq ($(BOOTMODE), mmcsd)
202   SBL_CFLAGS+= -DBOOT_MMCSD
203 endif # ifeq ($(BOOTMODE), mmcsd)
205 ifeq ($(BOOTMODE), ospi)
206   SBL_CFLAGS += -DBOOT_OSPI
207 endif # ifeq ($(BOOTMODE), ospi)
209 ifeq ($(BOOTMODE), qspi)
210   SBL_CFLAGS += -DBOOT_QSPI
211 endif # ifeq ($(BOOTMODE), qspi)
213 ifeq ($(BOOTMODE), spi)
214   SBL_CFLAGS += -DBOOT_SPI
215 endif # ifeq ($(BOOTMODE), spi)
217 export sbl_LIB_LIST
218 export sbl_EXAMPLE_LIST
219 export SBL_CFLAGS
221 sbl_component_make_include := 1
222 endif