--- a/buildframework/helium/tools/rombuild/imaker.ant.xml Wed Oct 28 14:39:48 2009 +0000
+++ b/buildframework/helium/tools/rombuild/imaker.ant.xml Wed Dec 23 19:29:07 2009 +0200
@@ -25,111 +25,6 @@
ROM image creation using iMaker (future implementation).
</description>
- <!-- Defining the default rom image creation templates. -->
- <property name="imaker.fmpp.makefile" location="${helium.dir}/tools/common/templates/imaker/build_imaker_roms_signing.mk.ftl"/>
- <property name="imaker.fmpp.ant" location="${helium.dir}/tools/common/templates/imaker/build_imaker_roms.ant.xml.ftl"/>
-
-
- <!-- The iMaker task. -->
- <macrodef name="imaker" uri="http://www.nokia.com/helium">
- <element name="config"/>
- <attribute name="engine" default="ebs"/>
- <attribute name="name" default=""/>
- <attribute name="signal" default="true"/>
- <sequential>
- <hlm:tempRecordStartMacro name="${build.id}@{name}.roms.log"/>
- <hlm:imaker2tdd property="internal.imaker.tdd" dir="${build.drive}/">
- <config/>
- </hlm:imaker2tdd>
- <echo>
-Generated TDD:
-${internal.imaker.tdd}
- </echo>
- <mkdir dir="${build.log.dir}"/>
- <if>
- <matches pattern="ec(-helium)?" string="@{engine}"/>
- <then>
- <fmpp sourceFile="${imaker.fmpp.makefile}"
- outputFile="${temp.build.dir}/build_imaker_roms@{name}.mk">
- <data expandProperties="yes">
- data: ${internal.imaker.tdd}
- ant: antProperties()
- </data>
- </fmpp>
- <exec executable="${ec.emake}" dir="${build.drive}/">
- <arg value="--emake-build-label=${build.id}@{name}-ROMS"/>
- <arg value="--emake-class=${ec.build.class}"/>
- <arg value="--emake-annofile=${build.log.dir}\${build.id}@{name}.ROMS.emake.anno.xml"/>
- <arg value="--emake-autodepend=1"/>
- <arg value="--emake-annodetail=basic,history,file,waiting"/>
- <arg line="-f ${temp.build.dir}/build_imaker_roms@{name}.mk all"/>
- </exec>
- </then>
- <else>
- <fmpp sourceFile="${imaker.fmpp.ant}"
- outputFile="${temp.build.dir}/build_imaker_roms@{name}.ant.xml">
- <data expandProperties="yes">
- data: ${internal.imaker.tdd}
- ant: antProperties()
- </data>
- </fmpp>
- <ant antfile="${temp.build.dir}/build_imaker_roms@{name}.ant.xml" target="all" />
- </else>
- </if>
-
- <hlm:tempRecordStopMacro name="${build.id}@{name}.roms.log" filterref="filterset.imaker"/>
- <!-- Todo: metadata: insert assertions for metadata parsing here -->
- <if>
- <istrue value="@{signal}"/>
- <then>
- <hlm:signalMacro logfile="${build.log.dir}/${build.id}@{name}.roms.log"
- signal.input="rombuildSignalInput" />
- </then>
- </if>
- </sequential>
- </macrodef>
-
- <!--
- This task implements the transformation of iMaker introspection into a TDD for FMPP.
- Syntax will be like:
- <pre>
- <hlm:imaker2tdd property="internal.imaker.tdd">
- <imakerconfigurationset>
- <imakerconfiguration>
- <makefileset>
- <include name="**/PRODUCT/*ui.mk"/>
- </makefileset>
- <categoryset>
- <include name="build"/>
- <include name="release"/>
- <include name="test"/>
- </categoryset>
- </imakerconfiguration>
- </imakerconfigurationset>
- </hlm:imaker2tdd>
- </pre>
- -->
-
- <scriptdef name="imaker2tdd" language="jython" uri="http://www.nokia.com/helium">
- <element name="imakerconfigurationset" classname="com.nokia.ant.types.imaker.ConfigurationSet"/>
- <attribute name="property"/>
- <attribute name="file"/>
- <attribute name="dir"/>
- <![CDATA[
-import imaker
-import traceback
-import ant
-import logging
-logging.getLogger('imaker.api').addHandler(ant.AntHandler(self))
-try:
- imaker.ant_task_configuration(project, self, elements, attributes)
-except Exception, e:
- traceback.print_exc()
- # Propagate the exception
- raise e
-]]>
- </scriptdef>
-
<!--
This task merges all files mentioned in the fileset and output them in filename output file.
-->
@@ -190,12 +85,28 @@
'imaker.rom.config'.
-->
<target name="build-roms" depends="rombuild-imaker-create-buildinfo">
- <property name="imaker.engine" value="${build.system}" />
+ <mkdir dir="${roms.log.dir}"/>
+ <if>
+ <not>
+ <isset property="imaker.engine" />
+ </not>
+ <then>
+ <if>
+ <or>
+ <equals arg1="${build.system}" arg2="ec-helium" />
+ <equals arg1="${build.system}" arg2="sbs-ec" />
+ </or>
+ <then>
+ <property name="imaker.engine" value="imaker.engine.ec" />
+ </then>
+ </if>
+ </then>
+ </if>
+ <property name="imaker.engine" value="imaker.engine.default" />
<property name="imaker.rom.name" value=""/>
- <hlm:imaker engine="${imaker.engine}" name="${imaker.rom.name}">
- <config>
- <imakerconfigurationset refid="imaker.rom.config"/>
- </config>
+ <hlm:imaker epocroot="${build.drive}/" engineRefid="${imaker.engine}"
+ output="${roms.log.dir}/${build.id}${imaker.rom.name}.roms.log" verbose="true">
+ <hlm:imakerconfigurationset refid="imaker.rom.config" />
</hlm:imaker>
<if>
<istrue value="${blocks.enabled}" />
@@ -216,4 +127,15 @@
</if>
</target>
+ <!-- iMaker engine configuration -->
+ <hlm:defaultEngine id="imaker.engine.default" threads="${number.of.threads}" />
+
+ <hlm:emakeEngine id="imaker.engine.ec">
+ <arg value="--emake-annofile=${roms.log.dir}/${build.id}${imaker.rom.name}.anno.xml"/>
+ <arg value="--emake-root=${env.EMAKE_ROOT}${path.separator}${helium.dir}"/>
+ <arg value="--emake-annodetail=basic,history,file,waiting"/>
+ <arg value="--emake-historyfile=${roms.log.dir}/${build.id}${imaker.rom.name}.emake.data" />
+ <arg value="--emake-class=${ec.build.class}" />
+ </hlm:emakeEngine>
+
</project>