Add a proper function for this rather than using internal functions. Use it
in the single call site.
Also, do a restart at the end of the vboot test to reset to the normal
device tree.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Stephen Warren <swarren@nvidia.com>
sha_algo: Either 'sha1' or 'sha256', to select the algorithm to
use.
"""
- cons.cleanup_spawn()
- cons.ensure_spawned()
+ cons.restart_uboot()
with cons.log.section('Verified boot %s %s' % (sha_algo, test_type)):
output = cons.run_command_list(
['sb load hostfs - 100 %stest.fit' % tmpdir,
test_with_algo('sha1')
test_with_algo('sha256')
finally:
+ # Go back to the original U-Boot with the correct dtb.
cons.config.dtb = old_dtb
+ cons.restart_uboot()
pass
self.p = None
+ def restart_uboot(self):
+ """Shut down and restart U-Boot."""
+ self.cleanup_spawn()
+ self.ensure_spawned()
+
def get_spawn_output(self):
"""Return the start-up output from U-Boot