summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)Author
2017-11-01rockchip: mkimage: remove unused code-paths (spl_boot0 is now implied)Philipp Tomsich
With all targets converted to generate prepadded images, this removes the spl_boot0 field from our config structure and removes the unused code-path (for images that are not prepadded): i.e. spl_boot0 is now implied as 'true' and the code is specialised by removing the other case. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-11-01rockchip: mkimage: use spl_boot0 for all Rockchip SoCsKever Yang
Enable the spl_boot0 in SPL and use the pre-padding TAG memory, the mkimage do not need to pad it but only need to replace the value with correct TAG value. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> [Updated:] Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-10-23tools: image: fix node name of signature node in FITMasahiro Yamada
Both "conf_name" and "sig_name" point to the name of config node. The latter should be the name of the signature node. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-10-16tools: env: Add embedded.c to .gitignoreBin Meng
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-10-16env: Drop CONFIG_ENV_IS_IN_DATAFLASHTuomas Tynkkynen
Last user of this option went away in commit: fdc7718999 ("board: usb_a9263: Update to support DT and DM") Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
2017-10-16tools: bmp_logo: correctly interpret BMP files with larger headersJon Smith
All BMP files were being treated as though they had a 40 byte header. There are several BMP header formats consisting of additional data. This was causing some of the header to be read as color information, skewing the color palette. Signed-off-by: Jon Smith <jtsmith@pdiarm.com>
2017-10-16tools/mkimage: Fix DTC run command to handle file names with spaceMirza, Taimoor
fit_handle_file function does not quote input and output files while preparing command to run DTC to convert .its to .itb. This results in a failure if input or output files contain spaces in their names. Quote input and output files in DTC command to avoid this failure. Signed-off-by: Mirza, Taimoor <Taimoor_Mirza@mentor.com>
2017-10-15moveconfig: fix error message in do_autoconf()Chris Packham
Move the % arch outside the double quote so that the missing toolchain message is displayed correctly. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-10-07cmd/gpt.c, cmd/nvedit.c, tools/fit_image.c: Rework recent fixes for CoverityTom Rini
The recent changes to these files did not completely fix the previous issues, or introduced different (minor) issues. In cmd/gpt.c we need to dereference str_disk_guid to be sure that malloc worked. In cmd/nvedit.c we need to be careful that we can also fit in that leading space when adding to the string. And in tools/fit_image.c we need to re-work the error handling slightly in fit_import_data() so that we only call munmap() once. We have two error paths here, one where we have an fd to close and one where we do not. Adjust labels to match this. Reported-by: Coverity (CID: 167366, 167367, 167370) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-06tools/fit_image.c: Update some return code pathsTom Rini
Coverity has found some problems with the return paths in parts of this code. We have a case where we were going to the wrong part of the unwind (open() failed so we cannot close the fd), a case where we were only free()ing our buf on the error path and finally a case where we did not munmap in the failure path. Reported-by: Coverity (CID: 138492, 138495, 143064) Signed-off-by: Tom Rini <trini@konsulko.com>
2017-10-01rockchip: mkimage: add support for rk3128 socKever Yang
Add support for rk3128 package header in mkimage tool. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2017-09-29kconfiglib: update with 'imply' supportUlf Magnusson
Corresponds to 375506d (File writing nit) from upstream (https://github.com/ulfalizer/Kconfiglib). Adds proper 'imply' support and fixes a few minor issues, one of which previously triggered the following weird warning: configs/taurus_defconfig: /tmp/tmpisI45S:6: warning: assignment to SPL_LDSCRIPT changes mode of containing choice from "arch/$(ARCH)/cpu/u-boot-spl.lds" to "y" The change in 8639f69 (genconfig.py: Print defconfig next to warnings) was reapplied. tools/moveconfig.py previously depended on a hack that merged 'select's with 'imply's. It was modified to look at the union of Symbol.get_selected_symbols() and Symbol.get_implied_symbols(), which should give the same behavior. tools/genboardscfg.py was verified to produce identical board.cfg's before and after the change. Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
2017-09-24tools/mkimage: Make the path to the dtc binary that mkimage calls configurableTom Rini
In some cases, such as FreeBSD, the path to an alternative dtc needs to be used. Rather than override the one given in the Makefile on the command line, make this part of the build configuration. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-17Merge git://git.denx.de/u-boot-x86Tom Rini
2017-09-16tools: binman: Add a new entry type for Intel VBTBin Meng
This adds a new entry type for Intel Video BIOS Table. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-15dtoc: Add a header to the generated filesSimon Glass
Add a header that indicates that the files generated by dtoc should not be modified. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Support properties containing multiple phandle valuesSimon Glass
At present dtoc has a very simplistic view of phandles. It assumes that a property has only a single phandle with a single argument (i.e. two cells per property). This is not true in many cases. Enhance the implementation to scan all phandles in a property and to use the correct number of arguments (which can be 0, 1, 2 or more) when generating the C code. For the struct definitions, use a struct which can hold the maximum number of arguments used by the property. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Put phandle args in an arraySimon Glass
We want to support more than one phandle argument. It makes sense to use an array for this rather than discrete struct members. Adjust the code to support this. Rename the member to 'arg' instead of 'id'. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Put each phandle on a separate lineSimon Glass
When writing values from properties which contain phandles, dtoc currently writes 8 phandles per line. Change this to write one phandle per line. This helps reduce line length, since phandles are generally longer and may have arguments. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Rename the phandle structSimon Glass
Rather than naming the phandle struct according to the number of cells it uses (e.g. struct phandle_2_cell) name it according to the number of arguments it has (e.g. struct phandle_1_arg). This is a more intuitive naming. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Rename is_phandle() and adjust it to return more detailSimon Glass
Update this function to return more detail about a property that contains phandles. This will allow (in a future commit) more accurate handling of these properties. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Make is_phandle() a member functionSimon Glass
This function will need to have access to class members once we enhance it to support multiple phandle values. In preparation for that, move it into the class. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Use the Fdt's class's phandle mapSimon Glass
Now that the Fdt class can map phandles to the associated nodes, use that instead of a separate implementation. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Update the Fdt class to record phandlesSimon Glass
Add a map from phandles to nodes. This can be used by clients of the the class instead of maintaining this themselves. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Handle 'reg' properties with unusual sizesSimon Glass
At present dtoc assumes that all 'reg' properties have both an address and a size. For I2C devices we do not have this. Adjust dtoc to cope. Reported-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Add support for 32 or 64-bit addressesSimon Glass
When using 32-bit addresses dtoc works correctly. For 64-bit addresses it does not since it ignores the #address-cells and #size-cells properties. Update the tool to use fdt64_t as the element type for reg properties when either the address or size is larger than one cell. Use the correct value so that C code can obtain the information from the device tree easily. Alos create a new type, fdt_val_t, which is defined to either fdt32_t or fdt64_t depending on the word size of the machine. This type corresponds to fdt_addr_t and fdt_size_t. Unfortunately we cannot just use those types since they are defined to phys_addr_t and phys_size_t which use 'unsigned long' in the 32-bit case, rather than 'unsigned int'. Add tests for the four combinations of address and size values (32/32, 64/64, 32/64, 64/32). Also update existing uses for rk3399 and rk3368 which now need to use the new fdt_val_t type. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heiko Stuebner <heiko@sntech.de> Reported-by: Kever Yang <kever.yang@rock-chips.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Avoid very long lines in outputSimon Glass
Large arrays can result in lines with hundreds or thousands of characters which is not very editor-friendly. To avoid this, addjust the tool to group values 8 per line. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Add a 64-bit type and a way to convert cells into 64 bitsSimon Glass
When dealing with multi-cell values we need a type that can hold this value. Add this and a function to process it from a list of cell values. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-15dtoc: Adjust Node to record its parentSimon Glass
We need to be able to search back up the tree for #address-cells and #size-cells. Record the parent of each node to make this easier. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Tested-by: Kever Yang <kever.yang@rock-chips.com>
2017-09-14lib: at91: Add logo files used via API of DM_VIDEOWenyou Yang
In order to display the company's logo via the API of DM_VIDEO, and add the logo files of both Atmel and Microchip. Signed-off-by: Wenyou Yang <wenyou.yang@microchip.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-09-13patman: Fix error when the email blacklist is missingSimon Glass
This section of the settings file may be missing. Handle that gracefully rather than emitting an error. Also update patman to write this section when a new settings file is created. Fixes: e11aa602 (patman: add support for omitting bouncing addresses) Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Chris Packham <judge.pckham@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-12Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2017-09-11patman: add support for omitting bouncing addressesChris Packham
Add support for reading a list of bouncing addresses from a in-tree file (doc/bounces) and from the ~/.patman config file. These addresses are stripped from the Cc list. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com <mailto:philipp.tomsich@theobroma-systems.com>>
2017-09-11moveconfig: Use fd.write() instead of print >>Simon Glass
Adjust this code so that it can work with Python 2 and 3. Fixes: d73fcb1 (moveconfig: Support building a simple config database) Reported-by: Chris Packham <judge.packham@gmail.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-11genconfig.py: Print defconfig next to warningsSimon Glass
At present we sometimes see warnings of the form: /tmp/tmpMA89kB:36: warning: overriding the value of CMD_SPL. Old value: "y", new value: "y". This is not very useful as it does not show whch defconfig file it relates to. Update the tool to show this. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-11tools: pblimage: Fix address calculationYork Sun
The image size should be added to the initial pbl command, not bit "ORed". Signed-off-by: York Sun <york.sun@nxp.com>
2017-09-07tools: .gitignore: Add libfdt related filesBin Meng
Some files are generated during libfdt build. Ignore them. This was wrongly put in the .gitignore in the root directory before. Now let's remove entries there and put them in the right place. Fixes: 34e2c285 ("gitignore: add intermediates from libfdt build") Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-07tools: .gitignore: Sort in alphabetical orderBin Meng
These are currently out of alphabetical order. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-05env: Add 'envtools' target to 'make help'Simon Glass
The target is not currently mentioned anywhere. Add it to the help so people can find it. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-05env: Fix operation of 'make environ'Simon Glass
This was broken by the recent environment refactoring. Specifically: $ make environ scripts/Makefile.build:59: tools/environ/Makefile: No such file or directory make[1]: *** No rule to make target 'tools/environ/Makefile'. Stop. make: *** [Makefile:1469: environ] Error 2 Fix this by updating the Makefile and adjusting the #include filesnames in two C files. Fixes: ec74f5f (Makefile: Rename 'env' target to 'environ') Reported-by: Måns Rullgård <mans@mansr.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-09-05env: Fix out of tree building of tools-allTom Rini
With the move of environment code from common/ to env/ a number of changes needed to be made to various make targets. We missed updating some of the files required for out of tree builds of the tools. Correct the 'environ' target to know that we need to work under tools/env/ still (not tools/environ/) and then update the wrappers in env_attr.c and env_flags.c to point to the new correct file. Reported-by: Peter Robinson <pbrobinson@gmail.com> Tested-by: Peter Robinson <pbrobinson@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-09-03Makefile: Suppress output of python libfdt build commandBin Meng
This should not be printed by default. Prefix it with $(Q). Fixes ee95d10b: ("fdt: Build the new python libfdt module") Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-03Makefile: Quiesce libfdt buildBin Meng
Since commit 3809e302 "Makefile: honor PYTHON configuration properly", the build commands of libfdt are printed while previously were not. This adds the missing '--quiet' back. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-09-03fix: fw_env: Prevent writing error message on special files, which don't ↵Lukasz Majewski
support fsync According to fsync specification [1] some special files (e.g., a pipe, FIFO, or socket) don't support synchronization and return either EROFS or EINVAL. On the linux side the sys_fsync -> do_fsync() checks if the requested file has f_op->fsync defined. If not it returns EINVAL [2]. This commit prevents writing error messages for files (devices), which do not support fsync(). [1] - http://man7.org/linux/man-pages/man2/fsync.2.html [2] - http://elixir.free-electrons.com/linux/v4.13-rc6/source/fs/sync.c#L183 Signed-off-by: Lukasz Majewski <lukma@denx.de> Acked-by: Michael Heimpold <mhei@heimpold.de>
2017-08-23imx: move imximage header to common locationStefan Agner
Move the imximage.h header file to a common location so we can make use of it from U-Boot too. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Łukasz Majewski <lukma@denx.de>
2017-08-20Fix 'notes' typosAnatolij Gustschin
s/notes/nodes Signed-off-by: Anatolij Gustschin <agust@denx.de>
2017-08-20Makefile: honor PYTHON configuration properlyClément Bœsch
On some systems `python` is `python3` (for instance, Archlinux). The `PYTHON` variable can be used to point to `python2` to have a successful build. The use of `PYTHON` is currently limited in the Makefile and needs to be extended in other places: First, pylibfdt is required to be a Python 2 binding (binman imports pylibfdt and is only compatible Python 2), so its setup.py needs to be called accordingly. An alternative would be to change the libfdt setup.py shebang to python2, but the binding is actually portable. Also, it would break on system where there is no such thing as `python2`. Secondly, the libfdt import checks need to be done against Python 2 as well since the Python 2 compiled modules (in this case _libdft.so) can not be imported from Python 3. Note on the libfdt imports: "@if ! PYTHONPATH=tools $(PYTHON) -c 'import libfdt'; then..." is probably simpler than the currently sub-optimal pipe. Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
2017-08-16env: Rename setenv() to env_set()Simon Glass
We are now using an env_ prefix for environment functions. Rename setenv() for consistency. Also add function comments in common.h. Suggested-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2017-08-15Move environment files from common/ to env/Simon Glass
About a quarter of the files in common/ relate to the environment. It seems better to put these into their own subdirectory and remove the prefix. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-08-13rockchip: rk3368: mkimage: add support for the RK3368Philipp Tomsich
This commit adds support for RK3368 SoC in mkimage. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>