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/entry.py b/tools/binman/entry.py
index ec3b22e..1d6299a 100644
--- a/tools/binman/entry.py
+++ b/tools/binman/entry.py
@@ -17,10 +17,11 @@
except:
have_importlib = False
-import fdt_util
-import control
import os
import sys
+
+import fdt_util
+import state
import tools
modules = {}
@@ -393,7 +394,7 @@
Raises:
ValueError if the argument cannot be converted to in
"""
- value = control.GetEntryArg(name)
+ value = state.GetEntryArg(name)
if value is not None:
if datatype == int:
try: