summaryrefslogtreecommitdiff
path: root/sgm775/settings_generator.sh
blob: 0469d5092ed35fcc9143a10acb2a3646459df430 (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
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
#!/bin/bash
# This script generate the settings.ini file used for GGA or GRM support

NORMAL_FONT="\e[0m"
RED_FONT="\e[31;1m"
GREEN_FONT="\e[32;1m"
YELLOW_FONT="\e[33;1m"

GGA_GRM_ENABLE="$1"
PATH_TO_SETTINGS_INI="$2"

# No path specified, use default ../..
if [[ -z $PATH_TO_SETTINGS_INI ]]; then
	PATH_TO_SETTINGS_INI="../..";
	echo -e "$RED_FONT File \"settings.ini\" will be stored into \"$PATH_TO_SETTINGS_INI/settings.ini\" (default)$NORMAL_FONT" >&2
fi

# Only create settings.ini for 'gga' and 'gpu' options
cat > $PATH_TO_SETTINGS_INI/settings.ini <<EOF
##
## AUTOGENERATED FILE. See `readlink -f $0` script ##
##

## Level of details in the log
#LogLevel 0	#   The Generic Graphics Accelerator issues no messages.
#LogLevel 1	#   The Generic Graphics Accelerator issues fatal messages.
#LogLevel 2	#   The Generic Graphics Accelerator issues error messages.
#LogLevel 3	#   The Generic Graphics Accelerator issues warning messages.
#LogLevel 6565	#   The Generic Graphics Accelerator issues information about the important stages of executing APIs.
#LogLevel 6566	#   The Generic Graphics Accelerator issues the names and parameters of each API that is called.
#LogLevel 6567	#   The Generic Graphics Accelerator issues detailed information for checking bugs in the Generic Graphics Accelerator.
LogLevel 1

# Enable error code checking
checkErrorCode 0

# Enable white list for error code checking
# Prerequisites: callOnTargetAPI 1 and checkErrorCode 1
# 0: Check error code for the whole set of EGL and GLES APIs
# 1: Check error code for APIs in the white list from checkerrcode.ini
enableErrorCheckWhiteList 0
EOF

if [ ${GGA_GRM_ENABLE,,} == "gpu" ]; then

cat >> $PATH_TO_SETTINGS_INI/settings.ini <<EOF

## Enabling GRM
advanced 1

##Set callOnTargeAPI to 1 to enable both GRM and GGA, and to 0 to enable GGA only.
##By default, it is 0. Set to '1' for GRM
# Call on-target driver API
callOnTargetAPI 1
EOF

fi