platform_external_dtc/tests/fdtdump.dts
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

38 lines
724 B
Text

/dts-v1/;
/memreserve/ 0 0xe;
/ {
model = "MyBoardName";
compatible = "MyBoardName", "MyBoardFamilyName";
#address-cells = <0x00000002>;
#size-cells = <0x00000002>;
cpus {
linux,phandle = <0x00000001>;
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
PowerPC,970@0 {
device_type = "cpu";
reg = <0x00000000>;
linux,boot-cpu;
};
PowerPC,970@1 {
device_type = "cpu";
reg = <0x00000001>;
};
};
randomnode {
string = "foo", "stuff";
bytes = [61 62 63 64 65];
nbytes = [80 ff];
child {
};
};
memory@0 {
device_type = "memory";
reg = <0x00000000 0x00000123 0x00000456 0x87654321>;
};
chosen {
bootargs = "root=/dev/sda2";
linux,platform = <0x00000600>;
};
};