annotate doc/Compiling @ 275:79cfefc1e2b4

audio mode load: gracefully handle mode files of wrong AEC version Unfortunately our change of enabling L1_NEW_AEC (which is necessary in order to bring our Calypso ARM fw into match with the underlying DSP reality) brings along a change in the audio mode file binary format and file size - all those new tunable AEC parameters do need to be stored somewhere, after all. But we already have existing mode files in the old format, and setting AEC config to garbage when loading old audio modes (which is what would happen without the present change) is not an appealing proposition. The solution implemented in the present change is as follows: the audio mode loading code checks the file size, and if it differs from the active version of T_AUDIO_MODE, the T_AUDIO_AEC_CFG structure is cleared - set to the default (disabled AEC) for the compiled type of AEC. We got lucky in that this varying T_AUDIO_AEC_CFG structure sits at the end of T_AUDIO_MODE!
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 30 Jul 2021 02:55:48 +0000
parents a62e5bf88434
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
50
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 Preparing the development and build environment
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 ===============================================
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4 In order to compile our FreeCalypso Tourmaline firmware, you will need a
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 Unix/Linux system. Even though we are using a compiler which we got in the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 form of Windows .exe binaries and thus have to use Wine (see below), everything
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 that we have built on top of it is Unix-based. The Mother currently uses
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8 Slackware Linux release 14.2 (32-bit) and previously used Slackware 13.37,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 also 32-bit.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 You will need to install the following 3 pieces of software on whatever
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 machine you will use to run the FC Tourmaline build process:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 1. Wine: self-explanatory. The Mother uses the following Slackware package:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 https://www.freecalypso.org/members/falcon/slackware/wine-1.5.23-i486-1sg.txz
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18 I originally used it with Slackware 13.37 and I am still able to use it
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 with 14.2 without any issues.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 2. FreeCalypso Wine environment:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/installed-env.tar.xz
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 Extract the content of the above tarball into your ~/.wine/drive_c
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 directory - that's all there is to it!
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 3. nowhine wrapper around Wine:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 ftp://ftp.freecalypso.org/pub/GSM/TI_src/wine/nowhine.c
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 The purpose of this wrapper is to suppress the following obnoxious whine
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 which wine emits on my system:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 preloader: Warning: failed to reserve range 00010000-00110000
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 Wine will also emits a bunch of other whines if you have to run it
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 in an environment without an X11 display (e.g., on a machine that you
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 ssh into), and our nowhine wrapper suppresses those as well.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41 If wine does not emit those preloader whines on your system and you
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 never find yourself in a situation of having to run without an X11
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 display and thus you find our nowhine wrapper to be unnecessary,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 you can skip the wrapper and create a nowhine symlink pointing directly
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45 to wine.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 Compiling the local helper utilities
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48 ====================================
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 (cd helpers; make)
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52 Do the above. Most of the build helper scripts used in the FC Tourmaline build
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 system are written in Bourne shell, but a few were easier to implement in C.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 You need to compile these C helper utilities before you can run an actual FC
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55 Tourmaline firmware build, but these utilities are totally ad hoc and specific
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 to the needs of our fw build system, hence they are not meant to be installed
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57 globally on your system - instead they stay within the fc-tourmaline tree. You
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 just need to run make in the helpers directory once before any actual firmware
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 builds.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 Actually building the firmware
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62 ==============================
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 In order to build our FreeCalypso Tourmaline firmware for a particular target
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 in a particular configuration, run a command like this from the top level of
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 the fc-tourmaline tree:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 ./configure.sh luna2 bigcolor-gprs
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 The first required argument to the configure.sh script selects the hardware
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 target, the second required argument selects the functional configuration, and
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 any further arguments beyond these two (optional) allow changing various
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 configurable settings that go beyond basic functional selection and aren't
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74 strictly fixed by the hardware target.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 As of this writing, the following hardware targets are supported:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78 c11x Motorola C11x/12x
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 c139 Motorola C139/140
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 c155 Motorola C155/156
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81 fcdev3b FreeCalypso FCDEV3B
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82 gtamodem The Calypso GSM/GPRS modem in Openmoko GTA01/02 smartphones
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 gtm900mgc Huawei GTM900, hardware variant MGC1GSMT or MGC2GSMT
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 j100 Sony Ericsson J100
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 luna1 FreeCalypso Luna, based on iWOW DSK v4.0 or v5.0 motherboard
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 luna2 FreeCalypso Luna, based on FC Caramel2 motherboard
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 pirelli Pirelli DP-L10
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 tangomdm FreeCalypso Tango standard modem config
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 The second required argument selects the basic functional configuration; these
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 functional config stanzas appear in the configs directory. The following
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 functional configurations are currently available:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 bigcolor-gprs & bigcolor-vo
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 These are UI-enabled configurations with the big (176x220 pixel) color
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97 version of the UI. These functional configs can be built only for
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 luna1 and luna2 targets.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 smallbw
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 Small B&W UI configuration - 96x64 pixel black&white UI version. This
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 functional config can be built for c139, luna1 and luna2 targets. When
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 running on Luna, the logical 96x64 pixel B&W LCD is centered in the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 middle of the 176x220 pixel physical LCD, surrounded by a pale magenta
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 border.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 bwtest
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 This one is a special intermediate configuration is that the UI layers
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 are built in the smallbw config, but the underlying R2D framebuffer
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112 driver is 176x220 pixel B&W, rather than 96x64 pixel B&W. This config
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 can only be built for Luna targets; it originates from TI's own
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114 configuration of running their !LSCREEN (smallbw) UI on D-Sample boards
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 with R2D driver in the BW_D_Sample config.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 stdmodem
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 Standard modem config, all data services enabled, no UI functionality
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120 included. Supported targets are fcdev3b, gtamodem, gtm900mgc and
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 tangomdm.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 vpm
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 See the Voice-pseudo-modem article. This functional config is
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 applicable to c11x, c139, c155, j100 and pirelli targets.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 Each configuration is built in its own directory; the name of this build
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 directory takes the form of build-$TARGET-$CONFIG$SUFFIX, i.e., for the example
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 configure.sh line above, the resulting build directory will be named
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 build-luna2-bigcolor-gprs. The $SUFFIX part is empty by default, but can be set
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 on the command line in order to distinguish non-standard builds that had some
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 tunable settings changed to values other than the default. For example, if you
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 are building modem firmware for an FCDEV3B V1 board where you need to disable
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 sleep, you should run the configure script as follows:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137 ./configure.sh fcdev3b stdmodem DISABLE_SLEEP=1 SUFFIX=-nosleep
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 The build directory would then become build-fcdev3b-stdmodem-nosleep, and the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 specified suffix will also be included in the firmware version ID string that
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 gets compiled into the image.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 To actually compile the firmware, cd into the created build directory and run
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 make there. Unfortunately the use of TI's proprietary compiler via Wine makes
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 the build quite slow, but there is a trick to speed it up: if you run some
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 other Wine program that stays open and does not exit on its own (e.g., wine cmd)
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 in another window and leave it open while you run your FC Tourmaline fw build,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 the build will proceed much faster - the presence of another Wine process using
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 the wineserver environment will keep Wine from shutting this environment down
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 and restarting it for every individual cl470 run, i.e., for each individual C
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 source file.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 When the build is done, the flashable firmware image will be in fwimage.bin.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154 This image is to be flashed with fc-loadtool at a target-dependent base address.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155 The build system also produces a short text file named flash-script which is a
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 flashing command script for fc-loadtool that erases the correct range of flash
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 sectors and then programs fwimage.bin at the right address.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 When building firmware for the FCDEV3B or for the Pirelli, one can build either
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 a flashable image or a RAM-loadable one - or both. Because this part of the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 build system is common with other targets for which only flash images can be
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 produced, the Makefile always builds the flashable image by default -
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 fwimage.bin is always meant for flash and never for RAM. To build a RAM-
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 loadable image when the target allows it, run 'make ram' - the image will be in
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 ramimage.srec, which you can then load and run on the target with FreeCalypso
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 host tool fc-xram.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 Cached libraries
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 ================
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 In the build architecture of all TCS211-based firmwares including Tourmaline,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 each fw component is first compiled into a linkable library (*.lib file with
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 TI's TMS470 toolchain), and then these libraries are linked together into the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174 final code image. Early in FreeCalypso project history many of these component
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 libraries were blobs, meaning that we had to use prebuilt libraries for which
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 we had no corresponding source. Our fw has now been almost fully deblobbed,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 meaning that we have transitioned from blobs to recompilation from source for
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178 almost all of our fw components. But this deblobbing has had an unfortunate
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 downside: because our Wine-based compiler is very slow, every time we deblobbed
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 a component library, build times would get longer and longer.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 FC Tourmaline introduces a partial solution to this problem in the form of
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 cached libs. Some component libraries are completely independent of
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 configuration particulars, i.e., they remain exactly the same no matter which
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 Calypso target you are building firmware for, and are likewise unaffected by
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 our various supported functional configs. Prebuilt versions of these config-
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 independent libs have been checked into the cache directory of our source tree,
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 and Tourmaline fw builds use these cached libs by default. These cached libs
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 are NOT blobs in that we do have the corresponding source for them, and the
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 versions that are checked in have been built by us, not by any evil source-
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 withholding third parties. You can disable the use of cached libs and force
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192 full recompilation from source by adding a USE_CACHE=0 argument to your
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 configure.sh line.
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 Running on the hardware
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 =======================
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 In order to run the firmware you have built on your Calypso phone or modem
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 (flash or run in RAM as appropriate), you will need to use FreeCalypso host
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 tools. The current version at any given moment can be found at this URL:
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 ftp://ftp.freecalypso.org/pub/GSM/FreeCalypso/fc-host-tools-latest.tar.bz2
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203
a62e5bf88434 first round of documentation
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 Please see target-specific notes for more details.