summaryrefslogtreecommitdiff
path: root/tools
AgeCommit message (Collapse)AuthorFilesLines
2018-11-21binman: Set the pathname correctly for ELF filesSimon Glass1-3/+2
At present, stripped files don't have the right pathname which means that blob compression cannot be used. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21binman: Drop an unnecessary comma in blob handlingSimon Glass1-1/+1
This comma is not needed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21binman: Add a way to enable debugging from the buildSimon Glass1-0/+6
When the build fails due to something wrong in binman it is sometimes useful to get a full backtrace showing the location of the failure. Add a BINMAN_DEBUG environment variable to support this along with some documentation. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21buildman: Show boards with warning with w+Simon Glass2-19/+54
At present we should boards with warnings in the same way as those with errors. This is not ideal. Add a new 'warn' state and show these listed in yellow to match the actual warning lines printing with -e. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21buildman: Rename the good, better, worse variablesSimon Glass1-14/+14
At present we don't distinguish between errors and warnings when printing the architecture summary. Rename the variables to better describe their purpose. 'Worse' at present means we got an error, so use that as the name. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21buildman: Detect dtc warningsSimon Glass2-3/+6
At present messages from the device-tree compiler like this: arch/arm/dts/socfpga_arria10_socdk_sdmmc.dtb: Warning (avoid_unnecessary_addr_size): /clocks: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property are detected as errors since they don't match the gcc warning regex. Add a new one for dtc to fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-21buildman: Only print toolchain probing with -vSimon Glass2-2/+2
At present --list-tool-chains prints a lot of information about the toolchain-probing process. This is generally not very interesting. Update buildman to print this only if --list-tool-chains is given with -v. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-17armv7R: K3: am654: Add support for generating build targetsLokesh Vutla1-0/+48
Update Makefiles to generate: - tiboot3.bin: Image format that can be processed by ROM. Below is the tiboot3.bin image format that is required by ROM: _______________________ | X509 | | Certificate | | ____________________ | | | | | | | u-boot-spl.bin | | | | | | | |___________________| | |_______________________| Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
2018-11-14buildman: Add a --boards option to specify particular boards to buildSimon Glass5-23/+72
At present 'buildman sandbox' will build all 5 boards for the sandbox architecture rather than the single board 'sandbox'. The only current way to exclude sandbox_spl, sandbox_noblk, etc. is to use -x which is a bit clumbsy. Add a --boards option to allow individual build targets to be specified. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-11-06tools: imx8image: flatten container header only when creating containerPeng Fan1-10/+12
If there is no CONTAINER entry, there is no need to flatten container header. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-11-06tools: imx8image: fix coverity CID 184233Peng Fan1-0/+8
Fix: CID 184233: (NEGATIVE_RETURNS) Using variable "container" as an index to array "imx_header.fhdr". Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-11-06tools: imx8image: fix coverity CID 184234Peng Fan1-1/+3
Fix: CID 184234: (TAINTED_SCALAR) Using tainted variable "header.num_images - 1" as an index into an array "header.img". Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-11-06tools: imx8image: check lseek return valuePeng Fan1-4/+23
Check lseek return value. Fix Coverity CID: 184236 184235 184232 Reported-by: Coverity Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Fabio Estevam <festevam@gmail.com>
2018-11-03MIPS: make size of relocation table fixed but configurableDaniel Schwierzeck1-22/+8
Currently the size of the relocation table will be shrunk to the actual size needed. Although this gives a maximal space saving, it messes up the _end symbol. This breaks features like appended DTBs because the _end symbol doesn't point to the real end of the U-Boot binary. Remove the size shrinking and make the size of the relocation table fixed but configurable. This follows the Linux approach and the user can adjust the size to his needs. Also rename the relocation table section from .rel to .data.reloc to follow the Linux approach and to avoid ambiguities with the .rel.* sections added by the linker. Reported-by: Lars Povlsen <lars.povlsen@microsemi.com> Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2018-10-25Merge tag 'u-boot-imx-20181025' of git://git.denx.de/u-boot-imxTom Rini5-0/+999
Merged imx8 architecture, fix build for imx8 + warnings
2018-10-25imx: mkimage: avoid stop CI when required files not existsPeng Fan1-0/+29
Introduce a new script to check whether file exists and use that check in Makefile to avoid break CI system. The script return 1 when the required files not exists, return 0 when files exists. The script will ignore check to u-boot-dtb.bin, because if there is something wrong to generate u-boot-dtb.bin, there must be some code error. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-22binman: Add a test for Intel reference codeSimon Glass2-0/+21
Unfortunately the test was not included in the original implementation. Add one. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-22tools: add i.MX8/8X image supportPeng Fan4-0/+970
i.MX8/8X bootable image type is container type. The bootable image, containers a container set which supports two container. The 1st container is for SECO firmware, the 2nd container needs to include scfw, m4_0/1 image, ACore images per your requirement. Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-10-22binman: Add support for Intel reference codeSimon Glass1-0/+27
Some platforms use this instead of FSP to set up the platform, including memory. Add support for this in binman. This is needed for chromebook_samus, for example. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2018-10-09dtoc: Fix the value of SetInt()Simon Glass1-1/+1
This does not set the correct value at present. Fix it. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-09binman: Move to three-digit test-file numbersSimon Glass101-115/+115
We now have 99 tests. Before adding any more, rename everything to three digits. This helps to preserve the ordering of tests and makes it easier to find things. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08binman: Run tests concurrentlySimon Glass10-22/+272
At present the tests run one after the other using a single CPU. This is not very efficient. Bring in the concurrencytest module and run the tests concurrently, using one process for each CPU by default. A -P option allows this to be overridden, which is necessary for code-coverage to function correctly. This requires fixing a few tests which are currently not fully independent. At some point we might consider doing this across all pytests in U-Boot. There is a pytest version that supports specifying the number of processes to use, but it did not work for me. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08patman: Don't clear progress in tout unless it was usedSimon Glass1-1/+7
At present calling Uninit() always called ClearProgress() which outputs a \r character as well as spaces to remove any progress information on the line. This can mess up the normal output of binman and other tools. Fix this by outputing this only when progress information has actually been previous written. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08tools: Set an initial value for indirSimon Glass1-0/+3
This variable is not documented or set up in the module. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08buildman: dtoc: Suppress unwanted output from testSimon Glass2-3/+7
There are a few test cases which print output. Suppress this so that tests can run silently in the normal case. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08binman: Separate out testSplBssPad()Simon Glass1-1/+3
At present this test runs binman twice, which means that the temporary files from the first run do not get cleaned up. Split this into two tests to fix this problem. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08binman: Fix up removal of temporary directoriesSimon Glass5-10/+25
At present 'make check' leaves some temporary directories around. Part of this is because we call tools.PrepareOutputDir() twice in some cases, without calling tools.FinaliseOutputDir() in between. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08binman: Add a default path to libfdt.pySimon Glass2-0/+7
This module is often available in the sandbox_spl build created by 'make check'. Use this as a default path so that just typing 'binman -t' (without setting PYTHONPATH) will generally run the tests. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08buildman: Make the toolchain test more forgivingSimon Glass1-2/+4
The filenames of the toolchains on kernel.org changes every now and then. Fix it for the current change, and make the test use a regex so that it has a better chance of passing with future changes too. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-08patman: Handle unicode in _ProjectConfigParser testsSimon Glass1-7/+20
With Python 2.7.15rc1, ConfigParser.SafeConfigParser has unfortunately started returning unicode, for unknown reasons. Adjust the code to handle this by converting everything to unicode. We cannot convert things to ASCII since email addresses may be encoded with UTF-8. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-10-06Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini1-0/+1
2018-10-04rockchip: Fix rkimage format for SPL boot over USBDaniel Gröber1-3/+2
The 'rkimage' format used for booting rockchip boards over USB seems to have been broken since commit 7bf274b9caab ("rockchip: mkimage: use imagename to select spl hdr & spl size"). That commit adds an offset of RK_SPL_HDR_START(=2048) to the location the 'RKxx' header is written at. However the bootrom expects this header to be the first four bytes of the image, not at offset 2048. This appears to have been a copy paste error since the 'rksd' and 'rkspi' image types do require this offset. Furthermore commit 111bcc4fb6cb ("rockchip: mkimage: pad the header to 8-bytes (using a 'nop') for RK3399"), commit 3d54eabcafec9 ("rockchip: spl: RK3399: use boot0 hook to create space for SPL magic") and commit 308277569229 ("rockchip: mkimage: update rkimage to support pre-padded payloads") changed the way the space for the 'RKxx' header is allocated and written to the image without adjusting 'rkimage'. This commit fixes those mistakes and makes it possible to load u-boot SPL over USB once more. (Tested on RK3399) Signed-off-by: Daniel Gröber <daniel@dps.uibk.ac.at> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-10-03tools: socfpga: fix sfp_verify_headerAtsushi Nemoto1-0/+1
Fix sfp_verify_header to return correct version number. This fixes "Not a sane SOCFPGA preloader" error message with v1 header. Signed-off-by: Atsushi Nemoto <atsushi.nemoto@sord.co.jp>
2018-10-01Merge git://git.denx.de/u-boot-dmTom Rini59-166/+2005
2018-09-29buildman: Avoid hanging when the config changesSimon Glass1-1/+1
Something has changed in the last several month such that when buildman builds U-Boot incrementally and a new CONFIG option has been added to the Kconfig, the build hanges waiting for input: Test new config (NEW_CONFIG) [N/y/?] (NEW) Since binamn does not connect the build's stdin to anything this waits on stdin to the build thread, which never comes. Eventually I suspect all the threads end up in this state and the build does not progress. Fix this by passing /dev/null as input to the build. That way, if there is a new CONFIG, the build will stop (and fail): Test new config (NEW_CONFIG) [N/y/?] (NEW) Error in reading or end of file. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Allow writing a map file when something goes wrongSimon Glass4-8/+46
When we get a problem like overlapping regions it is sometimes hard to figure what what is going on. At present we don't write the map file in this case. However the file does provide useful information. Catch any packing errors and write a map file (if enabled with -m) to aid debugging. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support ELF files for U-Boot and SPLSimon Glass6-0/+130
For sandbox we want to put ELF files in the image since that is what we need to execute. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Correct fmap output on x86Simon Glass8-16/+121
Normally x86 platforms use the end-at-4gb option. This currently produces an FMAP with positions which have a large offset. The use of end-at-4gb is a useful convenience within binman, but we don't really want to export a map with these offsets. Fix this by subtracting the 'skip at start' parameter. Also put the code which convers names to fmap format, for clarity. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Record the parent section of each sectionSimon Glass3-4/+9
At present sections have no record of their parent so it is not possible to traverse up the tree to the root and figure out the position of a section within the image. Change the constructor to record this information. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support x86 microcode in TPLSimon Glass9-21/+151
When TPL is used on x86 we may want to program the microcode (at least for the first CPU) early in boot. Add support for this by refactoring the existing code to be more generic. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support hashing entriesSimon Glass9-0/+143
Sometimesi it us useful to be able to verify the content of entries with a hash. Add an easy way to do this in binman. The hash information can be retrieved from the device tree at run time. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Mention section attributes in docsSimon Glass1-2/+2
Images and sections have the same attributes, since an image is mostly just a top-level section. Update the docs to explain this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support expanding entriesSimon Glass8-2/+136
It is useful to have entries which can grow automatically to fill available space. Add support for this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support adding filesSimon Glass17-0/+225
In some cases it is useful to add a group of files to the image and be able to access them at run-time. Of course it is possible to generate the binman config file with a set of blobs each with a filename. But for convenience, add an entry type which can do this. Add required support (for adding nodes and string properties) into the state module. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Allow zero-size sectionsSimon Glass1-1/+1
At present if there is only a zero-size entry in a section this is reported as an error, e.g.: Offset 0x0 (0) is outside the section starting at 0x0 (0) Adjust the logic in CheckEntries() to avoid this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-29binman: Support compressed entriesSimon Glass5-9/+105
Add support for compressing blob entries. This can help reduce image sizes for many types of data. It requires that the firmware be able to decompress the data at run-time. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-28patman: Detect missing tools and report themSimon Glass1-1/+28
When tools are needed but not present, at present we just get an error which can be confusing for the user. Try to be helpful by reporting the tool as missing and suggesting a possible remedy. Also update the Run() method to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-28binman: Support updating all device tree filesSimon Glass13-21/+235
Binman currently supports updating the main device tree with things like the position of each entry. Extend this support to SPL and TPL as well, since they may need (a subset of) this information. Also adjust DTB output files to have a .out extension since this seems clearer than having a .dtb extension with 'out' in the name somwhere. Also add a few missing comments and update the DT setup code to use ReadFile and WriteFile(). Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-28binman: Allow control of whether a fake DT is usedSimon Glass4-2/+7
We use a fake device tree in tests most of the time since tests don't normally care about the actual data. For example, for U-Boot proper we use U_BOOT_DTB_DATA which is just a four-character string. This makes testing the image output against an expected value very easy. However in some cases, such as when the test wants to check that the DT output containing particular nodes, we do actually need the real DT. Add support for this, along with a command-line option to select 'test mode'. Signed-off-by: Simon Glass <sjg@chromium.org>
2018-09-28binman: Obtain the list of device trees from the configSimon Glass5-3/+46
We always have a device tree for U-Boot proper. But we may also have one for SPL and TPL. Add a new Entry method to find out what DTs an entry has, and use that list when updating DTs. Signed-off-by: Simon Glass <sjg@chromium.org>