summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2015-08-05gitignore: Add defconfig and fdtgrepBin Meng
Ignore defconfig and tools/fdtgrep. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-08-02Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini
2015-07-31patman: Don't run patman when it is imported as a moduleSimon Glass
Commit 488d19c (patman: add distutils based installer) has the side effect of making patman run twice with each invocation. Fix this by checking for 'main program' invocation in patman.py. This is good practice in any case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chris Packham <judge.packham@gmail.com>
2015-07-28patman: add distutils based installerChris Packham
To make it easier to use patman on other projects add a distutils style installer. Now patman can be installed with cd u-boot/tools/patman && python setup.py install There are also the usual distutils options for creating source/binary distributions of patman. Tested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-28buildman: Correct '--fetch-arch' command documentationBin Meng
The doc wrongly put sandbox in the '--fetch-arch' command. Remove it. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-27Reproducible U-Boot build support, using SOURCE_DATE_EPOCHPaul Kocialkowski
In order to achieve reproducible builds in U-Boot, timestamps that are defined at build-time have to be somewhat eliminated. The SOURCE_DATE_EPOCH environment variable allows setting a fixed value for those timestamps. Simply by setting SOURCE_DATE_EPOCH to a fixed value, a number of targets can be built reproducibly. This is the case for e.g. sunxi devices. However, some other devices might need some more tweaks, especially regarding the image generation tools. Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
2015-07-27tools: remove mpc86x_clk toolMasahiro Yamada
This is commented out in the Makefile for more than 10 years. I assume it is proof that this tool is unused. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Pantelis Antoniou <panto@intracom.gr>
2015-07-26imx: imximage: add new CHECK/CLR BIT commandAdrian Alonso
* Extend imximage DCD version 2 to support DCD commands CMD_WRITE_CLR_BIT 4 [address] [mask bit] means: while ((*address & ~mask) != 0); CMD_CHECK_BITS_SET 4 [address] [mask bit] means: while ((*address & mask) != mask); CMD_CHECK_BITS_CLR 4 [address] [mask bit] means: *address = *address & ~mask; * Add set_dcd_param_v2 helper function to set DCD command parameters Signed-off-by: Adrian Alonso <aalonso@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
2015-07-24kwbimage: Rename CONFIG_SYS_SPI_U_BOOT_OFFS to CONFIG_SYS_U_BOOT_OFFSStefan Roese
To use this offset for other boot device (like SDIO/MMC), lets rename it to a more generic name. This will be used be the SDIO/MMC SPL boot support for the A38x. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-24kwbimage: Add support for SDIO/MMC boot device selectionStefan Roese
This patch adds support to select the "sdio" as boot device in the kwbimage.cfg file. This line selects this SDIO device: BOOT_FROM sdio Tested on Marvell DB-88F6820-GP board. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Luka Perkov <luka.perkov@sartura.hr> Cc: Dirk Eibach <eibach@gdsys.de>
2015-07-21mkimage: Set up a file size parameter and keep it updatedSimon Glass
Some functions called by mkimage would like to know the output file size. Initially this is the same as the input file size, but it may be affected by adding headers, etc. Add this information to the image parameters. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2015-07-21fdt: Add fdtgrep toolSimon Glass
This tool allows us to extract subsets of a device tree file. It is used by the SPL vuild, which needs to cut down the device tree size for use in limited memory. This tool was originally written for libfdt but it has not been accepted upstream, so for now, include it in U-Boot. Several utilfdt library functions been included inline here. If fdtgrep is eventually accepted in libfdt then we can bring that version of libfdt in here, and drop fdtgrep (requiring that fdtgrep is provided by the user). If it is not accepted then another approach would be to write a special tool for chopping down device tree files for SPL. While it would use the same libfdt support, it would be less code than fdtgrep.c because it would not have general-purpose functions. Another approach (which was used with v1 of this series) is to sprinkler all the device tree files with #ifdef. I don't like that idea. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-21mkimage: Display a better list of available image typesSimon Glass
Offer to display the available image types in help. Also, rather than hacking the genimg_get_type_id() function to display a list of types, do this in the tool. Also, sort the list. The list of image types is quite long, and hard to discover. Print it out when we show help information. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-17Merge branch 'master' of git://git.denx.de/u-bootStefano Babic
2015-07-14tools: ifdtool: Write correct offset on 32-bit machineBin Meng
On 32-bit machine strtol() returns LONG_MAX which is 0x7fffffff, which is wrong for u-boot.rom components like u-boot-x86-16bit.bin. Change to use strtoll() so that it works on both 32-bit and 64-bit machines. Reported-by: Fei Wang <wangfei.jimei@gmail.com> Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-14builderthread.py: Keep 'SPL'Tom Rini
On i.MX platforms the SPL binary is called "SPL" so make sure we keep that. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-07-10tools: mkimage: fix imximage header sizeAlbert ARIBAUD \(3ADEV\)
imximage header size is 4-byte, not 8-byte aligned. This produces .imx images that a Vybrid cannot boot on. Fix by adding a "padding" field in header. Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>
2015-06-18tools/env/fw_env.h: Correct include orderPeter Robinson
When building tools-only (or env) we need to be sure that we do use <linux/kconfig.h> and do not use <generated/autoconf.h>. This will fix problems such as running 'make defconfig' or 'make sandbox_config' and then 'make tools-only'. Based on the responses below to the thread add linux/kconfig.h higher in the includes and drop the now unneeded autoconf.h lower down to ensure the default environment is included correctly http://lists.denx.de/pipermail/u-boot/2015-June/216849.html Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
2015-06-15Merge git://git.denx.de/u-boot-marvellTom Rini
2015-06-14tools/kwboot: Add parameters to set delay and timeout via cmdlineStefan Roese
To support the Armada 38x, new values for the request-delay and the response-timeout are needed. As the values already implemented in this tool (for Kirkwood and Armada XP) don't seem to work here. To make this more flexible, lets add make those 2 parameters configurable via the cmdline. Here the new parameters: -q <req-delay>: use specific request-delay -s <resp-timeo>: use specific response-timeout For the Marvell DB-88F6820 these values are known to work: One board: -q 2 -s 1 2nd board: -q 5 -s 5 So this seems to be even board specific. But with this patch now those values can be specified and tested via the cmdline. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Kevin Smith <kevin.smith@elecsyscorp.com> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Luka Perkov <luka.perkov@sartura.hr>
2015-06-14tools/kwbimage.c: Correct header size for SPI bootKevin Smith
If defined, the macro CONFIG_SYS_SPI_U_BOOT_OFFS allows a board to specify the offset of the payload image into the kwb image file. This value was being used to locate the image, but was not used in the "header size" field of the main header. Move the use of this macro into the function that returns the header size so that the same value is used in all places. Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com> Tested-by: Stefan Roese <sr@denx.de>
2015-06-12kconfiglib: sync with the latest in Kconfiglib projectMasahiro Yamada
This commit imports some updates of kconfiglib.py from https://github.com/ulfalizer/Kconfiglib - Warn about and ignore the "allnoconfig_y" Kconfig option - Statements in choices inherit menu/if deps - Add Symbol.is_allnoconfig_y() - Hint that modules are still supported despite warnings. - Add warning related to get_defconfig_filename(). - Fix typo in docs. - Allow digits in $-references to symbols. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com> Signed-off-by: Philip Craig <philipjcraig@gmail.com> Signed-off-by: Jakub Sitnicki <jsitnicki@gmail.com> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-06-04tools: ifdtool: Do not write region while its size is negativeBin Meng
We should ignore those regions whose size is negative. These are typically optional and unused regions (like GbE and platform data). Change-Id: I65ad01746144604a1dc0588b617af21f2722ebbf Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-05-29sunxi/nand: change BLOCK_SIZE in mksunxiboot to match NAND block sizeDaniel Kochmański
This change is necessary to calculate correct checksum for NAND boot. Works both for MMC and NAND. Without it BROM rejects boot image as invalid (bad checksum). (Changes block size from 0x200 to 0x2000). Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu> Signed-off-by: Roy Spliet <r.spliet@ultimaker.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2015-05-28tools: use pkg-config when available to get SSL flagsThomas Petazzoni
Instead of hardcoding -lssl -lcrypto as the flags needed to build mkimage with FIT signature enabled, use pkg-config when available. This allows to properly support cases where static linking is used, which requires linking with -lz, since OpenSSL uses zlib internally. We gracefully fallback on the previous behavior of hardcoding -lssl -lcrypto if pkg-config is not available or fails with an error. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-05-27moveconfig: Print status about the processed defconfigsJoe Hershberger
This gives a basic idea about progress. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Add a switch to enable printing errorsJoe Hershberger
In some cases the build for the autoconf breaks. This outputs the errors following the status so that action can be taken without building again manually. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Print a message for missing compilerJoe Hershberger
A common case for failed builds is a missing compiler. Print a message for that case to tell the user concisely which compiler was expected that was not found. This patch also has the effect of not printing build errors any longer. The next patch will add a switch to optionally bring that back. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Output a list of failed boardsJoe Hershberger
If boards fail, output that list to a file so that it can easily be passed back into moveconfig.py using the -d option. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Cleanup headers in arch and boardJoe Hershberger
Some config.h files live in arch and board directories. They will need to be cleaned up as well, so run the same filters there. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Add a switch to only cleanup headersJoe Hershberger
In some case you may want to only cleanup the headers. Make it possible without waiting for all boards to compile. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Add a parameter to accept a list to buildJoe Hershberger
This is helpful to re-attempt to move failed boards from a previous run without starting over. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Ignore duplicate configs when movingJoe Hershberger
When moving configs, it is important to know what was defined in the config header even if it duplicates the configs coming from Kconfig. This is specifically needed for the case where a config is set to default 'y' in the Kconfig. This would previously cause the actual value from the include config to be filtered out, and moveconfig.py would think that it was 'n'... This means that the value that should be 'y' is now (in every defconfig) set to 'not set'. tools/moveconfig.py now defines KCONFIG_IGNORE_DUPLICATES to prevent the filtering from happening and selecting wrong values for the defconfig. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27moveconfig: Always run savedefconfig on the moved configJoe Hershberger
This will ensure that the order of the defconfig entries will always match that of the Kconfig files. After one slightly painful (but still early in the process) pass over all boards, this should keep the defconfigs clean from here on. Users must edit the Kconfig first to add the menu entries and then run moveconfig.py to update the defconfig files and the include configs. As such, moveconfig.py cannot compare against the '.config' contents. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2015-05-27tools: moveconfig: a tool to move CONFIGs from headers to defconfigsMasahiro Yamada
This tool was originally written for my local use to ease the task of tons of CONFIG moves, but there have been some requests for mainlining it. So, I have tidied up the code with nicer comments, and here it is. See the comment block of the script for usage. The first draft was http://patchwork.ozlabs.org/patch/430422/ Main updates are: - Adapted to the single .config configuration - Support colored log - Support moving multiple options at once (and take configs via input file only) - Continue even if some boards fail (Idea provided by Joe Hershberger) - Add more options - More comments and code cleanups Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2015-05-24tools: mxsboot: Calculate ECC strength dynamicallyJörg Krause
Calculating the ECC strength dynamically to be aligned with the mxs NAND driver and the Linux Kernel. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-24mtd: nand: mxs: Replace magic number for bits per ECC level with macroJörg Krause
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Reviewed-by: Marek Vasut <marex@denx.de>
2015-05-15logos: Add Solidrun's logoFabio Estevam
Let Solidrun's logo appear on Cuboxi and Hummingboard by default. Signed-off-by: Rabeeh Khoury <rabeeh@solid-run.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2015-05-08Fix musl buildJörg Krause
This patch fixes cross-compiling U-Boot tools with the musl C library: * including <sys/types.h> is needed for ulong * defining _GNU_SOURCE is needed for loff_t Tested for target at91sam9261ek_dataflash_cs3. Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks> Cc: Tom Rini <trini@konsulko.com>
2015-05-05fw_env.h: include autoconf.hMax Krummenacher
Without this, when CONFIG_ENV_VARS_UBOOT_CONFIG is active we get a compile time error when doing 'make env'. In file included from tools/env/fw_env.c:117:0: include/env_default.h:110:11: error: expected ‘}’ before ‘CONFIG_SYS_ARCH’ When building U-Boot this is included indirectly by the compiler switch -include /home/trdx/git.toradex.com/u-boot-2014.10-toradex/include/linux/kconfig.h Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
2015-04-23patman: check git format.subjectprefix setting when generate patches prefixWu, Josh
For the local project, we may specified format.subjectprefix setting. Then the patch will be formated as [Project_prefix][PATCH]. But patman will not check this setting. It will remove the format.subjectprefix. So This patch will let patman check this setting and add it as a project prefix. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org>
2015-04-23buildman: Add gcc 4.9.0 with Microblaze toolchainMichal Simek
Also read gcc 4.9.0 at kernel.org which also have Microblaze toolchain. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Simon Glass <sjg@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Fixed unit test failure by updating the test: Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18patman: cover letter shows like 00/xx if more than 10 patchesWu, Josh
Make cover letter shows like 0/x, 00/xx and 000/xxx etc. Signed-off-by: Josh Wu <josh.wu@atmel.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Make -V (verbose_build) really be verboseTom Rini
The help text for -V says we will pass V=1 but all it really did was not pass in -s. Change the logic to pass make V=1 with given to buildman -V or -s to make otherwise. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Keep more outputs with the --keep-outputs flagTom Rini
When told to keep outputs, be much more liberal in what files we keep. In addition to adding 'MLO', keep anything that matches u-boot-spl.* (so that we keep the map file as well) and anything we generate about 'u-boot itself. A large number of bootable formats now match this and thus it's easier to build many targets and then boot them afterwards using buildman. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Allow comparison of build configurationSimon Glass
It is useful to be able to see CONFIG changes made by commits. Add this feature to buildman using the -K flag so that all CONFIG changes are reported. The CONFIG options exist in a number of files. Each is reported individually as well as a summary that covers all files. The output shows three parts: green for additions, red for removals and yellow for changes. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Store build config filesSimon Glass
Store all config file output so that we can compare changes if requested. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Adjust the 'aborted' heuristic for writing outputSimon Glass
At present buildman tries to detect an aborted build and doesn't record a result in that case. This is to make sure that an abort (e.g. with Ctrl-C) does not mark the build as done. Without this option, buildman would never retry the build unless -f/-F are provided. The effect is that aborting the build creates 'fake errors' on whatever builds buildman happens to be working on at the time. Unfortunately the current test is not reliable and this detection can trigger if a required toolchain tool is missing. In this case the toolchain problem is never reported. Adjust the logic to continue processing the build result, mark the build as done (and failed), but with a return code which indicates that it should be retried. The correct fix is to fully and correctly detect an aborted build, quit buildman immediately and not write any partial build results in this case. Unfortunately this is currently beyond my powers and is left as an exercise for the reader (and patches are welcome). Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-18buildman: Show 'make' command line when -V is usedSimon Glass
When a verbose build it selected, show the make command before the output of that command. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-04-10lpc32xx: add lpc32xx-spl.bin boot image targetAlbert ARIBAUD \(3ADEV\)
Signed-off-by: Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr>