blob: 027ff0923afff9596ac862752fbba73d6a628571 (
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
|
#!/bin/bash
lora_1_5_h_hw="-LORA-1.5\$"
lora_2_1_hw="-LORA-2.1\$"
L15=/sbin/mts-fpga-loader-1_5
L21=/sbin/sem-fpga-loader
lora_hw=$(mts-io-sysfs show lora/hw-version 2> /dev/null)
if [[ $lora_hw =~ ${lora_1_5_h_hw} ]]; then
if [[ -x ${L15} ]] ; then
${L15} "$@"
else
echo "Is mts-id-eeprom installed properly?"
echo "Missing executable ${L15}"
fi
elif [[ $lora_hw =~ ${lora_2_1_hw} ]]; then
if [[ -x ${L21} ]] ; then
${L21} "$@"
else
echo "Is sem-fpga-loader installed properly?"
echo "Missing executable ${L21}"
fi
else
echo "Supported FPGA hardware not found. Exiting."
exit 1
fi
|