diff -r 578be2adaf3e -r 307f4279f433 Adaptation/GUID-BFE1422D-3B4A-5B25-A757-B5B68D6390F8.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Adaptation/GUID-BFE1422D-3B4A-5B25-A757-B5B68D6390F8.dita Fri Oct 15 14:32:18 2010 +0100 @@ -0,0 +1,84 @@ + + + + + +Port +Implementation TutorialThis topic describes how to customize the Base Starter. +
Creating local +drive mapping files
    +
  1. Create an ASCII text +file containing your local drive mapping records; see create local drive mapping files for information about the syntax +of the file.

  2. +
  3. Put this text file into +your variant source tree. The source tree is typically of the form sf/os/boardsupport/.../<your + variant>/estart/ . Depending on your port, you +might need more than one local drive mapping file.

  4. +
  5. In the kernel.iby file +for your variant, you need to add lines to make sure that your local drive +mapping files are copied into the ROM's \sys\data\ directory +when the ROM is built. For example include a lines in the form

    data=\epoc32\rom\youvariant\ESTARTCOMP.TXT \Sys\Data\ESTARTCOMP.TXT
  6. +
  7. If you need more than +one mapping file, or your single mapping file has a name other than ESTART.TXT, +then you need to customise the function TFSStartUp::LocalDriveMappingFileName() so +that you can return the appropriate file name at run time.

  8. +
+
Making use +of auto detection

To make use of auto-detection, you need to ensure +that your variant cannot find local drive mapping files in your ROM's \sys\data\ directory. +If you are using the default version of TFSStartUp::LocalDriveMappingFileName(), +then make sure that no file exists with the full path name Z:\sys\data\estart.txt.

+
Customising +code

The most common customisation is to provide your own implementation +of the TFSStartup virtual functions. To do this:

    +
  1. Take a copy of ESTARTMAIN.CPP from sf/os/kernelhwsrv/userlibandfileserver/fileserver/estart/, and insert your code into this copy. Typically this will include, but is +not limited to, your implementation of the TFSStartup virtual +functions.

  2. +
  3. Place the copy into +your variant's source tree. This is typically of the form sf/os/boardsupport/.../<your +variant>/estart/. This is the general pattern for the other ports +supplied with Symbian platform.

  4. +
  5. Create a .mmp file +to build your variant's version of the Base Starter. This is usually placed +in the \<youvariant>\ directory. The general pattern +looks like this: sf/os/boardsupport/.../<your + variant>/estart/estart.mmp. Ports to other hardware variants and +the emulator (WINS) variant follow the same general pattern.

  6. +
  7. Your .mmp file +should pick up the Symbian platform generic code from sf/os/kernelhwsrv/userlibandfileserver/fileserver/estart/estart.cpp, +but should pick up your variant's customised source code from sf/os/boardsupport/.../<your +variant>/estart/estartmain.cpp. The general pattern is to give +the resulting executable the name e32strt.exe.

  8. +
  9. In the kernel.iby file +for your variant, you need to add a line that copies your executable into +the ROM's \sys\bin\ directory when the ROM is built. +For example, include a line of the form:

    file=\Epoc32\Release\##MAIN##\##BUILD##\_##VARIANT##_e32strt.exe sys\bin\estart.exe HEAPMAX(0x2000)
  10. +
+
Removing auto +detect from the Base Starter

You do this only if you need to save +code space, and you do not need the autodetect functionality.

See +also Use +automatic local drive mapping.

    +
  1. Create a .mmp file +to build your variant's version of the Base Starter. This is usually placed +in the sf/os/boardsupport/.../<your variant>/estart/ directory. +This shows the general pattern. Ports to other hardware variants and the emulator +(WINS) variant follow the same general pattern.

  2. +
  3. In your .mmp file, +define the macro:

    MACRO AUTODETECT_DISABLE
  4. +
  5. The location of all +source files in the .mmp file will be sf/os/kernelhwsrv/userlibandfileserver/fileserver/estart/.

  6. +
  7. In the kernel.iby file +for your variant, you need to add a line to make sure that your executable +is copied into the ROM's \sys\bin\ directory when the +ROM is built. For example, include a line of the form

    file=\Epoc32\Release\##MAIN##\##BUILD##\_##VARIANT##_e32strt.exe sys\bin\estart.exe HEAPMAX(0x2000)

    This is the general pattern for the other ports supplied with Symbian +platform.

  8. +
+
See also

Concepts

+
\ No newline at end of file