aboutsummaryrefslogtreecommitdiffstats
path: root/INSTALL
blob: a8abd875db8473c42a00a03f24ba15da0d2979fe (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
= Installing mgw_nat =

... is currently not _that_ simple, I'm working on it.

== Installation procedure (rebar) =

=== checking out mgw_nat ===

{{{
cd ~/osmo-erlang/
git clone git://git.osmocom.org/erlang/mgw_nat
}}}

=== getting + patching rebar ===

{{{
cd ~/osmo-erlang
hg clone https://bitbucket.org/basho/rebar
patch -p1 < ~/osmo-erlang/mgw_nat/rebar-asn1_set.diff
cd rebar
./bootstrap
cp rebar /usr/local/bin/
}}}

=== building mgw_nat and its dependencies ===

{{{
cd ~/osmo-erlang/mgw_nat
rebar get-deps
rebar compile
}}}
some error will occur regarding src/tcap_map_patch.erl due to missing map.hrl file
{{{
mv deps/osmo_map/src/map.hrl deps/osmo_map/include/
rebar compile
}}}

== Installation procedure (manual) ==

=== Dependencies ===

let's assume we create a new base directory directory {{{~/osmo-erlang}}} for all
the Osmocom related Erlang code.

As such, we need to set the {{{ERL_LIBS}}} variable to include this directory, e.g.
by using {{{export ERL_LIBS=~/osmo-erlang/}}} in the shell.

==== osmo_ss7 ====

{{{
cd ~/osmo-erlang/
git clone git://git.osmocom.org/erlang/osmo_ss7
cd osmo_ss7
erl -make
}}}


==== osmo_map ====

{{{
cd ~/osmo-erlang/
git clone git://git.osmocom.org/erlang/osmo_map
cd osmo_map
erl -make
}}}

=== mgw_nat ===

{{{
cd ~/osmo-erlang/
git clone git://git.osmocom.org/erlang/mgw_nat
cd mgw_nat
erl -make
}}}

== Configuration file ==

You have to write the config file using the standard Erlang OTP application
configuration file syntax and store it in e.g. {{{~/osmo-erlang/local.cfg}}}

== Starting the VM / Application ==

* Make sure ERL_LIBS is set (see above)
{{{
cd ~/osmo-erlang/
erl -config ./local.cfg
}}}

Inside the VM, you can then type
{{{
application:start(mgw_nat).
}}}
in order to start the application.