FreeCalypso > hg > fc-magnetite
comparison doc/Compiling @ 94:596d86109e44
initial round of documentation
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 03 Oct 2016 04:26:16 +0000 |
parents | |
children | 60cc20bfe18f |
comparison
equal
deleted
inserted
replaced
93:6475bde1b170 | 94:596d86109e44 |
---|---|
1 Preparing the development and build environment | |
2 =============================================== | |
3 | |
4 In order to compile our FreeCalypso Magnetite firmware, you will need a | |
5 Unix/Linux system. Even though we are using a compiler which we got in the | |
6 form of Windows .exe binaries and thus have to use Wine (see below), everything | |
7 that we have built on top of it is Unix-based. This author uses Slackware Linux | |
8 version 13.37, 32-bit. | |
9 | |
10 You will need to install the following four pieces of software on whatever | |
11 machine you will use to run the FC Magnetite build process: | |
12 | |
13 1. Wine: self-explanatory. | |
14 | |
15 2. FreeCalypso Wine environment: | |
16 | |
17 ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/installed-env.tar.xz | |
18 | |
19 Extract the content of the above tarball into your ~/.wine/drive_c | |
20 directory - that's all there is to it! | |
21 | |
22 3. nowhine wrapper around Wine: | |
23 | |
24 ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/nowhine.c | |
25 | |
26 Note that Wine may produce different whines on your system than it | |
27 does on mine, in which case if you wish to be relieved of those | |
28 whines, you'll need to edit my nowhine.c hack for your situation. | |
29 | |
30 4. mokosrec2bin flash image file format conversion utility: | |
31 | |
32 ftp://ftp.freecalypso.org/pub/GSM/GTA02/gsm-fw/mokosrec2bin.c | |
33 | |
34 Note that the four host software pieces above are exactly the same as what has | |
35 been needed to build our previous TCS211-based fw works such as leo2moko-debug | |
36 and tcs211-c139 - thus if you have built those previously, you should already | |
37 have all of the necessary host tools. | |
38 | |
39 Compiling the local helper utilities | |
40 ==================================== | |
41 | |
42 (cd helpers; make) | |
43 | |
44 Do the above. Most of the build helper scripts used in the FC Magnetite build | |
45 system are written in Bourne shell, but a few were easier to implement in C. | |
46 You need to compile these C helper utilities before you can run an actual FC | |
47 Magnetite firmware build, but these utilities are totally ad hoc and specific | |
48 to the needs of our fw build system, hence they are not meant to be installed | |
49 globally on your system - instead they stay within the fc-magnetite tree. You | |
50 just need to run make in the helpers directory once before any actual firmware | |
51 builds. | |
52 | |
53 Actually building the firmware | |
54 ============================== | |
55 | |
56 In order to build our FreeCalypso Magnetite firmware for a particular target in | |
57 a particular configuration, run a command like this from the top level of the | |
58 fc-magnetite tree: | |
59 | |
60 ./configure.sh gtamodem l1reconst | |
61 | |
62 The first argument to the configure.sh script selects the target, and the second | |
63 argument selects the configuration. As of this writing, the following targets | |
64 are supported: | |
65 | |
66 c139 Motorola C139 | |
67 fcdev3b FreeCalypso FCDEV3B (hardware designed but not built yet) | |
68 gtamodem The Calypso GSM/GPRS modem in Openmoko GTA01/02 smartphones | |
69 pirelli Pirelli DP-L10 | |
70 | |
71 For the available configurations (the second required argument to the configure | |
72 script), look in the configs directory. As of this writing, the most | |
73 interesting configuration is l1reconst - it was named so because it rebuilds L1 | |
74 from the reconstructed source. | |
75 | |
76 Each configuration is built in its own directory; by default the build directory | |
77 is named build-$TARGET-$CONFIG, i.e., for the example configure.sh line above, | |
78 the resulting build directory will be build-gtamodem-l1reconst. You can change | |
79 the name of this directory by appending a BUILD_DIR=dir argument to the | |
80 ./configure.sh line after the two required arguments. | |
81 | |
82 To actually compile the firmware, cd into the created build directory and run | |
83 make there. Unfortunately the use of TI's proprietary compiler via Wine makes | |
84 the build very slow - it takes about 42 minutes on my machine. When it's all | |
85 done, the flashable firmware image will be in fwimage.bin. This image is to be | |
86 flashed with fc-loadtool at address 0x10000 on the C139 and at address 0 on all | |
87 other targets. | |
88 | |
89 When building firmware for the Pirelli or for future FreeCalypso hardware that | |
90 will use the same high capacity flash+pSRAM chip, one can build either a | |
91 flashable image or a RAM-loadable one - or both. Because this part of the | |
92 build system is common with other targets for which only flash images can be | |
93 produced, the Makefile always builds the flashable image by default - | |
94 fwimage.bin is always meant for flash and never for RAM. To build a RAM- | |
95 loadable image when the target allows it, run 'make ram' - the image will be in | |
96 ramimage.srec, which you can then load and run on the target with FreeCalypso | |
97 host tool fc-xram. | |
98 | |
99 Running on the hardware | |
100 ======================= | |
101 | |
102 In order to run the firmware you have built on your Calypso phone or modem | |
103 (flash or run in RAM as appropriate), you will need to use FreeCalypso host | |
104 tools. As of this writing, the latest packaged release is this one: | |
105 | |
106 ftp://ftp.freecalypso.org/pub/GSM/FreeCalypso/fc-host-tools-r4.tar.bz2 | |
107 | |
108 Please see target-specific notes for more details. |