-
Notifications
You must be signed in to change notification settings - Fork 51
/
configure.sh
executable file
·65 lines (51 loc) · 998 Bytes
/
configure.sh
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
#! /bin/bash
conf_file=.config
echo "*"
echo "* XRADIO SDK Configuration"
echo "*"
# chip selection
choice_ok=0
echo "Chip"
echo " 1. XR872"
echo " 2. XR808"
echo -n "choice[1-2]: "
read choice
if [[ $choice == 1 ]]; then
echo "__CONFIG_CHIP_TYPE ?= xr872" > $conf_file
choice_ok=1
fi
if [[ $choice == 2 ]]; then
echo "__CONFIG_CHIP_TYPE ?= xr808" > $conf_file
choice_ok=1
fi
if [[ $choice_ok == 0 ]]; then
echo "ERROR: Invalid choice!"
exit
fi
# HOSC selection
choice_ok=0
echo ""
echo "External high speed crystal oscillator"
echo " 1. 24M"
echo " 2. 26M"
echo " 3. 40M"
echo -n "choice[1-3]: "
read choice
if [[ $choice == 1 ]]; then
echo "__CONFIG_HOSC_TYPE ?= 24" >> $conf_file
choice_ok=1
fi
if [[ $choice == 2 ]]; then
echo "__CONFIG_HOSC_TYPE ?= 26" >> $conf_file
choice_ok=1
fi
if [[ $choice == 3 ]]; then
echo "__CONFIG_HOSC_TYPE ?= 40" >> $conf_file
choice_ok=1
fi
if [[ $choice_ok == 0 ]]; then
echo "ERROR: Invalid choice!"
rm $conf_file
exit
fi
exit