diff options
author | Simon Glass | 2014-12-01 17:34:02 -0700 |
---|---|---|
committer | Simon Glass | 2015-01-14 21:16:53 -0800 |
commit | 620053421c1a346259bcd07db08c54cca99349ac (patch) | |
tree | a2d08bf3ab7c67d1b065887649aa739339882e92 /tools/buildman/README | |
parent | 346996969de74b18562e58a98788d93cc026a7e5 (diff) |
buildman: Add documentation about the .buildman file
This file is only partially documented. Add some more details.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'tools/buildman/README')
-rw-r--r-- | tools/buildman/README | 73 |
1 files changed, 53 insertions, 20 deletions
diff --git a/tools/buildman/README b/tools/buildman/README index 34c338ed9d8..865390a6f35 100644 --- a/tools/buildman/README +++ b/tools/buildman/README @@ -141,8 +141,8 @@ $ git clone git://git.denx.de/u-boot.git . $ git checkout -b my-branch origin/master $ # Add some commits to the branch, reading for testing -2. Create ~/.buildman to tell buildman where to find tool chains. As an -example: +2. Create ~/.buildman to tell buildman where to find tool chains (see 'The +.buildman file' later for details). As an example: # Buildman settings file @@ -675,28 +675,61 @@ It is common when refactoring code for the rodata to decrease as the text size increases, and vice versa. -Providing 'make' flags -====================== +The .buildman file +================== + +The .buildman file provides information about the available toolchains and +also allows build flags to be passed to 'make'. It consists of several +sections, with the section name in square brackets. Within each section are +a set of (tag, value) pairs. + +'[toolchain]' section + + This lists the available toolchains. The tag here doesn't matter, but + make sure it is unique. The value is the path to the toolchain. Buildman + will look in that path for a file ending in 'gcc'. It will then execute + it to check that it is a C compiler, passing only the --version flag to + it. If the return code is 0, buildman assumes that it is a valid C + compiler. It uses the first part of the name as the architecture and + strips off the last part when setting the CROSS_COMPILE environment + variable (parts are delimited with a hyphen). + + For example powerpc-linux-gcc will be noted as a toolchain for 'powerpc' + and CROSS_COMPILE will be set to powerpc-linux- when using it. + +'[toolchain-alias]' section + + This converts toolchain architecture names to U-Boot names. For example, + if an x86 toolchains is called i386-linux-gcc it will not normally be + used for architecture 'x86'. Adding 'x86: i386' to this section will + tell buildman that the i386 toolchain can be used for x86. + +'[make-flags]' section + + U-Boot's build system supports a few flags (such as BUILD_TAG) which + affect the build product. These flags can be specified in the buildman + settings file. They can also be useful when building U-Boot against other + open source software. + + [make-flags] + at91-boards=ENABLE_AT91_TEST=1 + snapper9260=${at91-boards} BUILD_TAG=442 + snapper9g45=${at91-boards} BUILD_TAG=443 -U-Boot's build system supports a few flags (such as BUILD_TAG) which affect -the build product. These flags can be specified in the buildman settings -file. They can also be useful when building U-Boot against other open source -software. + This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260 + and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special + variable ${target} is available to access the target name (snapper9260 + and snapper9g20 in this case). Variables are resolved recursively. Note + that variables can only contain the characters A-Z, a-z, 0-9, hyphen (-) + and underscore (_). -[make-flags] -at91-boards=ENABLE_AT91_TEST=1 -snapper9260=${at91-boards} BUILD_TAG=442 -snapper9g45=${at91-boards} BUILD_TAG=443 + It is expected that any variables added are dealt with in U-Boot's + config.mk file and documented in the README. -This will use 'make ENABLE_AT91_TEST=1 BUILD_TAG=442' for snapper9260 -and 'make ENABLE_AT91_TEST=1 BUILD_TAG=443' for snapper9g45. A special -variable ${target} is available to access the target name (snapper9260 and -snapper9g20 in this case). Variables are resolved recursively. Note that -variables can only contain the characters A-Z, a-z, 0-9, hyphen (-) and -underscore (_). + Note that you can pass ad-hoc options to the build using environment + variables, for example: -It is expected that any variables added are dealt with in U-Boot's -config.mk file and documented in the README. + SOME_OPTION=1234 ./tools/buildman/buildman my_board Quick Sanity Check |