Commit graph

2 commits

Author SHA1 Message Date
David Gibson
e5e6df7c37 fdtdump: Fix bug printing bytestrings with negative values
On systems where 'char' is signed, fdtdump will currently print the wrong
thing on properties containing bytestring values with "negative" bytes
(that is with values from 0x80..0xff).  The fdtdump testcase is extended
to cover this case too.

This corrects the problem by forcing use of unsigned char - although this
is perhaps another indication that fdtdump is a buggy hack and if you want
to do real work you should use dtc -O dts.

Reported-by: Igor Prusov <Igor.V.Prusov@mcst.ru>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2015-07-09 13:47:19 +10:00
Simon Glass
76a65b14d1 Add a basic test for fdtdump
We can test fdtdump by comparing its output with the source file that was
compiled by dtc. Add a simple test that should at least catch regressions
in basic functionality.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2014-06-18 21:24:48 +10:00