binman: Move state information into a new module
At present the control module has state information in it, since it is the
primary user of this. But it is a bit odd to have entries and other
modules importing control to obtain this information.
It seems better to have a dedicated state module, which control can use as
well. Create a new module using code from control and update other modules
to use it.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py
index 290e9ae..8671797 100644
--- a/tools/binman/ftest.py
+++ b/tools/binman/ftest.py
@@ -23,6 +23,7 @@
import fdt_util
import fmap_util
import test_util
+import state
import tools
import tout
@@ -258,7 +259,7 @@
retcode = self._DoTestFile(fname, map=map, update_dtb=update_dtb,
entry_args=entry_args)
self.assertEqual(0, retcode)
- out_dtb_fname = control.GetFdtPath('u-boot.dtb')
+ out_dtb_fname = state.GetFdtPath('u-boot.dtb')
# Find the (only) image, read it and return its contents
image = control.images['image']