-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathconfigure
executable file
·46 lines (39 loc) · 1.05 KB
/
configure
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
#! /bin/bash
# Get the path of this script (works even if this script is sourced and not
# executed, but won't work with symlink)
SCRIPT_PATH=$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd )
if [ "$1" != "" ]
then
CONFIG_CHIP=$1
else
CONFIG_CHIP="es3tsb"
fi
echo "Configuring for chip "${CONFIG_CHIP}
DEFCONFIG=${SCRIPT_PATH}/chips/${CONFIG_CHIP}/defconfig
if test ! -f ${DEFCONFIG}
then
echo "ERROR - invalid chip name \""${CONFIG_CHIP}"\" to be configured"
echo "Valid chip names currently supported are:"
for chip in `ls ${SCRIPT_PATH}/chips/`
do
if test -f ${SCRIPT_PATH}/chips/${chip}/defconfig
then
echo " ${chip}"
fi
done
exit 1
fi
cp ${DEFCONFIG} ${SCRIPT_PATH}/.config
# Echo Vendor/Product ids to .config, used only for es2
if [ "$2" != "" ]; then
BOOTROM_MODULE_VID=$2
else
BOOTROM_MODULE_VID=0
fi
if [ "$3" != "" ]; then
BOOTROM_MODULE_PID=$3
else
BOOTROM_MODULE_PID=0
fi
echo "CONFIG_BOOTROM_MODULE_VID=$BOOTROM_MODULE_VID" >> ${SCRIPT_PATH}/.config
echo "CONFIG_BOOTROM_MODULE_PID=$BOOTROM_MODULE_PID" >> ${SCRIPT_PATH}/.config