Preparing the development and build environment===============================================In order to compile our FreeCalypso Magnetite firmware, you will need aUnix/Linux system. Even though we are using a compiler which we got in theform of Windows .exe binaries and thus have to use Wine (see below), everythingthat we have built on top of it is Unix-based. The Mother currently usesSlackware Linux release 14.2 (32-bit) and previously used Slackware 13.37,also 32-bit.You will need to install the following 3 pieces of software on whatevermachine you will use to run the FC Magnetite build process:1. Wine: self-explanatory. The Mother uses the following Slackware package: https://www.freecalypso.org/members/falcon/slackware/wine-1.5.23-i486-1sg.txz I originally used it with Slackware 13.37 and I am still able to use it with 14.2 without any issues.2. FreeCalypso Wine environment: ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/installed-env.tar.xz Extract the content of the above tarball into your ~/.wine/drive_c directory - that's all there is to it!3. nowhine wrapper around Wine: ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/nowhine.c The purpose of this wrapper is to suppress the following obnoxious whine which wine emits on my system: preloader: Warning: failed to reserve range 00010000-00110000 Wine will also emits a bunch of other whines if you have to run it in an environment without an X11 display (e.g., on a machine that you ssh into), and our nowhine wrapper suppresses those as well. If wine does not emit those preloader whines on your system and you never find yourself in a situation of having to run without an X11 display and thus you find our nowhine wrapper to be unnecessary, you can skip the wrapper and create a nowhine symlink pointing directly to wine.The mokosrec2bin flash image file format conversion utility is now includedlocally and no longer needs to be provided externally.Compiling the local helper utilities====================================(cd helpers; make)Do the above. Most of the build helper scripts used in the FC Magnetite buildsystem are written in Bourne shell, but a few were easier to implement in C.You need to compile these C helper utilities before you can run an actual FCMagnetite firmware build, but these utilities are totally ad hoc and specificto the needs of our fw build system, hence they are not meant to be installedglobally on your system - instead they stay within the fc-magnetite tree. Youjust need to run make in the helpers directory once before any actual firmwarebuilds.Actually building the firmware==============================In order to build our FreeCalypso Magnetite firmware for a particular target ina particular configuration, run a command like this from the top level of thefc-magnetite tree:./configure.sh fcdev3b hybridThe first required argument to the configure.sh script selects the target, thesecond required argument selects the build configuration recipe, and any furtherarguments beyond these two (optional) allow changing various configurablesettings that aren't strictly fixed by the hardware target or by the buildconfiguration recipe.As of this writing, the following hardware targets are supported:c11x Motorola C11x/12xc139 Motorola C139/140c155 Motorola C155/156dsample TI's D-Sample C05 board (no working radio currently)fcdev3b FreeCalypso FCDEV3Bgtamodem The Calypso GSM/GPRS modem in Openmoko GTA01/02 smartphonesgtm900 Huawei GTM900-Bj100 Sony Ericsson J100pirelli Pirelli DP-L10For the available configurations (the second required argument to the configurescript), look in the configs directory and read the various write-ups under doc.Each configuration is built in its own directory; the name of this builddirectory takes the form of build-$TARGET-$CONFIG$SUFFIX, i.e., for the exampleconfigure.sh line above, the resulting build directory will be namedbuild-fcdev3b-hybrid. The $SUFFIX part is empty by default, but can be set onthe command line in order to distinguish non-standard builds that had sometunable settings changed to values other than the default. For example, if youare building the hybrid configuration for the fcdev3b target as above, but youneed to disable MELODY_E2, you could run the configure script as follows:./configure.sh fcdev3b hybrid MELODY_E2=0 SUFFIX=-noe2The build directory would then become build-fcdev3b-hybrid-noe2, and thespecified suffix will also be included in the firmware version ID string thatgets compiled into the image.To actually compile the firmware, cd into the created build directory and runmake there. Unfortunately the use of TI's proprietary compiler via Wine makesthe build quite slow, but there is a trick to speed it up: if you run someother Wine program that stays open and does not exit on its own (e.g., wine cmd)in another window and leave it open while you run your FC Magnetite fw build,the build will proceed much faster - the presence of another Wine process usingthe wineserver environment will keep Wine from shutting this environment downand restarting it for every individual cl470 run, i.e., for each individual Csource file.When the build is done, the flashable firmware image will be in fwimage.bin.This image is to be flashed with fc-loadtool at a target-dependent base address.The build system also produces a short text file named flash-script which is aflashing command script for fc-loadtool that erases the correct range of flashsectors and then programs fwimage.bin at the right address.When building firmware for the FCDEV3B or for the Pirelli, one can build eithera flashable image or a RAM-loadable one - or both. Because this part of thebuild system is common with other targets for which only flash images can beproduced, the Makefile always builds the flashable image by default -fwimage.bin is always meant for flash and never for RAM. To build a RAM-loadable image when the target allows it, run 'make ram' - the image will be inramimage.srec, which you can then load and run on the target with FreeCalypsohost tool fc-xram.Running on the hardware=======================In order to run the firmware you have built on your Calypso phone or modem(flash or run in RAM as appropriate), you will need to use FreeCalypso hosttools. The current version at any given moment can be found at this URL:ftp://ftp.freecalypso.org/pub/GSM/FreeCalypso/fc-host-tools-latest.tar.bz2Please see target-specific notes for more details.