bulidman: Add support for a simple build
[oweals/u-boot.git] / tools / buildman / README
index ccea13fd2dbcd1871d960c2a8cdf0267ecdf7920..abbbbea9f211e46e67b30c2199e792571c68b94d 100644 (file)
@@ -1,7 +1,5 @@
+# SPDX-License-Identifier: GPL-2.0+
 # Copyright (c) 2013 The Chromium OS Authors.
-#
-# SPDX-License-Identifier:     GPL-2.0+
-#
 
 (Please read 'How to change from MAKEALL' if you are used to that tool)
 
@@ -116,6 +114,10 @@ a few commits or boards, it will be pretty slow. As a tip, if you don't
 plan to use your machine for anything else, you can use -T to increase the
 number of threads beyond the default.
 
+
+Selecting which boards to build
+===============================
+
 Buildman lets you build all boards, or a subset. Specify the subset by passing
 command-line arguments that list the desired board name, architecture name,
 SOC name, or anything else in the boards.cfg file. Multiple arguments are
@@ -135,16 +137,22 @@ the '&' operator to limit the selection:
 
 You can also use -x to specifically exclude some boards. For example:
 
buildmand arm -x nvidia,freescale,.*ball$
 buildman arm -x nvidia,freescale,.*ball$
 
 means to build all arm boards except nvidia, freescale and anything ending
 with 'ball'.
 
+For building specific boards you can use the --boards option, which takes a
+comma-separated list of board target names and be used multiple times on
+the command line:
+
+  buildman --boards sandbox,snow --boards
+
 It is convenient to use the -n option to see what will be built based on
-the subset given.
+the subset given. Use -v as well to get an actual list of boards.
 
 Buildman does not store intermediate object files. It optionally copies
-the binary output into a directory when a build is successful. Size
+the binary output into a directory when a build is successful (-k). Size
 information is always recorded. It needs a fair bit of disk space to work,
 typically 250MB per thread.
 
@@ -343,12 +351,6 @@ Toolchain '/toolchains/gcc-4.6.3-nolibc/m68k-linux/bin/m68k-linux-gcc' at priori
       - looking in '/toolchains/gcc-4.6.3-nolibc/powerpc-linux/usr/bin'
 Tool chain test:  OK, arch='powerpc', priority 4
 Tool chain test:  OK, arch='or32', priority 4
-   - scanning path '/toolchains/gcc-4.2.4-nolibc/avr32-linux'
-      - looking in '/toolchains/gcc-4.2.4-nolibc/avr32-linux/.'
-      - looking in '/toolchains/gcc-4.2.4-nolibc/avr32-linux/bin'
-         - found '/toolchains/gcc-4.2.4-nolibc/avr32-linux/bin/avr32-linux-gcc'
-      - looking in '/toolchains/gcc-4.2.4-nolibc/avr32-linux/usr/bin'
-Tool chain test:  OK, arch='avr32', priority 4
    - scanning path '/'
       - looking in '/.'
       - looking in '/bin'
@@ -381,7 +383,6 @@ aarch64   : /toolchains/gcc-4.9.0-nolibc/aarch64-linux/bin/aarch64-linux-gcc
 alpha     : /toolchains/gcc-4.9.0-nolibc/alpha-linux/bin/alpha-linux-gcc
 am33_2.0  : /toolchains/gcc-4.9.0-nolibc/am33_2.0-linux/bin/am33_2.0-linux-gcc
 arm       : /opt/arm-eabi-4.6/bin/arm-eabi-gcc
-avr32     : /toolchains/gcc-4.2.4-nolibc/avr32-linux/bin/avr32-linux-gcc
 bfin      : /toolchains/gcc-4.6.3-nolibc/bfin-uclinux/bin/bfin-uclinux-gcc
 c89       : /usr/bin/c89-gcc
 c99       : /usr/bin/c99-gcc
@@ -428,7 +429,7 @@ Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.3/
 Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.6.2/
 Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.1/
 Checking: https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.2.4/
-Available architectures: alpha am33_2.0 arm avr32 bfin cris crisv32 frv h8300
+Available architectures: alpha am33_2.0 arm bfin cris crisv32 frv h8300
 hppa hppa64 i386 ia64 m32r m68k mips mips64 or32 powerpc powerpc64 s390x sh4
 sparc sparc64 tilegx x86_64 xtensa
 
@@ -473,7 +474,7 @@ Buildman should now be set up to use your new toolchain.
 
 At the time of writing, U-Boot has these architectures:
 
-   arc, arm, avr32, blackfin, m68k, microblaze, mips, nds32, nios2, openrisc
+   arc, arm, blackfin, m68k, microblaze, mips, nds32, nios2, openrisc
    powerpc, sandbox, sh, sparc, x86
 
 Of these, only arc and nds32 are not available at kernel.org..
@@ -1017,11 +1018,63 @@ variables. This avoids lots of useless output when converting a CONFIG
 option to Kconfig. To disable this behaviour, use --squash-config-y.
 
 
+Checking the environment
+========================
+
+When converting CONFIG options which manipulate the default environment,
+a common requirement is to check that the default environment has not
+changed due to the conversion. Buildman supports this with the -U option,
+used after a build. This shows differences in the default environment
+between one commit and the next.
+
+For example:
+
+$ buildman -b squash brppt1 -sU
+boards.cfg is up to date. Nothing to do.
+Summary of 2 commits for 3 boards (3 threads, 3 jobs per thread)
+01: Migrate bootlimit to Kconfig
+02: Squashed commit of the following:
+   c brppt1_mmc: altbootcmd=mmc dev 1; run mmcboot0; -> mmc dev 1; run mmcboot0
+   c brppt1_spi: altbootcmd=mmc dev 1; run mmcboot0; -> mmc dev 1; run mmcboot0
+   + brppt1_nand: altbootcmd=run usbscript
+   - brppt1_nand:  altbootcmd=run usbscript
+(no errors to report)
+
+This shows that commit 2 modified the value of 'altbootcmd' for 'brppt1_mmc'
+and 'brppt1_spi', removing a trailing semicolon. 'brppt1_nand' gained an a
+value for 'altbootcmd', but lost one for ' altbootcmd'.
+
+The -U option uses the u-boot.env files which are produced by a build.
+
+
+Building with clang
+===================
+
+To build with clang (sandbox only), use the -O option to override the
+toolchain. For example:
+
+   buildman -O clang-7 --board sandbox
+
+
+Doing a simple build
+====================
+
+In some cases you just want to build a single board and get the full output, use
+the -w option, for example:
+
+   buildman -o /tmp/build --board sandbox -w
+
+This will write the full build into /tmp/build including object files.
+
+
 Other options
 =============
 
 Buildman has various other command line options. Try --help to see them.
 
+To find out what architecture or toolchain prefix buildman will use for a build,
+see the -a and -A options.
+
 When doing builds, Buildman's return code will reflect the overall result:
 
     0 (success)     No errors or warnings found
@@ -1140,8 +1193,6 @@ access to log files. Also it would be nice if buildman could 'hunt' for
 problems, perhaps by building a few boards for each arch, or checking
 commits for changed files and building only boards which use those files.
 
-A specific problem to fix is that Ctrl-C does not exit buildman cleanly when
-multiple builder threads are active.
 
 Credits
 =======