463
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 There are 3 parts to the complete FreeCalypso software suite which are built
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 independently of each other:
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
4 * The tools that run on a GNU/Linux PC or other host system are the most
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 straightforward: there is a top level Makefile (named Makefile.hosttools if
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 you looking at a development source snapshot, will be renamed to just
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 Makefile in packaged releases of the host tools) that coordinates building
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 and installing all of them.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * The gsm-fw tree, which will eventually become our main GSM firmware, needs to
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 be built with a GNU cross-compiler toolchain for ARM7. This firmware can be
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 built for several different target devices and with different feature
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 configurations, hence there is no singular build for it - it's more like the
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 Linux kernel in terms of its build configuration management.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
16 * We also have a few utilities which need to be compiled to run on Calypso
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 targets, but which are not part of gsm-fw; they are gathered in the
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 target-utils tree. They are built with the same GNU toolchain for ARM7 as
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 gsm-fw, but don't have any fancy configuration system.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 Building and installing FreeCalypso host tools
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 ==============================================
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
24 If you are working with a packaged FC host tools release, just run 'make', then
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 'make install' as root. If you are working with a development source snapshot,
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 do 'make -f Makefile.hosttools' instead.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 The "standard" install directories are /usr/local/bin for binaries and
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 /usr/local/share/freecalypso for helper files. If you need to change these
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 paths to something else, you'll need to edit a bunch of individual component
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 Makefiles, and possibly also some source files like loadtools/defpath.c -
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 sorry, FreeCalypso is not GNU and does not use autotools.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 Building and installing the ARM7 toolchain
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 ==========================================
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 The current "official" GNU ARM toolchain for FreeCalypso consists of
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
38 binutils-2.21.1, gcc-4.5.4 and newlib-2.0.0 with a specific set of patches and
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 build configuration options. Build it as follows:
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 1. Download these 3 source tarballs for the standard GNU+newlib components:
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 binutils-2.21.1a.tar.bz2
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 gcc-core-4.5.4.tar.bz2
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 newlib-2.0.0.tar.gz
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 2. Run the build+install.sh script in the toolchain directory. Read the
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 comments in the script first for the usage instructions.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
50 The toolchain thus built will need to be in your PATH before you can compile
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 gsm-fw or target-utils.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 Please note: the toolchain that is prescribed for FreeCalypso as above is
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 *believed* to be equivalent to the one used by OsmocomBB, but there are no
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 guarantees. Use any other toolchain at your own risk.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 Compiling target-utils
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 ======================
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 Running 'make' in the target-utils tree with the ARM7 toolchain present in your
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 PATH will result in compalstage and loadagent being built; these are the two
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 components needed in order to use FreeCalypso loadtools. Run 'make install' to
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 install these target binaries in /usr/local/share/freecalypso, which is where
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 loadtools will look for them.
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 Run 'make all' in target-utils to build some other components that aren't
|
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 really needed.
|
864
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
68
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
69 Compiling FreeCalypso GSM firmware
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
70 ==================================
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
71
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
72 The firmware in our gsm-fw tree can be built in many different configurations,
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
73 hence there is no singular build for it. The configuration choices consist of:
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
74
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
75 * Which target device the firmware should be built for: the target device
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
76 selection is made at compile time; do not attempt to take a firmware image
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
77 built for one target device and flash or fc-xram it into another!
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
78
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
79 * What functionality is to be included. As the FreeCalypso firmware subproject
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
80 moves forward, we gradually add chunks of functionality, slowly approaching
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
81 what each target device is ultimately capable of. However, each time we add
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
82 a new piece of functionality, the ability to build a firmware image that works
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
83 like before, without the newly added functionality, still remains. Each
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
84 feature to be included needs to be explicitly selected.
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
85
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
86 * Miscellaneous configuration: which Calypso UART should be used for what,
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
87 should the firmware use a real FFS (flash file system) in flash or a fake one
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
88 in RAM, etc.
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
89
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
90 The GSM firmware build configuration is set by way of an editable text file
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
91 named build.conf; the configuration and build procedure is as follows:
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
92
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
93 1. Look at the available repertoire of standard configurations under
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
94 gsm-fw/configs and choose which one you would like to use, either as-is or
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
95 as a basis for your own;
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
96
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
97 2. Copy the configuration you selected to build.conf in the gsm-fw directory;
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
98
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
99 3. Optionally edit it to taste - the configuration language is Bourne shell;
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
100
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
101 4. Run 'make' in the gsm-fw directory.
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
102
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
103 Depending on the configuration, either a flashable or a RAM-loadable image will
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
104 be built by default. A flashable image will appear in finlink/flashImage.bin;
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
105 these images are meant to be programmed with fc-loadtool's flash program-bin
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
106 command; the starting flash address at which the image needs to be programmed
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
107 depends on the target device - see target-specific notes. A RAM-loadable image
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
108 will appear in finlink/ramImage.srec; these images are meant to be loaded and
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
109 run with the fc-xram utility.
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
110
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
111 It is possible to build either a flashable or a RAM-loadable image, or both,
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
112 without changing build.conf: run 'make flashImage' or 'make ramImage' as
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
113 desired. (The compilation of each module from source into a .o and all
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
114 intermediate linking steps are agnostic to whether a flashImage or a ramImage
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
115 is being built, only the very final link step differs.) Any otherwise working
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
116 configuration can be built into a flashImage, even if it makes no logical sense
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
117 to do so, but the ability to build a ramImage for a given configuration depends
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
118 on the code image size (which in turn depends on the selected feature set) and
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
119 the amount of RAM available on the target in question: most Calypso GSM devices
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
120 have small RAM, enough to satisfy a GSM firmware's data space requirements, but
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
121 not enough to hold the entire firmware code in RAM as well. Please see target-
|
4fa939eada22
documentation update: how to compile and flash experimental gsm-fw for gtamodem
Space Falcon <falcon@ivan.Harhan.ORG>
diff
changeset
|
122 specific notes for more details.
|