-
Notifications
You must be signed in to change notification settings - Fork 0
/
acq2206.init
executable file
·78 lines (61 loc) · 2.3 KB
/
acq2206.init
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
#!/bin/sh
#/usr/local/bin/load.milo
#echo 0 > /sys/class/pwm/pwmchip0/export
echo +++ acq2206.init
/usr/local/bin/acq2206_init_gpio
# set a high default fan. can be overridden in acq400.sh
FANSPEED=75
[ -e /mnt/local/sysconfig/acq400.sh ] && source /mnt/local/sysconfig/acq400.sh
echo set.fanspeed $FANSPEED
set.fanspeed $FANSPEED
if [ $(cat /dev/gpio/MGT_PRESENT) -gt 0 ]; then
WRSPCL=$(ls -t /mnt/ACQ2106_TOP_*_WR*bit.gz 2>/dev/null | head -n 1)
if [ -z $WRSPCL ]; then
S7=C
elif [ -e $WRSPCL ] && echo $WRSPCL | grep -qv 9011; then
echo "acq2106.init WR personality NO COMMS" $WRSPCL
elif [ "x$WHITE_RABBIT" = "x1" ]; then
echo "acq2106.init DEPRECATED WHITE_RABBIT definition in acq400.sh, assume NO COMMS"
else
S7=C
fi
if [ -e /sys/bus/i2c/devices/8-0054/eeprom ]; then
I2CBUS=/sys/bus/i2c/devices/
mkdir -p /dev/sites/C
ln -s $I2CBUS/8-0054/eeprom /dev/sites/C
fru-dump-acq /dev/sites/C/eeprom >/dev/sites/C/details
source /dev/sites/C/details
case $FRU_PROD_NAME in
MGT483)
/usr/local/init/mgt483.init;;
MGT508)
echo +++ MGT508 detected;;
*)
echo "ERROR: unknown site C device detected. Maybe needs a FRU\?"
PS1=FIXME\> /bin/sh;;
esac
else
/usr/local/init/mgt.init
fi
fi
#FMC_SCAN_FPGA=ACQ2206 FMC_SCAN_SITES="1 2 3 4 5 6" COMMS_SITE="$S7" /usr/local/bin/fmc-scan
FMC_SCAN_FPGA=ACQ2[12]06 FMC_SCAN_SITES="1 2 3 4 5 6" COMMS_SITE="$S7" /usr/local/bin/fmc-scan
# /dev/gpio/LED/FPGA_DONE : present on d37 and later front panels
[ -e /dev/gpio/LED/FPGA_DONE ] && echo 1 > /dev/gpio/LED/FPGA_DONE
if [ -e /etc/acq400/C/MTYPE ] && [ "x$(cat /etc/acq400/C/MTYPE)" = "x90" ]; then
/usr/local/init/mgt483.init tx_enable
nice daemon /usr/local/bin/sfpmon
fi
ln -s /usr/local/bin/set.fpmux /etc/acq400/0/fpmux
ln -s /usr/local/bin/acq2106.mb_clk /etc/acq400/0/mb_clk
ln -s /usr/local/bin/set.si5326.bypass /etc/acq400/0/set_si5326_bypass
ln -s /usr/local/bin/si5326_step_phase /etc/acq400/0/
echo "0,0,0,0" > /dev/shm/si5326_step_state
ln -s /dev/shm/si5326_step_state /etc/acq400/0/
load.si5326 si5326_1-1_bypass.txt
#/usr/local/CARE/fix-leds
set.fpmux off
#if [ "x$FIX_LEDS_SLEEP" != "x" ]; then
# nice /usr/local/CARE/fix-leds-watcher $FIX_LEDS_SLEEP &
#fi
#