Building a Data Drive Image

This section describes the procedure and configurable FAT attributes to build a data drive image.

Required background

Before you start, you must:

  • Understand the BUILDROM tool.

  • Understand the basic structure of .oby file and SIS file.

Introduction

A data drive image is a writable section formatted in FAT16 or FAT32. It allows the pre-installation of applications on either or both the internal or removable media of Symbian phones in a post-manufacturing environment.

ROM tools used to generate a data drive image are as follows:

  • A set of options are provided to BUILDROM to invoke the InterpretSIS tool for installing SIS files.

  • InterpretSIS invokes READIMAGE to extract the SIS file and generate an IBY file for the SIS components.

  • The IBY file is included in the OBY file which is the final input file for ROFSBUILD.

  • ROFSBUILD is invoked to generate the data drive image.

Procedure

  1. Prepare the .oby file to contain the data drive image information. It must contain the following details:

    InformationKey word

    The file system type, such as fat16 or fat32

    dataimagefilesystem or DATA_IMAGE

    The name of the data drive image.

    dataimagename or DATA_IMAGE

    The size of the data drive image.

    dataimagesize or DATA_IMAGE

    The name of the Z drive description image.

    At build time, dependency check is performed for the binary files in DATA_IMAGE against the Z drive image file. Error will be reported for any failure of the dependency check.

    Note: If the Z drive image name is specified in the command line as well as in the .oby file, then the Z drive image name specified in the .oby file takes precedence.

    zdriveimage or zdriveimagename

    The complete path of the SIS files

    sisfile

    The complete path of non-SIS files

    file and data

    Example 1 blow shows how data drive information is included in an .oby file within the _DATADRIVEF user defined macro.

    #ifdef _DATADRIVEF

    DATA_IMAGE 0 fatname size=16000000 fat16 -compress
    DATA_IMAGE[0] 
    {

    file=\epoc32\release\ARMV5\urel\example.exe   \sys\bin\example.exe  

    sisfile=\epoc32\release\ARMV5\urel\sisfolder\sample.sis

    zdriveimagename=h4hrp.techview.nand.rofs.img

    }
    #endif

    Example 2 below shows that keywords can be used within a separate DATA_IMAGE[x] block.

    #ifdef _DATADRIVEF

    DATA_IMAGE[0]
    {
    dataimagename=fatname
    compress
    dataimagefilesystem=fat16
    dataimagesize=16000000  

    file=\epoc32\release\ARMV5\urel\example.exe   \sys\bin\example.exe 

    sisfile=\epoc32\release\ARMV5\urel\sisfolder\sample.sis

    zdriveimagename=h4hrp.techview.nand.rofs.img

    }
    #endif

    Note: If the data drive information is specified using both the approaches listed in the examples above, the DATA_IMAGE[x]{...} approach takes precedence.

    Example 3 defines the data drive image information directly in the .oby file without using a macro.

    DATA_IMAGE[0]
    {
    dataimagename=fatname
    compress
    dataimagefilesystem=fat16
    dataimagesize=16000000  

    file=\epoc32\release\ARMV5\urel\example.exe   \sys\bin\example.exe 

    sisfile=\epoc32\release\ARMV5\urel\sisfolder\sample.sis

    zdriveimagename=h4hrp.techview.nand.rofs.img

    }
  2. Build a data drive image from a command line where BUILDROM exists. There are three command line choices to build a data drive image.

    Choice 1 below builds the data drive image using BUILDROM with the user defined macro. datadrive is the .oby file which contains the macro.

    > buildrom -D_DATADRIVEF datadrive

    Choice 2 below builds both data drive and ROM images using BUILDROM. -D_DATADRIVEF is the user defined macro for a data drive image. The -D_NAND2 macro generates both a data drive image and a ROM image. datadrive is the .oby file which contains the user defined macro.

    > buildrom -D_NAND2 -D_DATADRIVEF h4hrp techview platsec datadrive

    Choice 3 builds the data drive image from the datadrive.oby file as defined in the Example 3 of Step 1. This choice directly builds the data drive image without the command line control, and is not used often.

    > buildrom datadrive

FAT attributes for data drive image

Keywords for the FAT(File Allocation Table) file system attributes can be configured in the OBY/IBY file to generate the data drive image. These attributes help to improve the performance of the file system on the phone.

FAT file keywords

FAT file keywords in OBY/IBYUsage Default valueAcceptable values

fattable

Number of FATs.

2

1 to 255.

sectorsize

Sector size in bytes.

512

512, 1024, 2048, or 4096.

volume

volume label.

NO NAME

String of maximum 11 characters. Characters are within double quotes(").

Example

DATA_IMAGE[0]
{
dataimagename=fatname
compress
dataimagefilesystem=fat16
dataimagesize=16000000  

volume="SYMBIAN"
sectorsize=1024 
fattable=1

file=\epoc32\release\ARMV5\urel\example.exe   \sys\bin\example.exe 

sisfile=\epoc32\release\ARMV5\urel\sisfolder\sample.sis

zdriveimagename=h4hrp.techview.nand.rofs.img

}

Processing the FAT attributes

ROFSBUILD processes the FAT attributes for a data drive image as follows:

  1. Creates the data drive image with default FAT file system attribute values if no configurable attributes are set.

  2. Validates the configurable attributes and overrides its default values during the data drive image generation.

  3. Reports an error if a given attribute value is invalid.