1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# IBM_PROLOG_BEGIN_TAG
# This is an automatically generated prolog.
#
# $Source: import/tools/imageProcs/restore_image.mk $
#
# OpenPOWER HCODE Project
#
# COPYRIGHT 2016,2017
# [+] International Business Machines Corp.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied. See the License for the specific language governing
# permissions and limitations under the License.
#
# IBM_PROLOG_END_TAG
# $1 == chipId
define BUILD_RESTORE_IMAGE
$(eval IMAGE=$1.restore_image)
$(eval $(IMAGE)_PATH=$(IMAGEPATH)/restore_image)
$(eval $(IMAGE)_LINK_SCRIPT=restore_image.cmd)
$(eval $(IMAGE)_LAYOUT=$(IMAGEPATH)/restore_image/restore_image.o)
$(eval restore_image_COMMONFLAGS += -I$(ROOTPATH)/chips/p9/xip/)
# files with multiple DD level content to be generated
$(eval $(call BUILD_DD_LEVEL_CONTAINER,$1,cpmr_header))
# files to be appended to image
$(eval $(IMAGE)_FILE_CPMR=$$($(IMAGE)_DD_CONT_cpmr_header))
$(eval $(IMAGE)_FILE_SELF=$(ROOTPATH)/chips/p9/procedures/utils/stopreg/selfRest.bin)
# dependencies for appending image sections in sequence:
# - file to be appended
# - all dependencies of previously appended sections or on raw image
# - append operation as to other section that has to be finished first
$(eval $(IMAGE)_DEPS_CPMR =$$($(IMAGE)_FILE_CPMR))
$(eval $(IMAGE)_DEPS_CPMR+=$$($(IMAGE)_PATH)/.$(IMAGE).setbuild_host)
$(eval $(IMAGE)_DEPS_SELF =$$($(IMAGE)_FILE_SELF))
$(eval $(IMAGE)_DEPS_SELF+=$$($(IMAGE)_DEPS_CPMR))
$(eval $(IMAGE)_DEPS_SELF+=$$($(IMAGE)_PATH)/.$(IMAGE).append.cpmr)
$(eval $(IMAGE)_DEPS_REPORT =$$($(IMAGE)_DEPS_HCODE))
$(eval $(IMAGE)_DEPS_REPORT+=$$($(IMAGE)_PATH)/.$(IMAGE).append.self_restore)
# image build using all files and serialised by dependencies
$(eval $(call XIP_TOOL,append,.cpmr,$$($(IMAGE)_DEPS_CPMR),$$($(IMAGE)_FILE_CPMR) 1))
$(eval $(call XIP_TOOL,append,.self_restore,$$($(IMAGE)_DEPS_SELF),$$($(IMAGE)_FILE_SELF)))
# create image report for image with all files appended
$(eval $(call XIP_TOOL,report,,$$($(IMAGE)_DEPS_REPORT)))
$(eval $(call BUILD_XIPIMAGE))
endef
CHIPS :=$(filter-out centaur,$(CHIPS))
$(foreach chip,$(CHIPS),\
$(foreach chipId, $($(chip)_CHIPID),\
$(eval $(call BUILD_RESTORE_IMAGE,$(chipId)))))
|