summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeLines
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-02-12-1/+3
|\
| * tools: imximage: Let .name field be more genericFabio Estevam2013-01-28-1/+1
| | | | | | | | | | | | | | 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>
| * mx23: config: Enable mxsboot tool for i.MX23 based boardsOtavio Salvador2013-01-21-0/+2
| | | | | | | | | | | | | | 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>
* | treewide: include libfdt_env.h before fdt.hKim Phillips2013-02-07-2/+0
| | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Allow use outside of u-boot treeVadim Bendebury2013-01-31-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Add settings to the list of modules to doctestDoug Anderson2013-01-31-2/+3
| | | | | | | | | | | | The settings modules now has doctests, so run them. Signed-off-by: Doug Anderson <dianders@chromium.org>
* | patman: Add the concept of multiple projectsDoug Anderson2013-01-31-4/+208
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Add support for settings in .patmanDoug Anderson2013-01-31-6/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Add a call to get_maintainer.pl if it existsDoug Anderson2013-01-31-2/+74
| | | | | | | | | | | | | | | | | | 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>
* | patman: Add all CC addresses to the cover letterDoug Anderson2013-01-31-2/+15
| | | | | | | | | | | | | | 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>
* | patman: Cache the CC list from MakeCcFile() for use in ShowActions()Doug Anderson2013-01-31-6/+13
| | | | | | | | | | | | | | | | | | | | 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>
* | patman: Look for checkpatch in the scripts directoryDoug Anderson2013-01-31-1/+3
| | | | | | | | | | | | | | | | | | 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>
* | patman: Allow tests to run even if patman is in the pathDoug Anderson2013-01-31-2/+9
| | | | | | | | | | | | | | | | | | | | | | 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>
* | patman: Add spaces back into patman testDoug Anderson2013-01-31-3/+3
|/ | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-01-08-1/+8
|\
| * Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-08-1/+8
| |\
| | * tools: imximage: Load a size that is multiple of 512Fabio Estevam2013-01-05-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Revert "fw_env: fix building w/out a config.h"Tom Rini2012-12-20-10/+26
| | | | | | | | | | | | | | | | | | | | | | | | I had missed Joe's NAK on this patch, so... This reverts commit 92ace272d06cec1d7f1533bb9edf914fb5845fba. Signed-off-by: Tom Rini <trini@ti.com>
* | | fw_env: fix building w/out a config.hMike Frysinger2012-12-19-26/+10
| | | | | | | | | | | | | | | Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
* | | fw_env: fix incorrect usage of open(O_CREAT)Mike Frysinger2012-12-19-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | fw_env: fix type of lenMike Frysinger2012-12-19-1/+2
|/ / | | | | | | | | | | | | | | | | | | | | 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>
* | env: Handle write-once ethaddr and serial# genericallyJoe Hershberger2012-12-13-17/+0
| | | | | | | | | | | | | | 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>
* | env: Add support for access control to .flagsJoe Hershberger2012-12-13-4/+70
| | | | | | | | | | | | Add support for read-only, write-once, and change-default. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | tools/env: Add environment variable flags supportJoe Hershberger2012-12-13-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Correct comment to show the parameters as defined in tools/mkimage.hLars Rasmusson2012-12-11-1/+1
|/ | | | Signed-off-by: Lars Rasmusson <Lars.Rasmusson@sics.se>
* patman: Issue empty change logs for unchanged patchesSimon Glass2012-11-14-8/+13
| | | | | | | | | | | | 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>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2012-11-05-68/+40
|\
| * Merge remote-tracking branch 'u-boot-imx/master'Albert ARIBAUD2012-10-27-68/+40
| |\
| | * imximage: make set_imx_hdr_v1/v2 easier to readTroy Kisky2012-10-20-19/+11
| | | | | | | | | | | | Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| | * imximage: change parameters to set_imx_hdrTroy Kisky2012-10-20-15/+11
| | | | | | | | | | | | | | | | | | | | | Call with the value the function will use instead of going through a pointer. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| | * imximage: delay setting of image sizeTroy Kisky2012-10-20-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * imximage: fix size of image to load.Troy Kisky2012-10-20-4/+2
| | | | | | | | | | | | | | | | | | | | | sbuf->st_size already includes sizeof(struct imx_header), so remove extra addition. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
| | * imximage: move flash_offset check to common locationTroy Kisky2012-10-20-14/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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>
| | * imximage: remove redundant setting of app_dest_ptrTroy Kisky2012-10-20-1/+0
| | | | | | | | | | | | | | | Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com> Acked-by: Stefano Babic <sbabic@denx.de>
| | * imximage: check dcd_len as entries addedTroy Kisky2012-10-20-15/+11
| | | | | | | | | | | | | | | | | | | | | 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>
* | | patman: Add additional tags to ignoreSimon Glass2012-11-04-2/+2
|/ / | | | | | | | | | | | | | | | | 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>
* | Merge remote-tracking branch 'u-boot-ti/master'Albert ARIBAUD2012-10-26-18/+65
|\ \
| * | omapimage: Add support for byteswapped SPI imagesTom Rini2012-10-25-18/+65
| |/ | | | | | | | | | | | | 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>
* | patman: force git log commands to not use colorAlbert ARIBAUD2012-10-19-2/+3
| | | | | | | | | | | | | | | | | | | | 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>
* | env: cosmetic: Consilidate the default env definitionJoe Hershberger2012-10-19-96/+2
| | | | | | | | | | | | | | 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>
* | tools/env: Improve debug printsJoe Hershberger2012-10-16-5/+22
| | | | | | | | | | | | | | Provide more information when using redundant environments Consistently print debug info to stderr Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* | tools/env: Fix variable delete operationJoe Hershberger2012-10-16-2/+3
|/ | | | | | | Fix crash introduced by a073d63a36524453a817ab029fad5b188f46127e when attempting to delete a variable. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* tools/env: Fix build failure from missing header includeJoe Hershberger2012-10-15-0/+1
| | | | | | | | | | 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>
* kerneldoc: Implement "Example" section handlingMarek Vasut2012-10-15-0/+3
| | | | | | | | 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>
* kerneldoc: Implant DocBook from Linux kernelMarek Vasut2012-10-15-1/+3170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* tools: Add a README note about fw_printenv lock fileJoe Hershberger2012-10-15-0/+4
| | | | | | | 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>
* env: Check for NULL pointer in envmatch()Joe Hershberger2012-10-15-0/+2
| | | | | | | If the pointer passed into envmatch() is NULL, return -1 instead of crashing. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* tools/env: Serialize calls to fw_*envJoe Hershberger2012-10-15-22/+37
| | | | | | | 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>
* tools/env: Don't call env_init() in fw_getenv()Joe Hershberger2012-10-15-3/+0
| | | | | | We will only call fw_getenv when the env has already been initialized. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* tools/env: Remove unneeded complexityJoe Hershberger2012-10-15-20/+13
| | | | | | | | | 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>