23 <!--* @package rombuild --> |
23 <!--* @package rombuild --> |
24 <project name="rombuild.imaker" xmlns:hlm="http://www.nokia.com/helium"> |
24 <project name="rombuild.imaker" xmlns:hlm="http://www.nokia.com/helium"> |
25 <description> |
25 <description> |
26 ROM image creation using iMaker (future implementation). |
26 ROM image creation using iMaker (future implementation). |
27 </description> |
27 </description> |
|
28 |
|
29 <!--* @property imaker.engine |
|
30 Defines which accelerator to use for running iMaker. (default value from build.system property) |
|
31 @type string |
|
32 @scope private |
|
33 --> |
|
34 |
|
35 <condition property="imaker.engine" value="imaker.engine.ec" else="imaker.engine.default"> |
|
36 <and> |
|
37 <not> |
|
38 <isset property="imaker.engine" /> |
|
39 </not> |
|
40 <or> |
|
41 <equals arg1="${build.system}" arg2="ec-helium" /> |
|
42 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
43 </or> |
|
44 </and> |
|
45 </condition> |
|
46 |
28 |
47 |
29 <!-- |
48 <!-- |
30 This task merges all files mentioned in the fileset and output them in filename output file. |
49 This task merges all files mentioned in the fileset and output them in filename output file. |
31 --> |
50 --> |
32 <scriptdef name="mergeConfigXML" language="beanshell" uri="http://www.nokia.com/helium"> |
51 <scriptdef name="mergeConfigXML" language="beanshell" uri="http://www.nokia.com/helium"> |
33 <element name="fileset" type="fileset"/> |
52 <element name="fileset" type="fileset"/> |
34 <attribute name="filename"/> |
53 <attribute name="filename"/> |
35 <![CDATA[ |
54 <![CDATA[ |
36 import java.io.File; |
55 import java.io.File; |
37 import org.dom4j.Node; |
56 import org.dom4j.Node; |
38 import org.dom4j.io.SAXReader; |
57 import org.dom4j.io.SAXReader; |
39 import org.dom4j.DocumentHelper; |
58 import org.dom4j.DocumentHelper; |
40 import org.dom4j.Element; |
59 import org.dom4j.Element; |
48 rootConfig.addAttribute("abstract", "true"); |
67 rootConfig.addAttribute("abstract", "true"); |
49 rootConfig.addAttribute("name", "ee-roms"); |
68 rootConfig.addAttribute("name", "ee-roms"); |
50 |
69 |
51 filesets = elements.get("fileset"); |
70 filesets = elements.get("fileset"); |
52 for (i = 0; i < filesets.size(); ++i) { |
71 for (i = 0; i < filesets.size(); ++i) { |
53 ds = filesets.get(i).getDirectoryScanner(project); |
72 ds = filesets.get(i).getDirectoryScanner(project); |
54 ds.scan(); |
73 ds.scan(); |
55 String[] files = ds.getIncludedFiles(); |
74 String[] files = ds.getIncludedFiles(); |
56 for (j = 0; j < files.length ; ++j) { |
75 for (j = 0; j < files.length ; ++j) { |
57 romconf = new File(ds.getBasedir(), files[j]); |
76 romconf = new File(ds.getBasedir(), files[j]); |
58 self.log("Adding " + romconf + "."); |
77 self.log("Adding " + romconf + "."); |
59 SAXReader reader = new SAXReader(); |
78 SAXReader reader = new SAXReader(); |
60 Document document = reader.read(romconf); |
79 Document document = reader.read(romconf); |
61 Node node = document.selectSingleNode("//build/config"); |
80 Node node = document.selectSingleNode("//build/config"); |
62 rootConfig.add(node.detach()); |
81 rootConfig.add(node.detach()); |
63 } |
82 } |
64 } |
83 } |
65 // lets write to a file |
84 // lets write to a file |
66 OutputFormat format = OutputFormat.createPrettyPrint(); |
85 OutputFormat format = OutputFormat.createPrettyPrint(); |
67 XMLWriter writer = new XMLWriter(new FileWriter(attributes.get("filename")), format); |
86 XMLWriter writer = new XMLWriter(new FileWriter(attributes.get("filename")), format); |
68 writer.write( document ); |
87 writer.write( document ); |
69 writer.close(); |
88 writer.close(); |
70 ]]> |
89 ]]> |
71 </scriptdef> |
90 </scriptdef> |
72 |
91 |
73 <!-- |
92 <!-- |
74 This target is an helper to recompose the rom image configuration using the output of iMaker. |
93 This target is an helper to recompose the rom image configuration using the output of iMaker. |
75 --> |
94 --> |
113 default behaviour can be overriden by defining the reference of the engine to use via the 'imaker.engine' |
132 default behaviour can be overriden by defining the reference of the engine to use via the 'imaker.engine' |
114 property. |
133 property. |
115 --> |
134 --> |
116 <target name="build-roms" depends="rombuild-imaker-create-buildinfo"> |
135 <target name="build-roms" depends="rombuild-imaker-create-buildinfo"> |
117 <mkdir dir="${roms.log.dir}"/> |
136 <mkdir dir="${roms.log.dir}"/> |
118 <if> |
137 |
119 <not> |
|
120 <isset property="imaker.engine" /> |
|
121 </not> |
|
122 <then> |
|
123 <if> |
|
124 <or> |
|
125 <equals arg1="${build.system}" arg2="ec-helium" /> |
|
126 <equals arg1="${build.system}" arg2="sbs-ec" /> |
|
127 </or> |
|
128 <then> |
|
129 <!-- Defines which accelerator to use for running iMaker. (default value from build.system property) |
|
130 @type string |
|
131 @scope private |
|
132 --> |
|
133 <property name="imaker.engine" value="imaker.engine.ec" /> |
|
134 </then> |
|
135 </if> |
|
136 </then> |
|
137 </if> |
|
138 <!-- Defines which accelerator to use for running iMaker. (default value from build.system property) |
|
139 @type string |
|
140 @scope private |
|
141 --> |
|
142 <property name="imaker.engine" value="imaker.engine.default" /> |
|
143 <property name="imaker.rom.name" value=""/> |
138 <property name="imaker.rom.name" value=""/> |
144 <hlm:imaker epocroot="${build.drive}/" engineRefid="${imaker.engine}" |
139 <hlm:imaker epocroot="${build.drive}/" engineRefid="${imaker.engine}" |
145 output="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" verbose="true"> |
140 output="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" verbose="true"> |
146 <hlm:imakerconfigurationset refid="imaker.rom.config" /> |
141 <hlm:imakerconfigurationset refid="imaker.rom.config" /> |
147 </hlm:imaker> |
142 </hlm:imaker> |
152 <then> |
147 <then> |
153 <echo message="WARNING: Nothing to build." file="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" /> |
148 <echo message="WARNING: Nothing to build." file="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" /> |
154 </then> |
149 </then> |
155 </if> |
150 </if> |
156 <hlm:metadatarecord database="${metadata.dbfile}"> |
151 <hlm:metadatarecord database="${metadata.dbfile}"> |
157 <hlm:textmetadatainput> |
152 <hlm:imakermetadatainput> |
158 <fileset casesensitive="false" file="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" /> |
153 <fileset casesensitive="false" file="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" /> |
159 <metadatafilterset refid="filterset.imaker" /> |
154 <metadatafilterset refid="filterset.imaker" /> |
160 </hlm:textmetadatainput> |
155 </hlm:imakermetadatainput> |
161 </hlm:metadatarecord> |
156 </hlm:metadatarecord> |
162 <hlm:signalMacro logfile="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" |
157 <hlm:signalMacro logfile="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" |
163 signal.input="rombuildSignalInput" /> |
158 signal.input="rombuildSignalInput" /> |
164 <if> |
159 <if> |
165 <istrue value="${blocks.enabled}" /> |
160 <istrue value="${blocks.enabled}" /> |
176 <arg value="-Ddir=${release.images.dir}" /> |
171 <arg value="-Ddir=${release.images.dir}" /> |
177 <arg value="--updateData" /> |
172 <arg value="--updateData" /> |
178 </exec> |
173 </exec> |
179 </then> |
174 </then> |
180 </if> |
175 </if> |
181 <fmpp sourceFile="${helium.dir}/tools/common/templates/diamonds/build_roms_diamonds.xml.ftl" |
|
182 outputfile="${diamonds.build.output.dir}/build-roms.xml"> |
|
183 <data expandProperties="yes"> |
|
184 dbPath: ${metadata.dbfile} |
|
185 ant: antProperties() |
|
186 </data> |
|
187 </fmpp> |
|
188 </target> |
176 </target> |
189 |
177 |
190 |
178 |
191 <!-- iMaker engine configuration --> |
179 <!-- iMaker engine configuration --> |
192 <hlm:defaultEngine id="imaker.engine.default" threads="${number.of.threads}" /> |
180 <hlm:defaultEngine id="imaker.engine.default" threads="${number.of.threads}" /> |