Skip to content
This repository
Newer
Older
100755 484 lines (406 sloc) 15.859 kb
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
1 #!/bin/bash
2
3 # Original script done by Don Darling
4 # Later changes by Koen Kooi and Brijesh Singh
5
6 # Revision history:
108c0345 » koenkooi
2011-05-05 oebb: switch to git managed local.conf
7 # 20090902: download from twiki
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
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
7de547ce » koenkooi
2010-03-31 oebb: don't generate mirror tarballs by default
17 #
18 # For further changes consult 'git log' or browse to:
108c0345 » koenkooi
2011-05-05 oebb: switch to git managed local.conf
19 # http://git.angstrom-distribution.org/cgi-bin/cgit.cgi/setup-scripts/
7de547ce » koenkooi
2010-03-31 oebb: don't generate mirror tarballs by default
20 # to see the latest revision history
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
21
1f3cc146 » koenkooi
2011-03-02 oebb: move to release tag
22 # Use this till we get a maintenance branch based of the release tag
23
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
24 ###############################################################################
25 # User specific vars like proxy servers
26 ###############################################################################
27
28 #PROXYHOST=wwwgate.ti.com
29 #PROXYPORT=80
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
30 PROXYHOST=""
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
31
32 ###############################################################################
33 # OE_BASE - The root directory for all OE sources and development.
34 ###############################################################################
35 OE_BASE=${PWD}
52e95303 » koenkooi
2011-05-05 oebb: recreate environment file on BASE_VERSION mismatch
36 # incremement this to force recreation of config files
4fa09f5a » koenkooi
2012-04-19 oebb: bump BASE_VERSION again and derive DISTRO from local.conf
37 BASE_VERSION=5
fd8a2ed8 » koenkooi
2012-04-20 oebb: change name of environment file to avoid clashes with master
38 OE_ENV_FILE=~/.oe/environment-angstromv2012.05
f6f42a12 » koenkooi
2010-04-13 oebb: add infrastructure for using git submodules, disabled for now
39
d5a22682 » koenkooi
2012-04-26 layerman, oebb: another tweak to the git --no-abbrev test
40 if ! git help log | grep -q no-abbrev ; then
41 echo "Your installed version of git is too old, it lacks --no-abbrev. Please install 1.7.6 or newer"
801fd1fa » koenkooi
2012-04-20 oebb: check for outdated 'git' binary
42 exit 1
43 fi
44
45
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
46 ###############################################################################
67b17925 » koenkooi
2012-04-20 oebb: recreate site.conf if needed
47 # CONFIG_OE() - Configure OpenEmbedded
48 ###############################################################################
49 function config_oe()
50 {
51
52 MACHINE="${CL_MACHINE}"
53
54 #--------------------------------------------------------------------------
55 # Write out the OE bitbake configuration file.
56 #--------------------------------------------------------------------------
57 mkdir -p ${OE_BUILD_DIR}/conf
58
59 # There's no need to rewrite site.conf when changing MACHINE
60 if [ ! -e ${OE_BUILD_DIR}/conf/site.conf ]; then
61 cat > ${OE_BUILD_DIR}/conf/site.conf <<_EOF
62
63 SCONF_VERSION = "1"
64
65 # Where to store sources
66 DL_DIR = "${OE_SOURCE_DIR}/downloads"
67
68 # Where to save shared state
69 SSTATE_DIR = "${OE_BUILD_DIR}/build/sstate-cache"
70
71 # Which files do we want to parse:
72 BBFILES ?= "${OE_SOURCE_DIR}/openembedded-core/meta/recipes-*/*/*.bb"
73
74 TMPDIR = "${OE_BUILD_TMPDIR}"
75
76 # Go through the Firewall
77 #HTTP_PROXY = "http://${PROXYHOST}:${PROXYPORT}/"
78
79 _EOF
80 fi
81 if [ ! -e ${OE_BUILD_DIR}/conf/auto.conf ]; then
82 cat > ${OE_BUILD_DIR}/conf/auto.conf <<_EOF
83 MACHINE ?= "${MACHINE}"
84 _EOF
85 else
86 eval "sed -i -e 's/^MACHINE.*$/MACHINE ?= \"${MACHINE}\"/g' ${OE_BUILD_DIR}/conf/auto.conf"
87 fi
88 }
89
90 ###############################################################################
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
91 # SET_ENVIRONMENT() - Setup environment variables for OE development
92 ###############################################################################
93 function set_environment()
94 {
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
95
03810d58 » koenkooi
2011-02-23 oebb: work with bitbake master
96 # Workaround for differences between yocto bitbake and vanilla bitbake
97 export BBFETCH2=True
98
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
99 export TAG
100
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
101 #--------------------------------------------------------------------------
102 # If an env already exists, use it, otherwise generate it
103 #--------------------------------------------------------------------------
52e95303 » koenkooi
2011-05-05 oebb: recreate environment file on BASE_VERSION mismatch
104
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
105 if [ -e ${OE_ENV_FILE} ] ; then
106 . ${OE_ENV_FILE}
63ceb904 » kraj
2011-05-05 oebb.sh, .gitignore, build/conf: Add capability to issue bitbake comm…
107 fi
52e95303 » koenkooi
2011-05-05 oebb: recreate environment file on BASE_VERSION mismatch
108
109 if [ x"${BASE_VERSION}" != x"${SCRIPTS_BASE_VERSION}" ] ; then
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
110 echo "BASE_VERSION mismatch, recreating ${OE_ENV_FILE}"
e2c610b8 » koenkooi
2012-04-19 oebb: also remove site.conf when BASE_VERSION doesn't match
111 rm -f ${OE_ENV_FILE} ${OE_BUILD_DIR}/conf/site.conf
63ceb904 » kraj
2011-05-05 oebb.sh, .gitignore, build/conf: Add capability to issue bitbake comm…
112 fi
52e95303 » koenkooi
2011-05-05 oebb: recreate environment file on BASE_VERSION mismatch
113
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
114 if [ -e ${OE_ENV_FILE} ] ; then
115 . ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
116 else
117
d9bdbe27 » koenkooi
2010-03-23 oebb: replace all tabs with 4 spaces for consistency
118 mkdir -p ~/.oe/
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
119
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
120 #--------------------------------------------------------------------------
121 # Specify distribution information
122 #--------------------------------------------------------------------------
1bcb9e8b » denix0
2012-05-03 oebb: grep the correct DISTRO from local.conf, if there are other com…
123 DISTRO=$(grep DISTRO conf/local.conf | grep -v '^#' | awk -F\" '{print $2}')
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
124 DISTRO_DIRNAME=`echo $DISTRO | sed s#[.-]#_#g`
125
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
126 echo "export SCRIPTS_BASE_VERSION=${BASE_VERSION}" > ${OE_ENV_FILE}
127 echo "export BBFETCH2=True" >> ${OE_ENV_FILE}
03810d58 » koenkooi
2011-02-23 oebb: work with bitbake master
128
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
129 echo "export DISTRO=\"${DISTRO}\"" >> ${OE_ENV_FILE}
130 echo "export DISTRO_DIRNAME=\"${DISTRO_DIRNAME}\"" >> ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
131
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
132 #--------------------------------------------------------------------------
133 # Specify the root directory for your OpenEmbedded development
134 #--------------------------------------------------------------------------
63ceb904 » kraj
2011-05-05 oebb.sh, .gitignore, build/conf: Add capability to issue bitbake comm…
135 OE_BUILD_DIR=${OE_BASE}
136 OE_BUILD_TMPDIR="${OE_BUILD_DIR}/build/tmp-${DISTRO_DIRNAME}"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
137 OE_SOURCE_DIR=${OE_BASE}/sources
3b0a7f99 » shr-project
2012-09-05 oebb.sh: use OE_LAYERS_TXT variable instead of repeating layers.txt path
138 OE_LAYERS_TXT="${OE_SOURCE_DIR}/layers.txt"
448286d5 » koenkooi
2010-03-23 oebb: add some missing vars to environment script, reported by Gregg …
139
559117dc » koenkooi
2010-12-24 oebb: catch up with yocto bitbake wrapper usage for pseude
140 export BUILDDIR=${OE_BUILD_DIR}
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
141 mkdir -p ${OE_BUILD_DIR}
142 mkdir -p ${OE_SOURCE_DIR}
143 export OE_BASE
144
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
145 echo "export OE_BUILD_DIR=\"${OE_BUILD_DIR}\"" >> ${OE_ENV_FILE}
146 echo "export BUILDDIR=\"${OE_BUILD_DIR}\"" >> ${OE_ENV_FILE}
147 echo "export OE_BUILD_TMPDIR=\"${OE_BUILD_TMPDIR}\"" >> ${OE_ENV_FILE}
148 echo "export OE_SOURCE_DIR=\"${OE_SOURCE_DIR}\"" >> ${OE_ENV_FILE}
2722b1d5 » kraj
2012-09-06 oebb.sh: Export OE_LAYERS_TXT into env file
149 echo "export OE_LAYERS_TXT=\"${OE_LAYERS_TXT}\"" >> ${OE_ENV_FILE}
448286d5 » koenkooi
2010-03-23 oebb: add some missing vars to environment script, reported by Gregg …
150
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
151 echo "export OE_BASE=\"${OE_BASE}\"" >> ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
152
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
153 #--------------------------------------------------------------------------
154 # Include up-to-date bitbake in our PATH.
155 #--------------------------------------------------------------------------
c36e086a » koenkooi
2011-02-21 oebb: convert from yocto to oe-core
156 export PATH=${OE_SOURCE_DIR}/openembedded-core/scripts:${OE_SOURCE_DIR}/bitbake/bin:${PATH}
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
157
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
158 echo "export PATH=\"${PATH}\"" >> ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
159
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
160 #--------------------------------------------------------------------------
161 # Make sure Bitbake doesn't filter out the following variables from our
162 # environment.
163 #--------------------------------------------------------------------------
be691f60 » kraj
2011-04-21 oebb.sh: Export TCLIBC,TCMODE and delete ANGSTROMLIBC
164 export BB_ENV_EXTRAWHITE="MACHINE DISTRO TCLIBC TCMODE GIT_PROXY_COMMAND 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"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
165
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
166 echo "export BB_ENV_EXTRAWHITE=\"${BB_ENV_EXTRAWHITE}\"" >> ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
167
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
168 #--------------------------------------------------------------------------
169 # Specify proxy information
170 #--------------------------------------------------------------------------
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
171 if [ "x$PROXYHOST" != "x" ] ; then
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
172 export http_proxy=http://${PROXYHOST}:${PROXYPORT}/
173 export ftp_proxy=http://${PROXYHOST}:${PROXYPORT}/
174
175 export SVN_CONFIG_DIR=${OE_BUILD_DIR}/subversion_config
176 export GIT_CONFIG_DIR=${OE_BUILD_DIR}/git_config
177
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
178 echo "export http_proxy=\"${http_proxy}\"" >> ${OE_ENV_FILE}
179 echo "export ftp_proxy=\"${ftp_proxy}\"" >> ${OE_ENV_FILE}
180 echo "export SVN_CONFIG_DIR=\"${SVN_CONFIG_DIR}\"" >> ${OE_ENV_FILE}
181 echo "export GIT_CONFIG_DIR=\"${GIT_CONFIG_DIR}\"" >> ${OE_ENV_FILE}
66f12b9a » koenkooi
2011-05-05 oebb: only write to env file from a single place
182 echo "export GIT_PROXY_COMMAND=\"\${GIT_CONFIG_DIR}/git-proxy.sh\"" >> ${OE_ENV_FILE}
6a439748 » koenkooi
2010-03-19 oebb: generate sourceable env file
183
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
184 config_svn_proxy
185 config_git_proxy
d9bdbe27 » koenkooi
2010-03-23 oebb: replace all tabs with 4 spaces for consistency
186 fi
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
187
188 #--------------------------------------------------------------------------
189 # Set up the bitbake path to find the OpenEmbedded recipes.
190 #--------------------------------------------------------------------------
c36e086a » koenkooi
2011-02-21 oebb: convert from yocto to oe-core
191 export BBPATH=${OE_BUILD_DIR}:${OE_SOURCE_DIR}/openembedded-core/meta${BBPATH_EXTRA}
00a0c9ec » jadonk
2010-08-03 Utilize commit ID in updates
192
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
193 echo "export BBPATH=\"${BBPATH}\"" >> ${OE_ENV_FILE}
00a0c9ec » jadonk
2010-08-03 Utilize commit ID in updates
194
d9bdbe27 » koenkooi
2010-03-23 oebb: replace all tabs with 4 spaces for consistency
195 #--------------------------------------------------------------------------
bb16b330 » koenkooi
2012-04-19 oebb: remove hidden sudo
196 # Look for dash
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
197 #--------------------------------------------------------------------------
0ed3d157 » koenkooi
2010-10-20 oebb.sh: fix autorun logic
198 if [ "$(readlink /bin/sh)" = "dash" ] ; then
bb16b330 » koenkooi
2012-04-19 oebb: remove hidden sudo
199 echo "/bin/sh is a symlink to dash, please point it to bash instead"
200 exit 1
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
201 fi
8f98636b » koenkooi
2010-03-19 oebb: add usage note for ~/.oe/environment
202
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
203 echo "There now is a sourceable script in ~/.oe/enviroment. You can do '. ${OE_ENV_FILE}' and run 'bitbake something' without using $0 as wrapper"
204 fi # if -e ${OE_ENV_FILE}
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
205
67b17925 » koenkooi
2012-04-20 oebb: recreate site.conf if needed
206 if ! [ -e ${OE_BUILD_DIR}/conf/site.conf ] ; then
207 config_oe
208 fi
209
210 }
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
211
212 ###############################################################################
213 # UPDATE_ALL() - Make sure everything is up to date
214 ###############################################################################
215 function update_all()
216 {
217 set_environment
218 update_oe
219 }
220
be088960 » koenkooi
2010-04-26 oebb: add clean command
221 ###############################################################################
222 # CLEAN_OE() - Delete TMPDIR
223 ###############################################################################
224 function clean_oe()
225 {
226 set_environment
00a0c9ec » jadonk
2010-08-03 Utilize commit ID in updates
227 echo "Cleaning ${OE_BUILD_TMPDIR}"
228 rm -rf ${OE_BUILD_TMPDIR}
be088960 » koenkooi
2010-04-26 oebb: add clean command
229 }
230
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
231
232 ###############################################################################
233 # OE_BUILD() - Build an OE package or image
234 ###############################################################################
235 function oe_build()
236 {
088be906 » koenkooi
2011-05-05 oebb: put machine in auto.conf
237 if [ ! -e ${OE_BUILD_DIR}/conf/auto.conf ] ; then
1631d041 » koenkooi
2010-10-20 oebb.sh: if MACHINE is set in env on first invocation autorun the con…
238 if [ -z $MACHINE ] ; then
239 echo "No config found, please run $0 config <machine> first"
240 else
241 CL_MACHINE=$MACHINE
0ed3d157 » koenkooi
2010-10-20 oebb.sh: fix autorun logic
242 set_environment
1631d041 » koenkooi
2010-10-20 oebb.sh: if MACHINE is set in env on first invocation autorun the con…
243 config_oe && update_all
244 fi
245 fi
246
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
247 set_environment
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
248 if [ -e ${OE_ENV_FILE} ] ; then
249 echo "Using ${OE_ENV_FILE} to setup needed variables. It is recommended to do '. ${OE_ENV_FILE}' and run 'bitbake something' without using $0 as wrapper"
81612384 » koenkooi
2010-06-18 oebb: improve messaging to user
250 fi
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
251 cd ${OE_BUILD_DIR}
252 if [ -z $MACHINE ] ; then
253 echo "Executing: bitbake" $*
254 bitbake $*
255 else
256 echo "Executing: MACHINE=${MACHINE} bitbake" $*
257 MACHINE=${MACHINE} bitbake $*
258 fi
259 }
260
261
262 ###############################################################################
00a0c9ec » jadonk
2010-08-03 Utilize commit ID in updates
263 # OE_CONFIG() - Configure OE for a target
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
264 ###############################################################################
265 function oe_config()
266 {
267 set_environment
268 config_oe
1631d041 » koenkooi
2010-10-20 oebb.sh: if MACHINE is set in env on first invocation autorun the con…
269 update_all
c7b71f4c » koenkooi
2010-03-23 oebb: be more verbose about ~/oe/.environment and report when config …
270
271 echo ""
d9bdbe27 » koenkooi
2010-03-23 oebb: replace all tabs with 4 spaces for consistency
272 echo "Setup for ${CL_MACHINE} completed"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
273 }
274
275 ###############################################################################
276 # UPDATE_OE() - Update OpenEmbedded distribution.
277 ###############################################################################
278 function update_oe()
279 {
e4d6fb80 » Gregg Lebovitz
2010-03-23 oebb: protect call to git_proxy setup as well
280 if [ "x$PROXYHOST" != "x" ] ; then
281 config_git_proxy
282 fi
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
283
20193e28 » koenkooi
2011-01-27 oebb: hide stash output, simplify oebb update handling
284 #manage meta-openembedded and meta-angstrom with layerman
2722b1d5 » kraj
2012-09-06 oebb.sh: Export OE_LAYERS_TXT into env file
285 env gawk -v command=update -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
286 }
287
288 ###############################################################################
289 # CONFIG_SVN_PROXY() - Configure subversion proxy information
290 ###############################################################################
291 function config_svn_proxy()
292 {
293 if [ ! -f ${SVN_CONFIG_DIR}/servers ]
294 then
295 mkdir -p ${SVN_CONFIG_DIR}
296 cat >> ${SVN_CONFIG_DIR}/servers <<_EOF
297 [global]
298 http-proxy-host = ${PROXYHOST}
299 http-proxy-port = ${PROXYPORT}
300 _EOF
301 fi
302 }
303
304
305 ###############################################################################
306 # CONFIG_GIT_PROXY() - Configure GIT proxy information
307 ###############################################################################
308 function config_git_proxy()
309 {
310 if [ ! -f ${GIT_CONFIG_DIR}/git-proxy.sh ]
311 then
312 mkdir -p ${GIT_CONFIG_DIR}
313 cat > ${GIT_CONFIG_DIR}/git-proxy.sh <<_EOF
314 if [ -x /bin/env ] ; then
315 exec /bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*
316 else
317 exec /usr/bin/env corkscrew ${PROXYHOST} ${PROXYPORT} \$*
318 fi
319 _EOF
320 chmod +x ${GIT_CONFIG_DIR}/git-proxy.sh
89b0519e » koenkooi
2010-04-28 oebb: fix git_config logic to not always append to ~/.oe/environement
321 export GIT_PROXY_COMMAND=${GIT_CONFIG_DIR}/git-proxy.sh
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
322 fi
323 }
324
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
325 ###############################################################################
326 # tag_layers - Tag all layers with a given tag
327 ###############################################################################
328 function tag_layers()
329 {
330 set_environment
3b0a7f99 » shr-project
2012-09-05 oebb.sh: use OE_LAYERS_TXT variable instead of repeating layers.txt path
331 env gawk -v command=tag -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
fe00dedf » koenkooi
2012-01-16 oebb: store tagnames in 'tags' file for future reference
332 echo $TAG >> ${OE_BASE}/tags
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
333 }
334
335 ###############################################################################
ce4a376e » shr-project
2012-09-05 oebb.sh: add reset command
336 # reset_layers - Remove all local changes including stash and ignored files
337 ###############################################################################
338 function reset_layers()
339 {
340 set_environment
2722b1d5 » kraj
2012-09-06 oebb.sh: Export OE_LAYERS_TXT into env file
341 env gawk -v command=reset -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
ce4a376e » shr-project
2012-09-05 oebb.sh: add reset command
342 }
343
344 ###############################################################################
2ac18a82 » dasty
2012-03-29 oebb: Proper comment for changelog
345 # changelog - Display changelog for all layers with a given tag
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
346 ###############################################################################
347 function changelog()
348 {
edf3110b » koenkooi
2012-04-18 layerman: add 'info' command to generate a list of the current branch…
349 set_environment
2722b1d5 » kraj
2012-09-06 oebb.sh: Export OE_LAYERS_TXT into env file
350 env gawk -v command=changelog -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
edf3110b » koenkooi
2012-04-18 layerman: add 'info' command to generate a list of the current branch…
351 }
352
353 ###############################################################################
354 # layer_info - Get layer info
355 ###############################################################################
356 function layer_info()
357 {
358 set_environment
359 rm -f ${OE_SOURCE_DIR}/info.txt
3b0a7f99 » shr-project
2012-09-05 oebb.sh: use OE_LAYERS_TXT variable instead of repeating layers.txt path
360 env gawk -v command=info -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
edf3110b » koenkooi
2012-04-18 layerman: add 'info' command to generate a list of the current branch…
361 echo
362 echo "Showing contents of ${OE_SOURCE_DIR}/info.txt:"
363 echo
364 cat ${OE_SOURCE_DIR}/info.txt
365 echo
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
366 }
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
367
368 ###############################################################################
26ef55c9 » dasty
2012-05-04 Adding support for checkout of particular tag/branch
369 # checkout - Checkout all layers with a given tag
370 ###############################################################################
371 function checkout()
372 {
373 set_environment
2722b1d5 » kraj
2012-09-06 oebb.sh: Export OE_LAYERS_TXT into env file
374 env gawk -v command=checkout -v commandarg=$TAG -f ${OE_BASE}/scripts/layers.awk ${OE_LAYERS_TXT}
26ef55c9 » dasty
2012-05-04 Adding support for checkout of particular tag/branch
375 }
376
377
378 ###############################################################################
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
379 # Build the specified OE packages or images.
380 ###############################################################################
be088960 » koenkooi
2010-04-26 oebb: add clean command
381
382 # FIXME: convert to case/esac
383
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
384 if [ $# -gt 0 ]
385 then
386 if [ $1 = "update" ]
387 then
388 update_all
389 exit 0
390 fi
391
edf3110b » koenkooi
2012-04-18 layerman: add 'info' command to generate a list of the current branch…
392 if [ $1 = "info" ]
393 then
394 layer_info
395 exit 0
396 fi
397
ce4a376e » shr-project
2012-09-05 oebb.sh: add reset command
398 if [ $1 = "reset" ]
399 then
400 reset_layers
401 exit 0
402 fi
403
87920f55 » koenkooi
2012-01-11 oebb: hook up tag and changelog functionality from layerman
404 if [ $1 = "tag" ]
405 then
406 if [ -n "$2" ] ; then
407 TAG="$2"
408 else
409 TAG="$(date -u +'%Y%m%d-%H%M')"
410 fi
411 tag_layers $TAG
412 exit 0
413 fi
414
415 if [ $1 = "changelog" ]
416 then
417 if [ -z $2 ] ; then
418 echo "Changelog needs an argument"
419 exit 1
420 else
421 TAG="$2"
422 fi
423 changelog
424 exit 0
425 fi
426
26ef55c9 » dasty
2012-05-04 Adding support for checkout of particular tag/branch
427 if [ $1 = "checkout" ]
428 then
429 if [ -z $2 ] ; then
430 echo "Checkout needs an argument"
431 exit 1
432 else
433 TAG="$2"
434 fi
435 checkout
436 exit 0
437 fi
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
438 if [ $1 = "bitbake" ]
439 then
440 shift
441 oe_build $*
442 exit 0
443 fi
444
445 if [ $1 = "config" ]
446 then
447 shift
448 CL_MACHINE=$1
449 shift
450 oe_config $*
451 exit 0
452 fi
be088960 » koenkooi
2010-04-26 oebb: add clean command
453
454 if [ $1 = "clean" ]
455 then
456 clean_oe
457 exit 0
458 fi
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
459 fi
460
461 # Help Screen
462 echo ""
463 echo "Usage: $0 config <machine>"
464 echo " $0 update"
ce4a376e » shr-project
2012-09-05 oebb.sh: add reset command
465 echo " $0 reset"
6100f737 » dasty
2012-03-29 oebb: Updating Help Screen
466 echo " $0 tag [tagname]"
467 echo " $0 changelog <tagname>"
26ef55c9 » dasty
2012-05-04 Adding support for checkout of particular tag/branch
468 echo " $0 checkout <tagname>"
6100f737 » dasty
2012-03-29 oebb: Updating Help Screen
469 echo " $0 clean"
3d83b2dd » koenkooi
2010-06-21 oebb: update usage output
470 echo ""
471 echo " Not recommended, but also possible:"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
472 echo " $0 bitbake <bitbake target>"
8f81ffd9 » koenkooi
2011-05-05 oebb: make environment file configurable
473 echo " It is recommended to do '. ${OE_ENV_FILE}' and run 'bitbake something' inside ${BUILDDIR} without using oebb.sh as wrapper"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
474 echo ""
475 echo "You must invoke \"$0 config <machine>\" and then \"$0 update\" prior"
476 echo "to your first bitbake command"
477 echo ""
478 echo "The <machine> argument can be one of the following"
90203a23 » koenkooi
2012-04-20 oebb: change example machine listing
479 echo " beagleboard: BeagleBoard"
480 echo " qemuarm Emulated ARM machine"
481 echo " qemumips: Emulated MIPS machine"
482 echo " fri2-noemgd: Intel FRI2 machine without graphics"
f984361a » koenkooi
2010-03-08 Add first setup script, imported from TI wiki
483 echo ""
484 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.