FreeCalypso > hg > freecalypso-sw
annotate doc/Compiling @ 502:cff42ff57c60
osx.c: osx_free_mem() done
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 01 Jul 2014 18:34:53 +0000 |
parents | aad742029813 |
children | 4fa939eada22 |
rev | line source |
---|---|
463
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
1 There are 3 parts to the complete FreeCalypso software suite which are built |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
2 independently of each other: |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
3 |
aad742029813
doc/Compiling: everything except gsm-fw
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 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
5 straightforward: there is a top level Makefile (named Makefile.hosttools if |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
6 you looking at a development source snapshot, will be renamed to just |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
7 Makefile in packaged releases of the host tools) that coordinates building |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
8 and installing all of them. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
9 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
10 * The gsm-fw tree, which will eventually become our main GSM firmware, needs to |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
11 be built with a GNU cross-compiler toolchain for ARM7. This firmware can be |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
12 built for several different target devices and with different feature |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
13 configurations, hence there is no singular build for it - it's more like the |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
14 Linux kernel in terms of its build configuration management. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
15 |
aad742029813
doc/Compiling: everything except gsm-fw
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 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
17 targets, but which are not part of gsm-fw; they are gathered in the |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
18 target-utils tree. They are built with the same GNU toolchain for ARM7 as |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
19 gsm-fw, but don't have any fancy configuration system. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
20 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
21 Building and installing FreeCalypso host tools |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
22 ============================================== |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
23 |
aad742029813
doc/Compiling: everything except gsm-fw
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 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
25 'make install' as root. If you are working with a development source snapshot, |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
26 do 'make -f Makefile.hosttools' instead. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
27 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
28 The "standard" install directories are /usr/local/bin for binaries and |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
29 /usr/local/share/freecalypso for helper files. If you need to change these |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
30 paths to something else, you'll need to edit a bunch of individual component |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
31 Makefiles, and possibly also some source files like loadtools/defpath.c - |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
32 sorry, FreeCalypso is not GNU and does not use autotools. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
33 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
34 Building and installing the ARM7 toolchain |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
35 ========================================== |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
36 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
37 The current "official" GNU ARM toolchain for FreeCalypso consists of |
aad742029813
doc/Compiling: everything except gsm-fw
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 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
39 build configuration options. Build it as follows: |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
40 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
41 1. Download these 3 source tarballs for the standard GNU+newlib components: |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
42 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
43 binutils-2.21.1a.tar.bz2 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
44 gcc-core-4.5.4.tar.bz2 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
45 newlib-2.0.0.tar.gz |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
46 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
47 2. Run the build+install.sh script in the toolchain directory. Read the |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
48 comments in the script first for the usage instructions. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
49 |
aad742029813
doc/Compiling: everything except gsm-fw
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 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
51 gsm-fw or target-utils. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
52 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
53 Please note: the toolchain that is prescribed for FreeCalypso as above is |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
54 *believed* to be equivalent to the one used by OsmocomBB, but there are no |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
55 guarantees. Use any other toolchain at your own risk. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
56 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
57 Compiling target-utils |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
58 ====================== |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
59 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
60 Running 'make' in the target-utils tree with the ARM7 toolchain present in your |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
61 PATH will result in compalstage and loadagent being built; these are the two |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
62 components needed in order to use FreeCalypso loadtools. Run 'make install' to |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
63 install these target binaries in /usr/local/share/freecalypso, which is where |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
64 loadtools will look for them. |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
65 |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
66 Run 'make all' in target-utils to build some other components that aren't |
aad742029813
doc/Compiling: everything except gsm-fw
Michael Spacefalcon <msokolov@ivan.Harhan.ORG>
parents:
diff
changeset
|
67 really needed. |