xref: /openbmc/u-boot/tools/buildman/README (revision fc3fe1c2)
1*fc3fe1c2SSimon Glass# Copyright (c) 2013 The Chromium OS Authors.
2*fc3fe1c2SSimon Glass#
3*fc3fe1c2SSimon Glass# See file CREDITS for list of people who contributed to this
4*fc3fe1c2SSimon Glass# project.
5*fc3fe1c2SSimon Glass#
6*fc3fe1c2SSimon Glass# This program is free software; you can redistribute it and/or
7*fc3fe1c2SSimon Glass# modify it under the terms of the GNU General Public License as
8*fc3fe1c2SSimon Glass# published by the Free Software Foundation; either version 2 of
9*fc3fe1c2SSimon Glass# the License, or (at your option) any later version.
10*fc3fe1c2SSimon Glass#
11*fc3fe1c2SSimon Glass# This program is distributed in the hope that it will be useful,
12*fc3fe1c2SSimon Glass# but WITHOUT ANY WARRANTY; without even the implied warranty of
13*fc3fe1c2SSimon Glass# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14*fc3fe1c2SSimon Glass# GNU General Public License for more details.
15*fc3fe1c2SSimon Glass#
16*fc3fe1c2SSimon Glass# You should have received a copy of the GNU General Public License
17*fc3fe1c2SSimon Glass# along with this program; if not, write to the Free Software
18*fc3fe1c2SSimon Glass# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
19*fc3fe1c2SSimon Glass# MA 02111-1307 USA
20*fc3fe1c2SSimon Glass#
21*fc3fe1c2SSimon Glass
22*fc3fe1c2SSimon GlassWhat is this?
23*fc3fe1c2SSimon Glass=============
24*fc3fe1c2SSimon Glass
25*fc3fe1c2SSimon GlassThis tool handles building U-Boot to check that you have not broken it
26*fc3fe1c2SSimon Glasswith your patch series. It can build each individual commit and report
27*fc3fe1c2SSimon Glasswhich boards fail on which commits, and which errors come up. It aims
28*fc3fe1c2SSimon Glassto make full use of multi-processor machines.
29*fc3fe1c2SSimon Glass
30*fc3fe1c2SSimon GlassA key feature of buildman is its output summary, which allows warnings,
31*fc3fe1c2SSimon Glasserrors or image size increases in a particular commit or board to be
32*fc3fe1c2SSimon Glassquickly identified and the offending commit pinpointed. This can be a big
33*fc3fe1c2SSimon Glasshelp for anyone working with >10 patches at a time.
34*fc3fe1c2SSimon Glass
35*fc3fe1c2SSimon Glass
36*fc3fe1c2SSimon GlassCaveats
37*fc3fe1c2SSimon Glass=======
38*fc3fe1c2SSimon Glass
39*fc3fe1c2SSimon GlassBuildman is still in its infancy. It is already a very useful tool, but
40*fc3fe1c2SSimon Glassexpect to find problems and send patches.
41*fc3fe1c2SSimon Glass
42*fc3fe1c2SSimon GlassBuildman can be stopped and restarted, in which case it will continue
43*fc3fe1c2SSimon Glasswhere it left off. This should happen cleanly and without side-effects.
44*fc3fe1c2SSimon GlassIf not, it is a bug, for which a patch would be welcome.
45*fc3fe1c2SSimon Glass
46*fc3fe1c2SSimon GlassBuildman gets so tied up in its work that it can ignore the outside world.
47*fc3fe1c2SSimon GlassYou may need to press Ctrl-C several times to quit it. Also it will print
48*fc3fe1c2SSimon Glassout various exceptions when stopped.
49*fc3fe1c2SSimon Glass
50*fc3fe1c2SSimon Glass
51*fc3fe1c2SSimon GlassTheory of Operation
52*fc3fe1c2SSimon Glass===================
53*fc3fe1c2SSimon Glass
54*fc3fe1c2SSimon Glass(please read this section in full twice or you will be perpetually confused)
55*fc3fe1c2SSimon Glass
56*fc3fe1c2SSimon GlassBuildman is a builder. It is not make, although it runs make. It does not
57*fc3fe1c2SSimon Glassproduce any useful output on the terminal while building, except for
58*fc3fe1c2SSimon Glassprogress information. All the output (errors, warnings and binaries if you
59*fc3fe1c2SSimon Glassare ask for them) is stored in output directories, which you can look at
60*fc3fe1c2SSimon Glasswhile the build is progressing, or when it is finished.
61*fc3fe1c2SSimon Glass
62*fc3fe1c2SSimon GlassBuildman produces a concise summary of which boards succeeded and failed.
63*fc3fe1c2SSimon GlassIt shows which commit introduced which board failure using a simple
64*fc3fe1c2SSimon Glassred/green colour coding. Full error information can be requested, in which
65*fc3fe1c2SSimon Glasscase it is de-duped and displayed against the commit that introduced the
66*fc3fe1c2SSimon Glasserror. An example workflow is below.
67*fc3fe1c2SSimon Glass
68*fc3fe1c2SSimon GlassBuildman stores image size information and can report changes in image size
69*fc3fe1c2SSimon Glassfrom commit to commit. An example of this is below.
70*fc3fe1c2SSimon Glass
71*fc3fe1c2SSimon GlassBuildman starts multiple threads, and each thread builds for one board at
72*fc3fe1c2SSimon Glassa time. A thread starts at the first commit, configures the source for your
73*fc3fe1c2SSimon Glassboard and builds it. Then it checks out the next commit and does an
74*fc3fe1c2SSimon Glassincremental build. Eventually the thread reaches the last commit and stops.
75*fc3fe1c2SSimon GlassIf errors or warnings are found along the way, the thread will reconfigure
76*fc3fe1c2SSimon Glassafter every commit, and your build will be very slow. This is because a
77*fc3fe1c2SSimon Glassfile that produces just a warning would not normally be rebuilt in an
78*fc3fe1c2SSimon Glassincremental build.
79*fc3fe1c2SSimon Glass
80*fc3fe1c2SSimon GlassBuildman works in an entirely separate place from your U-Boot repository.
81*fc3fe1c2SSimon GlassIt creates a separate working directory for each thread, and puts the
82*fc3fe1c2SSimon Glassoutput files in the working directory, organised by commit name and board
83*fc3fe1c2SSimon Glassname, in a two-level hierarchy.
84*fc3fe1c2SSimon Glass
85*fc3fe1c2SSimon GlassBuildman is invoked in your U-Boot directory, the one with the .git
86*fc3fe1c2SSimon Glassdirectory. It clones this repository into a copy for each thread, and the
87*fc3fe1c2SSimon Glassthreads do not affect the state of your git repository. Any checkouts done
88*fc3fe1c2SSimon Glassby the thread affect only the working directory for that thread.
89*fc3fe1c2SSimon Glass
90*fc3fe1c2SSimon GlassBuildman automatically selects the correct toolchain for each board. You
91*fc3fe1c2SSimon Glassmust supply suitable toolchains, but buildman takes care of selecting the
92*fc3fe1c2SSimon Glassright one.
93*fc3fe1c2SSimon Glass
94*fc3fe1c2SSimon GlassBuildman always builds a branch, and always builds the upstream commit as
95*fc3fe1c2SSimon Glasswell, for comparison. It cannot build individual commits at present, unless
96*fc3fe1c2SSimon Glass(maybe) you point it at an empty branch. Put all your commits in a branch,
97*fc3fe1c2SSimon Glassset the branch's upstream to a valid value, and all will be well. Otherwise
98*fc3fe1c2SSimon Glassbuildman will perform random actions. Use -n to check what the random
99*fc3fe1c2SSimon Glassactions might be.
100*fc3fe1c2SSimon Glass
101*fc3fe1c2SSimon GlassBuildman is optimised for building many commits at once, for many boards.
102*fc3fe1c2SSimon GlassOn multi-core machines, Buildman is fast because it uses most of the
103*fc3fe1c2SSimon Glassavailable CPU power. When it gets to the end, or if you are building just
104*fc3fe1c2SSimon Glassa few commits or boards, it will be pretty slow. As a tip, if you don't
105*fc3fe1c2SSimon Glassplan to use your machine for anything else, you can use -T to increase the
106*fc3fe1c2SSimon Glassnumber of threads beyond the default.
107*fc3fe1c2SSimon Glass
108*fc3fe1c2SSimon GlassBuildman lets you build all boards, or a subset. Specify the subset using
109*fc3fe1c2SSimon Glassthe board name, architecture name, SOC name, or anything else in the
110*fc3fe1c2SSimon Glassboards.cfg file. So 'at91' will build all AT91 boards (arm), powerpc will
111*fc3fe1c2SSimon Glassbuild all PowerPC boards.
112*fc3fe1c2SSimon Glass
113*fc3fe1c2SSimon GlassBuildman does not store intermediate object files. It optionally copies
114*fc3fe1c2SSimon Glassthe binary output into a directory when a build is successful. Size
115*fc3fe1c2SSimon Glassinformation is always recorded. It needs a fair bit of disk space to work,
116*fc3fe1c2SSimon Glasstypically 250MB per thread.
117*fc3fe1c2SSimon Glass
118*fc3fe1c2SSimon Glass
119*fc3fe1c2SSimon GlassSetting up
120*fc3fe1c2SSimon Glass==========
121*fc3fe1c2SSimon Glass
122*fc3fe1c2SSimon Glass1. Get the U-Boot source. You probably already have it, but if not these
123*fc3fe1c2SSimon Glasssteps should get you started with a repo and some commits for testing.
124*fc3fe1c2SSimon Glass
125*fc3fe1c2SSimon Glass$ cd /path/to/u-boot
126*fc3fe1c2SSimon Glass$ git clone git://git.denx.de/u-boot.git .
127*fc3fe1c2SSimon Glass$ git checkout -b my-branch origin/master
128*fc3fe1c2SSimon Glass$ # Add some commits to the branch, reading for testing
129*fc3fe1c2SSimon Glass
130*fc3fe1c2SSimon Glass2. Create ~/.buildman to tell buildman where to find tool chains. As an
131*fc3fe1c2SSimon Glassexample:
132*fc3fe1c2SSimon Glass
133*fc3fe1c2SSimon Glass# Buildman settings file
134*fc3fe1c2SSimon Glass
135*fc3fe1c2SSimon Glass[toolchain]
136*fc3fe1c2SSimon Glassroot: /
137*fc3fe1c2SSimon Glassrest: /toolchains/*
138*fc3fe1c2SSimon Glasseldk: /opt/eldk-4.2
139*fc3fe1c2SSimon Glass
140*fc3fe1c2SSimon Glass[toolchain-alias]
141*fc3fe1c2SSimon Glassx86: i386
142*fc3fe1c2SSimon Glassblackfin: bfin
143*fc3fe1c2SSimon Glasssh: sh4
144*fc3fe1c2SSimon Glassnds32: nds32le
145*fc3fe1c2SSimon Glassopenrisc: or32
146*fc3fe1c2SSimon Glass
147*fc3fe1c2SSimon Glass
148*fc3fe1c2SSimon GlassThis selects the available toolchain paths. Add the base directory for
149*fc3fe1c2SSimon Glasseach of your toolchains here. Buildman will search inside these directories
150*fc3fe1c2SSimon Glassand also in any '/usr' and '/usr/bin' subdirectories.
151*fc3fe1c2SSimon Glass
152*fc3fe1c2SSimon GlassMake sure the tags (here root: rest: and eldk:) are unique.
153*fc3fe1c2SSimon Glass
154*fc3fe1c2SSimon GlassThe toolchain-alias section indicates that the i386 toolchain should be used
155*fc3fe1c2SSimon Glassto build x86 commits.
156*fc3fe1c2SSimon Glass
157*fc3fe1c2SSimon Glass
158*fc3fe1c2SSimon Glass2. Check the available toolchains
159*fc3fe1c2SSimon Glass
160*fc3fe1c2SSimon GlassRun this check to make sure that you have a toolchain for every architecture.
161*fc3fe1c2SSimon Glass
162*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman --list-tool-chains
163*fc3fe1c2SSimon GlassScanning for tool chains
164*fc3fe1c2SSimon Glass   - scanning path '/'
165*fc3fe1c2SSimon Glass      - looking in '/.'
166*fc3fe1c2SSimon Glass      - looking in '/bin'
167*fc3fe1c2SSimon Glass      - looking in '/usr/bin'
168*fc3fe1c2SSimon Glass         - found '/usr/bin/gcc'
169*fc3fe1c2SSimon GlassTool chain test:  OK
170*fc3fe1c2SSimon Glass         - found '/usr/bin/c89-gcc'
171*fc3fe1c2SSimon GlassTool chain test:  OK
172*fc3fe1c2SSimon Glass         - found '/usr/bin/c99-gcc'
173*fc3fe1c2SSimon GlassTool chain test:  OK
174*fc3fe1c2SSimon Glass         - found '/usr/bin/x86_64-linux-gnu-gcc'
175*fc3fe1c2SSimon GlassTool chain test:  OK
176*fc3fe1c2SSimon Glass   - scanning path '/toolchains/powerpc-linux'
177*fc3fe1c2SSimon Glass      - looking in '/toolchains/powerpc-linux/.'
178*fc3fe1c2SSimon Glass      - looking in '/toolchains/powerpc-linux/bin'
179*fc3fe1c2SSimon Glass         - found '/toolchains/powerpc-linux/bin/powerpc-linux-gcc'
180*fc3fe1c2SSimon GlassTool chain test:  OK
181*fc3fe1c2SSimon Glass      - looking in '/toolchains/powerpc-linux/usr/bin'
182*fc3fe1c2SSimon Glass   - scanning path '/toolchains/nds32le-linux-glibc-v1f'
183*fc3fe1c2SSimon Glass      - looking in '/toolchains/nds32le-linux-glibc-v1f/.'
184*fc3fe1c2SSimon Glass      - looking in '/toolchains/nds32le-linux-glibc-v1f/bin'
185*fc3fe1c2SSimon Glass         - found '/toolchains/nds32le-linux-glibc-v1f/bin/nds32le-linux-gcc'
186*fc3fe1c2SSimon GlassTool chain test:  OK
187*fc3fe1c2SSimon Glass      - looking in '/toolchains/nds32le-linux-glibc-v1f/usr/bin'
188*fc3fe1c2SSimon Glass   - scanning path '/toolchains/nios2'
189*fc3fe1c2SSimon Glass      - looking in '/toolchains/nios2/.'
190*fc3fe1c2SSimon Glass      - looking in '/toolchains/nios2/bin'
191*fc3fe1c2SSimon Glass         - found '/toolchains/nios2/bin/nios2-linux-gcc'
192*fc3fe1c2SSimon GlassTool chain test:  OK
193*fc3fe1c2SSimon Glass         - found '/toolchains/nios2/bin/nios2-linux-uclibc-gcc'
194*fc3fe1c2SSimon GlassTool chain test:  OK
195*fc3fe1c2SSimon Glass      - looking in '/toolchains/nios2/usr/bin'
196*fc3fe1c2SSimon Glass         - found '/toolchains/nios2/usr/bin/nios2-linux-gcc'
197*fc3fe1c2SSimon GlassTool chain test:  OK
198*fc3fe1c2SSimon Glass         - found '/toolchains/nios2/usr/bin/nios2-linux-uclibc-gcc'
199*fc3fe1c2SSimon GlassTool chain test:  OK
200*fc3fe1c2SSimon Glass   - scanning path '/toolchains/microblaze-unknown-linux-gnu'
201*fc3fe1c2SSimon Glass      - looking in '/toolchains/microblaze-unknown-linux-gnu/.'
202*fc3fe1c2SSimon Glass      - looking in '/toolchains/microblaze-unknown-linux-gnu/bin'
203*fc3fe1c2SSimon Glass         - found '/toolchains/microblaze-unknown-linux-gnu/bin/microblaze-unknown-linux-gnu-gcc'
204*fc3fe1c2SSimon GlassTool chain test:  OK
205*fc3fe1c2SSimon Glass         - found '/toolchains/microblaze-unknown-linux-gnu/bin/mb-linux-gcc'
206*fc3fe1c2SSimon GlassTool chain test:  OK
207*fc3fe1c2SSimon Glass      - looking in '/toolchains/microblaze-unknown-linux-gnu/usr/bin'
208*fc3fe1c2SSimon Glass   - scanning path '/toolchains/mips-linux'
209*fc3fe1c2SSimon Glass      - looking in '/toolchains/mips-linux/.'
210*fc3fe1c2SSimon Glass      - looking in '/toolchains/mips-linux/bin'
211*fc3fe1c2SSimon Glass         - found '/toolchains/mips-linux/bin/mips-linux-gcc'
212*fc3fe1c2SSimon GlassTool chain test:  OK
213*fc3fe1c2SSimon Glass      - looking in '/toolchains/mips-linux/usr/bin'
214*fc3fe1c2SSimon Glass   - scanning path '/toolchains/old'
215*fc3fe1c2SSimon Glass      - looking in '/toolchains/old/.'
216*fc3fe1c2SSimon Glass      - looking in '/toolchains/old/bin'
217*fc3fe1c2SSimon Glass      - looking in '/toolchains/old/usr/bin'
218*fc3fe1c2SSimon Glass   - scanning path '/toolchains/i386-linux'
219*fc3fe1c2SSimon Glass      - looking in '/toolchains/i386-linux/.'
220*fc3fe1c2SSimon Glass      - looking in '/toolchains/i386-linux/bin'
221*fc3fe1c2SSimon Glass         - found '/toolchains/i386-linux/bin/i386-linux-gcc'
222*fc3fe1c2SSimon GlassTool chain test:  OK
223*fc3fe1c2SSimon Glass      - looking in '/toolchains/i386-linux/usr/bin'
224*fc3fe1c2SSimon Glass   - scanning path '/toolchains/bfin-uclinux'
225*fc3fe1c2SSimon Glass      - looking in '/toolchains/bfin-uclinux/.'
226*fc3fe1c2SSimon Glass      - looking in '/toolchains/bfin-uclinux/bin'
227*fc3fe1c2SSimon Glass         - found '/toolchains/bfin-uclinux/bin/bfin-uclinux-gcc'
228*fc3fe1c2SSimon GlassTool chain test:  OK
229*fc3fe1c2SSimon Glass      - looking in '/toolchains/bfin-uclinux/usr/bin'
230*fc3fe1c2SSimon Glass   - scanning path '/toolchains/sparc-elf'
231*fc3fe1c2SSimon Glass      - looking in '/toolchains/sparc-elf/.'
232*fc3fe1c2SSimon Glass      - looking in '/toolchains/sparc-elf/bin'
233*fc3fe1c2SSimon Glass         - found '/toolchains/sparc-elf/bin/sparc-elf-gcc'
234*fc3fe1c2SSimon GlassTool chain test:  OK
235*fc3fe1c2SSimon Glass      - looking in '/toolchains/sparc-elf/usr/bin'
236*fc3fe1c2SSimon Glass   - scanning path '/toolchains/arm-2010q1'
237*fc3fe1c2SSimon Glass      - looking in '/toolchains/arm-2010q1/.'
238*fc3fe1c2SSimon Glass      - looking in '/toolchains/arm-2010q1/bin'
239*fc3fe1c2SSimon Glass         - found '/toolchains/arm-2010q1/bin/arm-none-linux-gnueabi-gcc'
240*fc3fe1c2SSimon GlassTool chain test:  OK
241*fc3fe1c2SSimon Glass      - looking in '/toolchains/arm-2010q1/usr/bin'
242*fc3fe1c2SSimon Glass   - scanning path '/toolchains/from'
243*fc3fe1c2SSimon Glass      - looking in '/toolchains/from/.'
244*fc3fe1c2SSimon Glass      - looking in '/toolchains/from/bin'
245*fc3fe1c2SSimon Glass      - looking in '/toolchains/from/usr/bin'
246*fc3fe1c2SSimon Glass   - scanning path '/toolchains/sh4-gentoo-linux-gnu'
247*fc3fe1c2SSimon Glass      - looking in '/toolchains/sh4-gentoo-linux-gnu/.'
248*fc3fe1c2SSimon Glass      - looking in '/toolchains/sh4-gentoo-linux-gnu/bin'
249*fc3fe1c2SSimon Glass         - found '/toolchains/sh4-gentoo-linux-gnu/bin/sh4-gentoo-linux-gnu-gcc'
250*fc3fe1c2SSimon GlassTool chain test:  OK
251*fc3fe1c2SSimon Glass      - looking in '/toolchains/sh4-gentoo-linux-gnu/usr/bin'
252*fc3fe1c2SSimon Glass   - scanning path '/toolchains/avr32-linux'
253*fc3fe1c2SSimon Glass      - looking in '/toolchains/avr32-linux/.'
254*fc3fe1c2SSimon Glass      - looking in '/toolchains/avr32-linux/bin'
255*fc3fe1c2SSimon Glass         - found '/toolchains/avr32-linux/bin/avr32-gcc'
256*fc3fe1c2SSimon GlassTool chain test:  OK
257*fc3fe1c2SSimon Glass      - looking in '/toolchains/avr32-linux/usr/bin'
258*fc3fe1c2SSimon Glass   - scanning path '/toolchains/m68k-linux'
259*fc3fe1c2SSimon Glass      - looking in '/toolchains/m68k-linux/.'
260*fc3fe1c2SSimon Glass      - looking in '/toolchains/m68k-linux/bin'
261*fc3fe1c2SSimon Glass         - found '/toolchains/m68k-linux/bin/m68k-linux-gcc'
262*fc3fe1c2SSimon GlassTool chain test:  OK
263*fc3fe1c2SSimon Glass      - looking in '/toolchains/m68k-linux/usr/bin'
264*fc3fe1c2SSimon GlassList of available toolchains (17):
265*fc3fe1c2SSimon Glassarm       : /toolchains/arm-2010q1/bin/arm-none-linux-gnueabi-gcc
266*fc3fe1c2SSimon Glassavr32     : /toolchains/avr32-linux/bin/avr32-gcc
267*fc3fe1c2SSimon Glassbfin      : /toolchains/bfin-uclinux/bin/bfin-uclinux-gcc
268*fc3fe1c2SSimon Glassc89       : /usr/bin/c89-gcc
269*fc3fe1c2SSimon Glassc99       : /usr/bin/c99-gcc
270*fc3fe1c2SSimon Glassi386      : /toolchains/i386-linux/bin/i386-linux-gcc
271*fc3fe1c2SSimon Glassm68k      : /toolchains/m68k-linux/bin/m68k-linux-gcc
272*fc3fe1c2SSimon Glassmb        : /toolchains/microblaze-unknown-linux-gnu/bin/mb-linux-gcc
273*fc3fe1c2SSimon Glassmicroblaze: /toolchains/microblaze-unknown-linux-gnu/bin/microblaze-unknown-linux-gnu-gcc
274*fc3fe1c2SSimon Glassmips      : /toolchains/mips-linux/bin/mips-linux-gcc
275*fc3fe1c2SSimon Glassnds32le   : /toolchains/nds32le-linux-glibc-v1f/bin/nds32le-linux-gcc
276*fc3fe1c2SSimon Glassnios2     : /toolchains/nios2/bin/nios2-linux-gcc
277*fc3fe1c2SSimon Glasspowerpc   : /toolchains/powerpc-linux/bin/powerpc-linux-gcc
278*fc3fe1c2SSimon Glasssandbox   : /usr/bin/gcc
279*fc3fe1c2SSimon Glasssh4       : /toolchains/sh4-gentoo-linux-gnu/bin/sh4-gentoo-linux-gnu-gcc
280*fc3fe1c2SSimon Glasssparc     : /toolchains/sparc-elf/bin/sparc-elf-gcc
281*fc3fe1c2SSimon Glassx86_64    : /usr/bin/x86_64-linux-gnu-gcc
282*fc3fe1c2SSimon Glass
283*fc3fe1c2SSimon Glass
284*fc3fe1c2SSimon GlassYou can see that everything is covered, even some strange ones that won't
285*fc3fe1c2SSimon Glassbe used (c88 and c99). This is a feature.
286*fc3fe1c2SSimon Glass
287*fc3fe1c2SSimon Glass
288*fc3fe1c2SSimon GlassHow to run it
289*fc3fe1c2SSimon Glass=============
290*fc3fe1c2SSimon Glass
291*fc3fe1c2SSimon GlassFirst do a dry run using the -n flag: (replace <branch> with a real, local
292*fc3fe1c2SSimon Glassbranch with a valid upstream)
293*fc3fe1c2SSimon Glass
294*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b <branch> -n
295*fc3fe1c2SSimon Glass
296*fc3fe1c2SSimon GlassIf it can't detect the upstream branch, try checking out the branch, and
297*fc3fe1c2SSimon Glassdoing something like 'git branch --set-upstream <branch> upstream/master'
298*fc3fe1c2SSimon Glassor something similar.
299*fc3fe1c2SSimon Glass
300*fc3fe1c2SSimon GlassAs an exmmple:
301*fc3fe1c2SSimon Glass
302*fc3fe1c2SSimon GlassDry run, so not doing much. But I would do this:
303*fc3fe1c2SSimon Glass
304*fc3fe1c2SSimon GlassBuilding 18 commits for 1059 boards (4 threads, 1 job per thread)
305*fc3fe1c2SSimon GlassBuild directory: ../lcd9b
306*fc3fe1c2SSimon Glass    5bb3505 Merge branch 'master' of git://git.denx.de/u-boot-arm
307*fc3fe1c2SSimon Glass    c18f1b4 tegra: Use const for pinmux_config_pingroup/table()
308*fc3fe1c2SSimon Glass    2f043ae tegra: Add display support to funcmux
309*fc3fe1c2SSimon Glass    e349900 tegra: fdt: Add pwm binding and node
310*fc3fe1c2SSimon Glass    424a5f0 tegra: fdt: Add LCD definitions for Tegra
311*fc3fe1c2SSimon Glass    0636ccf tegra: Add support for PWM
312*fc3fe1c2SSimon Glass    a994fe7 tegra: Add SOC support for display/lcd
313*fc3fe1c2SSimon Glass    fcd7350 tegra: Add LCD driver
314*fc3fe1c2SSimon Glass    4d46e9d tegra: Add LCD support to Nvidia boards
315*fc3fe1c2SSimon Glass    991bd48 arm: Add control over cachability of memory regions
316*fc3fe1c2SSimon Glass    54e8019 lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment
317*fc3fe1c2SSimon Glass    d92aff7 lcd: Add support for flushing LCD fb from dcache after update
318*fc3fe1c2SSimon Glass    dbd0677 tegra: Align LCD frame buffer to section boundary
319*fc3fe1c2SSimon Glass    0cff9b8 tegra: Support control of cache settings for LCD
320*fc3fe1c2SSimon Glass    9c56900 tegra: fdt: Add LCD definitions for Seaboard
321*fc3fe1c2SSimon Glass    5cc29db lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed console
322*fc3fe1c2SSimon Glass    cac5a23 tegra: Enable display/lcd support on Seaboard
323*fc3fe1c2SSimon Glass    49ff541 wip
324*fc3fe1c2SSimon Glass
325*fc3fe1c2SSimon GlassTotal boards to build for each commit: 1059
326*fc3fe1c2SSimon Glass
327*fc3fe1c2SSimon GlassThis shows that it will build all 1059 boards, using 4 threads (because
328*fc3fe1c2SSimon Glasswe have a 4-core CPU). Each thread will run with -j1, meaning that each
329*fc3fe1c2SSimon Glassmake job will use a single CPU. The list of commits to be built helps you
330*fc3fe1c2SSimon Glassconfirm that things look about right. Notice that buildman has chosen a
331*fc3fe1c2SSimon Glass'base' directory for you, immediately above your source tree.
332*fc3fe1c2SSimon Glass
333*fc3fe1c2SSimon GlassBuildman works entirely inside the base directory, here ../lcd9b,
334*fc3fe1c2SSimon Glasscreating a working directory for each thread, and creating output
335*fc3fe1c2SSimon Glassdirectories for each commit and board.
336*fc3fe1c2SSimon Glass
337*fc3fe1c2SSimon Glass
338*fc3fe1c2SSimon GlassSuggested Workflow
339*fc3fe1c2SSimon Glass==================
340*fc3fe1c2SSimon Glass
341*fc3fe1c2SSimon GlassTo run the build for real, take off the -n:
342*fc3fe1c2SSimon Glass
343*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b <branch>
344*fc3fe1c2SSimon Glass
345*fc3fe1c2SSimon GlassBuildman will set up some working directories, and get started. After a
346*fc3fe1c2SSimon Glassminute or so it will settle down to a steady pace, with a display like this:
347*fc3fe1c2SSimon Glass
348*fc3fe1c2SSimon GlassBuilding 18 commits for 1059 boards (4 threads, 1 job per thread)
349*fc3fe1c2SSimon Glass  528   36  124 /19062  1:13:30  : SIMPC8313_SP
350*fc3fe1c2SSimon Glass
351*fc3fe1c2SSimon GlassThis means that it is building 19062 board/commit combinations. So far it
352*fc3fe1c2SSimon Glasshas managed to succesfully build 528. Another 36 have built with warnings,
353*fc3fe1c2SSimon Glassand 124 more didn't build at all. Buildman expects to complete the process
354*fc3fe1c2SSimon Glassin an hour and 15 minutes. Use this time to buy a faster computer.
355*fc3fe1c2SSimon Glass
356*fc3fe1c2SSimon Glass
357*fc3fe1c2SSimon GlassTo find out how the build went, ask for a summary with -s. You can do this
358*fc3fe1c2SSimon Glasseither before the build completes (presumably in another terminal) or or
359*fc3fe1c2SSimon Glassafterwards. Let's work through an example of how this is used:
360*fc3fe1c2SSimon Glass
361*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b lcd9b -s
362*fc3fe1c2SSimon Glass...
363*fc3fe1c2SSimon Glass01: Merge branch 'master' of git://git.denx.de/u-boot-arm
364*fc3fe1c2SSimon Glass   powerpc:   + galaxy5200_LOWBOOT
365*fc3fe1c2SSimon Glass02: tegra: Use const for pinmux_config_pingroup/table()
366*fc3fe1c2SSimon Glass03: tegra: Add display support to funcmux
367*fc3fe1c2SSimon Glass04: tegra: fdt: Add pwm binding and node
368*fc3fe1c2SSimon Glass05: tegra: fdt: Add LCD definitions for Tegra
369*fc3fe1c2SSimon Glass06: tegra: Add support for PWM
370*fc3fe1c2SSimon Glass07: tegra: Add SOC support for display/lcd
371*fc3fe1c2SSimon Glass08: tegra: Add LCD driver
372*fc3fe1c2SSimon Glass09: tegra: Add LCD support to Nvidia boards
373*fc3fe1c2SSimon Glass10: arm: Add control over cachability of memory regions
374*fc3fe1c2SSimon Glass11: lcd: Add CONFIG_LCD_ALIGNMENT to select frame buffer alignment
375*fc3fe1c2SSimon Glass12: lcd: Add support for flushing LCD fb from dcache after update
376*fc3fe1c2SSimon Glass       arm:   + lubbock
377*fc3fe1c2SSimon Glass13: tegra: Align LCD frame buffer to section boundary
378*fc3fe1c2SSimon Glass14: tegra: Support control of cache settings for LCD
379*fc3fe1c2SSimon Glass15: tegra: fdt: Add LCD definitions for Seaboard
380*fc3fe1c2SSimon Glass16: lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed console
381*fc3fe1c2SSimon Glass17: tegra: Enable display/lcd support on Seaboard
382*fc3fe1c2SSimon Glass18: wip
383*fc3fe1c2SSimon Glass
384*fc3fe1c2SSimon GlassThis shows which commits have succeeded and which have failed. In this case
385*fc3fe1c2SSimon Glassthe build is still in progress so many boards are not built yet (use -u to
386*fc3fe1c2SSimon Glasssee which ones). But still we can see a few failures. The galaxy5200_LOWBOOT
387*fc3fe1c2SSimon Glassnever builds correctly. This could be a problem with our toolchain, or it
388*fc3fe1c2SSimon Glasscould be a bug in the upstream. The good news is that we probably don't need
389*fc3fe1c2SSimon Glassto blame our commits. The bad news is it isn't tested on that board.
390*fc3fe1c2SSimon Glass
391*fc3fe1c2SSimon GlassCommit 12 broke lubbock. That's what the '+ lubbock' means. The failure
392*fc3fe1c2SSimon Glassis never fixed by a later commit, or you would see lubbock again, in green,
393*fc3fe1c2SSimon Glasswithout the +.
394*fc3fe1c2SSimon Glass
395*fc3fe1c2SSimon GlassTo see the actual error:
396*fc3fe1c2SSimon Glass
397*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b <branch> -se lubbock
398*fc3fe1c2SSimon Glass...
399*fc3fe1c2SSimon Glass12: lcd: Add support for flushing LCD fb from dcache after update
400*fc3fe1c2SSimon Glass       arm:   + lubbock
401*fc3fe1c2SSimon Glass+common/libcommon.o: In function `lcd_sync':
402*fc3fe1c2SSimon Glass+/u-boot/lcd9b/.bm-work/00/common/lcd.c:120: undefined reference to `flush_dcache_range'
403*fc3fe1c2SSimon Glass+arm-none-linux-gnueabi-ld: BFD (Sourcery G++ Lite 2010q1-202) 2.19.51.20090709 assertion fail /scratch/julian/2010q1-release-linux-lite/obj/binutils-src-2010q1-202-arm-none-linux-gnueabi-i686-pc-linux-gnu/bfd/elf32-arm.c:12572
404*fc3fe1c2SSimon Glass+make: *** [/u-boot/lcd9b/.bm-work/00/build/u-boot] Error 139
405*fc3fe1c2SSimon Glass13: tegra: Align LCD frame buffer to section boundary
406*fc3fe1c2SSimon Glass14: tegra: Support control of cache settings for LCD
407*fc3fe1c2SSimon Glass15: tegra: fdt: Add LCD definitions for Seaboard
408*fc3fe1c2SSimon Glass16: lcd: Add CONFIG_CONSOLE_SCROLL_LINES option to speed console
409*fc3fe1c2SSimon Glass-/u-boot/lcd9b/.bm-work/00/common/lcd.c:120: undefined reference to `flush_dcache_range'
410*fc3fe1c2SSimon Glass+/u-boot/lcd9b/.bm-work/00/common/lcd.c:125: undefined reference to `flush_dcache_range'
411*fc3fe1c2SSimon Glass17: tegra: Enable display/lcd support on Seaboard
412*fc3fe1c2SSimon Glass18: wip
413*fc3fe1c2SSimon Glass
414*fc3fe1c2SSimon GlassSo the problem is in lcd.c, due to missing cache operations. This information
415*fc3fe1c2SSimon Glassshould be enough to work out what that commit is doing to break these
416*fc3fe1c2SSimon Glassboards. (In this case pxa did not have cache operations defined).
417*fc3fe1c2SSimon Glass
418*fc3fe1c2SSimon GlassIf you see error lines marked with - that means that the errors were fixed
419*fc3fe1c2SSimon Glassby that commit. Sometimes commits can be in the wrong order, so that a
420*fc3fe1c2SSimon Glassbreakage is introduced for a few commits and fixed by later commits. This
421*fc3fe1c2SSimon Glassshows up clearly with buildman. You can then reorder the commits and try
422*fc3fe1c2SSimon Glassagain.
423*fc3fe1c2SSimon Glass
424*fc3fe1c2SSimon GlassAt commit 16, the error moves - you can see that the old error at line 120
425*fc3fe1c2SSimon Glassis fixed, but there is a new one at line 126. This is probably only because
426*fc3fe1c2SSimon Glasswe added some code and moved the broken line futher down the file.
427*fc3fe1c2SSimon Glass
428*fc3fe1c2SSimon GlassIf many boards have the same error, then -e will display the error only
429*fc3fe1c2SSimon Glassonce. This makes the output as concise as possible.
430*fc3fe1c2SSimon Glass
431*fc3fe1c2SSimon GlassThe full build output in this case is available in:
432*fc3fe1c2SSimon Glass
433*fc3fe1c2SSimon Glass../lcd9b/12_of_18_gd92aff7_lcd--Add-support-for/lubbock/
434*fc3fe1c2SSimon Glass
435*fc3fe1c2SSimon Glass   done: Indicates the build was done, and holds the return code from make.
436*fc3fe1c2SSimon Glass         This is 0 for a good build, typically 2 for a failure.
437*fc3fe1c2SSimon Glass
438*fc3fe1c2SSimon Glass   err:  Output from stderr, if any. Errors and warnings appear here.
439*fc3fe1c2SSimon Glass
440*fc3fe1c2SSimon Glass   log:  Output from stdout. Normally there isn't any since buildman runs
441*fc3fe1c2SSimon Glass         in silent mode for now.
442*fc3fe1c2SSimon Glass
443*fc3fe1c2SSimon Glass   toolchain: Shows information about the toolchain used for the build.
444*fc3fe1c2SSimon Glass
445*fc3fe1c2SSimon Glass   sizes: Shows image size information.
446*fc3fe1c2SSimon Glass
447*fc3fe1c2SSimon GlassIt is possible to get the build output there also. Use the -k option for
448*fc3fe1c2SSimon Glassthis. In that case you will also see some output files, like:
449*fc3fe1c2SSimon Glass
450*fc3fe1c2SSimon Glass   System.map  toolchain  u-boot  u-boot.bin  u-boot.map  autoconf.mk
451*fc3fe1c2SSimon Glass   (also SPL versions u-boot-spl and u-boot-spl.bin if available)
452*fc3fe1c2SSimon Glass
453*fc3fe1c2SSimon Glass
454*fc3fe1c2SSimon GlassChecking Image Sizes
455*fc3fe1c2SSimon Glass====================
456*fc3fe1c2SSimon Glass
457*fc3fe1c2SSimon GlassA key requirement for U-Boot is that you keep code/data size to a minimum.
458*fc3fe1c2SSimon GlassWhere a new feature increases this noticeably it should normally be put
459*fc3fe1c2SSimon Glassbehind a CONFIG flag so that boards can leave it off and keep the image
460*fc3fe1c2SSimon Glasssize more or less the same with each new release.
461*fc3fe1c2SSimon Glass
462*fc3fe1c2SSimon GlassTo check the impact of your commits on image size, use -S. For example:
463*fc3fe1c2SSimon Glass
464*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b us-x86 -sS
465*fc3fe1c2SSimon GlassSummary of 10 commits for 1066 boards (4 threads, 1 job per thread)
466*fc3fe1c2SSimon Glass01: MAKEALL: add support for per architecture toolchains
467*fc3fe1c2SSimon Glass02: x86: Add function to get top of usable ram
468*fc3fe1c2SSimon Glass       x86: (for 1/3 boards)  text -272.0  rodata +41.0
469*fc3fe1c2SSimon Glass03: x86: Add basic cache operations
470*fc3fe1c2SSimon Glass04: x86: Permit bootstage and timer data to be used prior to relocation
471*fc3fe1c2SSimon Glass       x86: (for 1/3 boards)  data +16.0
472*fc3fe1c2SSimon Glass05: x86: Add an __end symbol to signal the end of the U-Boot binary
473*fc3fe1c2SSimon Glass       x86: (for 1/3 boards)  text +76.0
474*fc3fe1c2SSimon Glass06: x86: Rearrange the output input to remove BSS
475*fc3fe1c2SSimon Glass       x86: (for 1/3 boards)  bss -2140.0
476*fc3fe1c2SSimon Glass07: x86: Support relocation of FDT on start-up
477*fc3fe1c2SSimon Glass       x86: +   coreboot-x86
478*fc3fe1c2SSimon Glass08: x86: Add error checking to x86 relocation code
479*fc3fe1c2SSimon Glass09: x86: Adjust link device tree include file
480*fc3fe1c2SSimon Glass10: x86: Enable CONFIG_OF_CONTROL on coreboot
481*fc3fe1c2SSimon Glass
482*fc3fe1c2SSimon Glass
483*fc3fe1c2SSimon GlassYou can see that image size only changed on x86, which is good because this
484*fc3fe1c2SSimon Glassseries is not supposed to change any other board. From commit 7 onwards the
485*fc3fe1c2SSimon Glassbuild fails so we don't get code size numbers. The numbers are fractional
486*fc3fe1c2SSimon Glassbecause they are an average of all boards for that architecture. The
487*fc3fe1c2SSimon Glassintention is to allow you to quickly find image size problems introduced by
488*fc3fe1c2SSimon Glassyour commits.
489*fc3fe1c2SSimon Glass
490*fc3fe1c2SSimon GlassNote that the 'text' region and 'rodata' are split out. You should add the
491*fc3fe1c2SSimon Glasstwo together to get the total read-only size (reported as the first column
492*fc3fe1c2SSimon Glassin the output from binutil's 'size' utility).
493*fc3fe1c2SSimon Glass
494*fc3fe1c2SSimon GlassA useful option is --step which lets you skip some commits. For example
495*fc3fe1c2SSimon Glass--step 2 will show the image sizes for only every 2nd commit (so it will
496*fc3fe1c2SSimon Glasscompare the image sizes of the 1st, 3rd, 5th... commits). You can also use
497*fc3fe1c2SSimon Glass--step 0 which will compare only the first and last commits. This is useful
498*fc3fe1c2SSimon Glassfor an overview of how your entire series affects code size.
499*fc3fe1c2SSimon Glass
500*fc3fe1c2SSimon GlassYou can also use -d to see a detailed size breakdown for each board. This
501*fc3fe1c2SSimon Glasslist is sorted in order from largest growth to largest reduction.
502*fc3fe1c2SSimon Glass
503*fc3fe1c2SSimon GlassIt is possible to go a little further with the -B option (--bloat). This
504*fc3fe1c2SSimon Glassshows where U-Boot has bloted, breaking the size change down to the function
505*fc3fe1c2SSimon Glasslevel. Example output is below:
506*fc3fe1c2SSimon Glass
507*fc3fe1c2SSimon Glass$ ./tools/buildman/buildman -b us-mem4 -sSdB
508*fc3fe1c2SSimon Glass...
509*fc3fe1c2SSimon Glass19: Roll crc32 into hash infrastructure
510*fc3fe1c2SSimon Glass       arm: (for 10/10 boards)  all -143.4  bss +1.2  data -4.8  rodata -48.2 text -91.6
511*fc3fe1c2SSimon Glass            paz00          :  all +23  bss -4  rodata -29  text +56
512*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 3/-2 bytes: 168/-104 (64)
513*fc3fe1c2SSimon Glass                 function                                   old     new   delta
514*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
515*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
516*fc3fe1c2SSimon Glass                 ext4fs_read_file                           540     568     +28
517*fc3fe1c2SSimon Glass                 insert_var_value_sub                       688     692      +4
518*fc3fe1c2SSimon Glass                 run_list_real                             1996    1992      -4
519*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
520*fc3fe1c2SSimon Glass            trimslice      :  all -9  bss +16  rodata -29  text +4
521*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 1/-3 bytes: 136/-124 (12)
522*fc3fe1c2SSimon Glass                 function                                   old     new   delta
523*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
524*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
525*fc3fe1c2SSimon Glass                 ext4fs_iterate_dir                         672     668      -4
526*fc3fe1c2SSimon Glass                 ext4fs_read_file                           568     548     -20
527*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
528*fc3fe1c2SSimon Glass            whistler       :  all -9  bss +16  rodata -29  text +4
529*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 1/-3 bytes: 136/-124 (12)
530*fc3fe1c2SSimon Glass                 function                                   old     new   delta
531*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
532*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
533*fc3fe1c2SSimon Glass                 ext4fs_iterate_dir                         672     668      -4
534*fc3fe1c2SSimon Glass                 ext4fs_read_file                           568     548     -20
535*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
536*fc3fe1c2SSimon Glass            seaboard       :  all -9  bss -28  rodata -29  text +48
537*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 3/-2 bytes: 160/-104 (56)
538*fc3fe1c2SSimon Glass                 function                                   old     new   delta
539*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
540*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
541*fc3fe1c2SSimon Glass                 ext4fs_read_file                           548     568     +20
542*fc3fe1c2SSimon Glass                 run_list_real                             1996    2000      +4
543*fc3fe1c2SSimon Glass                 do_nandboot                                760     756      -4
544*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
545*fc3fe1c2SSimon Glass            colibri_t20_iris:  all -9  rodata -29  text +20
546*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 2/-3 bytes: 140/-112 (28)
547*fc3fe1c2SSimon Glass                 function                                   old     new   delta
548*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
549*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
550*fc3fe1c2SSimon Glass                 read_abs_bbt                               204     208      +4
551*fc3fe1c2SSimon Glass                 do_nandboot                                760     756      -4
552*fc3fe1c2SSimon Glass                 ext4fs_read_file                           576     568      -8
553*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
554*fc3fe1c2SSimon Glass            ventana        :  all -37  bss -12  rodata -29  text +4
555*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 1/-3 bytes: 136/-124 (12)
556*fc3fe1c2SSimon Glass                 function                                   old     new   delta
557*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
558*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
559*fc3fe1c2SSimon Glass                 ext4fs_iterate_dir                         672     668      -4
560*fc3fe1c2SSimon Glass                 ext4fs_read_file                           568     548     -20
561*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
562*fc3fe1c2SSimon Glass            harmony        :  all -37  bss -16  rodata -29  text +8
563*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 2/-3 bytes: 140/-124 (16)
564*fc3fe1c2SSimon Glass                 function                                   old     new   delta
565*fc3fe1c2SSimon Glass                 hash_command                                80     160     +80
566*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
567*fc3fe1c2SSimon Glass                 nand_write_oob_syndrome                    428     432      +4
568*fc3fe1c2SSimon Glass                 ext4fs_iterate_dir                         672     668      -4
569*fc3fe1c2SSimon Glass                 ext4fs_read_file                           568     548     -20
570*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
571*fc3fe1c2SSimon Glass            medcom-wide    :  all -417  bss +28  data -16  rodata -93  text -336
572*fc3fe1c2SSimon Glass               u-boot: add: 1/-1, grow: 1/-2 bytes: 88/-376 (-288)
573*fc3fe1c2SSimon Glass                 function                                   old     new   delta
574*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
575*fc3fe1c2SSimon Glass                 do_fat_read_at                            2872    2904     +32
576*fc3fe1c2SSimon Glass                 hash_algo                                   16       -     -16
577*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
578*fc3fe1c2SSimon Glass                 hash_command                               420     160    -260
579*fc3fe1c2SSimon Glass            tec            :  all -449  bss -4  data -16  rodata -93  text -336
580*fc3fe1c2SSimon Glass               u-boot: add: 1/-1, grow: 1/-2 bytes: 88/-376 (-288)
581*fc3fe1c2SSimon Glass                 function                                   old     new   delta
582*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
583*fc3fe1c2SSimon Glass                 do_fat_read_at                            2872    2904     +32
584*fc3fe1c2SSimon Glass                 hash_algo                                   16       -     -16
585*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
586*fc3fe1c2SSimon Glass                 hash_command                               420     160    -260
587*fc3fe1c2SSimon Glass            plutux         :  all -481  bss +16  data -16  rodata -93  text -388
588*fc3fe1c2SSimon Glass               u-boot: add: 1/-1, grow: 1/-3 bytes: 68/-408 (-340)
589*fc3fe1c2SSimon Glass                 function                                   old     new   delta
590*fc3fe1c2SSimon Glass                 crc32_wd_buf                                 -      56     +56
591*fc3fe1c2SSimon Glass                 do_load_serial_bin                        1688    1700     +12
592*fc3fe1c2SSimon Glass                 hash_algo                                   16       -     -16
593*fc3fe1c2SSimon Glass                 do_fat_read_at                            2904    2872     -32
594*fc3fe1c2SSimon Glass                 do_mem_crc                                 168      68    -100
595*fc3fe1c2SSimon Glass                 hash_command                               420     160    -260
596*fc3fe1c2SSimon Glass   powerpc: (for 5/5 boards)  all +37.4  data -3.2  rodata -41.8  text +82.4
597*fc3fe1c2SSimon Glass            MPC8610HPCD    :  all +55  rodata -29  text +84
598*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 0/-1 bytes: 176/-96 (80)
599*fc3fe1c2SSimon Glass                 function                                   old     new   delta
600*fc3fe1c2SSimon Glass                 hash_command                                 -     176    +176
601*fc3fe1c2SSimon Glass                 do_mem_crc                                 184      88     -96
602*fc3fe1c2SSimon Glass            MPC8641HPCN    :  all +55  rodata -29  text +84
603*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 0/-1 bytes: 176/-96 (80)
604*fc3fe1c2SSimon Glass                 function                                   old     new   delta
605*fc3fe1c2SSimon Glass                 hash_command                                 -     176    +176
606*fc3fe1c2SSimon Glass                 do_mem_crc                                 184      88     -96
607*fc3fe1c2SSimon Glass            MPC8641HPCN_36BIT:  all +55  rodata -29  text +84
608*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 0/-1 bytes: 176/-96 (80)
609*fc3fe1c2SSimon Glass                 function                                   old     new   delta
610*fc3fe1c2SSimon Glass                 hash_command                                 -     176    +176
611*fc3fe1c2SSimon Glass                 do_mem_crc                                 184      88     -96
612*fc3fe1c2SSimon Glass            sbc8641d       :  all +55  rodata -29  text +84
613*fc3fe1c2SSimon Glass               u-boot: add: 1/0, grow: 0/-1 bytes: 176/-96 (80)
614*fc3fe1c2SSimon Glass                 function                                   old     new   delta
615*fc3fe1c2SSimon Glass                 hash_command                                 -     176    +176
616*fc3fe1c2SSimon Glass                 do_mem_crc                                 184      88     -96
617*fc3fe1c2SSimon Glass            xpedite517x    :  all -33  data -16  rodata -93  text +76
618*fc3fe1c2SSimon Glass               u-boot: add: 1/-1, grow: 0/-1 bytes: 176/-112 (64)
619*fc3fe1c2SSimon Glass                 function                                   old     new   delta
620*fc3fe1c2SSimon Glass                 hash_command                                 -     176    +176
621*fc3fe1c2SSimon Glass                 hash_algo                                   16       -     -16
622*fc3fe1c2SSimon Glass                 do_mem_crc                                 184      88     -96
623*fc3fe1c2SSimon Glass...
624*fc3fe1c2SSimon Glass
625*fc3fe1c2SSimon Glass
626*fc3fe1c2SSimon GlassThis shows that commit 19 has increased text size for arm (although only one
627*fc3fe1c2SSimon Glassboard was built) and by 96 bytes for powerpc. This increase was offset in both
628*fc3fe1c2SSimon Glasscases by reductions in rodata and data/bss.
629*fc3fe1c2SSimon Glass
630*fc3fe1c2SSimon GlassShown below the summary lines is the sizes for each board. Below each board
631*fc3fe1c2SSimon Glassis the sizes for each function. This information starts with:
632*fc3fe1c2SSimon Glass
633*fc3fe1c2SSimon Glass   add - number of functions added / removed
634*fc3fe1c2SSimon Glass   grow - number of functions which grew / shrunk
635*fc3fe1c2SSimon Glass   bytes - number of bytes of code added to / removed from all functions,
636*fc3fe1c2SSimon Glass            plus the total byte change in brackets
637*fc3fe1c2SSimon Glass
638*fc3fe1c2SSimon GlassThe change seems to be that hash_command() has increased by more than the
639*fc3fe1c2SSimon Glassdo_mem_crc() function has decreased. The function sizes typically add up to
640*fc3fe1c2SSimon Glassroughly the text area size, but note that every read-only section except
641*fc3fe1c2SSimon Glassrodata is included in 'text', so the function total does not exactly
642*fc3fe1c2SSimon Glasscorrespond.
643*fc3fe1c2SSimon Glass
644*fc3fe1c2SSimon GlassIt is common when refactoring code for the rodata to decrease as the text size
645*fc3fe1c2SSimon Glassincreases, and vice versa.
646*fc3fe1c2SSimon Glass
647*fc3fe1c2SSimon Glass
648*fc3fe1c2SSimon GlassOther options
649*fc3fe1c2SSimon Glass=============
650*fc3fe1c2SSimon Glass
651*fc3fe1c2SSimon GlassBuildman has various other command line options. Try --help to see them.
652*fc3fe1c2SSimon Glass
653*fc3fe1c2SSimon Glass
654*fc3fe1c2SSimon GlassTODO
655*fc3fe1c2SSimon Glass====
656*fc3fe1c2SSimon Glass
657*fc3fe1c2SSimon GlassThis has mostly be written in my spare time as a response to my difficulties
658*fc3fe1c2SSimon Glassin testing large series of patches. Apart from tidying up there is quite a
659*fc3fe1c2SSimon Glassbit of scope for improvement. Things like better error diffs, easier access
660*fc3fe1c2SSimon Glassto log files, error display while building. Also it would be nice it buildman
661*fc3fe1c2SSimon Glasscould 'hunt' for problems, perhaps by building a few boards for each arch,
662*fc3fe1c2SSimon Glassor checking commits for changed files and building only boards which use
663*fc3fe1c2SSimon Glassthose files.
664*fc3fe1c2SSimon Glass
665*fc3fe1c2SSimon Glass
666*fc3fe1c2SSimon GlassCredits
667*fc3fe1c2SSimon Glass=======
668*fc3fe1c2SSimon Glass
669*fc3fe1c2SSimon GlassThanks to Grant Grundler <grundler@chromium.org> for his ideas for improving
670*fc3fe1c2SSimon Glassthe build speed by building all commits for a board instead of the other
671*fc3fe1c2SSimon Glassway around.
672*fc3fe1c2SSimon Glass
673*fc3fe1c2SSimon Glass
674*fc3fe1c2SSimon Glass
675*fc3fe1c2SSimon GlassSimon Glass
676*fc3fe1c2SSimon Glasssjg@chromium.org
677*fc3fe1c2SSimon GlassHalloween 2012
678*fc3fe1c2SSimon GlassUpdated 12-12-12
679*fc3fe1c2SSimon GlassUpdated 23-02-13
680