-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·59 lines (49 loc) · 1.44 KB
/
install
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
#!/bin/bash
THIS=$( cd "$( dirname "$0" )" && pwd )
usage()
{
echo "emma-node install"
echo "install DESTINATION"
echo " DESTINATION: The location of a Contiki directory (David Kopf branch)"
}
if [ ! -d "$1" ]; then
usage
exit
else
DEST="$1"
fi
echo -e "Contiki installation"
echo -e "===================="
cp -R $THIS/dep/* $DEST/
echo -e ""
# Patch Contiki OS
echo -e "Contiki patching"
echo -e "================"
patch -p2 --directory=$DEST --input=$THIS/patch/patch-slip-raven.diff
echo -e "STARTED"
patch -p1 --directory=$DEST --input=$THIS/patch/patch_erbium.diff
echo -e "ENDED"
patch -p2 --directory=$DEST --input=$THIS/patch/raven-main_patch.diff
patch -p2 --directory=$DEST --input=$THIS/patch/border-router_patch.diff
patch -p2 --directory=$DEST --input=$THIS/patch/patch-slip-activate-control-overrun.diff
# Temporary CFS patch
patch -p2 --directory=$DEST --input=$THIS/patch/cfs_patch.diff
echo -e ""
# Copy EMMA application and example
echo -e "emma-node installation"
echo -e "======================"
cp -r $THIS/src/apps/emma-node $DEST/apps/
cp -r $THIS/src/examples/emma-node-example $DEST/examples/
cp $THIS/network.sh $DEST/../
echo -e ""
# Copy EMMA documentation
echo -e "doc installation"
echo -e "================"
cp -r $THIS/doc $DEST/../
echo -e ""
# Install compilator toolchain
echo -e "Package installation"
echo -e "===================="
sudo apt-get install gcc-avr avr-libc avrdude
echo -e ""
echo "Done."