Commit Graph

464 Commits

Author SHA1 Message Date
Simon Glass
ca706e768d 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>
2013-04-04 14:04:35 -07:00
Simon Glass
0d99fe0fd8 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>
2013-04-04 14:04:35 -07:00
Simon Glass
ed9222752d 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>
2013-04-04 14:04:35 -07:00
Simon Glass
d29fe6e2d2 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>
2013-04-04 14:04:34 -07:00
Simon Glass
fe2f8d9e2f 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>
2013-04-04 14:04:34 -07:00
Doug Anderson
6d819925d0 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>
2013-04-04 14:04:34 -07:00
Doug Anderson
28b3594eb9 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>
2013-04-04 14:04:34 -07:00
Simon Glass
5f6a1c4200 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>
2013-04-04 14:04:34 -07:00
Simon Glass
e62f905e1c 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>
2013-04-04 14:04:33 -07:00
Simon Glass
dc191505b9 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>
2013-04-04 14:04:33 -07:00
Simon Glass
a10fd93cbc 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>
2013-04-04 14:04:33 -07:00
Simon Glass
71162e3cae 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>
2013-04-04 14:04:33 -07:00
Simon Glass
43bca004d6 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>
2013-04-04 14:04:33 -07:00
Simon Glass
bbd01435b9 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>
2013-04-04 14:04:32 -07:00
Tom Rini
0cab42110d checkpatch.pl: Add 'debug' to the list of logFunctions
While the kernel mainly uses pr_debug(...), etc, for debug messages, we
use debug(...).  Add this to the list of logFunctions so that they are
correctly checked (and not warned against) for long string literals.

Signed-off-by: Tom Rini <trini@ti.com>
2013-03-27 15:30:11 -04:00
Lubomir Rintel
f1932b7850 env: Allow accessing non-mtd devices
In certain cases, memory device is present as flat file or block device (via
mmc or mtdblock layer). Do not attempt MTD operations against it.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
2013-03-11 17:05:04 -04:00
Robert P. J. Day
5501153917 Fix a couple typoes in tools/env/README
Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-03-11 17:00:28 -04:00
Kim Phillips
d45a6ae241 tools: update checkpatch to latest upstream version
i.e., from the linux kernel's commit
be987d9f80354e2e919926349282facd74992f90

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2013-03-11 17:00:28 -04:00
Robert P. J. Day
7789df9dc6 fw_env.config: Correct "fw_saveenv" to "fw_setenv".
Fix a comment in the fw_env.config file, no functional change.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
2013-02-19 17:01:26 -05:00
Tom Rini
951c6baaf4 Merge branch 'master' of git://git.denx.de/u-boot-arm 2013-02-12 10:18:31 -05:00
Kim Phillips
12e06fe03f treewide: include libfdt_env.h before fdt.h
and, if including libfdt.h which includes libfdt_env.h in
the correct order, don't include fdt.h before libfdt.h.

this is needed to get the fdt type definitions set from
the project environment before fdt.h uses them.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Cc: Jerry Van Baren <gvb.uboot@gmail.com>
2013-02-07 20:38:55 -05:00
Vadim Bendebury
99adf6eda7 patman: Allow use outside of u-boot tree
To make it usable in git trees not providing a patch checker
implementation, add a command line option, allowing to suppress patch
check. While we are at it, sort debug options alphabetically.

Also, do not raise an exception if checkpatch.pl is not found - just
print an error message suggesting to use the new option, and return
nonzero status.

   . unit test passes:
    $ ./patman  -t
    <unittest.result.TestResult run=7 errors=0 failures=0>
   . successfully used patman in the autotest tree to generate a patch
     email (with --no-check option)
   . successfully used patman in the u-boot tree to generate a patch
     email
   . `patman --help' now shows command line options ordered
     alphabetically

Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Acked-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:40 -08:00
Doug Anderson
656cffeb49 patman: Add settings to the list of modules to doctest
The settings modules now has doctests, so run them.

Signed-off-by: Doug Anderson <dianders@chromium.org>
2013-01-31 15:23:40 -08:00
Doug Anderson
a1dcee84c9 patman: Add the concept of multiple projects
There are cases that we want to support different settings (or maybe
even different aliases) for different projects.  Add support for this
by:
* Adding detection for two big projects: U-Boot and Linux.
* Adding default settings for Linux (U-Boot is already good with the
  standard patman defaults).
* Extend the new "settings" feature in .patman to specify per-project
  settings.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:40 -08:00
Doug Anderson
8568baed3b patman: Add support for settings in .patman
This patch adds support for a [settings] section in the .patman file.
In this section you can add settings that will affect the default
values for command-line options.

Support is added in a generic way such that any setting can be updated
by just referring to the "dest" of the option that is passed to the
option parser.  At the moment options that would make sense to put in
settings are "ignore_errors", "process_tags", and "verbose".  You
could override them like:

 [settings]
 ignore_errors: True
 process_tags: False
 verbose: True

The settings functionality is also used in a future change which adds
support for per-project settings.

Signed-off-by: Doug Anderson <dianders@chromium.org>
2013-01-31 15:23:40 -08:00
Doug Anderson
21a19d70e2 patman: Add a call to get_maintainer.pl if it exists
For Linux the best way to figure out where to send a patch is with the
"get_maintainer.pl" script.  Add support for calling it from patman.
Support is added unconditionally for "scripts/get_maintainer.pl" in
case it is helpful for any other projects.

Signed-off-by: Doug Anderson <dianders@chromium.org>
2013-01-31 15:23:39 -08:00
Doug Anderson
3118725515 patman: Add all CC addresses to the cover letter
If we're sending a cover letter make sure to CC everyone that we're
CCing on each of the individual patches.

Signed-off-by: Doug Anderson <dianders@chromium.org>
2013-01-31 15:23:39 -08:00
Doug Anderson
d94566a111 patman: Cache the CC list from MakeCcFile() for use in ShowActions()
Currently we go through and generate the CC list for patches twice.
This gets slow when (in a future CL) we add a call to
get_maintainer.pl on Linux.  Instead of doing things twice, just cache
the CC list when it is first generated.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:39 -08:00
Doug Anderson
d96ef37df7 patman: Look for checkpatch in the scripts directory
The Linux kernel stores checkpatch.pl in the scripts directory.  Add
that to the search path to make things more automatic for kernel
development.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:39 -08:00
Doug Anderson
a970048e75 patman: Allow tests to run even if patman is in the path
Several of the patman doctests assume that patman was run with:
  ./patman

Fix them so that they work even if patman is run with just "patman"
(because patman is in the path).

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:39 -08:00
Doug Anderson
05d5282b58 patman: Add spaces back into patman test
The patman test code was failing because some extra spaces got
stripped when it was applied.  These spaces are critical to the test
code working.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-01-31 15:23:39 -08:00
Fabio Estevam
6e08385715 tools: imximage: Let .name field be more generic
Since this structure is not i.MX5x specific, remove the '5x' to make it more
generic.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-01-28 06:49:51 +01:00
Otavio Salvador
deb0757cc7 mx23: config: Enable mxsboot tool for i.MX23 based boards
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Fabio Estevam <fabio.estevam@freescale.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
2013-01-21 12:05:21 +01:00
Tom Rini
91c038f087 Merge branch 'master' of git://git.denx.de/u-boot-arm 2013-01-08 14:26:42 -07:00
Albert ARIBAUD
7528cf5f01 Merge branch 'u-boot-imx/master' into 'u-boot-arm/master' 2013-01-08 14:59:37 +01:00
Fabio Estevam
1411fb37b5 tools: imximage: Load a size that is multiple of 512
In order to mx53 ROM to properly load the U-boot image, its header size should
be multiple of 512 bytes.

This issue was observed with gcc 4.6.2/4.7.3, which caused data aborts:

U-Boot 2013.01-rc2-00172-gf8cfcf1-dirty (Dec 26 2012 - 13:13:28)

Board: MX53 LOCO
I2C:   ready
DRAM:  1 GiB
MMC:   FSL_SDHC: 0, FSL_SDHC: 1
In:    serial
Out:   serial
Err:   serial
CPU:   Freescale i.MX53 family rev2.1 at 1000 MHz
Reset cause: WDOG
Net:   FEC
Warning: FEC using MAC address from net device

Hit any key to stop autoboot:  0
data abort

    MAYBE you should read doc/README.arm-unaligned-accesses

pc : [<aff72220>]          lr : [<aff721fc>]
sp : af565e20  ip : af566918     fp : 00000000
r10: 00000003  r9 : affabb5b     r8 : af565f58
r7 : 00000000  r6 : 36747fff     r5 : af5668e8  r4 : 36747fff
r3 : af5668ec  r2 : af5668eb     r1 : 00000000  r0 : af5668e8
Flags: NzcV  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...

,and this patch fixes it.

Also, even though the ROUND macro is already defined in common.h,
the reason for redefining it in image.h is explained by Stefano Babic:

"I will remark a previous comment - even if including common.h seems a
good idea to avoid duplications, it makes tools like mkimage to depend
on the selected board, because <board>_config must run. Even if this is
not a problem for us u-boot developers, it becomes an issue when these
tools are included in distros (like u-boot-tools in Ubuntu) and cannot
be packaged."

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2013-01-05 18:09:00 +01:00
Tom Rini
e3c52f2b87 Revert "fw_env: fix building w/out a config.h"
I had missed Joe's NAK on this patch, so...

This reverts commit 92ace272d0.

Signed-off-by: Tom Rini <trini@ti.com>
2012-12-20 07:30:27 -07:00
Mike Frysinger
92ace272d0 fw_env: fix building w/out a config.h
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
2012-12-19 15:51:57 -07:00
Mike Frysinger
7a546db2ff fw_env: fix incorrect usage of open(O_CREAT)
When using open(), the O_CREAT flag must be given a mode, otherwise it
uses random garbage from the stack.  Also, it can fail to build:

In file included from /usr/include/fcntl.h:290:0,
                 from fw_env_main.c:42:
In function 'open',
    inlined from 'main' at fw_env_main.c:97:9:
/usr/include/bits/fcntl2.h:50:24: error: call to '__open_missing_mode' declared
	with attribute error: open with O_CREAT in second argument needs 3 arguments

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-19 15:51:57 -07:00
Mike Frysinger
3779c8e319 fw_env: fix type of len
This variable is assigned by a size_t, and is printed that way, but is
incorrectly declared as an int.  Which means we get warnings:
fw_env.c: In function 'fw_setenv':
fw_env.c:409:5: warning: format '%zu' expects argument of type 'size_t',
	but argument 3 has type 'int' [-Wformat]

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-19 15:51:57 -07:00
Joe Hershberger
1d6cd0a3f6 env: Handle write-once ethaddr and serial# generically
Use the variable access flags to implement the protection for ethaddr
and serial# instead of hard-coding them.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:57 -07:00
Joe Hershberger
267541f776 env: Add support for access control to .flags
Add support for read-only, write-once, and change-default.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Joe Hershberger
30fd4fadb3 tools/env: Add environment variable flags support
Currently just validates variable types as decimal, hexidecimal,
boolean, ip address, and mac address.  Call
env_acl_validate_setenv_params() from setenv() in fw_env.c.

If the entry is not found in the env .flags, then look in the static
one. This allows the env to override the static definitions, but prevents
the need to have every definition in the environment distracting you.

Need to build in _ctype for isdigit for Linux.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-12-13 11:46:56 -07:00
Lars Rasmusson
ee7c0fc764 Correct comment to show the parameters as defined in tools/mkimage.h
Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
2012-12-11 06:46:43 -07:00
Simon Glass
27e976004e patman: Issue empty change logs for unchanged patches
Often a particular patch may change only for some versions of a series.
For versions where there is no change, issue a change log indicating
that (for example 'Changes in v4: None').

For such lines, don't add a blank line afterwards, to conserve space.
Use list.insert() instead of list = [item] + list.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Stefan Roese <sr@denx.de>
2012-11-14 10:22:47 +01:00
Tom Rini
6acc7c3cbc Merge branch 'master' of git://git.denx.de/u-boot-arm 2012-11-05 07:42:00 -07:00
Simon Glass
619dd5de69 patman: Add additional tags to ignore
The BRANCH= tag can be used to indicate the destination branch for a
commit. Ignore this tag.

Also ignore the gerrit 'Commit-Ready:' tag.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-11-04 11:00:38 -07:00
Albert ARIBAUD
f04821a8ca Merge remote-tracking branch 'u-boot-imx/master' 2012-10-27 11:43:17 +02:00
Albert ARIBAUD
c68436fa42 Merge remote-tracking branch 'u-boot-ti/master' 2012-10-26 07:00:28 +02:00
Tom Rini
79b9ebb700 omapimage: Add support for byteswapped SPI images
Add MLO.byteswap as a target to spl/Makefile and un-guard the first MLO
rule so we don't have to duplicate it.

Signed-off-by: Tom Rini <trini@ti.com>
2012-10-25 11:30:50 -07:00
Troy Kisky
ab857f2613 imximage: make set_imx_hdr_v1/v2 easier to read
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-10-20 17:13:02 +02:00
Troy Kisky
ad0826dcd8 imximage: change parameters to set_imx_hdr
Call with the value the function will use
instead of going through a pointer.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-10-20 17:13:02 +02:00
Troy Kisky
243319825f imximage: delay setting of image size
When later we change to variable length
header, we won't know the file size when
set_imx_hdr is called. So this is prep work.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-10-20 17:13:02 +02:00
Troy Kisky
348ca8efb7 imximage: fix size of image to load.
sbuf->st_size already includes sizeof(struct imx_header),
so remove extra addition.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-10-20 17:13:01 +02:00
Troy Kisky
8d8cc828f4 imximage: move flash_offset check to common location
Both set_imx_hdr_v1 and set_imx_hdr_v2 perform the
same check. Move check to before the set_imx_hdr call.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-10-20 17:13:01 +02:00
Troy Kisky
f14e6258f3 imximage: remove redundant setting of app_dest_ptr
Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Acked-by: Stefano Babic <sbabic@denx.de>
2012-10-20 17:13:01 +02:00
Troy Kisky
4d5fa98536 imximage: check dcd_len as entries added
Before the len was checked after the entire file
was processed, so it could have already overflowed.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-10-20 17:13:01 +02:00
Albert ARIBAUD
7f14f30a6d patman: force git log commands to not use color
Colored logs confuse patman when analyzing logs.
Add --no-color option in git log commands in case
the default config has color.

Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19 15:25:46 -07:00
Joe Hershberger
ddd8418f7f env: cosmetic: Consilidate the default env definition
There used to be a huge structure duplicated 3 times in the source.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-19 15:25:43 -07:00
Joe Hershberger
74620e1c94 tools/env: Improve debug prints
Provide more information when using redundant environments
Consistently print debug info to stderr

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-16 08:47:27 -07:00
Joe Hershberger
ce2f580017 tools/env: Fix variable delete operation
Fix crash introduced by a073d63a36524453a817ab029fad5b188f46127e
when attempting to delete a variable.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-16 08:47:27 -07:00
Joe Hershberger
06134211ee tools/env: Fix build failure from missing header include
This was introduced in:
8679d0ffdcc0beafea8e6942c0c67cf859afa18e -
	COMMON: Use __stringify() instead of MK_STR()

The header is now needed since common.h is not included in this tool.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 13:36:48 -07:00
Marek Vasut
95d45a91d7 kerneldoc: Implement "Example" section handling
The default kernel-doc strips starting spaces from every single
line in the Example section. This makes the code look bad. Thus,
implement special handling for this section.

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:15 -07:00
Marek Vasut
30ff89189b kerneldoc: Implant DocBook from Linux kernel
Pull slightly modified version of Documentation/DocBook, the related perl
script scripts/kernel-doc and the scripts/docproc.c from Linux kernel and
implant it into U-Boot. This will allow smooth generation of kerneldoc
style documentation.

It was necessary to modify the DocBook/Makefile to work with U-Boot build
system. The changes were only minor though and involved replacing the kbuild
specific parts.

It was also necessary to replace use of variables like KERNEL_VERSION with
U_BOOT_VERSION, strings like Linux kernel with U-Boot Bootloader etc. so
the generated result actually matches.

Finally, it was necessary to adjust docproc.c, since the documentation in
U-Boot is located in doc/DocBook instead of Documentation/DocBook as is in
case of the Linux kernel.

Some parts of the DocBook Makefile are unused, but to allow easier sync with
Linux kernel, these parts are still left in. The targets enabled now are
"htmldocs" "pdfdocs" "psdocs" "xmldocs" and "cleandocs" to remove the results
of documentation build.

Linux scripts/docproc.c:
commit f0f3ca8d967462dafb815412b14ca3339b9817a6
Date:   Wed Jun 15 11:53:13 2011 +0200

Linux scripts/kernel-doc:
commit 1b40c1944db445c1de1c47ffd8cd426167f488e8
Date:   Sun Aug 12 10:46:15 2012 +0200

Linux Documentation/DocBook:
commit bb8187d35f820671d6dd76700d77a6b55f95e2c5
Date:   Thu May 17 19:06:13 2012 -0400

Signed-off-by: Marek Vasut <marex@denx.de>
2012-10-15 11:54:14 -07:00
Joe Hershberger
1c4ea78aa7 tools: Add a README note about fw_printenv lock file
Add a mention of the lock file to the README for the fw_printenv tool.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Reported-by: Luka Perkov <uboot@lukaperkov.net>
2012-10-15 11:54:05 -07:00
Joe Hershberger
586197dfe4 env: Check for NULL pointer in envmatch()
If the pointer passed into envmatch() is NULL, return -1 instead of
crashing.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 11:54:05 -07:00
Joe Hershberger
e4a223f04d tools/env: Serialize calls to fw_*env
Use a lock file at /var/lock/fw_printenv.lock.
Avoids seriously confusing the MTD driver.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 11:54:05 -07:00
Joe Hershberger
d9acae1a88 tools/env: Don't call env_init() in fw_getenv()
We will only call fw_getenv when the env has already been initialized.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 11:54:05 -07:00
Joe Hershberger
62a34a04e7 tools/env: Remove unneeded complexity
The length included the name length, and then it was subtracted back
out on each use.  Now we don't include it in the first place.  Also
realloc as we process arguments and eliminate memset.  Use memcpy
instead of manually copying each byte.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 11:54:05 -07:00
Joe Hershberger
497f2053f8 tools/env: Use a board-specific default env
Originally added in aa701b9433

Before this patch, there was a hard-coded env that was used as default
if the env in flash is detected as invalid.  Now this tool (compiled
for a given board) will share the default env with the u-boot for the
board.

Fix include of config.h

Need to define "TEXT_BASE" when building the fw_env tool so that the
default env will be correct for environments which use it.

Define __ASSEMBLY__ when calling #include <config.h> so that we only
get #defines (all we're interested in).

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2012-10-15 11:54:05 -07:00
Fabio Estevam
92eee7cde1 tools: Add cleanpatch
There are some errors reported by checkpatch.pl that can be easily cleaned up by
using the cleanpatch tool.

Import the cleanpatch script from linux kernel 3.5.4 stable version as from the
following commit:

commit cb3ed5b7e09c6c0462e396d55e3fecc0980a333a
Author: H. Peter Anvin <hpa@zytor.com>
Date:   Fri May 25 17:58:26 2007 -0700

    scripts: Make cleanfile/cleanpatch warn about long lines

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2012-10-15 11:54:04 -07:00
Simon Glass
afb9bf55d0 patman: Handle checkpatch.pl not providing file/line info
Sometimes we don't get a valid filename or line number from checkpatch.pl,
for example if the patch is in a bad format. Deal with this by using a
default value, rather than a stack trace.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-10-15 11:54:04 -07:00
Simon Glass
ef0e9de82b patman: Support Series-name tag to name a series
Sometimes it is possible to forget the name of the branch you used to
generate an upstream series. To assist with this, add an optional
patman does not use this.

Signed-off-by: Simon Glass <sjg@chromium.org>
2012-10-15 11:54:03 -07:00
Marek Vasut
5368c55d4c COMMON: Use __stringify() instead of MK_STR()
Kill multiple occurances and redeclaration of MK_STR
in favor of __stringify().

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Tom Rini <trini@ti.com>
2012-10-15 11:53:47 -07:00
Allen Martin
2051ff3450 tools, config.mk: add binutils-version
Modeled after gcc-version, add function to get binutils version.

Signed-off-by: Allen Martin <amartin@nvidia.com>
Acked-by: Wolfgang Denk <wd@denx.de>
2012-10-04 14:18:54 +02:00
Tom Rini
cec2655c3b Merge branch 'master' of git://git.denx.de/u-boot-net 2012-09-27 12:06:07 -07:00
Otavio Salvador
244e6f9705 patman: Use reverse order for changelog
Specially when many revisions are need for a patchset, the most
interesting information is about the last set of changes so we output
the changelog in reverse order to easy identification of most recent
change set.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
2012-09-26 11:08:32 -07:00
Tom Rini
5675b50916 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2012-09-25 12:23:55 -07:00
Joe Hershberger
7f51898c1b net: Make netconsole src and dest ports configurable
It is desirable to use different port numbers for sending and receiving
packets with netconsole in the case where you have more than one device
on the local subnet with netconsole enabled for broadcast.  When they
use the same port for both, any output from one will look like input to
the other.  This is typlically not desirable.

This patch allows the input and output ports to be specified separately
in the environment.

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
Cc: Mike Frysinger <vapier@gentoo.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-09-24 13:17:24 -05:00
Benoît Thébaudeau
8ae51ae172 fw_env: Add env vars describing U-Boot target board
Commit 5e724ca did the same thing for env_common and env_embedded, but forgot
fw_env.

Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
Cc: Wolfgang Denk <wd@denx.de>
2012-09-18 12:01:51 -07:00
Otavio Salvador
43de0244c1 patman: Do not Cc addresses included in To list
In case an address is listed in the To list, those will be skipped on
Cc list or user might end with a duplicated message.

This fixes the case when a tag points to same address used as series
destination thus avoiding duplicated sending.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
2012-09-02 16:27:07 +02:00
Otavio Salvador
d5f81d8acd patman: Allow for changelog use in first version of a series
When a patchset had a RFC series, a v1 might have a changelog of
changes done since the RFC. The patch changes the range checked for
changelog and allow it to start for version 1.

Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Simon Glass <sjg@chromium.org>
2012-09-02 16:25:33 +02:00
Ilya Yanok
c7379149ff patman: don't mess with signoffs
Currently patman assumes that there should be only one Signoff line
and this is obviously incorrect: we often have to work with patches
containing other people signoffs. Moreover, it's really desirable
to preserve the comments between signoffs.

So until some sophisticated signoff processing will be developed I
suggest just don't mess with signoffs at all and treat them like
plain text lines. The only drawback I've found so far is the case
where you have a patch with someones else signoff but not yours and
also have to patman tags under signoff line. In this case you will
get extra empty line between signoffs.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-09-02 16:24:51 +02:00
Ilya Yanok
73fe07a79a patman: don't mess with changelog
Don't try to sort and uniq changelog entries as this breaks
multiline entries. It will be better to add some real multi-line
support but for now just preserve the entries as is.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-09-02 16:24:07 +02:00
Ilya Yanok
a8840cb2f0 patman: don't pick changes while processing patches
We already got all changes from git log output and the comment
to the ProcessLine function clearly states that 'patch' mode
is not for scanning tags.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-09-02 16:23:33 +02:00
Ilya Yanok
05e5b73506 patman: fix end of changes detection
Changes may end in '---' line or Signoff line (generated by
git format-patch) in case of Series-changes: lines being
the last ones in commit message. So detect it properly.

Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
2012-09-02 16:22:49 +02:00
Shaohui Xie
5d898a00f3 powerpc/CoreNet: add tool to support pbl image build.
Provides a tool to build boot Image for PBL(Pre boot loader) which is
used on Freescale CoreNet SoCs, PBL can be used to load some instructions
and/or data for pre-initialization. The default output image is u-boot.pbl,
for more details please refer to doc/README.pblimage.

Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
2012-08-23 10:24:16 -05:00
Luka Perkov
578f35a338 tools: add kwboot binary to .gitignore file
Signed-off-by: Luka Perkov <uboot@lukaperkov.net>
Acked-by: Prafulla Wadaskar <Prafulla@marvell.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-08-10 23:25:53 +02:00
Daniel Schwierzeck
8b425b3f8e MIPS: fix renaming of inca-swap-bytes to xway-swap-bytes
Fix some remains of the renaming of inca-swap-bytes introduced in

commit 60b74bde92

MIPS: INCA-IP: rename inca-swap-bytes host tool

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2012-07-27 23:44:24 +02:00
Mike Frysinger
4f7136e7c5 tools: clean up mingw ifdefs
We have a header file specifically for mingw cruft, so keep it there
to avoid crap spreading into the main tools.  This lets our devs just
worry about *nix systems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-07-20 08:53:34 +02:00
Vladimir Yakovlev
8b6a4952e6 tools: Fix mingw tools build
mkenvimage does not build due to missed os_support.o and unsupported
file modes S_IRGRP S_IWGRP.
Tested with mingw 4.2.1 on ubuntu 12.04.

Signed-off-by: Vladimir Yakovlev <nagos@inbox.ru>
2012-07-08 22:41:19 +02:00
Luka Perkov
d131ad68c6 kwboot: boot kirkwood SoCs over a serial link
The kwboot program boots boards based on Marvell's Kirkwood platform
via Xmodem over their integrated UART.

Signed-off-by: Daniel Stodden <daniel.stodden@googlemail.com>
Acked-by: Luka Perkov <uboot@lukaperkov.net>
Tested-By: Holger Brunck <holger.brunck@keymile.com>
Tested-By: David Purdy <david.c.purdy@gmail.com>
Tested-by: Simon Guinot <simon.guinot@sequanux.org>
2012-07-07 14:07:32 +02:00
Andreas Bießmann
558cd995d6 tools/mkenvimage.c: fix basename(3) usage
Use the POSIX variant of basename due to BSD systems (e.g. OS X) do not provide
GNU version of basename(3). It is save to use the POSIX variant here cause we do
never use argv[0] later on which may be modified by the basename(3) POSIX
variant.
On systems providing GNU variant the GNU variant should be used since string.h
is included before libgen.h. Therefore let the _GNU_SOURCE as is.

This patch fixes following warning (on OS X):
---8<---
mkenvimage.c: In function ‘main’:
mkenvimage.c:105: warning: implicit declaration of function ‘basename’
mkenvimage.c:105: warning: assignment makes pointer from integer without a cast
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
cc: Keith Mok <ek9852@gmail.com>
2012-07-02 20:21:49 +02:00
Eric Nelson
172a3a82af checkpatch: add check for whitespace before semicolon at end-of-line
This tests for a bad habits of mine like this:

	return 0 ;

Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
2012-06-21 21:30:02 +02:00
Loïc Minier
3648ff2d9d Strip fw_printenv like the other tools
Signed-off-by: Loïc Minier <lool@debian.org>
2012-06-21 20:28:28 +02:00
Vikram Narayanan
87d65558ef patman: Handle creation of patman config file
patman shouts when it couldn't find a $(HOME)/.patman file.
Handle it in a sane way by creating a new one for the user.
It looks for a user.name and user.email in the global .gitconfig
file, waits for the user input if it can't find there. Update the
same in the README

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Cc: Wolfgang Denk <wd@denx.de>
2012-06-19 22:51:55 +02:00
Vikram Narayanan
2b36c75d7b patman: Change the location of patman config file
Move the config file from ~/.config/patman to ~/.patman as it is
more appropriate to have it there. Update the same in the README.

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
2012-06-19 22:51:36 +02:00
Mike Frysinger
1a3cb4ad64 easylogo: add lzma support
Compressing the logos with lzma rather than gzip saves ~9kb with the
Blackfin 24bit images and ~3kb with the 16bit images.

Add a new -l option to easylogo so people can pick lzma as their
decompression routine.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-06-19 22:33:55 +02:00
Tom Rini
19a695f84b tools, config.mk: Add gcc-version.sh, cc-version test from Linux
Added from Linux - commit fde7d9049e55ab85a390be7f415d74c9f62dd0f9

Signed-off-by: Tom Rini <trini@ti.com>
2012-05-15 08:31:26 +02:00
Vikram Narayanan
330a091c11 patman: Change the location of patman path
Fix the location of patman path in README

Signed-off-by: Vikram Narayanan <vikram186@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
2012-04-30 09:57:48 +02:00