Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

download Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

of 18

Transcript of Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    1/18

    1

    Raptor (Symbian Build System v2)Daniel Jacobs

    Software Engineer

    Nokia

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    2/18

    2

    Why a new build system?

    Need better performance faster builds Developer build times reduced by half or more depending on

    hardware Better utilisation of hardware e.g. multi-CPU machines Incremental builds full dependency trees can be built

    Need to run on Linux Open source, fast file system, more secure

    Better and easier configurability XML configuration

    Easier clustering and scalability E.g. Electric Accelerator, PVMGMake

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    3/18

    3

    Features 1

    Integrates with Carbide 2.0.4 onwards Multi-platform Linux and Windows

    Written in Python and Gnu Make POSIX-like command-line interface

    E.g. sbs -v / sbs --versionand sbs -h / sbs --help Drive builds using system definition or build

    information files (bld.infs) E.g. sbs -s system_definition.xmlor sbs -b ~/componentA/bld.inf -b ~/componentB/bld.inf

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    4/18

    4

    Features 2

    Fewer Windows limitations EPOCROOT can have a drive letter! EPOCROOT, source code, Raptor can all be installed on

    different drives!!

    XML logging provides standard format Plug-in filters allow analysis of logs during build

    Classify and report build errors to component owners e.g. byemail

    Gather build statistics e.g. compilation time Generate RSS feed of build results

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    5/18

    5

    Eclipse Public License 1

    Raptor is available under the EPL

    Open source license based largely on IBMsCommon Public License

    Approved by the Open Source Initiative

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    6/18

    6

    Eclipse Public License 2

    Allows developers of changes and additions tomake their own separate license (any type oflicense) for the changes and additions. EPL-licensed parts must stay licensed under EPL

    No requirement to provide source code

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    7/18

    7

    Using Raptor with Carbide 1

    Use file import wizard

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    8/18

    8

    Using Raptor with Carbide 2

    Using the new project wizard

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    9/18

    9

    Command line usage 1

    sbs Look in current directory for a bld.inf and build for default

    configurations

    sbs b ~/a/path/to/a/bld.inf c tools2 Build ~/a/path/to/a/bld.inf for the TOOLS2 platform

    sbs clean Perform a clean on the current directorys bld.inf (remove

    released files) Also can do sbs CLEAN (case-insensitive)

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    10/18

    10

    Command line usage 2

    sbs -c armv5_urel -c armv7_udeb -b C:\a\path\to\a\bld.inf j 32

    BuildC:\a\path\to\a\bld.infforarmv5urelandarmv7udebusing32paralleljobsusingGnuMake(default)

    sbs -c armv5_urel -c armv7_udeb -b C:\a\path\to\a\bld.inf j 32 e emake

    Sameasabove,butusingemakeasthebuildengine

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    11/18

    11

    Using Raptor in the Foundation

    Andrew Simpson

    Senior Integration Engineer

    Symbian Foundation

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    12/18

    Module

    component

    Historical Structure

    12

    ex SymbianOS Model

    ex S60 Model

    Module

    component

    Module

    componentModule

    component

    Developers &

    Teams

    build using

    individual

    bld.inf or lists

    of bld.inf

    Platform builtfrom xml

    system model

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    13/18

    Package

    Package Based Foundation Structure

    13

    Symbian Foundation Model

    .....

    Package

    Developers &

    Teams

    build using

    packagedefinition xml

    files

    Full platform build

    Uses system model

    which is created bycollating the package

    definition xml files.

    n.b.

    System Definition syntax is

    being updated.

    In v2.x or earlier is

    typically used for

    package

    In 3.x is added

    as a type

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    14/18

    Building a Foundation package

    Get a base environment and tools PDK + PDT (everything) or SDK + ADT (Just enough for app dev)

    Get package source from Mercuriale.g.

    hg clone http://developer.symbian.org/oss/FCL/sf/mw/serviceapi sf/mw/serviceapi

    Clean - Raptor Clean or True Cleansbs -s sf/mw/serviceapi/package_definition.xml -k -c winscw CLEAN -f clean_log.txt

    perl utilities/truclean.pl --packageexpr=mw/serviceapi --releasablesdir=\releaseables

    Buildsbs -s sf/mw/serviceapi/package_definition.xml -k -c winscw.whatlog -f build_log.txt

    Check what you builtsbs -s sf/mw/serviceapi/package_definition.xml -k -c winscw --check > check_log.txt 2>&1

    14

    Get

    Env

    Get

    Source

    Clean

    Check

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    15/18

    Raptor Logs

    See help within Carbide for format of log files Most items are in recipe statements

    __SUPPORT_CPP_EXCEPTIONS__ -D NDEBUG -D __EXE__ -FI bldvariant.hrh -I M:/sf/mw/uitools/gfxtools/gditools/inc -I M:/sf/mw/uitools/inc -I M:/sf/mw/uitools/

    gfxtools/inc -I M:/epoc32/include -I M:/epoc32/include -I M:/epoc32/include/mw -I M:/epoc32/include/platform/mw -I M:/epoc32/include/platform -I M:/epoc32/include/platform/loc -I M:/epoc32/include/platform/mw/loc -I M:/epoc32/include/platform/loc/sc -I M:/epoc32/include/platform/mw/loc/sc '-FRM:\epoc32\build

    \uitools\c_28e6bf596feae056\fontcomp_exe\tools\rel\fontcomp.sbr' '-FoM:\epoc32\build\uitools\c_28e6bf596feae056\fontcomp_exe\tools\rel\fontcomp.obj' M:/sf/mw/uitools/gfxtools/gditools/fontcomp/fontcomp.cpp

    fontcomp.cpp

    ]]>

    + RV=0

    + set +x

    Also check for and tags and a few items outside of tags

    make.exe: Nothing to be done for `EXPORT'.

    Making M:/output/logs/symbian2_FCL.27.108__tools_rel.whatlog_single_thread_GT_tb91sf_Makefile.bitmap

    15

    Context Information

    Type of actionlayer / package / phase

    Full command line

    and response

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    16/18

    Raptor Logs

    Raptor logs can be long... Raptor supports filters,

    e.g. to hide successful recipes--filter=FilterSquashMake

    Can add your own filters A number of post analysis tools available

    http://developer.symbian.org/oss/FCL/interim/fbf/configs/default/file/5fac205a712c/common/tools/analysis

    16

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    17/18

    Final Thoughts

    Using multiple threads Typically choose value for j of about 2x physical

    CPUs

    Remember order of execution may vary

    Incremental builds Take advantage of the full system dependency

    information

    Build only what has changed

    17

  • 8/14/2019 Demo Lab 2 Dan Jacobs Raptor(SBSv2)_aps

    18/18

    Build & Test Tools in Symbian

    18