Commit Graph

736 Commits

Author SHA1 Message Date
Simon Glass d2ce658de5 buildman: Add an option to write the full build output
Normally buildman runs with 'make -s' meaning that only errors and warnings
appear in the log file. Add a -V option to run make in verbose mode, and
with V=1, causing a full build log to be created.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:54 -08:00
Simon Glass 827e37b558 buildman: Add the option to download toolchains from kernel.org
The site at https://www.kernel.org/pub/tools/crosstool/ is a convenient
repository of toolchains which can be used for U-Boot. Add a feature to
download and install a toolchain for a selected architecture automatically.

It isn't clear how long this site will stay in the current place and
format, but we should be able to rely on bug reports if it changes.

Suggested-by: Marek Vašut <marex@denx.de>
Suggested-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:54 -08:00
Simon Glass 9b83bfdcb0 buildman: Allow architecture to alias to multiple toolchains
Some archs have need than one alias, so support a list of alises in the
..buildman file.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:54 -08:00
Simon Glass cc935295f2 buildman: Don't use the local settings when running tests
We should create a test setting file when running testes, not use whatever
happens to be on the local machine.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:54 -08:00
Simon Glass 7024ab6316 buildman: Don't complain about missing sections in ~/.buildman
Silently ignore this since it is valid to have missing sections.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:54 -08:00
Simon Glass 620053421c 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>
2015-01-14 21:16:53 -08:00
Simon Glass 346996969d buildman: Add a note about Python pre-requisites
Since we need a few modules which might not be available in a bare-bones
distribution, add a note about that to the README.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Wolfgang Denk <wd@denx.de>
2015-01-14 21:16:53 -08:00
Simon Glass bb1501f2c2 buildman: Add an option to use the full tool chain path
In some cases there may be multiple toolchains with the same name in the
path. Provide an option to use the full path in the CROSS_COMPILE
environment variable.

Note: Wolfgang mentioned that this is dangerous since in some cases there
may be other tools on the path that are needed. So this is set up as an
option, not the default. I will need test confirmation (i.e. that this
commit fixes a real problem) before merging it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Steve Rae <srae@broadcom.com>
2015-01-14 21:16:53 -08:00
Simon Glass f210b58734 buildman: Put the toolchain path first instead of last in PATH
If:

1. Toolchains A and B have the same filename
2. Toolchain A is in the PATH
3. Toolchain B is given in ~/.buildman and buildman uses it to build

then buildman will add toolchain B to the end of its path but will not
necessarily use it since U-Boot will find toolchain A first in the PATH.

Try to fix this by putting the toolchain first in the path instead of
last.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:53 -08:00
Simon Glass b53241230d buildman: Try to avoid hard-coded string parsing
The assumption that the compiler name will always end in gcc is incorrect
for clang and apparently on BSD.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:53 -08:00
Simon Glass 5abab20dfb buildman: Allow specifying a range of commits to build
Adjust the -b flag to permit a range expression as well as a branch.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2015-01-14 21:16:53 -08:00
Simon Glass 0740127f4d buildman: Don't remove entire output directory when testing
When running tests the output directory is often wiped. This is only safe if
a branch is being built. The output directory may contain other things
besides the buildman test output.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:52 -08:00
Simon Glass 5971ab5c44 buildman: Add an option to flatten output directory trees
When building current source for a single board, buildman puts the output
in <output_dir>/current/current/<board>. Add an option to make it use
<output_dir>/<board> instead. This removes the unnecessary directories
in that case, controlled by the --no-subdirs/-N option.

Suggested-by: Tom Rini <trini@ti.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:52 -08:00
Simon Glass 2a9e2c6a09 buildman: Try to guess the upstream commit
Buildman normally obtains the upstream commit by asking git. Provided that
the branch was created with 'git checkout -b <branch> <some_upstream>' then
this normally works.

When there is no upstream, we can try to guess one, by looking up through
the commits until we find a branch. Add a function to try this and print
a warning if buildman ends up relying on it.

Also update the documentation to match.

Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Wolfgang Denk <wd@denx.de>
2015-01-14 21:16:52 -08:00
Simon Glass 1a91567510 buildman: Don't prune output space for 'current source' build
This is not needed since we always do a full (non-incremental) build. Also
it might be dangerous since it will try to delete everything below the
base directory.

Fix this potentially nasty bug.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:52 -08:00
Simon Glass 05c96b187a buildman: Put build in 'current', not 'current/current'
Buildman currently puts current-source builds in a current/current
subdirectory, but there is no need for the extra depth.

Suggested-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:52 -08:00
Simon Glass 4466c1f943 buildman: Add tests that check the correct output directory is used
Add a few tests of the output directory logic.

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 21:16:52 -08:00
Tom Rini bd5053ffa5 Merge branch 'buildman' of git://git.denx.de/u-boot-x86
Conflicts:
	tools/buildman/control.py

Signed-off-by: Tom Rini <trini@ti.com>
2015-01-14 11:00:38 -05:00
Simon Glass 8a388085c7 x86: Correct ifdtool microcode calculation
This currently assumes that U-Boot resides at the start of ROM. Update
it to remove this assumption.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2015-01-13 07:24:58 -08:00
Andreas Bießmann f411b8f227 tools/kwbimage.c: fix parser error handling
The two error checks for image_boot_mode_id and image_nand_ecc_mode_id where
wrong and would never fail, fix that!

This was detected by Apple's clang compiler:
---8<---
  HOSTCC  tools/kwbimage.o
tools/kwbimage.c:553:20: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                if (el->bootfrom < 0) {
                    ~~~~~~~~~~~~ ^ ~
tools/kwbimage.c:571:23: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
                if (el->nandeccmode < 0) {
                    ~~~~~~~~~~~~~~~ ^ ~
2 warnings generated.
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-By: Jeroen Hofstee <jeroen@myspectrum.nl>
2015-01-11 09:05:03 -05:00
Łukasz Majewski 93e9371f00 fix: tools: kwbimage.c: Initialize headersz to suppress warning
When building with my toolchain (4.8.2):
CROSS_COMPILE=/home/lukma/work/ptxdist/toolchains/arm/OSELAS.Toolchain-2013.12.0/arm-v7a-linux-gnueabi/gcc-4.8.2-glibc-2.18-binutils-2.24-kernel-3.12-sanitized/bin/arm-v7a-linux-gnueabi-

I see following WARNING:
tools/kwbimage.c: In function "kwbimage_set_header":
tools/kwbimage.c:803:8: warning: "headersz" may be used uninitialized in this function [-Wmaybe-uninitialized]
  memcpy(ptr, image, headersz);
        ^
This fix aims to suppress it.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Acked-by: Stefan Roese <sr@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
2015-01-10 14:09:55 -05:00
Dirk Behme 3e1ded1fff buildman: Fix some typos in README
Signed-off-by: Dirk Behme <dirk.behme@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-12-29 16:31:24 -05:00
Simon Glass d2c6181d2d x86: Add a script to process Intel microcode files
Intel delivers microcode updates in a microcode.dat file which must be
split up into individual files for each CPU. Add a tool which performs
this task. It can list available microcode updates for each model and
produce a new microcode update in U-Boot's .dtsi format.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:08 -07:00
Simon Glass 31eca69727 x86: ifdtool: Add support for early microcode access
Some Intel CPUs use an 'FSP' binary blob which provides an inflexible
means of starting up the CPU. One result is that microcode updates can only
be done before RAM is available and therefore parsing of the device tree
is impracticle.

Worse, the addess of the microcode update must be stored in ROM since a
pointer to its start address and size is passed to the 'FSP' blob. It is
not possible to perform any calculations to obtain the address and size.

To work around this, ifdtool is enhanced to work out the address and size of
the first microcode update it finds in the supplied device tree. It then
writes these into the correct place in the ROM. U-Boot can then start up
the FSP correctly.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:05 -07:00
Simon Glass 65851fcec3 x86: ifdtool: Use a structure for the file/address list
Rather than two independent arrays, use a single array of a suitable
structure. Also add a 'type' member since we will shortly add additional
types.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:04 -07:00
Simon Glass fa8d3b00f9 x86: ifdtool: Display filename when file errors are reported
When a file is missing it helps to know which file. Update the error message
to print this information.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:04 -07:00
Simon Glass 7e8ffa4ed8 x86: ifdtool: Correct a debug() missing parameter
This is missing a parameter. Fix it to avoid a warning when debug is
enabled.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2014-12-18 17:26:04 -07:00
Simon Glass 7dfb172d67 x86: ifdtool: Separate out filenames for -D and -i
To allow these options to be specified together, separate them out.

Change-Id: Ib93f11cd51eb3302127f4c82936ff2b44c88d5a2
Signed-off-by: Simon Glass <sjg@chromium.org>
2014-12-13 22:32:04 -07:00
Bin Meng 673ed2f8c2 tools/ifdtool: Support writing multiple files (-w) simultaneously
Currently ifdtool only supports writing one file (-w) at a time.
This looks verbose when generating u-boot.rom for x86 targets.
This change allows at most 16 files to be written simultaneously.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-12-13 22:32:04 -07:00
Alison Wang 94cb17d078 ls102xa: pblimage: Add pblimage tool support for LS102xA
For LS102xA, the size of spl/u-boot-spl.bin is variable.
This patch adds the support to deal with the variable
u-boot size in pblimage tool. It will be padded to 64
byte boundary.

Use pblimage_check_params() to add the specific operations
for ARM, such as PBI CRC and END command and the calculation
of pbl_cmd_initaddr.

Signed-off-by: Alison Wang <alison.wang@freescale.com>
Reviewed-by: York Sun <yorksun@freescale.com>
2014-12-11 09:36:34 -08:00
Tom Rini 97cdf64026 Merge branch 'sandbox' of git://git.denx.de/u-boot-x86 2014-12-04 09:24:05 -05:00
Simon Glass 1d8104fe88 buildman: Don't default to -e when building current source
We probably don't need to enable this option by default. It is useful to
display only failure boards (not errors) and it is easy to add -e if it
is required. Also update the docs.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
2014-11-26 20:25:40 -07:00
Simon Glass f66153be19 buildman: Fix repeating board list with -l
Ensure that we don't print duplicate board names when -l is used.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
2014-11-26 20:25:40 -07:00
Simon Glass 0b5b409acc patman: Use the full commit hash for 'git checkout'
Even with the initial 8 characeters of the hash we will sometimes get a
collision. Use the full hash.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-26 20:25:39 -07:00
Tom Rini ce267335c3 buildman: Save *.img files too
When saving binary files we likely want to keep any .img files that have
been generated as well.

Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-11-26 20:25:39 -07:00
Bin Meng 908ec6e4d1 tools: Add ifdtool to .gitignore
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2014-11-25 07:11:17 -07:00
Tom Rini dee332ffb7 Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-24 12:02:12 -05:00
Simon Glass c03c951b06 x86: ifdtool: Allow creation of an empty ROM
Allow an empty ROM to be created, without needing to provide a descriptor.
The descriptor is not needed on some x86 boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-21 07:34:05 +01:00
Simon Glass cd392fe8a0 x86: Add ifdtool for working with Intel Flash Descriptor ROM images
Newer Intel chips require a Management Engine which requires a particular
format for the SPI flash that contains the boot loader. Add a tool that
supports creating and modifying these ROM images.

This tool is from Chrome OS but has been cleaned up to use U-Boot style
and to add comments. A few features have been added also.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-21 07:24:11 +01:00
Albert ARIBAUD 3cb4b713e1 tools/msximage.c: fix warning about nptr possibly uninitialized
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2014-11-20 10:30:19 +01:00
Alexey Ignatov 7a139959d0 ARM: mxs: tools: Add support for boot progress display flag
mkimage -T mxs now support new flag in config file:
DISPLAYPROGRESS - makes boot process print HTLLC characters for each BootROM
instruction.

Signed-off-by: Alexey Ignatov <lexszero@gmail.com>
2014-11-20 10:13:45 +01:00
Dominik Muth e72be8947e Added support for comments in input to mkenvimage.
This patch adds support for comments in the input to mkenvimage, i.e. in
the environment source: All lines starting with a # in the firs column
will be ignored.

Additionally empty lines will also be ignored.

Signed-off-by: Dominik Muth <dominik.muth@bkvibro.com>
2014-11-10 16:25:28 -05:00
Dominic Sacré ea19527c20 tools/env: Fix environment size and CRC on 64-bit hosts
On architectures where 'long' is 64 bit, the u-boot environment
as seen by the fw_env tools was missing 4 bytes.
This patch fixes getenvsize(), and thus also ensures that the
environment's CRC32 checksum is calculated correctly.

Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Tom Rini <trini@ti.com>
2014-11-07 16:27:07 -05:00
Masahiro Yamada ffe29ebc07 kbuild: sync top Makefile with Linux 3.18-rc1
Since Linux 3.15, relative path feature and related fixes,
cleanups have been merged to the top Makefile.

The relative path feature looks stable enough, so let's import it
to U-Boot along with various cleanups.

Commits imported from Linux (some need adjustment) are:

[1] commit 7e1c04779efd by Michal Marek
  kbuild: Use relative path for $(objtree)

[2] commit 890676c65d69 by Michal Marek
  kbuild: Use relative path when building in the source tree

[3] commit 9da0763bdd82 by Michal Marek
  kbuild: Use relative path when building in a subdir of the source tree

[4] commit c2e28dc975ea by Michal Marek
  kbuild: Print the name of the build directory

[5] commit 066b7ed95580 by Michal Marek
  kbuild: Do not print the build directory with make -s

[6] commit 3f1d9a6cec01 by Michal Marek
  kbuild: make -s should be used with kernelrelease/kernelversion/image_name

[7] commit 7ff525712acf by Masahiro Yamada
  kbuild: fake the "Entering directory ..." message more simply

[8] commit 745a254322c8 by Masahiro Yamada
  kbuild: use $(Q) for sub-make target

[9] commit aa55c8e2f7a3 by Masahiro Yamada
  kbuild: handle C=... and M=... after entering into build directory

[10] commit ab7474ea5361 by Borislav Petkov
  Kbuild: Ignore GREP_OPTIONS env variable

To use relative path feature, tools/Makefile and scripts/Makefile.autoconf
must be tweaked.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-11-07 16:27:06 -05:00
Tom Rini 625509ab0e Merge branch 'master' of git://www.denx.de/git/u-boot-imx 2014-11-05 12:48:09 -05:00
Gerald Kerma 26f195c712 ARM: kwimage: fix v0 format
This patch fix the kwimage tools for version 0 fileformat used for kirkwood
Tested on sheevaplug

Signed-off-by: Gerald Kerma <drEagle@doukki.net>
Tested-by: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Acked-By: Prafulla Wadaskar <prafulla@marvell.com>
2014-11-04 15:03:07 -05:00
Simon Glass 1ddda1b321 patman: Use the full commit hash for 'git checkout'
Even with the initial 8 characeters of the hash we will sometimes get a
collision. Use the full hash.

Signed-off-by: Simon Glass <sjg@chromium.org>
2014-11-03 14:12:39 -07:00
Simon Glass 58d818f19f buildman: Don't default to -e when using -s
When using summary mode (-s) we don't always want to display errors.
Allow this option to be omitted.

Series-to: u-boot
Series-cc: albert
Change-Id: I6b37754d55eb920ecae114fceba55834b43ea3b9
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
2014-11-03 14:10:53 -07:00
Simon Glass be338a5149 buildman: Fix repeating board list with -l
Ensure that we don't print duplicate board names when -l is used.

Change-Id: I56adb138fc18f772ba61eba0fa194cdd7bc7efc6
Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
2014-11-03 14:10:52 -07:00
Ye.Li de97980478 imximage: Fix the bootdata.size calculation
In system boot chapter of i.MX6 reference manual, the "Image Vector Table"
figure shows the bootdata.start points to the beginning of the destination
memory. It means the bootdata.size should contain the IVT offset part,
but the calculation in imximage tool does not have.

We found this issue when booting from QuadSPI NOR on i.MX6SX. The u-boot
runs into abnormal (crash or stop) after booting. After checked the destination
memory where the image is loaded to, there are hundreds of bytes at
the image end are not loaded into memory. Since there is a 4096 bytes
round in the calculation, for the booting devices using smaller IVT offset,
such as SD and SPI booting, they are not easy to reproduce.

Signed-off-by: Ye.Li <B37916@freescale.com>
2014-11-03 10:33:01 +01:00