-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfigure
executable file
·156 lines (124 loc) · 2.38 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
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
#!/bin/sh
usage()
{
echo "usage: $0 [options]"
echo ""
echo "options:"
echo " --help, -h display help information and exit"
echo " --release build release version"
echo " --soc SOC build for the given SoC"
echo " (must be one of: tegra114, tegra124, tegra132)"
echo " --debug build debug version"
}
soc=tegra210
debug=yes
while test $# -gt 0; do
if test -n "$prev"; then
eval "$prev=$1"; prev=
shift; continue
fi
case $1 in
--help | -h)
usage $0
exit 0
;;
--release)
debug=no
shift
;;
--soc)
prev=soc
shift
;;
--debug)
debug=yes
shift
;;
*)
usage $0
exit 1
;;
esac
done
case $soc in
tegra114)
text_base=0x4000e000
;;
tegra124)
text_base=0x4000e000
;;
tegra132)
text_base=0x4000f000
;;
tegra210)
text_base=0x40010000
;;
*)
echo "unsupported SoC: $soc"
exit 1
;;
esac
exec 3> "config.mk"
if test "x$debug" = "xno"; then
echo "# CONFIG_DEBUG is not set" >&3
else
echo "CONFIG_DEBUG=y" >&3
fi
echo "CONFIG_MINILOADER=y" >&3
echo "CONFIG_TEXT_BASE=$text_base" >&3
if test "x$soc" != "xtegra114"; then
echo "# CONFIG_TEGRA114 is not set" >&3
else
echo "CONFIG_TEGRA114=y" >&3
fi
if test "x$soc" != "xtegra124"; then
echo "# CONFIG_TEGRA124 is not set" >&3
else
echo "CONFIG_TEGRA124=y" >&3
fi
if test "x$soc" != "xtegra132"; then
echo "# CONFIG_TEGRA132 is not set" >&3
else
echo "CONFIG_TEGRA132=y" >&3
fi
if test "x$soc" != "xtegra210"; then
echo "# CONFIG_TEGRA210 is not set" >&3
else
echo "CONFIG_TEGRA210=y" >&3
fi
exec 3>&-
exec 3> "config.h"
echo "#ifndef CONFIG_H" >&3
echo "#define CONFIG_H" >&3
echo "" >&3
echo "#define CONFIG_RELEASE \"2015.03-wip\"" >&3
if test "x$debug" = "xyes"; then
echo "#define CONFIG_DEBUG 1" >&3
else
echo "#undef CONFIG_DEBUG" >&3
fi
echo "#define CONFIG_MINILOADER 1" >&3
echo "#define CONFIG_TEXT_BASE $text_base" >&3
if test "x$soc" = "xtegra114"; then
echo "#define CONFIG_TEGRA114 1" >&3
else
echo "#undef CONFIG_TEGRA114" >&3
fi
if test "x$soc" = "xtegra124"; then
echo "#define CONFIG_TEGRA124 1" >&3
else
echo "#undef CONFIG_TEGRA124" >&3
fi
if test "x$soc" = "xtegra132"; then
echo "#define CONFIG_TEGRA132 1" >&3
else
echo "#undef CONFIG_TEGRA132" >&3
fi
if test "x$soc" = "xtegra210"; then
echo "#define CONFIG_TEGRA210 1" >&3
else
echo "#undef CONFIG_TEGRA210" >&3
fi
echo "" >&3
echo "#endif" >&3
exec 3>&-