- 27 4月, 2020 4 次提交
-
-
由 Simon Glass 提交于
Now that we are using absolute paths we can remove some of the sys.path mangling that appears in the tools. We only need to add the path to 'tools/' so that everything can find modules relative to that directory. The special paths for finding pylibfdt remain. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present patman sets the python path on startup so that it can access the libraries it needs. If we convert to use absolute imports this is not necessary. Move patman to use absolute imports. This requires changes in tools which use the patman libraries (which is most of them). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Python does not like the module name being the same as the module directory. To allow dtoc modules to be used from other tools, rename it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
We don't need these now that the tools using Python 3. Drop them. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 18 4月, 2020 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Fix some errors pointed out by 'make refcheckdocs'. Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 05 11月, 2019 3 次提交
-
-
由 Simon Glass 提交于
Drop the now-unused Python 2 code to keep code coverage at 100%. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update this test to use Python 3 to meet the 2020 deadline. Also make it executable while we are here. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update this test to use Python 3 to meet the 2020 deadline. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 29 7月, 2019 6 次提交
-
-
由 Simon Glass 提交于
Since the state module holds references to all the device trees used by binman, it must be updated when the device trees are updated. Add support for this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present EnsureCompiled() uses an file from the 'output' directory (in the tools module) when compiling the device tree. This is fine in most cases, allowing useful inspection of the output files from binman. However in functional tests, _SetupDtb() creates an output directory and immediately removes it afterwards. This serves no benefit and just confuses things, since the 'official' output directory is supposed to be created and destroyed in control.Binman(). Add a new parameter for the optional temporary directory to use, and use a separate temporary directory in _SetupDtb(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function currently fails if the root node is requested. Requesting the root node is sometimes useful, so fix the bug. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is confusing when something goes wrong with a device tree which was created from data rather than a file, since there is no identifying filename. Add an option to provide this. Use the filename as the name, where available Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present a Python exception is raised which does not show the node information. Add a more helpful exception in this case. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present 'dtoc -t' return a success code even if some of the tests fail. Fix this by checking the test result and setting the exit code. This allows 'make qcheck' to function as expected. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 11 7月, 2019 14 次提交
-
-
由 Simon Glass 提交于
The only change needed is to update get_value() to support the 'bytes' type correctly with Python 3. With this the dtoc unit tests pass with both Python 2 and 3: PYTHONPATH=/tmp/b/sandbox_spl/scripts/dtc/pylibfdt python \ ./tools/dtoc/dtoc -t PYTHONPATH=~/cosarm/dtc/pylibfdt:tools/patman python3 \ ./tools/dtoc/dtoc -t Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Since we are now using the bytes type in Python 3, the conversion in fdt32_to_cpu() is not necessary, so drop it. Also use 'int' instead of 'long' to convert the integer value, since 'long' is not present in Python 3. With this, test_fdt passes with both Python 2 and 3: PYTHONPATH=/tmp/b/sandbox_spl/scripts/dtc/pylibfdt python \ ./tools/dtoc/test_fdt -t PYTHONPATH=~/cosarm/dtc/pylibfdt:tools/patman python3 \ ./tools/dtoc/test_fdt -t Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a simple unit test for one of the cases of this function, so that any fault can be seen directly, rather than appearing through the failure of another test. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present this test does not check the upper 32 bits of the returned value. Add some additional tests to cover this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The .dtb files are binary so we should open them as binary files. This allows Python 3 to use the correct 'bytes' type. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update this class to work correctly on Python 3 and to pass its unit tests. The only required change is to deal with a difference in the behaviour of sorting with a None value. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update this class to work correctly on Python 3 and to pass its unit tests. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
In Python 3 bytes and str are separate types. Use bytes to ensure that the code functions correctly with Python 3. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The difference between the bytes and str types in Python 3 requires a number of minor changes to this function. Update it to handle the input data using the 'bytes' type. Create two useful helper functions which can be used by other modules too. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This method does not actually use any members of the Prop class. Move it out of the class so that it is easier to add unit tests. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Use this helper function which works on both Python 2 and Python 3. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present the order of struct field emitted by this tool depends on the internal workings of a Python dictionary. Sort the fields to remove this uncertainty, so that tests are deterministic. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update a few things in this tool so that they support Python 3: - print statements - iteritems() - xrange() Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Fix an open() statement to use binary mode, so that it works as expected with Python 3. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 27 4月, 2019 1 次提交
-
-
由 Heiko Schocher 提交于
generate define for an alias only if the struct is not created already. This prevents compilerwarning: PLAT spl/dts/dt-platdata.o spl/dts/dt-platdata.c:11:46: error: missing braces around initializer [-Werror=missing-braces] static const struct dtd_simple_bus dtv_ahb = { ^ spl/dts/dt-platdata.c:20:46: error: missing braces around initializer [-Werror=missing-braces] static const struct dtd_simple_bus dtv_apb = { ^ cc1: all warnings being treated as errors on the at91 based taurus board. Reason is in at91sam9260.dtsi is defined: ahb { compatible = "simple-bus"; ranges; and later: pinctrl: pinctrl@fffff400 { compatible = "atmel,at91rm9200-pinctrl", "simple-bus"; ranges = <0xfffff400 0xfffff400 0x600>; without this patch dtoc generates: struct dtd_atmel_at91rm9200_pinctrl { fdt32_t atmel_mux_mask[6]; fdt32_t ranges[3]; fdt32_t reg[6]; }; struct dtd_simple_bus { bool ranges; }; "#define dtd_simple_bus dtd_atmel_at91rm9200_pinctrl" and the line with "define dtd_simple_bus..." introduces the warning. This define is not needed. Signed-off-by: NHeiko Schocher <hs@denx.de>
-
- 26 1月, 2019 1 次提交
-
-
由 Simon Goldschmidt 提交于
The dtoc tests need to be adapted to dtoc being changed to output platdata structs as const, which has been introduced in commit 7d05d3a8 ("dtoc: make generated platdata structs const"). Fixes: 7d05d3a8 ("dtoc: make generated platdata structs const") Signed-off-by: NSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org> Tested-by: NSimon Glass <sjg@chromium.org>
-
- 16 1月, 2019 1 次提交
-
-
由 Simon Goldschmidt 提交于
The platdata initialization structs are currently generated into .rwdata. Make sure the are put into .rodata by generating them as const. Signed-off-by: NSimon Goldschmidt <simon.k.r.goldschmidt@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 09 10月, 2018 1 次提交
-
-
由 Simon Glass 提交于
This does not set the correct value at present. Fix it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 08 10月, 2018 4 次提交
-
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
There are a few test cases which print output. Suppress this so that tests can run silently in the normal case. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
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: NSimon Glass <sjg@chromium.org>
-
- 29 9月, 2018 4 次提交
-
-
由 Simon Glass 提交于
Support creating an Fdt object without having to write the data to a file first. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a few more functions which allow creating and modifying property values. If only we could do this so easily in the real world. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a way to add new nodes and sync them back to the blob. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This should be big endian, since that is what device tree uses. Fix it. Signed-off-by: NSimon Glass <sjg@chromium.org>
-