summaryrefslogtreecommitdiff
path: root/cleopatre/userfs/image/scripts/startplc
blob: 0aa9771a1f31a12a7917a705717e19c87333b604 (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
#!/bin/sh

# This file is used to to start the prototype with cesar and plcdrv

#Variables
plc_module="plcdrv.ko"
leon_file=$1
shift

if [ "$leon_file" = "" ]
then
    echo "You need to precise the Cesar binary file"
    exit 1
fi

#Download Cesar binary
/root/scripts/download $leon_file
/root/scripts/download $plc_module

#Insert plcdrv module
/root/scripts/plcdrv $*

#Copy Cesar binary into Memory
dd if=$leon_file of=/dev/plcdrv

#Open plc0 interface and added to the bridge
/sbin/ifconfig plc0 0.0.0.0
brctl addif br0 plc0