patman: Use ANSI colours only when outputting to a terminal

It is easy to detect whether or not the process is connected to a terminal,
or piped to a file. Disable ANSI colours automatically when output is
not to a terminal.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Use bright ANSI colours by default

Rather than the rather dull colours, use bright versions which normally
look better and are easier to read.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Add cros_subprocess library to manage subprocesses

This adds a new library on top of subprocess which permits access to
the subprocess output as it is being generated. We can therefore
give the illusion that a process is running independently, but still
monitor its output so that we know what is going on.

It is possible to display output on a terminal as it is generated
(a little like tee). The supplied output function is called with all
stdout/stderr data as it arrives.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Make command methods return a CommandResult

Rather than returning a list of things, return an object. That makes it
easier to access the returned items, and easier to extend the return
value later.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Allow commands to raise on error, or not

Make raise_on_error a parameter so that we can control which commands
raise and which do not. If we get an error reading the alias file, just
continue.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Allow reading metadata from a list of commits

We normally read from the current branch, but buildman will need to look
at commits from another branch. Allow the metadata to be read from any
list of commits, to provide this flexibility.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Add additional git utilties

Add methods to find out the commits in a branch, clone a repo and
fetch from a repo.

Signed-off-by: Simon Glass <sjg@chromium.org>
patman: Make "Reviewed-by" an important tag

Although "Reviewed-by:" is a tag that gerrit adds, it's also a tag
used by upstream.  Stripping it is undesirable.  In fact, we should
treat it as important.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
patman: Allow specifying the message ID your series is in reply to

Some versions of git don't seem to prompt you for the message ID that
your series is in reply to.  Allow specifying this from the command
line.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
patman: Add Cover-letter-cc tag to Cc cover letter to people

The cover letter is sent to everyone who is on the Cc list for any of
the patches in the series. Sometimes it is useful to send just the cover
letter to additional people, so that they are aware of the series, but
don't need to wade through all the individual patches.

Add a new Cover-letter-cc tag for this purpose.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
patman: Fix up checkpatch parsing to deal with 'CHECK' lines

checkpatch has a new type of warning, a 'CHECK'. At present patman fails
with these, which makes it less than useful.

Add support for checks, making it backwards compatible with the old
checkpatch.

At the same time, clean up formatting of the CheckPatches() output,
fix erroneous "internal error" if multiple patches have warnings and
be more robust to new types of problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
patman: Don't allow spaces in tags

At present something like:

   Revert "arm: Add cache operations"

will try to use

   Revert "arm

as a tag. Clearly this is wrong, so fix it.

If the revert is intended to be tagged, then the tag can come before
the revert, perhaps. Alternatively the 'Cc' tag can be used in the commit
messages.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
patman: Fix the comment in CheckTags to mention multiple tags

This comment is less than helpful. Since multiple tags are supported, add
an example of how multiple tags work.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
patman: Minor help message/README fixes

A few of the help messages are not quite right, and there is a typo
in the README. Fix these.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
patman: Ignore all Gerrit Commit-* tags

These tags are used by Gerrit, so let's ignore all of them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
buildman - U-Boot multi-threaded builder and summary tool

This tool handles building U-Boot to check that you have not broken it
with your patch series. It can build each individual commit and report
which boards fail on which commits, and which errors come up. It also
shows differences in image sizes due to particular commits.

Buildman aims to make full use of multi-processor machines.

Documentation and caveats are in tools/buildman/README.

Signed-off-by: Simon Glass <sjg@chromium.org>
dfu:ext4:fix: Change ext4write command order of parameters

Following commit:
"cmd_ext4: BREAK and correct ext4write parameter order"
SHA1:0171d52c410cbaa9290b1b214e695697c835bfe5

introduced cleanup of ext4write semantics to be consistent with other
filesystem's writing commands (e.g. fatwrite).
This commit provides correct ext4write command generation at DFU eMMC
code.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
dfu: Increase DFU buffer size from 4MiB to 8MiB

Increase size of DMA buffer from 4MiB to 8MiB. This is necessary due to
uImage size increase.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
common/cmd_test: Avoid macro expansion

cmd_test.c adds "true" and "false" as new commands. We need to avoid macro
expansion for U_BOOT_CMD.

Signed-off-by: York Sun <yorksun@freescale.com>
cmd_sf: include header file common.h before div64.h

The header file div64.h includes <asm/types.h> which defines
the phys_addr_t according to the macro CONFIG_PHYS_64BIT, while
the macro CONFIG_PHYS_64BIT is included in common.h which comes
after div64.h, so in order to get consistent type definition for
phys_addr_t, common.h should be included before div64.h, Or else,
the parameters of phys_addr_t type will be passed wrongly when
CONFIG_PHYS_64BIT is defined.

Signed-off-by: Mingkai Hu <Mingkai.Hu@freescale.com>