]> git.baikalelectronics.ru Git - uboot.git/commit
dtoc: Fix widening of int to bytes
authorSimon Glass <sjg@chromium.org>
Sat, 3 Oct 2020 17:31:27 +0000 (11:31 -0600)
committerSimon Glass <sjg@chromium.org>
Thu, 29 Oct 2020 20:42:17 +0000 (14:42 -0600)
commitd69e6f6e6ae010edd1880448800007ff7ed322e4
tree0c671dc9826b0ca6569294c438597fcc89f78039
parent0eac2576488ae94687620481745b5bef5a338e9e
dtoc: Fix widening of int to bytes

At present an integer is converted to bytes incorrectly. The whole 32-bit
integer is inserted as the first element of the byte array, and the other
three bytes are skipped. This was not noticed because the unit test did
not check it, and the functional test was checking for wrong values.

Update the code to handle this as a special case. Add one more test to
cover all code paths.

Signed-off-by: Simon Glass <sjg@chromium.org>
test/py/tests/test_ofplatdata.py
tools/dtoc/dtoc_test_simple.dts
tools/dtoc/fdt.py
tools/dtoc/test_dtoc.py
tools/dtoc/test_fdt.py