buildframework/helium/sf/java/sbs/sbs.rst
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 629 541af5ee3ed9
equal deleted inserted replaced
588:c7c26511138f 628:7c4a911dc066
     1 .. index::
       
     2   module: Configuring Raptor (SBS)
       
     3 
       
     4 ========================
       
     5 Configuring Raptor (SBS)
       
     6 ========================
       
     7 
       
     8 .. contents::
       
     9 
       
    10 This document describes requirements and how to run sbs builds using helium. Now it is 
       
    11 possible to pass directly pass all the raptor input directly and there are no mapping of
       
    12 raptor parameter specific to helium.
       
    13 
       
    14 
       
    15 SBS Requirements
       
    16 -----------------
       
    17 
       
    18 Before starting the build, SBS needs to be updated for s60 related changes, please follow the instructions from the link below,
       
    19 
       
    20 `How to Build Raptor <http://s60wiki.nokia.com/S60Wiki/How_To_Build_With_Raptor>`_
       
    21 
       
    22 1. SBS_HOME environment variable needs to be set
       
    23 2. PATH environment variable needs to be updated with SBS related exe::
       
    24 
       
    25     path(SBS_HOME\\BIN;SBS_HOME\\win32\\mingw\\bin;SBS_HOME\\win32\\msys\\bin)
       
    26 
       
    27 3. RVCT requirement for raptor is 22_686 or higher, in IDO config / product config batch file the env variable needs to be set to `HLM_RVCT_VERSION=22_686`
       
    28 
       
    29 For Example: ::
       
    30 
       
    31  set HELIUM_HOME=E:\Build_E\ec_test\helium-trunk\helium
       
    32  set PATH=e:\svn\bin;E:\sbs\bin;c:\apps\actpython;%PATH%
       
    33  set SBS_HOME=E:\sbs
       
    34  set MWSym2Libraries=%MWSym2Libraries%;C:\APPS\carbide\x86Build\Symbian_Support\Runtime\Runtime_x86\Runtime_Win32\Libs
       
    35  set TEAM=site_name
       
    36    
       
    37 (Note: For IDOs, these environment variables are set automatically, for S60 option is proposed).
       
    38 
       
    39 Required SBS input for Helium
       
    40 ------------------------------
       
    41 
       
    42 SBS Input consists of SBSInput and SBSBuild types:
       
    43 
       
    44 1. SBSInput - SBS Input stores the list of raptor arguments both the sbs options and
       
    45 sbs make options. Nested sbs input option is also possible, for details please see the 
       
    46 antdoclet information for sbsInput.
       
    47 
       
    48 2. SBSBuild - SBS Build is the collection of SBSInput. Each SBSInput refering within
       
    49 SBSBuild corresponds to a single invocation of raptor with the corresponding sbs arguments
       
    50 refered within the sbsInput. Each sbsInput refered within SBSBuild roughly corresponds to
       
    51 the abld commands associated with corresponding abld configurations. <configuration> </configuration>
       
    52 is corresponds ot SBSBuild. This is there only for backward compatibility and will be removed
       
    53 once the mighration is completed for schema 3.0, in which case, abld mapping of configuration
       
    54 is not required and sbsInput could be directly used. Example is as below,
       
    55 
       
    56 .. code-block:: xml
       
    57 
       
    58     <hlm:sbsbuild id="sbs.dfs_build_export">
       
    59         <sbsInput refid="dfs_build_export_input" />
       
    60     </hlm:sbsbuild> 
       
    61 
       
    62 
       
    63 1. To run using SBS mode (schema 1.4.0)
       
    64 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
    65 
       
    66 List of SBSInput one to one mapping with corresponding abld commands mapped for a configuration.
       
    67     
       
    68 example is below,
       
    69 
       
    70 .. code-block:: xml
       
    71 
       
    72     <!-- tools common sbs options -->
       
    73     <hlm:sbsoptions id="commonSBS">
       
    74         <arg line="-k" />
       
    75         <arg name="--filters" value="FilterMetadataLog"/>
       
    76     </hlm:sbsoptions>
       
    77 
       
    78     <hlm:sbsoptions id="exportSBS">
       
    79         <argset refid="commonSBS" />
       
    80         <arg line="--export-only" />
       
    81     </hlm:sbsoptions>
       
    82 
       
    83     <!-- sbs input for export -->
       
    84     <hlm:sbsinput id="export-sbs">
       
    85         <sbsoptions refid="exportSBS" />
       
    86     </hlm:sbsinput>
       
    87     
       
    88     <hlm:sbsbuild id="sbs.dfs_build_export">
       
    89         <sbsInput refid="dfs_build_export_input" />
       
    90     </hlm:sbsbuild> 
       
    91 
       
    92 Assuming there is a dfs_build_export schema configuration 1.4.0 system definition file.
       
    93 Then there should be a corresponding <hlm:sbsbuild> type defined prefixing with sbs
       
    94 as sbs.dfs_build_export as above which contains a reference to sbsinput. The sbsInput
       
    95 contains actual raptor commands equivalent to abld commands to be executed for that
       
    96 configuration, in this case it is referring exportSBS, which in turn referring to commonsbs
       
    97 so finally the command generated would be 
       
    98 
       
    99 .. code-block:: xml
       
   100 
       
   101     sbs -k --filters=FilterMetadataLog --export-only
       
   102 
       
   103 This command is executed for all the componentes specified in the dfs_build_export
       
   104 configuration.
       
   105 
       
   106 No change from the configuration is required, except the new raptor input needs to be imported.
       
   107 
       
   108 2. To run using SBS mode (schema 3.0.0) - partial support
       
   109 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
   110 
       
   111 For schema 3.0, required inputs are,
       
   112  a. sbs arguments
       
   113  b. package definition files
       
   114  c. filters to filter the component
       
   115  d. patternset - specifying specific set of layers to be executed.
       
   116 
       
   117 Note: Filters are not supported yet.
       
   118  
       
   119 As raptor doesn't support schema 3.0 directly, the schema 3.0 is downgraded to
       
   120 2.0 schema, then it is joined / merged with symbian / nokia system definition.
       
   121 Finally calling raptor commands with the raptor input.
       
   122 
       
   123 The minimum required input for schema 3.0 is, sbsinput.
       
   124 
       
   125 .. code-block:: xml
       
   126 
       
   127     <!-- sbs input for export -->
       
   128     <hlm:sbsinput id="export-sbs">
       
   129         <sbsoptions refid="exportSBS" />
       
   130     </hlm:sbsinput>
       
   131 
       
   132 When building for raptor just the export-sbs needs to be passed as the argument to 
       
   133 compile-main target as below,
       
   134 
       
   135 .. code-block:: xml
       
   136 
       
   137     <antcall target="compile-main" inheritRefs="true">
       
   138         <param name="sbs.inputs.list" value="export-sbs,armv5-build"/>
       
   139     </antcall>
       
   140 
       
   141 Which will execute each sbs input from the list as a separate sbs call and execute it. Schema 3.0
       
   142 is very basic and is only intended for internal testing / validation.
       
   143 
       
   144 Customizing raptor input
       
   145 ------------------------
       
   146 
       
   147 Different scenario the user might need to provide the raptor inputs, (required to map raptor 
       
   148 commands for abld configuration which is not there in the default raptor input xml file, 
       
   149 want to override the default raptor input to pass additional parameters), below section covers
       
   150 how these can be customized.
       
   151 
       
   152 Mapping raptor commands for new configuration from system definition file (1.4.0)
       
   153 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
   154 
       
   155 First step is to identify the abld commands executed by the new configuration. Correspondingly the
       
   156 raptor commands need to be identified for that. Then need to check from the common raptor input 
       
   157 is there any input which can be reused. If any raptor input could be re-usable, the just refering
       
   158 that input and adding additional arguments would provide the exact raptor command arguments to be
       
   159 executed.
       
   160 
       
   161 
       
   162 For example, if the new configuration for which the raptor command input is to be created is,
       
   163 os, which is not there in the default raptor input, then abld commands executed are 
       
   164 (to be simpoer - bldmake, export, tools_rel, winscw, armv5). The corresponding raptor input would
       
   165 be
       
   166 
       
   167 
       
   168 .. code-block:: xml
       
   169 
       
   170     <hlm:sbsinput id="build_input_os_export">
       
   171         <sbsInput refid="export-${build.system}" />
       
   172         <sbsOptions>
       
   173             <arg name="--logfile" value="${compile.log.dir}/${build.id}_export_os_build.log" />
       
   174             <arg name="--makefile" value="${temp.build.dir}/${build.id}_export_os_build" />
       
   175         </sbsOptions>
       
   176     </hlm:sbsinput>
       
   177 
       
   178     <hlm:sbsinput id="build_input_os_tools">
       
   179         <sbsInput refid="tools-${build.system}" />
       
   180         <sbsOptions>
       
   181             <arg name="--logfile" value="${compile.log.dir}/${build.id}_tools_rel_os_build.log" />
       
   182             <arg name="--makefile" value="${temp.build.dir}/${build.id}_tools_rel_os_build" />
       
   183         </sbsOptions>
       
   184     </hlm:sbsinput>
       
   185 
       
   186     <hlm:sbsinput id="build_input_os_winscw">
       
   187         <sbsInput refid="winscw-${build.system}" />
       
   188         <sbsOptions>
       
   189             <arg name="--logfile" value="${compile.log.dir}/${build.id}_winscw_os_build.log" />
       
   190             <arg name="--makefile" value="${temp.build.dir}/${build.id}_winscw_os_build" />
       
   191         </sbsOptions>
       
   192     </hlm:sbsinput>
       
   193 
       
   194 
       
   195     <hlm:sbsinput id="build_input_os_armv5">
       
   196         <sbsInput refid="armv5-${build.system}" />
       
   197         <sbsOptions>
       
   198             <arg name="--logfile" value="${compile.log.dir}/${build.id}_armv5_os_build.log" />
       
   199             <arg name="--makefile" value="${temp.build.dir}/${build.id}_armv5_os_build" />
       
   200         </sbsOptions>
       
   201     </hlm:sbsinput>
       
   202 
       
   203 The default raptor input for each build target (tools, winscw, armv5) are reused here and just the
       
   204 log file names are changed.
       
   205 
       
   206 Next the sequence of command execution needs to be defined for the corresponding os confoguration as below.
       
   207 
       
   208 .. code-block:: xml
       
   209 
       
   210     <hlm:sbsbuild id="sbs.os">
       
   211         <sbsInput refid="build_input_os_export" />
       
   212         <sbsInput refid="build_input_os_tools" />
       
   213         <sbsInput refid="build_input_os_winscw" />
       
   214         <sbsInput refid="build_input_os_armv5" />
       
   215     </hlm:sbsbuild>
       
   216 
       
   217 For configuration name os in the system definition file, it will take the list of raptor input
       
   218 as defined with sbs.os, then it will execute each sbsinput as separate sbs calls with the arguments
       
   219 extracted from the corresponding reference id.
       
   220 
       
   221 Overriding default raptor arguments
       
   222 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
       
   223 
       
   224 In case the default argument is not enough for the user requirements, this could be overriden by
       
   225 redefining the reference of a particular sbsoptions will provide the user to change the arguments.
       
   226 
       
   227 For example, if the user just wants to pass debug flag for armv5 raptor inputs, the raptor input 
       
   228 
       
   229 .. code-block:: xml
       
   230 
       
   231     <!-- Mainbuild common sbs options -->
       
   232     <hlm:sbsoptions id="armv5CommonSBS">
       
   233         <argset refid="commonSBS" />
       
   234         <arg line="-c armv5" />
       
   235     </hlm:sbsoptions>
       
   236 
       
   237 
       
   238 could be redefined as below in the user configuration,
       
   239 
       
   240 .. code-block:: xml
       
   241 
       
   242     <!-- Mainbuild common sbs options -->
       
   243     <hlm:sbsoptions id="armv5CommonSBS">
       
   244         <argset refid="commonSBS" />
       
   245         <arg line="-c armv5" />
       
   246         <arg line="-d" />
       
   247     </hlm:sbsoptions>
       
   248 
       
   249 This would add the debug flag in all the raptor configuration which is using armv5CommonSBS.