summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Makefile: drop unused cpp_cfg macroBaruch Siach2018-07-101-5/+0
| | | | | | | | | | Commit e19b0fb4851f (kbuild: generate u-boot.cfg as a byproduct of include/autoconf.mk) removed the use of the cpp_cfg macro in Makefile, but forgot to remove its definition. Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* omap3_logic: Change console from ttyO0 to ttyS0Adam Ford2018-07-101-1/+1
| | | | | | | | | | | | | | Newer kernels have moved from ttyO0 to ttyS0, and when booting it drops a notice: WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0' This ensures that you still see kernel messages. Please update your kernel commandline. This patch updates the console to use ttyS0 and eliminate the chatter. Signed-off-by: Adam Ford <aford173@gmail.com>
* common: print \n in initr_scsi()Heinrich Schuchardt2018-07-101-0/+1
| | | | | | | | | | | Typically init_scsi() does not output anything. So initr_scsi() should provide a \n or we may see borked output like SCSI: Net: No ethernet found. as observed with sandbox_defconfig. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
* gpio: omap_gpio: Convert to auto-alloc feature when DT is supportedAdam Ford2018-07-101-1/+24
| | | | | | | | | | The omap_gpio driver has a TODO that says when every board is converted to DM and DT, the omap_gpio_bind can stop using calloc and switch to auto-alloc. This patch converts this driver to auto-calloc when DT is enabled. Signed-off-by: Adam Ford <aford173@gmail.com>
* vboot: Do not use hashed-strings offsetTeddy Reed2018-07-102-2/+6
| | | | | | | | | | | | The hashed-strings signature property includes two uint32_t values. The first is unneeded as there should never be a start offset into the strings region. The second, the size, is needed because the added signature node appends to this region. See tools/image-host.c, where a static 0 value is used for the offset. Signed-off-by: Teddy Reed <teddy.reed@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* vboot: Add FIT_SIGNATURE_MAX_SIZE protectionTeddy Reed2018-07-104-0/+49
| | | | | | | | | | | | | | | | | This adds a new config value FIT_SIGNATURE_MAX_SIZE, which controls the max size of a FIT header's totalsize field. The field is checked before signature checks are applied to protect from reading past the intended FIT regions. This field is not part of the vboot signature so it should be sanity checked. If the field is corrupted then the structure or string region reads may have unintended behavior, such as reading from device memory. A default value of 256MB is set and intended to support most max storage sizes. Suggested-by: Simon Glass <sjg@chromium.org> Signed-off-by: Teddy Reed <teddy.reed@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* board: arm: Add support for Broadcom BCM7445Thomas Fitzsimmons2018-07-1028-1/+1305
| | | | | | | | | | | | Add support for loading U-Boot on the Broadcom 7445 SoC. This port assumes Broadcom's BOLT bootloader is acting as the second stage bootloader, and U-Boot is acting as the third stage bootloader, loaded as an ELF program by BOLT. Signed-off-by: Thomas Fitzsimmons <fitzsim@fitzsim.org> Cc: Stefan Roese <sr@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Florian Fainelli <f.fainelli@gmail.com>
* spl: fit: verify images prior to post processingBen Whitten2018-07-101-12/+9
| | | | | | | | | Verification of hashes needs to take place before any image post processing, thus matching full FIT image processing. This allows mechanisms such as encryption be applied to images prior to fit generation at the spl level. Signed-off-by: Ben Whitten <ben.whitten@lairdtech.com>
* configs: Remove empty #ifdef/#ifndef blocks from configsAlex Kiernan2018-07-1019-62/+0
| | | | | | | Remove empty #ifdef/#ifndef..#endif blocks where the configuration they guarded has been completely removed. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
* spl: fit: Fix support for loading FPGA bitstreamMarek Vasut2018-07-101-5/+8
| | | | | | | | | | Move the FPGA loading from IS_ENABLED(CONFIG_SPL_OS_BOOT) && IS_ENABLED(CONFIG_SPL_GZIP) conditional. The FPGA loading can be used without OS loading and GZIP support in SPL. This issue was most likely induced by some merge conflict, so fix it. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com>
* spl: spi: Support full fitImage handlingMarek Vasut2018-07-101-2/+11
| | | | | | | | | | Handle the case where the full fitImage support is enabled. In this case, the whole fitImage must be loaded up front as some parts of the fitImage code require memory-mapped access to the entire fitImage. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
* spl: fat: Support full fitImage handlingMarek Vasut2018-07-101-1/+12
| | | | | | | | | | Handle the case where the full fitImage support is enabled. In this case, the whole fitImage must be loaded up front as some parts of the fitImage code require memory-mapped access to the entire fitImage. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Simon Glass <sjg@chromium.org>
* fit: Verify all configuration signaturesMarek Vasut2018-07-101-12/+14
| | | | | | | | | | | | | Rather than verifying configuration signature of the configuration node containing the kernel image types, verify all configuration nodes, even those that do not contain kernel images. This is useful when the nodes contain ie. standalone OSes or U-Boot. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Pantelis Antoniou <pantelis.antoniou@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-dmTom Rini2018-07-1064-285/+2769
|\
| * binman: Support updating the device tree with calc'd infoSimon Glass2018-07-096-14/+144
| | | | | | | | | | | | | | | | It is useful to write the position and size of each entry back to the device tree so that U-Boot can access this at runtime. Add a feature to support this, along with associated tests. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add a SetCalculatedProperties() methodSimon Glass2018-07-097-9/+67
| | | | | | | | | | | | | | | | | | | | | | | | Once binman has packed the image, the position and size of each entry is known. It is then possible for binman to update the device tree with these positions. Since placeholder values have been added, this does not affect the size of the device tree and therefore the packing does not need to be performed again. Add a new SetCalculatedProperties method to handle this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Add a ProcessFdt() methodSimon Glass2018-07-099-37/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some entry types modify the device tree, e.g. to remove microcode or add a property. So far this just modifies their local copy and does not affect a 'shared' device tree. Rather than doing this modification in the ObtainContents() method, and a new ProcessFdt() method which is specifically designed to modify this shared device tree. Move the existing device-tree code over to use this method, reducing ObtainContents() to the goal of just obtaining the contents without any processing, even for device tree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Complete documentation of stagesSimon Glass2018-07-091-2/+4
| | | | | | | | | | | | | | At present one of the stages is badly numbered and not described. Fix this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add functions to add integer propertiesSimon Glass2018-07-092-0/+47
| | | | | | | | | | | | | | Add a few simple functions to add a placeholder integer property, and set its value. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Avoid unwanted output during testsSimon Glass2018-07-092-6/+11
| | | | | | | | | | | | | | At present some warnings are printed to indicate failures which are a known part of running the tests. Suppress these. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Enable cover-coverage tests for dtoc and fdtSimon Glass2018-07-091-0/+4
| | | | | | | | | | | | | | Now that we have 100% code coverage we can enable these tests in the test script also. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Increase code coverage to 100%Simon Glass2018-07-0910-2/+285
| | | | | | | | | | | | | | | | Add more tests to increase dtoc code coverage to 100%. Correct a whitespace error in some test .dts files at the same time. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Move capture_sys_output() to test_utilSimon Glass2018-07-093-21/+24
| | | | | | | | | | | | | | This function is useful in various tests. Move it into the common test utility module. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add a test for code coverageSimon Glass2018-07-091-0/+15
| | | | | | | | | | | | | | Add a -T option to run a code-coverage test on dtoc. At present this is about 96%. Future work will increase it to 100%. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Fix some minor errorsSimon Glass2018-07-093-4/+5
| | | | | | | | | | | | Fix some comments and a printf string which is incorrect. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Fix properties with a single zero-arg phandleSimon Glass2018-07-094-5/+27
| | | | | | | | | | | | | | | | | | At present a property with a single phandle looks like an integer value to dtoc. Correct this by adjusting it in the phandle-processing code. Add a test for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Fix Fdt.GetNode() to handle a missing nodeSimon Glass2018-07-092-1/+7
| | | | | | | | | | | | | | | | At present the algortihm is not correct since it will return the root node if the requested node is not found and there are no slashes in the requested node name. Fix this and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Keep track of property offsetsSimon Glass2018-07-092-7/+78
| | | | | | | | | | | | | | | | At present the Fdt class does not keep track of property offsets if they change due to removal of properties. Update the code to handle this, and add a test. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Update fdt tests to increase code coverageSimon Glass2018-07-095-24/+150
| | | | | | | | | | | | | | | | At present only some of the fdt functionality is tested. Add more tests to cover the rest of it. Also turn on test coverage, which is now 100% with a small exclusion for a Python 3 feature. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Drop use of a local dtb bufferSimon Glass2018-07-092-10/+10
| | | | | | | | | | | | | | | | | | | | | | At present the Fdt class has its own copy of the device tree. This is confusing an unnecessary now that pylibfdt has its own. Drop it and provide access functions to the buffer. This allows us to move the rest of the implementation to use pylibfdt methods instead of directly calling libfdt stubs. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Make use of the new pylibfdt methodsSimon Glass2018-07-091-12/+14
| | | | | | | | | | | | | | | | | | | | Now that pylibfdt supports a fuller API we don't need to directly call the libfdt stubs. Update the code to use the Fdt methods instead. Some other cases remain which will be tidied up in a later commit, since they need larger changes. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Update tests to write failures to /tmpSimon Glass2018-07-091-14/+42
| | | | | | | | | | | | | | | | | | | | | | | | When a test fails due to an output mismatch (e.g. due to a new property being adding to a test file) it is currently hard to update the test to the new output. In particular the tabs in the file are written as \t in the Python tests. To make this easier, write both the expected and actual results to /tmp to allow use of meld, and copying into the test. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dtoc: Add some tests for the fdt moduleSimon Glass2018-07-093-2/+257
| | | | | | | | | | | | | | | | | | | | At present this module is tested via the dtoc tests. This is a bit painful since the tests are at a higher level and so failures are more difficult to diagnose. Add some tests that exercise the fdt module directly. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Move coverage logic into a new test_util fileSimon Glass2018-07-092-25/+68
| | | | | | | | | | | | | | | | At present only binman has the logic for determining Python test coverage but this is useful for other tools also. Move it out into a separate file so it can be used by other tools. Signed-off-by: Simon Glass <sjg@chromium.org>
| * libfdt: Add get_property() and del_node()Simon Glass2018-07-091-0/+32
| | | | | | | | | | | | | | Add support for these functions in the Python binding. This patch stands in for a pending upstream change. Signed-off-by: Simon Glass <sjg@chromium.org>
| * libfdt: Fix the Python pack() functionSimon Glass2018-07-091-1/+5
| | | | | | | | | | | | | | | | This currently fails to reduce the device-tree bytearray size. Fix this. This stands in for a pending upstream change. Signed-off-by: Simon Glass <sjg@chromium.org>
| * libfdt: Bring in proposed pylibfdt changesSimon Glass2018-07-095-71/+663
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This provides various patches sent to the devicetree-compiler mailing list to enhance the Python bindings. A final version of this patch may be created once upstreaming is complete, but if it takes too long, this can act as a placeholder. New pylibfdt features: - Support for most remaining, relevant libfdt functions - Support for sequential-write functions Changes are applied to existing U-Boot tools as needed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Tidy up setting of entry contentsSimon Glass2018-07-097-6/+62
| | | | | | | | | | | | | | | | | | | | | | At present the contents of an entry are set in subclasses simply by assigning to the data and content_size properties. Add some methods to do this, so that we have more control. In particular, add a method to set the contents without changing its size, so we can validate that case. Add a test case for trying to change the size when this is not allowed. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Tidy up execution of testsSimon Glass2018-07-091-5/+3
| | | | | | | | | | | | | | | | Move all the test execution into the same mechanism so that we can request a particular test (from any suite) by passing it as an argument to 'binman -t'. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Correct operation of ObtainContents()Simon Glass2018-07-098-14/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This method is supposed to return the contents of an entry. However at present there is no check that it actually does. Also some implementations do not return 'True' to indicate success, as required. Add a check for things working as expected, and correct the implementations. This requires some additional test cases to cover things which were missed originally. Add these at the same time. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Tidy up variables in _RunMicrocodeTest()Simon Glass2018-07-091-7/+18
| | | | | | | | | | | | | | At present we call the three entries first, second and third. Rename them to reflect their contents instead, for clarity. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Make the operation of Entry__testing explicitSimon Glass2018-07-092-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This fake entry is used for testing. At present it only has one behaviour which is to return an invalid set of entry positions, to cause an error. The fake entry will need to be used for other things too. Allow the test .dts file to specify the behaviour of the fake entry, so we can control its behaviour easily. While we are here, drop the ReadContents() method, since this only applies to subclasses of Entry_blob, which Entry__testing is not. Signed-off-by: Simon Glass <sjg@chromium.org>
| * binman: Switch to 'python-coverage'Tom Rini2018-07-093-8/+7
| | | | | | | | | | | | | | | | | | The most portable way to get access to coverage is to invoke it as 'python-coverage'. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add logging of some common errorsSimon Glass2018-07-091-2/+12
| | | | | | | | | | | | | | Add additional logging so that common errors when finding a device by ofnode are easier to debug. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add a function to decode a memory regionSimon Glass2018-07-092-0/+126
| | | | | | | | | | | | | | Add a way to decode a memory region, including the memory type (sram or sdram) and its start address and size. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Update of_read_fmap_entry() for livetreeSimon Glass2018-07-093-10/+8
| | | | | | | | | | | | Update this function to take an ofnode so that it can work with livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: spi: Update sandbox SPI emulation driver to use ofnodeSimon Glass2018-07-093-9/+10
| | | | | | | | | | | | Update the parameters sandbox_sf_bind_emul to support livetree. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add a way to bind a device by ofnodeSimon Glass2018-07-092-0/+12
| | | | | | | | | | | | | | Add a new device_bind_ofnode() function which can bind a device given its ofnode. This allows binding devices more easily with livetree nodes. Signed-off-by: Simon Glass <sjg@chromium.org>
| * log: Add a way to log a return value with a messageSimon Glass2018-07-091-0/+8
| | | | | | | | | | | | | | | | It is sometimes useful to show a message when logging an error return value, perhaps to add a few details about the problem. Add a function to support this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add a way to find an ofnode by compatible stringSimon Glass2018-07-092-0/+23
| | | | | | | | | | | | | | Add an ofnode_by_compatible() to allow iterating through ofnodes with a given compatible string. Signed-off-by: Simon Glass <sjg@chromium.org>