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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
#!/bin/bash
#
# Installer script for the ubuntu live system offered by GNURadio
# * ODR-mmbTools:
# * ODR-DabMux
# * ODR-DabMod
# * auxiliary scripts
# * the FDK-AAC library with DAB+ patch
# * ODR-AudioEnc
# * ODR-PadEnc
#
#
# Requires: sudo, UHD already installed, with all -dev packages too for
# boost and zeromq and maybe others
RED="\e[91m"
GREEN="\e[92m"
NORMAL="\e[0m"
echo
echo "This is the mmbTools installer script for the GNURadio live system"
echo "=================================================================="
echo
echo "It will install ODR-DabMux, ODR-DabMod, ODR-AudioEnc, ODR-PadEnc"
echo "and all prerequisites to your machine."
echo -e $RED
echo "This program will use sudo to install components on your"
echo "system. Please read the script before you execute it, to"
echo "understand what changes it will do to your system !"
echo
echo "There is no undo functionality here !"
echo -e $NORMAL
if [ "$UID" == "0" ]
then
echo -e $RED
echo "Do not run this script as root !"
echo -e $NORMAL
echo "Install sudo, and run this script as a normal user."
exit 1
fi
which sudo
if [ "$?" == "0" ]
then
echo "Press Ctrl-C to abort installation"
echo "or Enter to proceed"
read
else
echo -e $RED
echo -e "Please install sudo first $NORMAL using"
echo " apt-get -y install sudo"
exit 1
fi
# Fail on error
set -e
if [ -d dab ]
then
echo -e $RED
echo "ERROR: The dab directory already exists."
echo -e $NORMAL
echo "This script assumes a fresh initialisation,"
echo "if you have already run it and wish to update"
echo "the existing installation, please do it manually"
echo "or erase the dab folder first."
exit 1
fi
echo -e "$GREEN Updating ubuntu package repositories $NORMAL"
sudo apt-get -y --force-yes update
echo -e "$GREEN Installing essential prerquisites $NORMAL"
# some essential and less essential prerequisistes
sudo apt-get -y --force-yes install build-essential git wget \
sox alsa-tools alsa-utils \
automake libtool mpg123 \
libasound2 libasound2-dev \
libjack-jackd2-dev jackd2 \
ncdu vim ntp links cpufrequtils \
libfftw3-dev \
libmagickwand-dev \
libvlc-dev vlc-nox \
libfaad2 libfaad-dev
# since this is the GNURadio live-CD, most UHD and related dependencies (boost,
# cmake, zeromq and a lot more) are already installed
# stuff to install from source
mkdir dab || exit
cd dab || exit
echo -e "$GREEN Installing KA9Q libfec $NORMAL"
git clone https://github.com/Opendigitalradio/ka9q-fec.git
pushd ka9q-fec
./bootstrap
./configure
make
sudo make install
popd
echo
echo -e "$GREEN PREREQUISITES INSTALLED $NORMAL"
### END OF PREREQUISITES
echo -e "$GREEN Fetching mmbtools-aux $NORMAL"
git clone https://github.com/mpbraendli/mmbtools-aux.git
echo -e "$GREEN Fetching etisnoop $NORMAL"
git clone https://github.com/Opendigitalradio/etisnoop.git
pushd etisnoop
./bootstrap.sh
./configure
make
sudo make install
popd
echo -e "$GREEN Compiling ODR-DabMux $NORMAL"
git clone https://github.com/Opendigitalradio/ODR-DabMux.git
pushd ODR-DabMux
./bootstrap.sh
./configure --enable-input-zeromq --enable-output-zeromq
make
sudo make install
popd
echo -e "$GREEN Compiling ODR-DabMod $NORMAL"
git clone https://github.com/Opendigitalradio/ODR-DabMod.git
pushd ODR-DabMod
./bootstrap.sh
./configure --enable-zeromq --enable-fft-simd
make
sudo make install
popd
echo -e "$GREEN Compiling fdk-aac library $NORMAL"
git clone https://github.com/Opendigitalradio/fdk-aac.git
pushd fdk-aac
./bootstrap
./configure
make
sudo make install
popd
echo -e "$GREEN Updating ld cache $NORMAL"
# update ld cache
sudo ldconfig
echo -e "$GREEN Compiling ODR-AudioEnc $NORMAL"
git clone https://github.com/Opendigitalradio/ODR-AudioEnc.git
pushd ODR-AudioEnc
./bootstrap
./configure --enable-jack --enable-vlc
make
sudo make install
popd
echo -e "$GREEN Compiling ODR-PadEnc $NORMAL"
git clone https://github.com/Opendigitalradio/ODR-PadEnc.git
pushd ODR-PadEnc
./bootstrap
./configure --enable-jack --enable-vlc
make
sudo make install
popd
echo -e "$GREEN Done installing all tools $NORMAL"
echo -e "All the tools have been dowloaded to the dab/ folder,"
echo -e "compiled and installed to /usr/local"
echo
echo -e "The stable versions have been compiled, i.e. the latest"
echo -e "'master' branch from the git repositories"
echo
echo -e "If you know there is a new release, and you want to update,"
echo -e "you have to go to the folder containing the tool, pull"
echo -e "the latest changes from the repository and recompile"
echo -e "it manually."
echo
echo -e "To pull the latest changes for ODR-DabMux, use:"
echo -e " cd ~/dab/ODR-DabMux"
echo -e " git pull"
echo -e " ./bootstrap.sh"
echo -e " ./configure --enable-input-zeromq --enable-output-zeromq"
echo -e " make"
echo -e " sudo make install"
echo
echo -e "This example should give you the idea. For the options"
echo -e "for compiling the other tools, please see in the gnuradio-livecd.sh"
echo -e "script what options are used. Please also read the README"
echo -e "and INSTALL files in the repositories."
|