Debian Codegraph @

src/soc/qualcomm/x1p42100/Makefile.mk

raw symbols SCIP
1 ## SPDX-License-Identifier: GPL-2.0-only
2 ifeq ($(CONFIG_SOC_QUALCOMM_BASE),y)
3
4 decompressor-y += decompressor.c
5 decompressor-y += mmu.c
6 decompressor-y += ../common/timer.c
7 all-y += ../common/timer.c
8 all-y += ../common/gpio.c
9 all-y += ../common/clock.c
10 all-y += clock.c
11 all-y += ../common/spi.c
12 all-y += ../common/qspi.c
13 all-y += ../common/qupv3_config.c
14 all-y += qcom_qup_se.c
15 all-y += ../common/qup_se_handler.c
16 all-y += ../common/qupv3_spi.c
17 all-y += ../common/qupv3_i2c.c
18 all-y += ../common/qupv3_spi.c
19
20 ################################################################################
21 bootblock-y += bootblock.c
22 bootblock-y += mmu.c
23 bootblock-$(CONFIG_DRIVERS_UART) += ../common/uart_bitbang.c
24
25 ################################################################################
26 verstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c
27
28 ################################################################################
29 romstage-y += cbmem.c
30 romstage-y += ../common/shrm_load_reset.c
31 romstage-y += cpucp_load_reset.c
32 romstage-y += ../common/qclib.c
33 romstage-y += ../common/mmu.c
34 romstage-y += ../common/watchdog.c
35 romstage-y += qclib.c
36 romstage-y += mmu.c
37 romstage-y += ../common/aop_load_reset.c
38 romstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c
39 romstage-y += ../common/spmi.c
40
41 ################################################################################
42 ramstage-y += soc.c
43 ramstage-y += cbmem.c
44 ramstage-y += ../common/mmu.c
45 ramstage-$(CONFIG_DRIVERS_UART) += ../common/qupv3_uart.c
46 ramstage-y += usb/usb.c
47 ramstage-y += usb/snps_usb_phy.c
48 ramstage-y += usb/qmpv4_usb_phy.c
49 ramstage-$(CONFIG_PCI) += ../common/pcie_common.c
50 ramstage-y += ../common/spmi.c
51 ramstage-$(CONFIG_PCI) += pcie.c
52 ramstage-y += cpucp_load_reset.c
53
54 ################################################################################
55
56 CPPFLAGS_common += -Isrc/soc/qualcomm/x1p42100/include
57 CPPFLAGS_common += -Isrc/soc/qualcomm/common/include
58
59 ################################################################################
60 # look for QC blobs if QC SoC blobs are only available in upstream else ignore
61 ifeq ($(CONFIG_QC_BLOBS_UPSTREAM),y)
62 ifeq ($(CONFIG_USE_QC_BLOBS),y)
63 # TODO: Upload X1P42100 SoC blobs
64 X1P42100_BLOB := $(top)/3rdparty/qc_blobs/x1p42100
65
66 ifeq ($(CONFIG_SOC_QUALCOMM_HAMOA),y)
67 DTB_DCB_BLOB_PATH := hamoa
68 else
69 DTB_DCB_BLOB_PATH := x1p42100
70 endif
71
72 ifeq ($(CONFIG_QC_SDI_ENABLE),y)
73 BL31_MAKEARGS += QTI_SDI_BUILD=1
74 BL31_MAKEARGS += QTISECLIB_PATH=$(X1P42100_BLOB)/qtiseclib/libqtisec_dbg.a
75 else
76 BL31_MAKEARGS += QTISECLIB_PATH=$(X1P42100_BLOB)/qtiseclib/libqtisec.a
77 endif # CONFIG_QC_SDI_ENABLE
78
79 ################################################################################
80 ifeq ($(CONFIG_QC_SDI_ENABLE),y)
81 QCSDI_FILE := $(X1P42100_BLOB)/boot/QcSdi.elf
82 QCSDI_CBFS := $(CONFIG_CBFS_PREFIX)/qcsdi
83 $(QCSDI_CBFS)-file := $(QCSDI_FILE)
84 $(QCSDI_CBFS)-type := stage
85 $(QCSDI_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
86 cbfs-files-y += $(QCSDI_CBFS)
87 endif
88
89 ################################################################################
90 QC_SEC_FILE := $(X1P42100_BLOB)/qc_sec/qc_sec.mbn
91 TME_SEQ_FILE := $(X1P42100_BLOB)/tme/sequencer_ram.elf
92 TME_FW_FILE := $(X1P42100_BLOB)/tme/signed_firmware_soc_view.elf
93
94 $(objcbfs)/bootblock.bin: $(objcbfs)/bootblock.raw.elf
95 @util/qualcomm/createxbl.py --mbn_version 7 -f $(objcbfs)/bootblock.raw.elf \
96 -o $(objcbfs)/bootblock.mbn \
97 -a 64 -c 64
98 @util/qualcomm/create_multielf.py -f $(TME_SEQ_FILE),$(TME_FW_FILE),$(QC_SEC_FILE),$(objcbfs)/bootblock.mbn \
99 -o $(objcbfs)/merged_bb.melf
100 @printf "\nqgpt.py 4K sector size\n"
101 @util/qualcomm/qgpt.py $(objcbfs)/merged_bb.melf \
102 $(objcbfs)/bootblock.bin
103
104 ################################################################################
105 QCLIB_FILE := $(X1P42100_BLOB)/boot/QcLib.elf
106 QCLIB_CBFS := $(CONFIG_CBFS_PREFIX)/qclib
107 $(QCLIB_CBFS)-file := $(QCLIB_FILE)
108 $(QCLIB_CBFS)-type := stage
109 $(QCLIB_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
110 cbfs-files-y += $(QCLIB_CBFS)
111
112 ################################################################################
113 DCB_FILE := $(X1P42100_BLOB)/boot/$(DTB_DCB_BLOB_PATH)/dcb.bin
114 DCB_CBFS := $(CONFIG_CBFS_PREFIX)/dcb
115 $(DCB_CBFS)-file := $(DCB_FILE)
116 $(DCB_CBFS)-type := raw
117 $(DCB_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
118 cbfs-files-y += $(DCB_CBFS)
119
120 ################################################################################
121 DTB_FILE := $(X1P42100_BLOB)/boot/$(DTB_DCB_BLOB_PATH)/pre-ddr.dtb
122 DTB_CBFS := $(CONFIG_CBFS_PREFIX)/dtb
123 $(DTB_CBFS)-file := $(DTB_FILE)
124 $(DTB_CBFS)-type := raw
125 $(DTB_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
126 cbfs-files-y += $(DTB_CBFS)
127
128 ################################################################################
129 CPR_FILE := $(X1P42100_BLOB)/boot/$(DTB_DCB_BLOB_PATH)/cpr.bin
130 CPR_CBFS := $(CONFIG_CBFS_PREFIX)/cpr
131 $(CPR_CBFS)-file := $(CPR_FILE)
132 $(CPR_CBFS)-type := raw
133 $(CPR_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
134 cbfs-files-y += $(CPR_CBFS)
135
136 ################################################################################
137 UART_FW_FILE := $(X1P42100_BLOB)/qup_fw/uart_fw.bin
138 UART_FW_CBFS := $(CONFIG_CBFS_PREFIX)/uart_fw
139 $(UART_FW_CBFS)-file := $(UART_FW_FILE)
140 $(UART_FW_CBFS)-type := raw
141 $(UART_FW_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
142 cbfs-files-y += $(UART_FW_CBFS)
143
144 ################################################################################
145 SPI_FW_FILE := $(X1P42100_BLOB)/qup_fw/spi_fw.bin
146 SPI_FW_CBFS := $(CONFIG_CBFS_PREFIX)/spi_fw
147 $(SPI_FW_CBFS)-file := $(SPI_FW_FILE)
148 $(SPI_FW_CBFS)-type := raw
149 $(SPI_FW_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
150 cbfs-files-y += $(SPI_FW_CBFS)
151
152 ################################################################################
153 I2C_FW_FILE := $(X1P42100_BLOB)/qup_fw/i2c_fw.bin
154 I2C_FW_CBFS := $(CONFIG_CBFS_PREFIX)/i2c_fw
155 $(I2C_FW_CBFS)-file := $(I2C_FW_FILE)
156 $(I2C_FW_CBFS)-type := raw
157 $(I2C_FW_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
158 cbfs-files-y += $(I2C_FW_CBFS)
159
160 ################################################################################
161 AOP_FILE := $(X1P42100_BLOB)/aop/aop.mbn
162 AOP_CBFS := $(CONFIG_CBFS_PREFIX)/aop
163 $(AOP_CBFS)-file := $(AOP_FILE)
164 $(AOP_CBFS)-type := payload
165 $(AOP_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
166 cbfs-files-y += $(AOP_CBFS)
167
168 ################################################################################
169 # Rule to create aop_meta from aop.mbn
170 # This rule depends on aop.mbn built and the extractor script existing.
171 $(obj)/mainboard/$(MAINBOARDDIR)/aop_meta: $(X1P42100_BLOB)/aop/aop.mbn util/qualcomm/elf_segment_extractor.py
172 @echo "Extracting ELF headers and hash table segment from $< to $@"
173 @util/qualcomm/elf_segment_extractor.py --eh --pht --hashtable $< $@
174
175 AOP_META_FILE := $(obj)/mainboard/$(MAINBOARDDIR)/aop_meta
176 AOP_META_CBFS := $(CONFIG_CBFS_PREFIX)/aop_meta
177 $(AOP_META_CBFS)-file := $(AOP_META_FILE)
178 $(AOP_META_CBFS)-type := raw
179 $(AOP_META_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
180 cbfs-files-y += $(AOP_META_CBFS)
181
182 ################################################################################
183 AOP_CFG_FILE := $(X1P42100_BLOB)/aop/aop_devcfg.mbn
184 AOP_CFG_CBFS := $(CONFIG_CBFS_PREFIX)/aop_cfg
185 $(AOP_CFG_CBFS)-file := $(AOP_CFG_FILE)
186 $(AOP_CFG_CBFS)-type := payload
187 $(AOP_CFG_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
188 cbfs-files-y += $(AOP_CFG_CBFS)
189
190 ################################################################################
191 # Rule to create aop_meta from aop_devcfg.mbn
192 # This rule depends on aop_devcfg.mbn built and the extractor script existing.
193 $(obj)/mainboard/$(MAINBOARDDIR)/aop_devcfg_meta: $(X1P42100_BLOB)/aop/aop_devcfg.mbn util/qualcomm/elf_segment_extractor.py
194 @echo "Extracting ELF headers and hash table segment from $< to $@"
195 @util/qualcomm/elf_segment_extractor.py --eh --pht --hashtable $< $@
196
197 AOP_DEVCFG_META_FILE := $(obj)/mainboard/$(MAINBOARDDIR)/aop_devcfg_meta
198 AOP_DEVCFG_META_CBFS := $(CONFIG_CBFS_PREFIX)/aop_devcfg_meta
199 $(AOP_DEVCFG_META_CBFS)-file := $(AOP_DEVCFG_META_FILE)
200 $(AOP_DEVCFG_META_CBFS)-type := raw
201 $(AOP_DEVCFG_META_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
202 cbfs-files-y += $(AOP_DEVCFG_META_CBFS)
203
204 ################################################################################
205 CPUCP_FILE := $(X1P42100_BLOB)/cpucp/cpucp.elf
206 CPUCP_CBFS := $(CONFIG_CBFS_PREFIX)/cpucp
207 $(CPUCP_CBFS)-file := $(CPUCP_FILE)
208 $(CPUCP_CBFS)-type := payload
209 $(CPUCP_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
210 cbfs-files-y += $(CPUCP_CBFS)
211
212 ################################################################################
213 # Rule to create cpucp_meta from cpucp.elf
214 # This rule depends on cpucp.elf being built and the extractor script existing.
215 $(obj)/mainboard/$(MAINBOARDDIR)/cpucp_meta: $(X1P42100_BLOB)/cpucp/cpucp.elf util/qualcomm/elf_segment_extractor.py
216 @echo "Extracting ELF headers and hash table segment from $< to $@"
217 @util/qualcomm/elf_segment_extractor.py --eh --pht --hashtable $< $@
218
219 CPUCP_META_FILE := $(obj)/mainboard/$(MAINBOARDDIR)/cpucp_meta
220 CPUCP_META_CBFS := $(CONFIG_CBFS_PREFIX)/cpucp_meta
221 $(CPUCP_META_CBFS)-file := $(CPUCP_META_FILE)
222 $(CPUCP_META_CBFS)-type := raw
223 $(CPUCP_META_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
224 cbfs-files-y += $(CPUCP_META_CBFS)
225
226 ################################################################################
227 CPUCP_DTBS_FILE := $(X1P42100_BLOB)/cpucp/cpucp_dtbs.elf
228 CPUCP_DTBS_CBFS := $(CONFIG_CBFS_PREFIX)/cpucp_dtbs
229 $(CPUCP_DTBS_CBFS)-file := $(CPUCP_DTBS_FILE)
230 $(CPUCP_DTBS_CBFS)-type := payload
231 $(CPUCP_DTBS_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
232 cbfs-files-y += $(CPUCP_DTBS_CBFS)
233
234 ################################################################################
235 SHRM_FILE := $(X1P42100_BLOB)/shrm/shrm.elf
236 SHRM_CBFS := $(CONFIG_CBFS_PREFIX)/shrm
237 $(SHRM_CBFS)-file := $(SHRM_FILE)
238 $(SHRM_CBFS)-type := payload
239 $(SHRM_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
240 cbfs-files-y += $(SHRM_CBFS)
241
242 ################################################################################
243 # Rule to create shrm_meta from shrm.elf
244 # This rule depends on shrm.elf being built and the extractor script existing.
245 $(obj)/mainboard/$(MAINBOARDDIR)/shrm_meta: $(X1P42100_BLOB)/shrm/shrm.elf util/qualcomm/elf_segment_extractor.py
246 @echo "Extracting ELF headers and hash table segment from $< to $@"
247 @util/qualcomm/elf_segment_extractor.py --eh --pht --hashtable $< $@
248
249 SHRM_META_FILE := $(obj)/mainboard/$(MAINBOARDDIR)/shrm_meta
250 SHRM_META_CBFS := $(CONFIG_CBFS_PREFIX)/shrm_meta
251 $(SHRM_META_CBFS)-file := $(SHRM_META_FILE)
252 $(SHRM_META_CBFS)-type := raw
253 $(SHRM_META_CBFS)-compression := $(CBFS_PRERAM_COMPRESS_FLAG)
254 cbfs-files-y += $(SHRM_META_CBFS)
255
256 ################################################################################
257 GSI_FW_FILE := $(X1P42100_BLOB)/qup_fw/gsi_fw.bin
258 GSI_FW_CBFS := $(CONFIG_CBFS_PREFIX)/gsi_fw
259 $(GSI_FW_CBFS)-file := $(GSI_FW_FILE)
260 $(GSI_FW_CBFS)-type := raw
261 $(GSI_FW_CBFS)-compression := $(CBFS_COMPRESS_FLAG)
262 cbfs-files-y += $(GSI_FW_CBFS)
263
264 endif # ifeq ($(CONFIG_USE_QC_BLOBS),y)
265
266 endif # ifeq ($(CONFIG_QC_BLOBS_UPSTREAM),y)
267 endif # ifeq ($(CONFIG_SOC_QUALCOMM_BASE),y)