summaryrefslogtreecommitdiff
path: root/tools
Commit message (Collapse)AuthorAgeLines
...
* buildman: Clean up odd characters on the terminalSimon Glass2016-12-02-1/+1
| | | | | | | At present buildman leaves behind a few characters during its progress updates, which looks odd. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Squash useless output from -KSimon Glass2016-12-02-13/+38
| | | | | | | | | | When using #define CONFIG_SOME_OPTION, the value it set to '1'. When using defconfig (i.e. CONFIG_SOME_OPTION=y) the value is set to 'y'. This results in differences showing up with -K. These differences are seldom useful. Adjust buildman to suppress these differences by default. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add documentation for CONFIG checkingSimon Glass2016-12-02-0/+37
| | | | | | | The -K option is not mentioned in the README at present. Add some notes to describe how this is used. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Add an option to just create the configSimon Glass2016-12-02-7/+17
| | | | | | | | | | | | | | Normally buildman does a full build of a board. This includes creating the u-boot.cfg file which contains all the configuration options. Buildman uses this file with the -K option, to show differences in effective configuration for each commit. Doing a full build of U-Boot just to create the u-boot.cfg file is wasteful. Add a -D option which causes buildman to only create the configuration. This is enough to support use of -K and can be done much more quickly (typically 5-10 times faster). Signed-off-by: Simon Glass <sjg@chromium.org>
* tools/kwbimage: add DEBUG optionChris Packham2016-12-01-1/+10
| | | | | | | | | Offset 0x1 in the generated kwb image file is a set of flags, bit 0 enables debug output from the BootROM firmware. Allow a DEBUG option in the kwb configuration to request debug output from the BootROM firmware. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
* tools/kwbimage: add BAUDRATE optionChris Packham2016-12-01-1/+44
| | | | | | | | | | | | Offset 0x18 in some Marvell datasheets this field is redacted as "reserved". This offset is actually a set of options and bits 2:0 allow the selection of the UART baudrate. Allow a BAUDRATE option to set the UART baudrate for any messages coming from the BootROM firmware. Signed-off-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Stefan Roese <sr@denx.de>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-11-30-1/+9
|\
| * tools: imximage: display DCD block offset, lengthEric Nelson2016-11-29-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These values can be used to sign a U-Boot image for use when loading an image through the Serial Download Protocol (SDP). Note that the address of 0x910000 is usable with the stock configuration of imx_usb_loader on i.MX6 and i.MX7 SOCs: https://github.com/boundarydevices/imx_usb_loader/blob/master/mx6_usb_work.conf#L3 Refer to the section on imx_usb_loader in this post for more details: https://boundarydevices.com/high-assurance-boot-hab-dummies/ Signed-off-by: Eric Nelson <eric@nelint.com>
* | Merge git://git.denx.de/u-boot-mpc85xxTom Rini2016-11-29-0/+2
|\ \ | |/ |/|
| * tools/env: Correct include kconfigYork Sun2016-11-23-0/+2
| | | | | | | | | | | | | | While we move some config macros to Kconfig, kconfig header is needed to avoid compiling error if not already included. Signed-off-by: York Sun <york.sun@nxp.com>
* | tools/env: fix environment alignment tests for block devicesMax Krummenacher2016-11-28-27/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 183923d3e412500bdc597d1745e2fb6f7f679ec7 enforces that the environment must start at an erase block boundary. For block devices the sample fw_env.config does not mandate a erase block size for block devices. A missing setting defaults to the full env size. Depending on the environment location the alignment check now errors out for perfectly legal settings. Fix this by defaulting to the standard blocksize of 0x200 for environments stored in a block device. That keeps the fw_env.config files for block devices working even with that new check. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
* | tools/Makefile: suppress "which swig" error outputAndre Przywara2016-11-28-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Makefile in tools/ tries to find the "swig" utility by calling "which". If nothing is found in the path, some versions of which will print an error message: $ make clean which: no swig in (/usr/local/bin:/usr/bin:/bin) This does not apply to all version of "which", though: $ echo $0 bash $ type which which is aliased to `type -path' $ which foo <== this version is OK $ /usr/bin/which foo <== this one is chatty /usr/bin/which: no foo in (/usr/local/bin:/usr/bin:/bin) $ sh <== make uses /bin/sh sh-4.3$ which foo <== no alias here which: no foo in (/usr/local/bin:/usr/bin:/bin) This error message is rather pointless in our case, since we just have this very check to care for this. So add stderr redirection to suppress the message. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | image: Combine image_sig_algo with image_sign_infoAndrew Duda2016-11-21-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the need to explicitly add SHA/RSA pairings. Invalid SHA/RSA pairings will still fail on verify operations when the hash length is longer than the key length. Follow the same naming scheme "checksum,crytpo" without explicitly defining the string. Indirectly adds support for "sha1,rsa4096" signing/verification. Signed-off-by: Andrew Duda <aduda@meraki.com> Signed-off-by: aduda <aduda@meraki.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | image: Add crypto_algo struct for RSA infoAndrew Duda2016-11-21-4/+5
|/ | | | | | | | | | Cut down on the repetition of algorithm information by defining separate checksum and crypto structs. image_sig_algos are now simply pairs of unique checksum and crypto algos. Signed-off-by: Andrew Duda <aduda@meraki.com> Signed-off-by: aduda <aduda@meraki.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* tools: mkimage: Check if file is regular fileMichal Simek2016-11-15-2/+8
| | | | | | | | | | | | Current Makefile.spl passes -R parameter which is not empty and pointing to ./ folder. "./tools/mkimage -T zynqmpimage -R ./"" -d spl/u-boot-spl.bin spl/boot.bin" That's why mkimage is trying to parse ./ file and generate register init which is wrong. Check that passed filename is regular file. If not do not work with it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* tools: mkimage: Add support for initialization table for Zynq and ZynqMPMike Looijmans2016-11-15-0/+56
| | | | | | | | | | | | | | | | | | The Zynq/ZynqMP boot.bin file contains a region for register initialization data. Filling in proper values in this table can reduce boot time (e.g. about 50ms faster on QSPI boot) and also reduce the size of the SPL binary. The table is a simple text file with register+data on each line. Other lines are simply skipped. The file can be passed to mkimage using the "-R" parameter. It is recommended to add reg init file to board folder. For example: CONFIG_BOOT_INIT_FILE="board/xilinx/zynqmp/xilinx_zynqmp_zcu102/reg.int Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* tools: fix mksunxiboot build for tools-all targetAndre Przywara2016-11-13-1/+1
| | | | | | | | | | | | Commit fed329aebe3a ("tools: add mksunxiboot to tools-all target") added mksunxiboot to the tools-all target, but used the CONFIG_SUNXI symbol to enable its build. Now commit aec9a0f19f64 ("sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXI"), merged before that, renamed that symbol, so that the first patch basically gets ineffective. Adjust the symbol name in tools/Makefile to make it build again. Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
* mkimage: Allow including a ramdisk in FIT auto modeTomeu Vizoso2016-11-06-4/+40
| | | | | | | | | | | | | | | Adds -i option that allows specifying a ramdisk file to be added to the FIT image when we are using the automatic FIT mode (no ITS file). This makes adding Depthcharge support to LAVA much more convenient, as no additional configuration files need to be kept around in the machine that dispatches jobs to the boards. Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Simon Glass <sjg@chromium.org> Cc: Matt Hart <matthew.hart@linaro.org> Cc: Neil Williams <codehelp@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* buildman: Fix building based on 'options' fieldTom Rini2016-11-06-2/+2
| | | | | | | | | | The README for buildman says that we can use any field in boards.cfg to decide what to build. However, we were not saving the options field correctly. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Acked-by: Simon Glass <sjg@chromium.org>
* tools: imximage: check return value when open the plugin filePeng Fan2016-11-05-1/+8
| | | | | | | | | | | | | | | | | | Check return value when open the plugin file. Coverity report: ** CID 153926: Error handling issues (NEGATIVE_RETURNS) /tools/imximage.c: 542 in copy_plugin_code() ifd = open(plugin_file, O_RDONLY|O_BINARY); >>> CID 153926: Error handling issues (NEGATIVE_RETURNS) >>> "ifd" is passed to a parameter that cannot be negative. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Tom Rini <trini@konsulko.com> Reported-by: Coverity (CID: 153926) Reviewed-by: Tom Rini <trini@konsulko.com>
* mkimage: Fix missing free() in show_valid_options()Simon Glass2016-10-31-0/+1
| | | | | | | | The allocated memory should be freed. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org> Reported-by: Coverity (CID: 150963) Reviewed-by: Tom Rini <trini@konsulko.com>
* Fix spelling of "occur".Vagrant Cascadian2016-10-31-1/+1
| | | | | | Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Acked-by: Angelo Dureghello <angelo@sysam.it> Reviewed-by: Simon Glass <sjg@chromium.org>
* tools: add mksunxiboot to tools-all targetStefan Brüns2016-10-30-1/+2
| | | | | | | mksunxiboot is useful outside of u-boot, it is e.g. used by sunxi-tools. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXIJagan Teki2016-10-30-1/+1
| | | | | | | | | | | | CONFIG_SUNXI -> CONFIG_ARCH_SUNXI and removed CONFIG_SUNIX from config_whitelist.txt Cc: Simon Glass <sjg@chromium.org> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-imxTom Rini2016-10-28-60/+230
|\ | | | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: common/Kconfig configs/dms-ba16_defconfig
| * tools: imximage: add plugin supportPeng Fan2016-10-24-60/+230
| | | | | | | | | | | | | | | | | | | | | | | | Add plugin support for imximage. Define CONFIG_USE_IMXIMG_PLUGIN in defconfig to enable using plugin. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Eric Nelson <eric@nelint.com> Cc: Ye Li <ye.li@nxp.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* | tools: moveconfig: support wildcards in --defconfigs fileMasahiro Yamada2016-10-24-8/+22
| | | | | | | | | | | | | | | | | | | | | | Supporting shell-style wildcards for the --defconfigs option will be useful to run the moveconfig tool against a specific platform. For example, "uniphier*" in the file passed by --defconfigs option will be expanded to defconfig files that start with "uniphier". This is easier than listing out all defconfig files you are interested in. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
* | pbl: use "wait" command instead of "flush" commandZhao Qiang2016-10-14-1/+1
|/ | | | | | | | | | PBL flush command is restricted to CCSR memory space. So use WAIT PBI command to provide enough time for data to get flush in target memory. Signed-off-by: Zhao Qiang <qiang.zhao@nxp.com> [York Sun: rewrap commit message] Reviewed-by: York Sun <york.sun@nxp.com>
* tools: buildman: Add compiler wrapperYork Sun2016-10-09-2/+25
| | | | | | | | Now we can use compiler wrapper such as ccache or distcc for buildman. Signed-off-by: York Sun <york.sun@nxp.com> CC: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* tools: buildman: Remove duplicated codeYork Sun2016-10-09-4/+0
| | | | | | | | Signed-off-by: York Sun <york.sun@nxp.com> CC: Simon Glass <sjg@chromium.org> Fixed commit subject: Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* dtoc: Make integer division python 3.x safePaul Burton2016-10-09-1/+1
| | | | | | | | | | | | | If we use the '/' operator then python 3.x will produce a float, and refuse to multiply the string sequence in Conv_name_to_c by it with: TypeError: can't multiply sequence by non-int of type 'float' Use the '//' operator instead to enforce that we want integer rather than floating point division. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* dtoc: Decode strings for struct.unpack on python 3.xPaul Burton2016-10-09-0/+3
| | | | | | | | | | On python 3.x struct.unpack will complain if we provide it with a string since it expects to operate on a bytes object. In order to satisfy this requirement, encode the string to a bytes object when running on python 3.x. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* dtoc: Use items() to iterate over dictionaries in python 3.xPaul Burton2016-10-09-5/+5
| | | | | | | | | | | In python 3.x the iteritems() method has been removed from dictionaries, and the items() method does effectively the same thing. On python 2.x using items() is a little less efficient since it involves copying data, but as speed isn't a concern in the affected code switch to using items() anyway for simplicity. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Fix doctest StringIO import for python 3.xPaul Burton2016-10-09-5/+8
| | | | | | | | | In python 3.x StringIO is no longer a module, and the class can instead be found in the io module. Adjust the code in the doctest input to account for both. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Use items() to iterate over dictionariesPaul Burton2016-10-09-1/+1
| | | | | | | | | | | In python 3.x the iteritems() method has been removed from dictionaries, and the items() method does effectively the same thing. On python 2.x using items() is a little less efficient since it involves copying data, but as speed isn't a concern in this code switch to using items() anyway for simplicity. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Import 'configparser' lower case to be python 3.x safePaul Burton2016-10-09-1/+5
| | | | | | | | | In python 3.x module names used in import statements are case sensitive, and the configparser module is named in all lower-case. Import it as such in order to avoid errors when running with python 3.x. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Make exception handling python 3.x safePaul Burton2016-10-09-8/+8
| | | | | | | | Syntax for exception handling is a little more strict in python 3.x. Convert all uses to a form accepted by both python 2.x & python 3.x. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Make print statements python 3.x safePaul Burton2016-10-09-52/+58
| | | | | | | | | In python 3.x, print must be used as a function call. Convert all print statements to the function call style, importing from __future__ where we print with no trailing newline or print to a file object. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Replace tabs with spacesPaul Burton2016-10-09-2/+2
| | | | | | | | | In preparation for running on python 3.x, which will refuse to run scripts which mix tabs & spaces for indentation, replace 2 tab characters present in series.py with spaces. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Simon Glass <sjg@chromium.org>
* dtoc: Add a way for tests to request the fallback librarySimon Glass2016-10-09-3/+13
| | | | | | | | We need to test both the normal (Python libfdt module) and fallback (fdtget) implementations of the Fdt class. Add a way to select which implementation to use. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Adjust GetProps() in fdt_normal to use the node pathSimon Glass2016-10-09-6/+3
| | | | | | | There is no need to pass a node path separately. Instead we should use the path for the node provided. Correct this. Signed-off-by: Simon Glass <sjg@chromium.org>
* dtoc: Fix bug in GetProp()Simon Glass2016-10-09-1/+1
| | | | | | | This does not actually call fdtget correctly when requesting a particular type. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Drop the 'alive' flag in BuilderThreadSimon Glass2016-10-09-3/+1
| | | | | | This is not used, so drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Don't show a stacktrace on Ctrl-CSimon Glass2016-10-09-0/+7
| | | | | | | | When Ctrl-C is pressed, just exited quietly. There is no sense in displaying a stack trace since buildman will always be in the same place: waiting for threads to complete building all the jobs on the queue. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Drop the 'active' flag in the builderSimon Glass2016-10-09-16/+1
| | | | | | This serves no real purpose, since when we are not active, we exit. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Allow builds to terminate cleanlySimon Glass2016-10-09-2/+6
| | | | | | | | | It is annoying that buildman does not respond cleanly to Ctrl-C or SIGINT, particularly on machines with lots of CPUS. Unfortunately queue.join() blocks the main thread and does not allow it to see the signal. Use a separate thread instead, Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Put our local libraries first in the pathSimon Glass2016-10-09-1/+1
| | | | | | | | | If patman is installed on the machine (e.g. in the standard dist-packages directory), it will find libraries from there in preference to our local libraries. Adjust the order of the path to ensure that local libraries are found first. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Print a message indicating the build is startingSimon Glass2016-10-09-2/+3
| | | | | | | Make it clear when buildman actually starts building. This happens when it has prepared the threads, working directory and output directories. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Print a message when removing old directoriesSimon Glass2016-10-09-0/+6
| | | | | | | | | | | | When buildman starts, it prepares its output directory by removing any old build directories which will not be used this time. This can happen if a previous build left directories around for commit hashes which are no-longer part of the branch. This can take quite a while, so print a message to indicate what is going on. Signed-off-by: Simon Glass <sjg@chromium.org>
* buildman: Tidy up the 'cloning' messageSimon Glass2016-10-09-1/+3
| | | | | | | | | | | | | | | On a machine with a lot of CPUs this prints a lot of useless lines of the form: Cloning repo for thread <n> Adjust the output so that these all appear on one line, and disappear when the cloning is complete. Note: This cloning is actually unnecessary and very wasteful on disk space (about 3.5GB each time). It would be better to create symlinks. Signed-off-by: Simon Glass <sjg@chromium.org>