blob: bae465d1d5f5ddef8c9f29196db1ec8d85f66c2a [file] [log] [blame]
Klaus Heinrich Kiwid2551242020-07-16 16:59:04 -03001################################################################################
2#
3# openpower_pnor_p10
4#
5################################################################################
6
7OPENPOWER_PNOR_P10_VERSION ?= aa76df051c5196b311039337e757e0fbe1ae78a9
8
9# TODO: WORKAROUND: Need to reenable next line and comment out the two lines
10# after that, when code is propagated to a public repo
11#OPENPOWER_PNOR_P10_SITE ?= $(call github,open-power,pnor,$(OPENPOWER_PNOR_P10_VERSION))
12OPENPOWER_PNOR_P10_SITE = git@github.ibm.com:open-power/pnor.git
13OPENPOWER_PNOR_P10_SITE_METHOD=git
14
15OPENPOWER_PNOR_P10_LICENSE = Apache-2.0
16OPENPOWER_PNOR_P10_LICENSE_FILES = LICENSE
17OPENPOWER_PNOR_P10_DEPENDENCIES = hostboot-binaries skiboot host-openpower-ffs capp-ucode host-openpower-pnor-util linux-rebuild-with-initramfs host-xz host-sb-signing-utils hostboot-p10 occ-p10 sbe-p10 hcode-p10 ocmb-explorer-fw $(call qstrip,$(BR2_OPENPOWER_P10_XMLS))
18
19ifeq ($(BR2_PACKAGE_IMA_CATALOG),y)
20OPENPOWER_PNOR_P10_DEPENDENCIES += ima-catalog
21endif
22
23ifeq ($(BR2_OPENPOWER_P10_SECUREBOOT_KEY_TRANSITION_TO_DEV),y)
24OPENPOWER_PNOR_P10_KEY_TRANSITION_ARG = -key_transition imprint
25else ifeq ($(BR2_OPENPOWER_P10_SECUREBOOT_KEY_TRANSITION_TO_PROD),y)
26OPENPOWER_PNOR_P10_KEY_TRANSITION_ARG = -key_transition production
27endif
28
29ifneq ($(BR2_OPENPOWER_P10_SECUREBOOT_SIGN_MODE),"")
30OPENPOWER_PNOR_P10_SIGN_MODE_ARG = -sign_mode $(BR2_OPENPOWER_P10_SECUREBOOT_SIGN_MODE)
31endif
32
33OPENPOWER_PNOR_P10_INSTALL_IMAGES = YES
34OPENPOWER_PNOR_P10_INSTALL_TARGET = NO
35
36# Subpackages we want to include in the version info (do not include openpower-pnor-p10)
37# This is used inside pkg-versions.mk
38OPENPOWER_PNOR_P10_VERSIONED_SUBPACKAGES = skiboot linux petitboot hostboot-binaries capp-ucode pdata hostboot-p10 occ-p10 sbe-p10 hcode-p10 ocmb-explorer-fw $(call qstrip,$(BR2_OPENPOWER_P10_XMLS))
39
40OPENPOWER_PNOR_P10_OCMB_URL = $(call qstrip,$(OCMB_EXPLORER_FW_SITE)/$(OCMB_EXPLORER_FW_SOURCE))
41
42#######
43# OPENPOWER_PNOR_P10_UPDATE_IMAGE - process/sign PNOR partitions
44# Arguments:
45# $1 - The target-specific mrw package name (i.e., rainier-2u-xml)
46#######
47define OPENPOWER_PNOR_P10_UPDATE_IMAGE
48 echo "***Signing images for target:$(call qstrip,$(1))"
49
50 $(eval XML_VAR = $$(call UPPERCASE,$$(call qstrip,$(1))))
51 echo "***XML_VAR: $(XML_VAR)"
52
53 $(eval TARGETING_BINARY_SOURCE = $$(BR2_$(XML_VAR)_TARGETING_BIN_FILENAME))
54 echo "***TARGETING_BINARY_SOURCE: $(TARGETING_BINARY_SOURCE)"
55
56 $(eval TARGETING_BINARY_FILENAME = $$(BR2_$(XML_VAR)_TARGETING_ECC_FILENAME))
57 echo "***TARGETING_BINARY_FILENAME: $(TARGETING_BINARY_FILENAME)"
58
59 $(eval XML_FILENAME = $$(call qstrip,$$(BR2_$(XML_VAR)_FILENAME)))
60 echo "***XML_FILENAME: $(XML_FILENAME)"
61
62 $(eval WOF_BINARY_FILENAME = $$(patsubst %.xml,%.wofdata,$(XML_FILENAME)))
63 echo "***WOF_BINARY_FILENAME: $(WOF_BINARY_FILENAME)"
64
65 $(eval MEMD_BINARY_FILENAME = $$(patsubst %.xml,%.memd_output.dat,$(XML_FILENAME)))
66 echo "***MEMD_BINARY_FILENAME: $(MEMD_BINARY_FILENAME)"
67
68 $(eval DEVTREE_BINARY_FILENAME = $$(patsubst %.xml,%.dtb,$(XML_FILENAME)))
69 echo "***DEVTREE_BINARY_FILENAME: $(DEVTREE_BINARY_FILENAME)"
70
71 $(eval PNOR_SCRATCH_DIR = $(STAGING_DIR)/openpower_pnor_scratch.$(XML_VAR))
72 echo "***PNOR scratch directory: $(PNOR_SCRATCH_DIR)"
73 mkdir -p $(PNOR_SCRATCH_DIR)
74
75
76 $(TARGET_MAKE_ENV) $(@D)/update_image.pl \
77 -release p10 \
78 -op_target_dir $(STAGING_DIR)/hostboot_build_images \
79 -hb_image_dir $(STAGING_DIR)/hostboot_build_images \
80 -scratch_dir $(PNOR_SCRATCH_DIR) \
81 -hb_binary_dir $(STAGING_DIR)/hostboot_binaries \
82 -hcode_dir $(STAGING_DIR)/hcode \
83 -targeting_binary_filename $(TARGETING_BINARY_FILENAME) \
84 -targeting_binary_source $(TARGETING_BINARY_SOURCE) \
85 -targeting_RO_binary_filename $(TARGETING_BINARY_FILENAME).protected \
86 -targeting_RO_binary_source $(TARGETING_BINARY_SOURCE).protected \
87 -targeting_RW_binary_filename $(TARGETING_BINARY_FILENAME).unprotected \
88 -targeting_RW_binary_source $(TARGETING_BINARY_SOURCE).unprotected \
89 -sbe_binary_filename $(BR2_HOSTBOOT_P10_BINARY_SBE_FILENAME) \
90 -sbe_binary_dir $(STAGING_DIR)/sbe_binaries \
91 -sbec_binary_filename $(BR2_HOSTBOOT_P10_BINARY_SBEC_FILENAME) \
92 -wink_binary_filename $(BR2_HOSTBOOT_P10_BINARY_WINK_FILENAME) \
93 -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_P10_BIN_FILENAME) \
94 -capp_binary_filename $(BINARIES_DIR)/$(BR2_CAPP_UCODE_BIN_FILENAME) \
95 -ima_catalog_binary_filename $(BINARIES_DIR)/$(BR2_IMA_CATALOG_P10_FILENAME) \
96 -openpower_version_filename $(OPENPOWER_PNOR_P10_VERSION_FILE) \
97 -wof_binary_filename $(STAGING_DIR)/openpower_mrw_scratch/$(WOF_BINARY_FILENAME) \
98 -memd_binary_filename $(STAGING_DIR)/openpower_mrw_scratch/$(MEMD_BINARY_FILENAME) \
99 -payload $(BINARIES_DIR)/$(BR2_SKIBOOT_P10_LID_NAME) \
100 -payload_filename skiboot.lid.xz \
101 -binary_dir $(BINARIES_DIR) \
102 -bootkernel_filename $(LINUX_IMAGE_NAME) \
103 -ocmbfw_version $(OCMB_EXPLORER_FW_VERSION) \
104 -ocmbfw_url $(OPENPOWER_PNOR_P10_OCMB_URL) \
105 -ocmbfw_original_filename $(BINARIES_DIR)/$(BR2_OCMBFW_P10_FILENAME) \
106 -ocmbfw_binary_filename $(PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_P10_PROCESSED_FILENAME) \
107 -pnor_layout $(@D)/p10Layouts/$(BR2_OPENPOWER_P10_PNOR_XML_LAYOUT_FILENAME) \
108 -sbe_img_dir $(BUILD_DIR)/sbe-p10-$(call qstrip,$(BR2_SBE_P10_VERSION))/images \
109 -devtree_binary_filename $(STAGING_DIR)/usr/share/pdata/$(DEVTREE_BINARY_FILENAME) \
110 -xz_compression \
111 $(OPENPOWER_PNOR_P10_KEY_TRANSITION_ARG) \
112 $(OPENPOWER_PNOR_P10_SIGN_MODE_ARG)
113
114 if [ -n "$(BR2_OPENPOWER_PNOR_P10_LEGACY_PNOR_TARGET)" ] ; then \
115 echo "***Generating legacy pnor targets..." ;\
116 mkdir -p $(STAGING_DIR)/pnor.$(XML_VAR) ; \
117 $(TARGET_MAKE_ENV) $(@D)/create_pnor_image.pl \
118 -release p10 \
119 -xml_layout_file $(@D)/p10Layouts/$(BR2_OPENPOWER_P10_PNOR_XML_LAYOUT_FILENAME) \
120 -pnor_filename $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor \
121 -hb_image_dir $(STAGING_DIR)/hostboot_build_images \
122 -scratch_dir $(PNOR_SCRATCH_DIR) \
123 -outdir $(STAGING_DIR)/pnor.$(XML_VAR)/ \
124 -payload $(PNOR_SCRATCH_DIR)/$(BR2_SKIBOOT_LID_XZ_NAME) \
125 -bootkernel $(PNOR_SCRATCH_DIR)/$(LINUX_IMAGE_NAME) \
126 -sbe_binary_filename $(BR2_HOSTBOOT_P10_BINARY_SBE_FILENAME) \
127 -sbec_binary_filename $(BR2_HOSTBOOT_P10_BINARY_SBEC_FILENAME) \
128 -wink_binary_filename $(BR2_HOSTBOOT_P10_BINARY_WINK_FILENAME) \
129 -occ_binary_filename $(OCC_STAGING_DIR)/$(BR2_OCC_P10_BIN_FILENAME) \
130 -targeting_binary_filename $(TARGETING_BINARY_FILENAME) \
131 -targeting_RO_binary_filename $(TARGETING_BINARY_FILENAME).protected \
132 -targeting_RW_binary_filename $(TARGETING_BINARY_FILENAME).unprotected \
133 -wofdata_binary_filename $(PNOR_SCRATCH_DIR)/wofdata.bin.ecc \
134 -memddata_binary_filename $(PNOR_SCRATCH_DIR)/memd_extra_data.bin.ecc \
135 -ocmbfw_binary_filename $(PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_P10_PROCESSED_FILENAME) \
136 -openpower_version_filename $(PNOR_SCRATCH_DIR)/openpower_pnor_version.bin \
137 -devtree_binary_filename $(PNOR_SCRATCH_DIR)/DEVTREE.bin ;\
138 $(INSTALL) $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor $(BINARIES_DIR) ;\
139 PATH=$(HOST_DIR)/usr/bin:$(PATH) $(HOST_DIR)/usr/bin/generate-tar -i squashfs \
140 -m $(XML_VAR) \
141 -f $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor.squashfs.tar \
142 $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor -s ;\
143 $(INSTALL) $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor.squashfs.tar $(BINARIES_DIR) ;\
144 cd $(STAGING_DIR)/pnor.$(XML_VAR) ;\
145 PATH=$(HOST_DIR)/usr/sbin:$(PATH) $(HOST_DIR)/usr/bin/generate-ubi \
146 $(XML_VAR).pnor.squashfs.tar ;\
147 $(INSTALL) $(STAGING_DIR)/pnor.$(XML_VAR)/$(XML_VAR).pnor.ubi.mtd $(BINARIES_DIR) ;\
148 $(TARGET_MAKE_ENV) $(@D)/makelidpkg \
149 $(BINARIES_DIR)/$(XML_VAR).ebmc_lids.tar.gz \
150 $(PNOR_SCRATCH_DIR); \
151 if [ -e $(STAGING_DIR)/openpower_pnor_scratch ] ; then \
152 echo "*** Reusing existing $(STAGING_DIR)/openpower_pnor_scratch => $$(readlink -f $(STAGING_DIR)/openpower_pnor_scratch)";\
153 else \
154 ln -rs $(PNOR_SCRATCH_DIR) $(STAGING_DIR)/openpower_pnor_scratch ;\
155 ln -rs $(BINARIES_DIR)/$(XML_VAR).ebmc_lids.tar.gz \
156 $(BINARIES_DIR)/ebmc_lids.tar.gz ;\
157 ln -rs $(BINARIES_DIR)/$(XML_VAR).pnor \
158 $(BINARIES_DIR)/$(BR2_OPENPOWER_PNOR_P10_LEGACY_PNOR_TARGET).pnor ;\
159 ln -rs $(BINARIES_DIR)/$(XML_VAR).pnor.squashfs.tar \
160 $(BINARIES_DIR)/$(BR2_OPENPOWER_PNOR_P10_LEGACY_PNOR_TARGET).pnor.squashfs.tar ;\
161 ln -rs $(BINARIES_DIR)/$(XML_VAR).pnor.ubi.mtd \
162 $(BINARIES_DIR)/$(BR2_OPENPOWER_PNOR_P10_LEGACY_PNOR_TARGET).pnor.ubi.mtd ;\
163 fi ;\
164 fi
165 # Copy images to mmc dir
166 # HBBL
167 test -f "$(BINARIES_DIR)/mmc/HBBL.P10" ||\
168 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hbbl.bin.ecc \
169 $(BINARIES_DIR)/mmc/HBBL.P10
170
171 # HBB
172 test -f "$(BINARIES_DIR)/mmc/HBB.P10" ||\
173 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hostboot.header.bin.ecc \
174 $(BINARIES_DIR)/mmc/HBB.P10
175
176 # HBI
177 test -f "$(BINARIES_DIR)/mmc/HBI.P10" ||\
178 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hostboot_extended.header.bin.ecc \
179 $(BINARIES_DIR)/mmc/HBI.P10
180
181 # HBD
182 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/$(TARGETING_BINARY_FILENAME) \
183 $(BINARIES_DIR)/mmc/HBD.$(XML_VAR)
184
185 # SBE
186 test -f "$(BINARIES_DIR)/mmc/SBE.P10" ||\
187 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/$(BR2_HOSTBOOT_P10_BINARY_SBE_FILENAME) \
188 $(BINARIES_DIR)/mmc/SBE.P10
189
190 # PAYLOAD
191 test -f "$(BINARIES_DIR)/mmc/PAYLOAD.P10" ||\
192 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/skiboot.lid.xz \
193 $(BINARIES_DIR)/mmc/PAYLOAD.P10
194
195 # HCODE
196 test -f "$(BINARIES_DIR)/mmc/HCODE.P10" ||\
197 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/$(BR2_HOSTBOOT_P10_BINARY_WINK_FILENAME) \
198 $(BINARIES_DIR)/mmc/HCODE.P10
199
200 # HBRT
201 test -f "$(BINARIES_DIR)/mmc/HBRT.P10" ||\
202 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hostboot_runtime.header.bin.ecc \
203 $(BINARIES_DIR)/mmc/HBRT.P10
204
205 # OCC
206 test -f "$(BINARIES_DIR)/mmc/OCC.P10" ||\
207 $(INSTALL) -m 0644 -D $(OCC_STAGING_DIR)/$(BR2_OCC_P10_BIN_FILENAME).ecc \
208 $(BINARIES_DIR)/mmc/OCC.P10
209
210 # BOOTKERNEL
211 test -f "$(BINARIES_DIR)/mmc/BOOTKERNEL.P10" ||\
212 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/$(LINUX_IMAGE_NAME) \
213 $(BINARIES_DIR)/mmc/BOOTKERNEL.P10
214
215 # CAPP
216 test -f "$(BINARIES_DIR)/mmc/CAPP.P10" ||\
217 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/cappucode.bin.ecc \
218 $(BINARIES_DIR)/mmc/CAPP.P10
219
220 # VERSION
221 test -f "$(BINARIES_DIR)/mmc/VERSION.P10" ||\
222 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/openpower_pnor_version.bin \
223 $(BINARIES_DIR)/mmc/VERSION.P10
224
225 # IMA_CATALOG
226 test -f "$(BINARIES_DIR)/mmc/IMA_CATALOG.P10" ||\
227 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/ima_catalog.bin.ecc \
228 $(BINARIES_DIR)/mmc/IMA_CATALOG.P10
229
230 # SBKT (special content)
231 test -f "$(BINARIES_DIR)/mmc/SBKT.P10" ||\
232 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/SBKT.bin \
233 $(BINARIES_DIR)/mmc/SBKT.P10
234
235 # HBEL (blank)
236 test -f "$(BINARIES_DIR)/mmc/HBEL.P10" ||\
237 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hbel.bin.ecc \
238 $(BINARIES_DIR)/mmc/HBEL.P10
239
240 # GUARD (blank)
241 test -f "$(BINARIES_DIR)/mmc/GUARD.P10" ||\
242 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/guard.bin.ecc \
243 $(BINARIES_DIR)/mmc/GUARD.P10
244
245 # HB_VOLATILE (blank)
246 test -f "$(BINARIES_DIR)/mmc/HB_VOLATILE.P10" ||\
247 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hb_volatile.bin \
248 $(BINARIES_DIR)/mmc/HB_VOLATILE.P10
249
250 # NVRAM (blank)
251 test -f "$(BINARIES_DIR)/mmc/NVRAM.P10" ||\
252 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/nvram.bin \
253 $(BINARIES_DIR)/mmc/NVRAM.P10
254
255 # ATTR_TMP (blank)
256 test -f "$(BINARIES_DIR)/mmc/ATTR_TMP.P10" ||\
257 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/attr_tmp.bin.ecc \
258 $(BINARIES_DIR)/mmc/ATTR_TMP.P10
259
260 # ATTR_PERM (blank)
261 test -f "$(BINARIES_DIR)/mmc/ATTR_PERM.P10" ||\
262 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/attr_perm.bin.ecc \
263 $(BINARIES_DIR)/mmc/ATTR_PERM.P10
264
265 # FIRDATA (blank, optional)
266 if [ -f "$(PNOR_SCRATCH_DIR)/firdata.bin.ecc" ] ; then \
267 test -f "$(BINARIES_DIR)/mmc/FIRDATA.P10" || \
268 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/firdata.bin.ecc \
269 $(BINARIES_DIR)/mmc/FIRDATA.P10 ; \
270 fi
271
272 # SECBOOT (blank)
273 test -f "$(BINARIES_DIR)/mmc/SECBOOT.P10" ||\
274 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/secboot.bin.ecc \
275 $(BINARIES_DIR)/mmc/SECBOOT.P10
276
277 # RINGOVD (blank)
278 test -f "$(BINARIES_DIR)/mmc/RINGOVD.P10" ||\
279 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/ringOvd.bin \
280 $(BINARIES_DIR)/mmc/RINGOVD.P10
281
282 # CVPD (blank, optional)
283 if [ -f "$(PNOR_SCRATCH_DIR)/cvpd.bin.ecc" ] ; then \
284 test -f "$(BINARIES_DIR)/mmc/CVPD.P10" ||\
285 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/cvpd.bin.ecc \
286 $(BINARIES_DIR)/mmc/CVPD.P10 ; \
287 fi
288
289 # DJVPD (blank, optional)
290 if [ -f "$(PNOR_SCRATCH_DIR)/djvpd_fill.bin.ecc" ] ; then \
291 test -f "$(BINARIES_DIR)/mmc/DJVPD.P10" ||\
292 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/djvpd_fill.bin.ecc \
293 $(BINARIES_DIR)/mmc/DJVPD.P10 ; \
294 fi
295
296 # MVPD (blank, optional)
297 if [ -f "$(PNOR_SCRATCH_DIR)/mvpd_fill.bin.ecc" ] ; then \
298 test -f "$(BINARIES_DIR)/mmc/MVPD.P10" ||\
299 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/mvpd_fill.bin.ecc \
300 $(BINARIES_DIR)/mmc/MVPD.P10 ; \
301 fi
302
303 # EECACHE (blank, optional)
304 if [ -f "$(PNOR_SCRATCH_DIR)/eecache_fill.bin.ecc" ] ; then \
305 test -f "$(BINARIES_DIR)/mmc/EECACHE.P10" ||\
306 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/eecache_fill.bin.ecc \
307 $(BINARIES_DIR)/mmc/EECACHE.P10 ; \
308 fi
309
310 # WOFDATA
311 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/wofdata.bin.ecc \
312 $(BINARIES_DIR)/mmc/WOFDATA.$(XML_VAR)
313
314 # MEMD (optional)
315 if [ -f "$(PNOR_SCRATCH_DIR)/memd_extra_data.bin.ecc" ] ; then \
316 test -f "$(BINARIES_DIR)/mmc/MEMD.P10" ||\
317 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/memd_extra_data.bin.ecc \
318 $(BINARIES_DIR)/mmc/MEMD.P10 ; \
319 fi
320
321 # HDAT
322 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/hdat.bin.ecc \
323 $(BINARIES_DIR)/mmc/HDAT.$(XML_VAR)
324
325 # OCMBFW (optional)
326 if [ -f "$(PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_P10_PROCESSED_FILENAME)" ] ; then \
327 test -f "$(BINARIES_DIR)/mmc/OCMBFW.P10" ||\
328 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/$(BR2_OCMBFW_P10_PROCESSED_FILENAME) \
329 $(BINARIES_DIR)/mmc/OCMBFW.P10 ; \
330 fi
331
332 # DEVTREE
333 $(INSTALL) -m 0644 -D $(PNOR_SCRATCH_DIR)/DEVTREE.bin \
334 $(BINARIES_DIR)/mmc/DEVTREE.$(XML_VAR)
335
336endef
337
338define OPENPOWER_PNOR_P10_INSTALL_IMAGES_CMDS
339
340 if [ -n "$(BR2_OPENPOWER_PNOR_P10_LEGACY_PNOR_TARGET)" ] ; then \
341 rm -f $(BINARIES_DIR)/*.pnor \
342 $(BINARIES_DIR)/*.pnor.squashfs.tar \
343 $(BINARIES_DIR)/*.ubi.mtd ;\
344 rm -rf $(BINARIES_DIR)/ebmc_lids.tar.gz \
345 $(BINARIES_DIR)/*.ebmc_lids.tar.gz ;\
346 rm -rf $(STAGING_DIR)/openpower_pnor_scratch \
347 $(STAGING_DIR)/openpower_pnor_scratch.* ;\
348 fi
349
350 $(foreach xmlpkg,$(BR2_OPENPOWER_P10_XMLS),\
351 $(call OPENPOWER_PNOR_P10_UPDATE_IMAGE,\
352 $(xmlpkg)))
353
354 # Create Debug Tarball (target-agnostic)
355 mkdir -p $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/
356 cp -r $(STAGING_DIR)/hostboot_build_images/* \
357 $(BUILD_DIR)/skiboot-$(SKIBOOT_VERSION)/skiboot.elf \
358 $(BUILD_DIR)/skiboot-$(SKIBOOT_VERSION)/skiboot.map \
359 $(BUILD_DIR)/linux-$(LINUX_VERSION)/.config \
360 $(BUILD_DIR)/linux-$(LINUX_VERSION)/vmlinux \
361 $(BUILD_DIR)/linux-$(LINUX_VERSION)/System.map \
362 $(STAGING_DIR)/fsp-trace/fsp-trace \
363 $(BINARIES_DIR)/zImage.epapr \
364 $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/
365 tar -zcvf $(BINARIES_DIR)/host_fw_debug.tar -C $(STAGING_DIR)/pnor/host_fw_debug_tarball_files/ .
366
367endef
368
369$(eval $(generic-package))
370# Generate openPOWER pnor version string by combining subpackage version string files
371$(eval $(OPENPOWER_VERSION))
372