|
1 # |
|
2 # Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 # All rights reserved. |
|
4 # This component and the accompanying materials are made available |
|
5 # under the terms of the License "Eclipse Public License v1.0" |
|
6 # which accompanies this distribution, and is available |
|
7 # at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 # |
|
9 # Initial Contributors: |
|
10 # Nokia Corporation - initial contribution. |
|
11 # |
|
12 # Contributors: |
|
13 # |
|
14 # Description: iMaker SMR image configuration |
|
15 # |
|
16 |
|
17 |
|
18 |
|
19 ############################################################################### |
|
20 # ___ __ __ ___ |
|
21 # / __| \/ | _ \ |
|
22 # \__ \ |\/| | / |
|
23 # |___/_| |_|_|_\ |
|
24 # |
|
25 |
|
26 SMR_TITLE = SMR |
|
27 SMR_DIR = $(CORE_DIR)/smr |
|
28 SMR_NAME = $(NAME) |
|
29 SMR_PREFIX = $(SMR_DIR)/$(SMR_NAME) |
|
30 SMR_IDIR = |
|
31 SMR_HBY = |
|
32 SMR_OBY = |
|
33 SMR_OPT = $(BLDROM_OPT) -s -D_EABI=$(ARM_VERSION) |
|
34 SMR_MSTOBY = $(SMR_PREFIX)_smr_master.oby |
|
35 SMR_HEADER = |
|
36 |
|
37 SMR_OBYGEN = |
|
38 |
|
39 SMR_IMG = $(SMR_PREFIX).smr.img |
|
40 SMR_LOG = $(SMR_PREFIX).smr.log |
|
41 SMR_OUTOBY = $(SMR_PREFIX).smr.oby |
|
42 |
|
43 SMR_CONECONF = |
|
44 SMR_CONEOPT = --all-layers --impl-tag=target:smr |
|
45 |
|
46 #============================================================================== |
|
47 |
|
48 define SMR_MSTOBYINFO |
|
49 $(call BLDROM_HDRINFO,SMR) |
|
50 |
|
51 ROM_IMAGE 0 non-xip size=0x00000000 |
|
52 |
|
53 /* $(SMR_TITLE) header |
|
54 */ |
|
55 $(SMR_HDRINFO) |
|
56 |
|
57 SMR_IMAGE { |
|
58 $(BLR.SMR.OBY) |
|
59 imagename=$(notdir $(SMR_IMG)) |
|
60 } |
|
61 endef |
|
62 |
|
63 define SMR_HDRINFO |
|
64 $(DEFINE) _IMAGE_WORKDIR $(SMR_DIR) |
|
65 $(call mac2cppdef,$(BLR.SMR.OPT)) |
|
66 $(BLR.SMR.HBY) |
|
67 $(SMR_HEADER) |
|
68 $(if $(filter 1,$(USE_VARIANTBLD)),$(VARIANT_HEADER)) |
|
69 endef |
|
70 |
|
71 |
|
72 ############################################################################### |
|
73 # SMR pre-build step |
|
74 |
|
75 CLEAN_SMRPRE =\ |
|
76 $(if $(filter 1,$(USE_VARIANTBLD)),$(CLEAN_VARIANT) |)\ |
|
77 del | "$(SMR_MSTOBY)" | del | $(call getgenfiles,$(SMR_OBYGEN)) |
|
78 |
|
79 BUILD_SMRPRE =\ |
|
80 $(if $(filter 1,$(USE_VARIANTBLD)),$(BUILD_VARIANT) |)\ |
|
81 mkdir | "$(SMR_DIR)" |\ |
|
82 echo-q | Generating file(s) for $(SMR_TITLE) image creation |\ |
|
83 write-c | "$(SMR_MSTOBY)" | $(call def2str,$(SMR_MSTOBYINFO)) |\ |
|
84 $(SMR_OBYGEN) |
|
85 |
|
86 #============================================================================== |
|
87 # SMR build step |
|
88 |
|
89 BLR.SMR.IDIR = $(call dir2inc,$(SMR_IDIR) $(call iif,$(USE_FEATVAR),,$(FEATVAR_IDIR))) |
|
90 BLR.SMR.HBY = $(call includeiby,$(IMAGE_HBY) $(SMR_HBY)) |
|
91 BLR.SMR.OBY = $(call includeiby,$(SMR_OBY))\ |
|
92 $(call includeiby,$(if $(filter 1,$(USE_VARIANTBLD)),$(VARIANT_OBY)) $(BLDROBY)) |
|
93 BLR.SMR.OPT = $(SMR_OPT) -o$(call pathconv,$(SMR_PREFIX)).img $(BLDROPT) |
|
94 BLR.SMR.POST =\ |
|
95 move | "$(SMR_OUTOBY).log" | $(SMR_LOG) |\ |
|
96 test | "$(SMR_IMG)" |
|
97 |
|
98 CLEAN_SMR = $(call CLEAN_BLDROM,SMR) |
|
99 BUILD_SMR = $(call BUILD_BLDROM,SMR) |
|
100 |
|
101 REPORT_SMR =\ |
|
102 $(SMR_TITLE) dir | $(SMR_DIR) | d |\ |
|
103 $(SMR_TITLE) image | $(SMR_IMG) | f |
|
104 |
|
105 #============================================================================== |
|
106 |
|
107 SOS.SMR.STEPS = $(call iif,$(USE_SMR),\ |
|
108 $(call iif,$(SKIPPRE),,$(and $(filter 1,$(USE_VARIANTBLD)),$(call true,$(USE_CONE)),CONEGEN RESTART) SMRPRE)\ |
|
109 $(call iif,$(SKIPBLD),,SMR) $(call iif,$(SKIPPOST),,SMRPOST)) |
|
110 |
|
111 ALL.SMR.STEPS = $(SOS.SMR.STEPS) |
|
112 |
|
113 |
|
114 ############################################################################### |
|
115 # Targets |
|
116 |
|
117 .PHONY: smr smr-all smr-image smr-cone smr-pre |
|
118 |
|
119 smr smr%: IMAGE_TYPE = SMR |
|
120 |
|
121 smr smr-all: ;@$(call IMAKER,$$(ALL.SMR.STEPS)) |
|
122 smr-image : ;@$(call IMAKER,$$(SOS.SMR.STEPS)) |
|
123 smr-cone : ;@$(call IMAKER,CONEGEN) |
|
124 smr-pre : ;@$(call IMAKER,SMRPRE) |
|
125 |
|
126 |
|
127 # END OF IMAKER_SMR.MK |