Wild ducks project/Quick Start for Developers
From Symdev
Contents |
[edit] Creation of the 'clean' BASE / TSHELL - environment for BSP / device driver development
[edit] Why is this needed?
This page is intended to help developers to set up their environment that they will be able to use for BSP/Kernel components development / submissions.
It is intended to only build basic 'core' (non UI) of the platform, which is kernelhwsrv + bsp and is known as 'tshell' (blue screen).
These are instruction to build only a subset of the entire platform - if you want to build the entire platform refer to: http://www.symlab.org/wiki/index.php/Foundation_Build_Framework/How_to_build_the_Platform
However, you might still refer to basic tools / environment setup / configuration, especially if you want to try to use RVCT4.0 (although for entire platform version 2.2 is recommended)
Note, that this description pretty much applies to Windows environments only (inc Vista), so you either will need to adopt these steps if you're to develop on other platform or refer to other guides. It is continuously updated - but please remember, that it was not yet fully tested on many different machines and by many people - please report any issues/problems that you encountered or update it if needed. Also the information on SCM (getting sources) is often updated as FCL is not stable - and sometimes updating to latest 'default' FCL results in build errors.
[edit] Tools
It is assumed, that you are using RVCT4.0 (the freely available one) - but this guide pretty much applies to other versions of RVCT that are 'supported' by Symbian.
[edit] Tools to install first
- PDT,
- Instead of the entire PDK - you can just download kits from "Common binaries" section from [1]:
- binaries_epoc.zip,
- binaries_prebuilt.zip,
- binaries_epoc_sdk.zip,
- tools_epoc.zip.
you can download them automatically using downloadkit.py tool, e.g.:
hg clone http://www.symlab.org/oss/MCL/sftools/fbf/utilities utilities\downloadkit\downloadkit.py --nounzip --nowinscw --noarmv5 --nosrc --progress 3.0.4
Note, that you would normally download the entire PDK, but only getting the above is enough to build the 'tshell'. Also make sure you using the latest PDK revision number (3.0.1 in this example).
(Also note - for some reason above files have .7zip. in their names in more recent releases - this might be a bug or a recent change-simply use these names instead)
(if you couldn't find it on the page - here is the direct link)
Two important notes when installing RVCT
1. Make sure to install it under path that DOES NOT contain spaces (i.e. by default it would install in C:/Program Files/...)
2. After installing the RVCT4_0, in order for your build tools to work properly with raptor commands listed around the wiki you need to make sure to set following environment variables:
RVCT22BIN=unused RVCT22INC=unused RVCT22LIB=unused
(this is the case if you have a private computer, not having RVCT already installed and youre only to use RVCT4_0 for Symbian)
You should also receive the licence.dat file, so make sure to set the following:
LM_LICENSE_FILE=C:\your_path_to_licence_file\license.dat
(e.g. LM_LICENSE_FILE=C:\RVCT_Symbian\license.dat if you've installed RVCT under RVCT_Symbian and copied licence.dat there)
Note, that if on your machine you're using CodeWarrior tools (e.g. for other embedded development) or other tools, that use the same variable name, you might need to set this variable manually just prior to building symbian code instead of setting it globally (see below).
[edit] Create a substed drive
E.g. if you intend to create your environment in 'D:\Symbian':
subst x: d:\Symbian
(you can use any other letter for your drive)
[edit] Environment variables: update %PATH% and check the rest
Apart from mentioned above RVCT22x you need to have set following ones too:
- Append to the beginning of your path the following:
\epoc32\tools;\epoc32\gcc\bin
(note, that you can use %EPOCROOT% here..)
Your other environment variables should look something like (depending on where you've installed your tools):
RVCT22BIN=unused RVCT22INC=unused RVCT22LIB=unused RVCT40BIN=C:\RVCT_Symbian\bin RVCT40INC=C:\RVCT_Symbian\include RVCT40LIB=C:\RVCT_Symbian\lib LM_LICENSE_FILE=C:\RVCT_Symbian\license.dat HELIUM_HOME=D:\Symbian\Tools\PDT_1.7\helium SBS_HOME=D:\Symbian\Tools\PDT_1.7\raptor EPOCROOT=\
(run 'set' from console to print all of them)
In order to avoid issues with LM_LICENSE_FILE mentioned above, or any other issues with your existing environment, you can simply create a batch file, containing following commands - and simply run that script to 'prepare' your env. It might look like:
set EPOCROOT=\ set path=\epoc32\tools;\epoc32\gcc\bin;%path% set LM_LICENSE_FILE=C:\RVCT_Symbian\license.dat set RVCT22BIN=unused set RVCT22INC=unused set RVCT22LIB=unused
[edit] epoc32 tools necessary to build
In order to build everything 'from scratch' you will need some tools already in your epoc32 directory (in the root of your substed drive).
Extract downloaded files to the root of your substed drive as follows (given that you've downloaded them to C:\downloads):
cd \ 7z x -y c:\downloads\tools_epoc.zip 7z x -y c:\downloads\binaries_prebuilt.zip 7z x -y c:\downloads\binaries_epoc_sdk.zip
You could extract the whole binaries_epoc.zip - the same way i.e.:
7z x -y c:\downloads\binaries_epoc.zip
but - you can only extract the required subset by running the following:
7z x -y -x@d:\Symbian\my_tools\binaries_epoc_exclude.txt c:\downloads\binaries_epoc.zip
The latest File:Binaries epoc exclude.txt you can find here.
This should make your tools ready to build remaining tools and symbian code.
[edit] Sources
Now you are ready to get sources of the 'base' code and your variants / components - using mercurial (i.e. to clone them directly to your environment)
note, if you're behind firewall you might need to set up http proxies, simply run:
set https_proxy=http://username:passwordthe_proxy.com:port set http_proxy=http://username:password@the_proxy.com:port
(update "username, "password", "the_proxy" and "port" accordingly)
[edit] /sf/os/kernelhwsrv
Clone* the kernel and base stuff by running the following from your substed drive:
mkdir \sf\os\kernelhwsrv hg clone https://developer.symbian.org/oss/FCL/sf/os/kernelhwsrv/ /sf/os/kernelhwsrv
[edit] /sf/adaptation/beagleboard
Get the right* beagleboard baseport by running this:
mkdir \sf\adaptation hg clone https://developer.symbian.org/oss/FCL/sf/adapt/beagleboard/ /sf/adaptation/beagleboard
note* that you can either use the tag that corresponds to your PDK, but to include more recent changes - you can be more specific what versions (or tags) you clone/update your sources to, e.g.:
hg update [tag/revision]
Ideally you should omit specifying any tags - and get the latest version (for things that you are going to work on,e.g. beagleboard) - but note, that FCL is globally writeable and might not be stable. If you find that the beagleboard bsp does not compile/ build ROM or the board doesn't boot - use other version and check if it's not known already.. fix it.. (or create a bug describing details/versions so that it could be fixed) Refer below list of 'known to be good' versions if you fail to compile latest versions from default, but if you find, that it was not updated recently you might need to find the 'working version' yourself.
[edit] latest "known as good" revisions
(last updated on 22/11/2010)
/FCL/sf/os/kernelhwsrv/ changeset 301: 172f33f13d7d (PDK_3.0.4) /FCL/sf/adapt/beagleboard/ changeset 119: 2c1b345d77c2
[edit] Build the code
If you successfully followed all steps above you should be able to build your code.
[edit] kernelhwsrv
Build kernel libraries (and the rest of kernhwservices) first - this will build / export all dependencies that the beagle might need.
cd \sf\os\kernelhwsrv sbs -c armv5.rvct4_0 -k -s package_definition.xml
[edit] beagle baseport
Now your beagle baseport - it should build the bsp (and an image too):
cd \sf\adaptation\beagleboard\ sbs -c armv5.rvct4_0 -k -s package_definition.xml
For the correct commands for compilers other than RVCT 4 see here.
[edit] build with other RVCT version (*)
If you're already using RVCT2.2 (you don't need to install RVCT4.0 if you have RVCT2.2 (with the licence) already) - simply run equivalent commands replacing
rvct4_0
with
rvct2_2
..or simply use the default one - omitting this part and only specifying something like:
-c armv5
(but if that's the case you'll know already how to use sbs ;) )
Refer to Raptor Personal Preferences for more info on how to setup your raptor for a default RVCT version.
[edit] Build the image and test
Description for that you can find elswhere on the project Wiki, but to have it all in one place, here's the command to build basic eshell image on the environment you have created with steps above:
cd \sf\os\kernelhwsrv\kernel\eka\rombuild rom --variant=beagle --inst=armv5 --build=udeb --name=\epoc32\rom\beagle_tshell_ARMV5_udeb.img
Now you can enjoy making / testing / submitting your changes.
See also: