Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 469 lines (395 sloc) 16.063 kb
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
1 #!/bin/bash
2
3 # Original script done by Don Darling
4 # Later changes by Koen Kooi and Brijesh Singh
5
6 # Revision history:
7 # 20090902: download from twice
8 # 20090903: Weakly assign MACHINE and DISTRO
9 # 20090904: * Don't recreate local.conf is it already exists
10 # * Pass 'unknown' machines to OE directly
11 # 20090918: Fix /bin/env location
12 # Don't pass MACHINE via env if it's not set
13 # Changed 'build' to 'bitbake' to prepare people for non-scripted usage
14 # Print bitbake command it executes
15 # 20091012: Add argument to accept commit id.
16 # 20091202: Fix proxy setup
7de547c @koenkooi oebb: don't generate mirror tarballs by default
koenkooi authored
17 #
18 # For further changes consult 'git log' or browse to:
19 # http://gitorious.org/angstrom/angstrom-setup-scripts/commits
20 # to see the latest revision history
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
21
1f3cc14 @koenkooi oebb: move to release tag
koenkooi authored
22 # Use this till we get a maintenance branch based of the release tag
23
24 OE_COMMIT_ID="release-2011.03"
25
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
26 ###############################################################################
27 # User specific vars like proxy servers
28 ###############################################################################
29
30 #PROXYHOST=wwwgate.ti.com
31 #PROXYPORT=80
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
32 PROXYHOST=""
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
33
34 ###############################################################################
35 # OE_BASE - The root directory for all OE sources and development.
36 ###############################################################################
37 OE_BASE=${PWD}
38
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
39 #--------------------------------------------------------------------------
40 # Check if this script was cloned from http://gitorious.org/angstrom/angstrom-setup-scripts or not
41 #--------------------------------------------------------------------------
42
43 if [ -e ${OE_BASE}/.gitmodules ] ; then
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
44 USE_SUBMODULES="sort-of-true"
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
45 fi
46
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
47 ###############################################################################
48 # SET_ENVIRONMENT() - Setup environment variables for OE development
49 ###############################################################################
50 function set_environment()
51 {
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
52
53 #--------------------------------------------------------------------------
54 # If an env already exists, use it, otherwise generate it
55 #--------------------------------------------------------------------------
56 if [ -e ~/.oe/environment ] ; then
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
57 . ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
58 else
59
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
60 mkdir -p ~/.oe/
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
61
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
62 #--------------------------------------------------------------------------
63 # Specify distribution information
64 #--------------------------------------------------------------------------
65 DISTRO="angstrom-2008.1"
66 DISTRO_DIRNAME=`echo $DISTRO | sed s#[.-]#_#g`
67
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
68 echo "export DISTRO=\"${DISTRO}\"" > ~/.oe/environment
69 echo "export DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >> ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
70
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
71 #--------------------------------------------------------------------------
72 # Specify the root directory for your OpenEmbedded development
73 #--------------------------------------------------------------------------
74 OE_BUILD_DIR=${OE_BASE}/build
75 OE_BUILD_TMPDIR="${OE_BUILD_DIR}/tmp-${DISTRO_DIRNAME}"
76 OE_SOURCE_DIR=${OE_BASE}/sources
448286d @koenkooi oebb: add some missing vars to environment script, reported by Gregg Leb...
koenkooi authored
77
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
78 mkdir -p ${OE_BUILD_DIR}
79 mkdir -p ${OE_SOURCE_DIR}
80 export OE_BASE
81
448286d @koenkooi oebb: add some missing vars to environment script, reported by Gregg Leb...
koenkooi authored
82 echo "export OE_BUILD_DIR=\"${OE_BUILD_DIR}\"" >> ~/.oe/environment
83 echo "export OE_BUILD_TMPDIR=\"${OE_BUILD_TMPDIR}\"" >> ~/.oe/environment
84 echo "export OE_SOURCE_DIR=\"${OE_SOURCE_DIR}\"" >> ~/.oe/environment
85
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
86 echo "export OE_BASE=\"${OE_BASE}\"" >> ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
87
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
88 #--------------------------------------------------------------------------
89 # Include up-to-date bitbake in our PATH.
90 #--------------------------------------------------------------------------
91 export PATH=${OE_SOURCE_DIR}/bitbake/bin:${PATH}
92
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
93 echo "export PATH=\"${PATH}\"" >> ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
94
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
95 #--------------------------------------------------------------------------
96 # Make sure Bitbake doesn't filter out the following variables from our
97 # environment.
98 #--------------------------------------------------------------------------
5ace684 @koenkooi oebb: add more vars to whitelist
koenkooi authored
99 export BB_ENV_EXTRAWHITE="MACHINE DISTRO GIT_PROXY_COMMAND ANGSTROMLIBC http_proxy ftp_proxy https_proxy all_proxy ALL_PROXY no_proxy SSH_AGENT_PID SSH_AUTH_SOCK BB_SRCREV_POLICY SDKMACHINE BB_NUMBER_THREADS"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
100
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
101 echo "export BB_ENV_EXTRAWHITE=\"${BB_ENV_EXTRAWHITE}\"" >> ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
102
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
103 #--------------------------------------------------------------------------
104 # Specify proxy information
105 #--------------------------------------------------------------------------
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
106 if [ "x$PROXYHOST" != "x" ] ; then
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
107 export http_proxy=http://${PROXYHOST}:${PROXYPORT}/
108 export ftp_proxy=http://${PROXYHOST}:${PROXYPORT}/
109
110 export SVN_CONFIG_DIR=${OE_BUILD_DIR}/subversion_config
111 export GIT_CONFIG_DIR=${OE_BUILD_DIR}/git_config
112
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
113 echo "export http_proxy=\"${http_proxy}\"" >> ~/.oe/environment
114 echo "export ftp_proxy=\"${ftp_proxy}\"" >> ~/.oe/environment
115 echo "export SVN_CONFIG_DIR=\"${SVN_CONFIG_DIR}\"" >> ~/.oe/environment
116 echo "export GIT_CONFIG_DIR=\"${GIT_CONFIG_DIR}\"" >> ~/.oe/environment
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
117
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
118 config_svn_proxy
119 config_git_proxy
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
120 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
121
122 #--------------------------------------------------------------------------
123 # Set up the bitbake path to find the OpenEmbedded recipes.
124 #--------------------------------------------------------------------------
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
125 export BBPATH=${OE_BUILD_DIR}:${OE_SOURCE_DIR}/openembedded${BBPATH_EXTRA}
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
126
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
127 echo "export BBPATH=\"${BBPATH}\"" >> ~/.oe/environment
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
128
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
129 #--------------------------------------------------------------------------
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
130 # Reconfigure dash
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
131 #--------------------------------------------------------------------------
0ed3d15 @koenkooi oebb.sh: fix autorun logic
koenkooi authored
132 if [ "$(readlink /bin/sh)" = "dash" ] ; then
08a30b2 @jadonk Eliminate dash deconfiguration prompt using expect
jadonk authored
133 sudo aptitude install expect -y
134 expect -c 'spawn sudo dpkg-reconfigure -freadline dash; send "n\n"; interact;'
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
135 fi
8f98636 @koenkooi oebb: add usage note for ~/.oe/environment
koenkooi authored
136
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
137 echo "There now is a sourceable script in ~/.oe/enviroment. You can do '. ~/.oe/environment' and run 'bitbake something' without using $0 as wrapper"
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
138 fi # if -e ~/.oe/environment
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
139 }
140
141
142 ###############################################################################
143 # UPDATE_ALL() - Make sure everything is up to date
144 ###############################################################################
145 function update_all()
146 {
147 set_environment
148 update_bitbake
149 update_oe
150 }
151
be08896 @koenkooi oebb: add clean command
koenkooi authored
152 ###############################################################################
153 # CLEAN_OE() - Delete TMPDIR
154 ###############################################################################
155 function clean_oe()
156 {
157 set_environment
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
158 echo "Cleaning ${OE_BUILD_TMPDIR}"
159 rm -rf ${OE_BUILD_TMPDIR}
be08896 @koenkooi oebb: add clean command
koenkooi authored
160 }
161
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
162
163 ###############################################################################
164 # OE_BUILD() - Build an OE package or image
165 ###############################################################################
166 function oe_build()
167 {
1631d04 @koenkooi oebb.sh: if MACHINE is set in env on first invocation autorun the config...
koenkooi authored
168 if [ ! -e ${OE_BUILD_DIR}/conf/local.conf ] ; then
169 if [ -z $MACHINE ] ; then
170 echo "No config found, please run $0 config <machine> first"
171 else
172 CL_MACHINE=$MACHINE
0ed3d15 @koenkooi oebb.sh: fix autorun logic
koenkooi authored
173 set_environment
1631d04 @koenkooi oebb.sh: if MACHINE is set in env on first invocation autorun the config...
koenkooi authored
174 config_oe && update_all
175 fi
176 fi
177
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
178 set_environment
8161238 @koenkooi oebb: improve messaging to user
koenkooi authored
179 if [ -e ~/.oe/environment ] ; then
180 echo "Using ~/.oe/environment to setup needed variables. It is recommended to do '. ~/.oe/environment' and run 'bitbake something' without using $0 as wrapper"
181 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
182 cd ${OE_BUILD_DIR}
183 if [ -z $MACHINE ] ; then
184 echo "Executing: bitbake" $*
185 bitbake $*
186 else
187 echo "Executing: MACHINE=${MACHINE} bitbake" $*
188 MACHINE=${MACHINE} bitbake $*
189 fi
190 }
191
192
193 ###############################################################################
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
194 # OE_CONFIG() - Configure OE for a target
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
195 ###############################################################################
196 function oe_config()
197 {
198 set_environment
199 config_oe
1631d04 @koenkooi oebb.sh: if MACHINE is set in env on first invocation autorun the config...
koenkooi authored
200 update_all
c7b71f4 @koenkooi oebb: be more verbose about ~/oe/.environment and report when config is ...
koenkooi authored
201
202 echo ""
d9bdbe2 @koenkooi oebb: replace all tabs with 4 spaces for consistency
koenkooi authored
203 echo "Setup for ${CL_MACHINE} completed"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
204 }
205
206
207 ###############################################################################
208 # UPDATE_BITBAKE() - Update Bitbake distribution
209 ###############################################################################
210 function update_bitbake()
211 {
6a43974 @koenkooi oebb: generate sourceable env file
koenkooi authored
212 if [ "x$PROXYHOST" != "x" ] ; then
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
213 config_git_proxy
214 fi
215
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
216 if [ "USE_SUBMODULES" = "true" ] ; then
37fa7b8 @koenkooi oebb: fix non-submodule usage on old git versions
koenkooi authored
217 echo "Updating bitbake submodule"
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
218 git submodule update --init ${OE_SOURCE_DIR}/bitbake
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
219 else
37fa7b8 @koenkooi oebb: fix non-submodule usage on old git versions
koenkooi authored
220 if [ ! -d ${OE_SOURCE_DIR}/bitbake/bin ]; then
221 rm -rf ${OE_SOURCE_DIR}/bitbake
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
222 echo Checking out bitbake
223 git clone git://git.openembedded.org/bitbake ${OE_SOURCE_DIR}/bitbake
278d8fc @koenkooi oebb: use bitbake 1.12
koenkooi authored
224 cd ${OE_SOURCE_DIR}/bitbake && git checkout -b 1.12 origin/1.12
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
225 else
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
226 echo "Updating bitbake"
8161238 @koenkooi oebb: improve messaging to user
koenkooi authored
227 echo "Executing: cd ${OE_SOURCE_DIR}/bitbake && git pull --rebase"
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
228 cd ${OE_SOURCE_DIR}/bitbake && git pull --rebase
229 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
230 fi
231 }
232
233
234 ###############################################################################
235 # UPDATE_OE() - Update OpenEmbedded distribution.
236 ###############################################################################
237 function update_oe()
238 {
e4d6fb8 oebb: protect call to git_proxy setup as well
Gregg Lebovitz authored
239 if [ "x$PROXYHOST" != "x" ] ; then
240 config_git_proxy
241 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
242
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
243 if [ "USE_SUBMODULES" = "true" ] ; then
37fa7b8 @koenkooi oebb: fix non-submodule usage on old git versions
koenkooi authored
244 echo "Updating OE submodule"
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
245 git submodule update --init ${OE_SOURCE_DIR}/openembedded
246 else
37fa7b8 @koenkooi oebb: fix non-submodule usage on old git versions
koenkooi authored
247 if [ ! -d ${OE_SOURCE_DIR}/openembedded/conf ]; then
248 rm -rf ${OE_SOURCE_DIR}/openembedded/
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
249 echo Checking out OpenEmbedded
250 git clone "git://git.openembedded.org/openembedded" ${OE_SOURCE_DIR}/openembedded
251 cd ${OE_SOURCE_DIR}/openembedded
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
252 if [ ! -r ${OE_COMMIT_ID} ];
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
253 then
254 echo "Checkout commit id: ${OE_COMMIT_ID}"
255 git checkout -b install ${OE_COMMIT_ID}
256 else
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
257 echo "Checking out OE, depending on your git version you might get a harmless, what git alarmingly calls 'fatal' error. It just means the branch already exists."
1f3cc14 @koenkooi oebb: move to release tag
koenkooi authored
258 git checkout -b angstrom origin/org.openembedded.dev || true
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
259 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
260 else
f6f42a1 @koenkooi oebb: add infrastructure for using git submodules, disabled for now
koenkooi authored
261 echo Updating OpenEmbedded
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
262 cd ${OE_SOURCE_DIR}/openembedded
263 if [ ! -r ${OE_COMMIT_ID} ];
264 then
265 echo "Checkout commit id: ${OE_COMMIT_ID}"
f593f1c @jadonk oebb.sh: fixed remote name
jadonk authored
266 git remote update origin
267 git checkout ${OE_COMMIT_ID}
268 git checkout -b install
00a0c9e @jadonk Utilize commit ID in updates
jadonk authored
269 else
270 echo "Executing: git pull --rebase"
271 git pull --rebase
272 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
273 fi
274 fi
275 }
276
277
278 ###############################################################################
279 # CONFIG_OE() - Configure OpenEmbedded
280 ###############################################################################
281 function config_oe()
282 {
283 #--------------------------------------------------------------------------
284 # Determine the proper machine name
285 #--------------------------------------------------------------------------
286 case ${CL_MACHINE} in
ab79e04 @jadonk Added aliases for the proper board names.
jadonk authored
287 beagle|beagleboard)
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
288 MACHINE="beagleboard"
289 ;;
ab79e04 @jadonk Added aliases for the proper board names.
jadonk authored
290 dm6446evm|davinci-evm)
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
291 MACHINE="davinci-dvevm"
292 ;;
293 omap3evm)
294 MACHINE="omap3evm"
295 ;;
ab79e04 @jadonk Added aliases for the proper board names.
jadonk authored
296 shiva|omap3517-evm)
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
297 MACHINE="omap3517-evm"
298 ;;
299 *)
300 echo "Unknown machine ${CL_MACHINE}, passing it to OE directly"
301 MACHINE="${CL_MACHINE}"
302 ;;
303 esac
304
305 #--------------------------------------------------------------------------
306 # Write out the OE bitbake configuration file.
307 #--------------------------------------------------------------------------
308 mkdir -p ${OE_BUILD_DIR}/conf
309
f8ca6dd @ceyusa oebb: add bblayers.conf
ceyusa authored
310 if [ ! -e ${OE_BUILD_DIR}/conf/bblayers.conf ]; then
311 cat > ${OE_BUILD_DIR}/conf/bblayers.conf <<_EOF
312 # LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
313 # changes incompatibly
314 LCONF_VERSION = "1"
315
316 BBFILES ?= ""
3cb4cab @koenkooi oebb.sh: remote marmita reference for the time being and add some more i...
koenkooi authored
317
318 # Add your overlay location to BBLAYERS
319 # Make sure to have a conf/layers.conf in there
7641f69 @ceyusa oebb.sh: cosmetic the bblayers.conf output
ceyusa authored
320 BBLAYERS = " \\
321 ${OE_SOURCE_DIR}/openembedded \\
f8ca6dd @ceyusa oebb: add bblayers.conf
ceyusa authored
322 "
323 _EOF
324 fi
325
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
326 # There's no need to rewrite local.conf when changing MACHINE
327 if [ ! -e ${OE_BUILD_DIR}/conf/local.conf ]; then
328 cat > ${OE_BUILD_DIR}/conf/local.conf <<_EOF
329 # Where to store sources
82cd3ba @koenkooi oebb: put downloaded sources in sources/ instead of build/
koenkooi authored
330 DL_DIR = "${OE_SOURCE_DIR}/downloads"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
331
332 INHERIT += "rm_work"
333
334 # Which files do we want to parse:
74aa70b @koenkooi oebb: fix build when bblayers.conf isn't found
koenkooi authored
335 BBFILES ?= "${OE_SOURCE_DIR}/openembedded/recipes/*/*.bb"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
336 BBMASK = ""
337
abdd489 @koenkooi oebb: disable localegen for users
koenkooi authored
338 # Qemu 0.12.x is giving too much problems recently (2010.05), so disable it for users
339 ENABLE_BINARY_LOCALE_GENERATION = "0"
340
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
341 # What kind of images do we want?
342 IMAGE_FSTYPES += "tar.bz2"
343
dea6d19 @koenkooi oebb: clean up variables and local.conf
koenkooi authored
344 # Make use of SMP:
345 # PARALLEL_MAKE specifies how many concurrent compiler threads are spawned per bitbake process
346 # BB_NUMBER_THREADS specifies how many concurrent bitbake tasks will be run
347 #PARALLEL_MAKE = "-j2"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
348 BB_NUMBER_THREADS = "2"
349
350 DISTRO = "${DISTRO}"
351 MACHINE ?= "${MACHINE}"
352
353 # Set TMPDIR instead of defaulting it to $pwd/tmp
354 TMPDIR = "${OE_BUILD_TMPDIR}"
355
7de547c @koenkooi oebb: don't generate mirror tarballs by default
koenkooi authored
356 # Don't generate the mirror tarball for SCM repos, the snapshot is enough
357 BB_GENERATE_MIRROR_TARBALLS = "0"
358
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
359 # Go through the Firewall
360 #HTTP_PROXY = "http://${PROXYHOST}:${PROXYPORT}/"
361
362 _EOF
363 fi
364 }
365
366 ###############################################################################
367 # CONFIG_SVN_PROXY() - Configure subversion proxy information
368 ###############################################################################
369 function config_svn_proxy()
370 {
371 if [ ! -f ${SVN_CONFIG_DIR}/servers ]
372 then
373 mkdir -p ${SVN_CONFIG_DIR}
374 cat >> ${SVN_CONFIG_DIR}/servers <<_EOF
375 [global]
376 http-proxy-host = ${PROXYHOST}
377 http-proxy-port = ${PROXYPORT}
378 _EOF
379 fi
380 }
381
382
383 ###############################################################################
384 # CONFIG_GIT_PROXY() - Configure GIT proxy information
385 ###############################################################################
386 function config_git_proxy()
387 {
388 if [ ! -f ${GIT_CONFIG_DIR}/git-proxy.sh ]
389 then
390 mkdir -p ${GIT_CONFIG_DIR}
391 cat > ${GIT_CONFIG_DIR}/git-proxy.sh <<_EOF
392 if [ -x /bin/env ] ; then
393 exec /bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*
394 else
395 exec /usr/bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*
396 fi
397 _EOF
398 chmod +x ${GIT_CONFIG_DIR}/git-proxy.sh
89b0519 @koenkooi oebb: fix git_config logic to not always append to ~/.oe/environement
koenkooi authored
399 export GIT_PROXY_COMMAND=${GIT_CONFIG_DIR}/git-proxy.sh
400 echo "export GIT_PROXY_COMMAND=\"\${GIT_CONFIG_DIR}/git-proxy.sh\"" >> ~/.oe/environment
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
401 fi
402 }
403
404
405 ###############################################################################
406 # Build the specified OE packages or images.
407 ###############################################################################
be08896 @koenkooi oebb: add clean command
koenkooi authored
408
409 # FIXME: convert to case/esac
410
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
411 if [ $# -gt 0 ]
412 then
413 if [ $1 = "update" ]
414 then
415 shift
416 if [ ! -r $1 ]; then
417 if [ $1 == "commit" ]
418 then
419 shift
dea6d19 @koenkooi oebb: clean up variables and local.conf
koenkooi authored
420 OE_COMMIT_ID=$1
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
421 fi
422 fi
423 update_all
424 exit 0
425 fi
426
427 if [ $1 = "bitbake" ]
428 then
429 shift
430 oe_build $*
431 exit 0
432 fi
433
434 if [ $1 = "config" ]
435 then
436 shift
437 CL_MACHINE=$1
438 shift
439 oe_config $*
440 exit 0
441 fi
be08896 @koenkooi oebb: add clean command
koenkooi authored
442
443 if [ $1 = "clean" ]
444 then
445 clean_oe
446 exit 0
447 fi
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
448 fi
449
450 # Help Screen
451 echo ""
452 echo "Usage: $0 config <machine>"
453 echo " $0 update"
3d83b2d @koenkooi oebb: update usage output
koenkooi authored
454 echo ""
455 echo " Not recommended, but also possible:"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
456 echo " $0 bitbake <bitbake target>"
3d83b2d @koenkooi oebb: update usage output
koenkooi authored
457 echo " It is recommended to do '. ~/.oe/environment' and run 'bitbake something' without using oebb.sh as wrapper"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
458 echo ""
459 echo "You must invoke \"$0 config <machine>\" and then \"$0 update\" prior"
460 echo "to your first bitbake command"
461 echo ""
462 echo "The <machine> argument can be one of the following"
ab79e04 @jadonk Added aliases for the proper board names.
jadonk authored
463 echo " beagleboard: BeagleBoard"
464 echo " davinci-evm: DM6446 EVM"
465 echo " omap3evm: OMAP35x EVM"
dea6d19 @koenkooi oebb: clean up variables and local.conf
koenkooi authored
466 echo " am3517-evm: AM3517 (Shiva) EVM"
f984361 @koenkooi Add first setup script, imported from TI wiki
koenkooi authored
467 echo ""
468 echo "Other machines are valid as well, but listing those would make this message way too long"
Something went wrong with that request. Please try again.