documentation/common_mmh.pod
changeset 0 7f656887cf89
child 7 184a1eb85cf2
child 8 eb5f524dc31d
equal deleted inserted replaced
-1:000000000000 0:7f656887cf89
       
     1 # common_mmh.pod
       
     2 #
       
     3 # Copyright (c) 2010 Accenture. All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of the "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Accenture - Initial contribution
       
    11 #
       
    12 
       
    13 =head1 common.mmh and platform.mmh Syntax
       
    14 
       
    15 The fshell build system uses a number of macros to control what should be built and how. These are defined in F<fshell/build/common/common.mmh> and F<fshell/platforms/E<lt>PLATFORME<gt>/platform.mmh>. Each platform defines the things it does and doesn't support in its platform.mmh. common.mmh takes these and defines some derived macros. This system allows fshell to be built in a large number of configurations, ranging from minimal base textshell on Symbian OS v9.1 to full GUI on the latest Symbian Foundation codeline.
       
    16 
       
    17 Any code wishing to use the fshell conditional system should C<< #include <fshell/common.mmh> >> and use the macros below and/or the ones defined in common.mmh to decide how to behave. Below follows the complete list of things that the platform.mmh can define. This isn't the complete list of all the macros that can be I<used>, for that see common.mmh directly. common.mmh can be included anywhere that the preprocessor is used - eg in source code, MMP files, RSS files or bld.infs.
       
    18 
       
    19 The macros that have a [NO_] in are assumed to be supported unless the [NO_] variant is defined. Eg in your MMP file you would check for btrace support with C<#ifdef FSHELL_BTRACE_SUPPORT> and to say a platform didn't support it you'd add C<#define FSHELL_NO_BTRACE_SUPPORT> to the platform.mmh. Unless the platform.mmh says otherwise, common.mmh would define C<FSHELL_BTRACE_SUPPORT>. Everything in fshell that uses btrace checks for C<FSHELL_SUPPORT_BTRACE> in either the bld.inf (in the case of a command that shouldn't be built at all if btrace isn't available) or in its MMP and/or source code (for a command that can still offer some functionality when btrace isn't available).
       
    20 
       
    21 =head2 Supported platform.mmh macros
       
    22 
       
    23 =over 4
       
    24 
       
    25 =item FSHELL_[NO_]BTRACE_SUPPORT
       
    26 
       
    27 BTrace (including timestamp2) supported in kernel.
       
    28 
       
    29 =item FSHELL_[NO_]PIPS_SUPPORT
       
    30 
       
    31 Pips runtime available.
       
    32 
       
    33 =item FSHELL_[NO_]PATCHABLE_CONSTANTS_SUPPORT
       
    34 
       
    35 Platform/toolchain supports patchdata. Everything since about Symbian OS v9.1 does therefore it is assumed to be supported by default.
       
    36 
       
    37 =item FSHELL_[NO_]DYNAMICDFC_SUPPORT
       
    38 
       
    39 Kern::DynamicDfcQCreate API is present. Also used to guard TDfc::RawAdd.
       
    40 
       
    41 =item FSHELL_REPLACE_ECONS
       
    42 
       
    43 buildrom macro (on platforms that support it) to say that iosrv should replace econs.DLL with its own implementation.
       
    44 
       
    45 =item FSHELL_PLATFORM_S60
       
    46 
       
    47 S60 platform (value of this is either 3 or 5, for 3rd edition or 5th edition, or > 5 for foundation). Various UI code uses this to decide whether to build or not.
       
    48 
       
    49 =item FSHELL_PLATFORM_FOUNDATION
       
    50 
       
    51 Symbian Foundation platform (value of this is n, where n is Symbian^n).
       
    52 
       
    53 =item FSHELL_PLATFORM_SYMTB
       
    54 
       
    55 Symbian Timebox release (value can be 92 or 101).
       
    56 
       
    57 =item FSHELL_9_1_SUPPORT
       
    58 
       
    59 Used to guard things that don't work in Symbian OS v9.1, that don't have their own macro. Its use is discouraged in any new code. Currently guards: switchview missing API; missing thread priorities; demand paging definitions; missing RFs API; kernel TFindHandle class.
       
    60 
       
    61 =item FSHELL_CAP_ALL
       
    62 
       
    63 All capabilities are available (platform.mmh must define either this macro or the specific C<FSHELL_CAP_xxx> that are supported)
       
    64 
       
    65 =item FSHELL_PROTECTED_UIDS
       
    66 
       
    67 Protected uids (0x10xxxxxx) should be used, as opposed to unprotected (0xE0xxxxxx), for exe and dll UID3. The UIDs themselves are all defined at the bottom of common.mmh so nothing else uses this macro directly. Unprotected UIDs should only be specified if the platform produces an unsigned sis file.
       
    68 
       
    69 =item FSHELL_BASE_ROM
       
    70 
       
    71 Configure IBYs for base 'rom' command rather than 'buildrom' style.
       
    72 
       
    73 =item FSHELL_[NO_]COMMS_SUPPORT
       
    74 
       
    75 ESock and C32 are available.
       
    76 
       
    77 =item FSHELL_[NO_]BLUETOOTH_SUPPORT
       
    78 
       
    79 Bluetooth is available. If C<FSHELL_COMMS_SUPPORT> isn't available, BT is assumed not to be, also.
       
    80 
       
    81 =item FSHELL_[NO_]TELEPHONY_SUPPORT
       
    82 
       
    83 Etel and SMS available.
       
    84 
       
    85 =item FSHELL_[NO_]APPARC_SUPPORT
       
    86 
       
    87 Apparc available.
       
    88 
       
    89 =item FSHELL_[NO_]EZLIB_SUPPORT
       
    90 
       
    91 Zip libraries available.
       
    92 
       
    93 =item FSHELL_[NO_]AUDIO_SUPPORT
       
    94 
       
    95 MMF/Devsound available.
       
    96 
       
    97 =item FSHELL_[NO_]WSERV_SUPPORT
       
    98 
       
    99 Graphical windowserver (either version) is present (as opposed to text windowserver).
       
   100 
       
   101 =item FSHELL_[NO_]WSERV2_SUPPORT
       
   102 
       
   103 Windowserver v2 is being used. Very few things need to know what windowserver version is in use, but occasionally it is needed.
       
   104 
       
   105 =item FSHELL_[NO_]RAMDEFRAG_SUPPORT
       
   106 
       
   107 RAM defrag (in form of TRamDefragRequest API) is supported.
       
   108 
       
   109 =item FSHELL_CORE_SUPPORT_LOCAL_ICON
       
   110 
       
   111 Create a launch icon for running fshell local.
       
   112 
       
   113 =item FSHELL_CORE_SUPPORT_TCP_ICON
       
   114 
       
   115 Create a launch icon for running fshell remotely via TCP/IP.
       
   116 
       
   117 =item FSHELL_CORE_SUPPORT_BT_ICON
       
   118 
       
   119 Create a launch icon for running fshell remotely via Bluetooth.
       
   120 
       
   121 =item FSHELL_CORE_SUPPORT_USB_ICON
       
   122 
       
   123 Create a launch icon for running fshell remotely via USB. The value of the macro is the port name to use (eg C<"ACM::1">).
       
   124 
       
   125 =item FSHELL_CORE_SUPPORT_SERIAL_ICON
       
   126 
       
   127 Create a launch icon for running fshell remotely via Serial. The value of the macro is the console-title arguments to use (eg C<"port=COMM::1,rate=115200">).
       
   128 
       
   129 =item FSHELL_CORE_SUPPORT_RCONS_ICON
       
   130 
       
   131 Create a launch icon for running fshell remotely via rcons.
       
   132 
       
   133 =item FSHELL_CORE_SUPPORT_LICENSE
       
   134 
       
   135 Build platform specific license support into fshell. Note, the platform must export F<\epoc32\build\fshell\core\generated\license.cpp> that provides the implementation of the interface defined in F<\fshell\core\src\license.h>.
       
   136 
       
   137 =item FSHELL_[NO_]SAMPLINGPROFILER_SUPPORT
       
   138 
       
   139 Samping profiler (profiler.h) is present. (foundation forgot to include it in S^2).
       
   140 
       
   141 =item FSHELL_CLOGGER_REPLACE_FLOGGER
       
   142 
       
   143 Put "FLOGGER_clogger_stub.DLL" into the ROM file as "flogger.dll". Probably won't work for SIS install.
       
   144 
       
   145 =item FSHELL_CLOGGER_REPLACE_CDU
       
   146 
       
   147 Put "COMSDBGUTIL_clogger_stub.DLL" into the ROM file as "comsdbgutil.dll". Probably won't work for SIS install.
       
   148 
       
   149 =item FSHELL_ROM_INCLUDE(ibyname)
       
   150 
       
   151 Optional function-like macro, can be defined to override default IBY export path. Only a few platforms need to override this.
       
   152 
       
   153 =item FSHELL_ROM_INCLUDE2(srciby,destiby)
       
   154 
       
   155 Optional function-like macro, can be defined to override default IBY export path. Only a few platforms need to override this.
       
   156 
       
   157 =item FSHELL_[NO_]COPYTOSHADOWMEMORY_SUPPORT
       
   158 
       
   159 The kernel supports Epoc::CopyToShadowMemory.
       
   160 
       
   161 =item FSHELL_[NO_]LBS_SUPPORT
       
   162 
       
   163 LBS libraries (Symbian or S60) are available.
       
   164 
       
   165 =item FSHELL_[NO_]SQL_SUPPORT
       
   166 
       
   167 SQLite libraries are available.
       
   168 
       
   169 =item FSHELL_[NO_]EGL_SUPPORT
       
   170 
       
   171 Embedded-system Graphics Library is available. If FSHELL_NO_WSERV_SUPPORT is defined, it is assumed EGL is not supported either.
       
   172 
       
   173 =item FSHELL_[NO_]OPENVG_SUPPORT
       
   174 
       
   175 Open Vector Graphics Library is available. If FSHELL_NO_WSERV_SUPPORT is defined, it is assumed OpenVG is not supported either.
       
   176 
       
   177 =item FSHELL_ARM11XX_SUPPORT
       
   178 
       
   179 Defined if the target platform is ARM11. Eg ARM1136 or ARM1176. Do NOT define for Cortex A8/A9. Only used by fdb.
       
   180 
       
   181 =item FSHELL_ARM_MEM_MAPPED_DEBUG
       
   182 
       
   183 Defined if the target platform supports ARM PRB. Should be defined for Cortex A8/A9. Only used by fdb.
       
   184 
       
   185 =item FSHELL_[NO_]DOBJECTIX_SUPPORT
       
   186 
       
   187 On newer baselines DObjectIx has been replaced. This macro is to (hopefully temporarily) guard code that assumes that DObjectIx is being used.
       
   188 
       
   189 =item FSHELL_[NO_]CRYPTO_SUPPORT
       
   190 
       
   191 Cryptographic libraries are available.
       
   192 
       
   193 =item FSHELL_[NO_]SHA2_SUPPORT
       
   194 
       
   195 SHA2 message digest implementation is available.
       
   196 
       
   197 =item FSHELL_[NO_]MD4_SUPPORT
       
   198 
       
   199 MD4 message digest implementation is available.
       
   200 
       
   201 =item FSHELL_FLEXIBLEMM_AWARE
       
   202 
       
   203 Indicates that the baseline is recent enough to be aware of the flexible memory model. It doesn't necessarily mean that the flexible model is actually the one being used. It generally guards kernel APIs that weren't introduced until the FMM was (such as Kern::ChunkUserBase).
       
   204 
       
   205 =item FSHELL_SPCRE_SUPPORT
       
   206 
       
   207 The regular expression libraries spcre.dll and libpcre.dll are available.
       
   208 
       
   209 =item FSHELL_DYNAMICSTARTUP_SUPPORT
       
   210 
       
   211 The Dynamic Startup Configuration (DSC) APIs such as RDscStore are available.
       
   212 
       
   213 =item FSHELL_MEMSPY_SUPPORT
       
   214 
       
   215 The MemSpy Engine APIs are available.
       
   216 
       
   217 =back
       
   218 
       
   219 A couple of further macros follow - these are specifically for platforms that provide an custom implementation of the relevant command rather than using fshell's built-in version.
       
   220 
       
   221 =over 4
       
   222 
       
   223 =item FSHELL_NO_SUPPORT_BUILTIN_REBOOT
       
   224 
       
   225 =item FSHELL_NO_SUPPORT_BUILTIN_VARIANT
       
   226 
       
   227 =back
       
   228 
       
   229 =head2 Example platform.mmh file
       
   230 
       
   231 An example platform.mmh is included below. This is for an imaginary platform based on the S^4 release, that is text-only but supports most other things. Generally the older and/or more restricted the platform is, the more C<FSHELL_NO_...> macros you have to define.
       
   232 
       
   233 	// platform.mmh for the imaginary Mythic platform
       
   234 
       
   235 	#ifndef FSHELL_PLATFORM_MMH
       
   236 	#define FSHELL_PLATFORM_MMH
       
   237 
       
   238 	// We support all Platsec capabilities
       
   239 	#define FSHELL_CAP_ALL
       
   240 	#define FSHELL_PROTECTED_UIDS
       
   241 
       
   242 	// We're based on S^4
       
   243 	#define FSHELL_PLATFORM_FOUNDATION 4
       
   244 
       
   245 	// We are Mythic v1
       
   246 	#define FSHELL_PLATFORM_MYTHIC 1
       
   247 
       
   248 	// We are text-only
       
   249 	#define FSHELL_NO_WSERV_SUPPORT
       
   250 
       
   251 	// We have a recent kernel that supports the flexible memory model
       
   252 	#define FSHELL_FLEXIBLEMM_AWARE
       
   253 	#define FSHELL_NO_DOBJECTIX_SUPPORT
       
   254 
       
   255 	// For the sake of argument, say we don't support Location Based Services but we do support regexes
       
   256 	#define FSHELL_NO_LBS_SUPPORT
       
   257 	#define FSHELL_SPCRE_SUPPORT
       
   258 
       
   259 	#endif // FSHELL_PLATFORM_MMH
       
   260 
       
   261 =head1 Copyright
       
   262 
       
   263 Copyright (c) 2008-2010 Accenture. All rights reserved.
       
   264