dtoc: Drop use of a local dtb buffer

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>
diff --git a/tools/dtoc/test_fdt.py b/tools/dtoc/test_fdt.py
index ba660ca..daa9d12 100755
--- a/tools/dtoc/test_fdt.py
+++ b/tools/dtoc/test_fdt.py
@@ -72,7 +72,7 @@
 
     def testGetFdt(self):
         """Tetst that we can access the raw device-tree data"""
-        self.assertTrue(isinstance(self.dtb.GetFdt(), bytearray))
+        self.assertTrue(isinstance(self.dtb.GetContents(), bytearray))
 
     def testGetProps(self):
         """Tests obtaining a list of properties"""
@@ -157,7 +157,7 @@
 
         # Add 12, which is sizeof(struct fdt_property), to get to start of data
         offset = prop.GetOffset() + 12
-        data = self.dtb._fdt[offset:offset + len(prop.value)]
+        data = self.dtb.GetContents()[offset:offset + len(prop.value)]
         bytes = [chr(x) for x in data]
         self.assertEqual(bytes, prop.value)