Kernel & Hardware Services Quick Start
From Symbian Developer Community
The Kernel & Hardware Services package is the foundation upon which the rest of the platform is built. However, to run the Symbian kernel you need a baseport. That is, a port of the "base" parts of the Symbian platform for the hardware that you want to run it on. For other systems this is more typically known as a Board Support Package (BSP). This term is used in Symbian, but the "Board Support Packages" package is currently rather empty, containing only a soon-to-be-deprecated Windows emulator and some hardware abstraction interface tests.
At the time of releasing the kernel under the EPL we have two open source baseports available to enable wider use and experimentation, and hopefully to facilitate the creation of further baseports. One of the baseports is known as Syborg: It allows you to run ARM binaries for the Symbian platform on the popular QEMU emulator. The other baseport is for the low-cost BeagleBoard development platform with its OMAP3530 processor from Texas Instruments.
In addition to the open source baseports there is also a binary baseport for the Zoom II. It should be available for download from omapzoom.org.
Contents |
Getting Started
To get the Symbian kernel building and running on a supported platform, you must follow a common set of steps:
- Get the tools.
- Set up the environment.
- Get the kernel source code.
- Get the baseport source code.
- Build the baseport.
- Create a ROM image.
- Load the ROM image on the target platform.
To help you get started faster we have created a Kernel Taster Kit, which has most of step 2 and steps 3-6 already done for you. It includes source, pre-built binaries and ROM images for both QEMU/Syborg and BeagleBoard baseports.
The instructions below assume that you are using Microsoft Windows (XP or Vista - possibly even Windows 7). It is possible to build and run Symbian code on Linux, but that requires a little more effort - see these forum posts.
Get the Tools
To build Symbian platform code and baseports you must install:
- A supported compiler:
- ARM RVCT 2.2. The officially supported compiler for use with the platform.
- ARM RVCT 4.0. A free version is available for use with Symbian (installation instructions here).
- Note: GCCE support is work in progress.
- A Product Development Toolkit (PDT) and its Perl and Python dependencies (installation instructions here).
- Note: If using RVCT 4.0 you'll need PDT 1.3 or later.
- A 7-zip compatible zip utility. We use a release from http://www.7-zip.org/, although a recent of Winzip (http://www.winzip.com/) will also work.
Installing the Kernel Taster Kit
The latest Kernel Taster Kit (KTK) is a preview to Symbian^4 (S^4) ahead of full Product Development Kits (PDK’s) to be released in Q3 2010. The aim of this kit is to allow the community early access to S^4 allowing them to get started, experiment and integrate with hardware.
The S^4 Kernel Taster Kit includes the source for a product quality SMP kernel which OEMs and silicon vendors can begin to use with their SMP enabled hardware to port or develop drivers and adaptation software. It can be downloaded from here.
After downloading the KTK, open a command prompt, create a new folder (in the example below I call it Symbian_Kernel_Taster) and subst(itute) it with a drive letter (X: in the example):
C:\>mkdir Symbian_Kernel_Taster
C:\>subst X: Symbian_Kernel_Taster
Leave the command box open. (In Windows Explorer) Unzip the Kernel Taster Kit into the root of the subst'ed drive. You can use a tool like WinZip or 7-zip to extract the .7z file.
Set Up the Kernel Taster Environment
In your command prompt, set the following environment variables:
C:\>set EPOCROOT=\
C:\>set path=\epoc32\tools;\epoc32\gcc\bin;%path%
These let the tools know where find the code and other tools. We use paths without a drive letter; this means that we have to run all commands that access Symbian tools from the subst'ed drive.
Loading a ROM Image on a Target Platform
The Kernel Taster Kit comes with debug and release ROM images for Syborg and the BeagleBoard. They can be found in \epoc32\rom. It also includes pre-built Windows binaries for the QEMU simulator.
To run the Syborg ROM image on QEMU, enter the following in your command prompt (changing the drive letter as necessary):
C:\>X:
X:\>cd \qemu\bin
x:\qemu\bin>qemu-system-arm -M \sf\adaptation\qemu\baseport\syborg\syborg.dtb -kernel \epoc32\rom\syborg_tshell_ARMV5_udeb.img
If everything is set up correctly, a QEMU window with a Symbian text shell should pop-up - looking something like this:
For more details about using QEMU and Syborg with Symbian, try this wiki page and for debugging instructions this one.
If you've got a BeagleBoard (or are willing to buy one) and want to run the BeagleBoard ROM image then follow the instructions in this article.
What Next?
Before going any further, you should validate your environment by rebuilding the Syborg baseport, re-creating the ROM and making sure you can still run it. Optionally, if you have a BeagleBoard, you may also want to rebuild the BeagleBoard baseport and ROM.
Building Syborg
Close your current QEMU window (if it's still running) and issue these commands from your command prompt:
[Hide RVCT4.0 instructions (debug)]
X:\qemu\bin>cd \sf\adaptation\qemu
X:\sf\adaptation\qemu>sbs -s package_definition_2.0.1.xml -c arm.v5.udeb.rvct4_0 -k -j 4
This changes to the root directory of the QEMU package, which contains the Syborg baseport, and builds either a debug or release version of it with SBSv2 (aka Raptor) using the specified compiler. Depending on your PC it should take a little over three minutes to complete with zero errors and 34 warnings. For more information on the sbs command and it's parameters please see the sbs tool reference.
The above command/s will generate a debug or release ROM image in \epoc32\rom as either syborg_tshell_ARMV5_udeb.img or syborg_tshell_ARMV5_urel.img respectively and assuming the ROM is generated without errors you can now repeat the steps from the previous section to run the image on QEMU.
[Show Syborg ROM generation details]Building BeagleBoard
To rebuild the BeagleBoard baseport and generate a ROM, use these commands:
[Hide RVCT4.0 instructions (debug)]
X:\qemu\bin>cd \sf\adaptation\beagleboard
X:\sf\adaptation\beagleboard>sbs -s package_definition_2.0.1.xml -c arm.v5.udeb.rvct4_0 -k -j 4
This changes to the root directory of the Beagleboard package, which contains the Beagleboard baseport, and builds either a debug or release version of it with SBSv2 (aka Raptor) using the specified compiler. For more information on the sbs command and it's parameters please see the sbs tool reference.
The above command/s will generate a debug or release ROM image in \epoc32\rom as either beagleboard_tshell_ARMV5_udeb.img or beagleboard_tshell_ARMV5_urel.img respectively.
[Show Beagleboard ROM generation details]What Next Now?
Now that you have proven that you can rebuild and run your ROM you can begin exploring and modifying source on your own. Here is a simple starting point: Kernel & Hardware Services - Things To Try.
Troubleshooting
Having problems getting started? Common problems and their solutions can be found on this page, please leave comments about your specific problems (rather than errors in the instructions) there.
Summary
If you've worked through this article and the linked instructions you should have a working environment for experimenting with the Symbian kernel and the supplied baseports. You should be able to build the open source baseports and generate ROM images.
What next? Well, here are some things to try.
Build Tool Arguments
There are two main tools mentioned previously that are used to build a ROM from the KTK, sbs and rom. With the intention of keeping the quick start guide lightweight and concise we've collected the command arguments that are shared between the Syborg and Beagleboard ROMs and their described use down here so we can keep their associated sections short, so you can get up and running quickly.
Raptor - sbs
Example: sbs -s package_definition_2.0.1.xml -c arm.v5.udeb.rvct4_0 -k -j 4
This starts a Symbian build. In the above example the parameters are:
- -s specifies the package definition to use. The package definition file tells Raptor what needs building.
- -c specifies the build configuration to use. In this case, build a debug release (udeb) for arm v5 architecture (arm.v5) using the RVCT4.0 compiler (rvct4_0). Multiple -c options can be specified.
- -k tells Raptor to keep going if it encounters any errors.
- -j specifies how many compilations to perform in parallel. The number 4 was selected to ensure maximum utilisation of a typical dual-core system. It should work fine if you only have a single core.
For help on the other options use: sbs --help.
ROM Builder - rom
Example: rom --variant=syborg --inst=armv5 --build=udeb --type=tshell --name=\epoc32\rom\syborg_tshell_ARMV5_udeb.img
This command needs to be run from the \sf\os\kernelhwsrv\kernel\eka\rombuild directory. The above example creates a Syborg ROM. The parameters used are:
- --variant identifies a folder in \epoc32\rom which contains IBY files specifying the target-specific binaries to be included in the ROM
- --inst identifies the target architecture
- --build determines whether debug or release binaries are to be used
- --type=tshell selects the tshell.oby file from the current directory which then specifies the names of the IBY files to get from the variant directory and the remaining IBY files required to define a standard text shell ROM
- --name specifies the output image file name
For more help on the commands see the output of rom --help, the Guide to using ROM.bat or the ROM Building Guide.
References & Further Reading
- Kernel & Hardware Services package landing page
- Kernel & Hardware Services Guide in the Symbian Developer Library for Product Developers
- Complete version of the Symbian OS Internals book
- Base Porting Quick Start
- BeagleBoard Quick Start
- Guide to using ROM.bat - for creating text shell ROMs, as in this article.
- ROM Building Guide - for creating more complex ROMs than a text shell!
- More information on Syborg & QEMU
- Debugging Symbian code on QEMU
Comments
Contents |
Royerfa said…
William roberts said…
Please could you raise a defect for this, and if possible include the rom build logs for both working and non-working BEAGLEARMV5D.IMG ROMs. We didn't encounter this problem when testing the Kernel Taster Kit, but perhaps the folk with Beagleboards concentrated on their ROMs and didn't do the Syborg build first.
--William roberts 13:37, 25 January 2010 (UTC)
Raj007 said…
hi..can we proceed with building a baseport immediately after building another baseport?? or is it necessary to "CLEAN" the previous baseport build??
--Raj007 07:53, 20 July 2010 (BST)
William roberts said…
Yes, you should be able to build multiple baseports in the same epoc32 tree without any problems - we normally build syborg and beagleboard in parallel in Symbian platform builds.
--William roberts 09:55, 20 July 2010 (BST)
Raj007 said…
Hi..
i tried building another baseport after the beagleboard.. and it started including files from the beagleboard and the build failed... now should i use "REALLYCLEAN" or just "CLEAN" to clear my previous builds????
--Raj007 12:38, 21 July 2010 (BST)
William roberts said…
Please post a description and some relevant log output to the Forums - I do not know of any way that the beagleboard baseport can affect other baseports. Your "other baseport" could be mistakenly referring to beagleboard things by resuing some of the names - e.g. are you defining AsspTarget to be _omap3530_##name##.##ext?
If you really want to clean something, use reallyclean.
--William roberts 13:50, 21 July 2010 (BST)
Sign in to comment…



Hi, I would like to add a warning on this wikipage. I use to have a Kernel panic when I was booting Symbian on the Beagle after following the above wiki instructions. Actually I noticed that if you first do a Syborg build followed by a build for the Beagle board. The image BEAGLEARMV5D.IMG would boot with kernel panic
Fault Category: TPS65950SpurioustInt Fault Reason: 00030005 ExcId bdbbdffd CodeAddr 80006108 DataAddr e7b7dffb Extra ab33dcde
But When I start again from scratch and I do directly a build for Beagle board I have an Image BEAGLEARMV5D.IMG which boot sucessfully.
Obviously there is a defect with the Build tools.
--Royerfa 14:15, 21 January 2010 (UTC)