summaryrefslogtreecommitdiff
path: root/test/py/u_boot_console_sandbox.py
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-05-05 14:42:02 -0400
committerTom Rini <trini@konsulko.com>2022-05-05 14:42:02 -0400
commitae242b2ea6f76fac5433c4702399747f0d81c6c4 (patch)
tree84a1166812235de4867720da2aa867573288616e /test/py/u_boot_console_sandbox.py
parent1739a6db5403d187902dcebca548de0644c8078f (diff)
parent344e86c61ec2f88b2740b33ed65ccc34ed708baa (diff)
Merge branch '2022-05-05-platform-updates'
- Nuvoton NPCM750 board support and some related drivers - MediaTek pinctrl updates - Bugfixes for sandbox, ls10xxx, and 64bit TI platforms
Diffstat (limited to 'test/py/u_boot_console_sandbox.py')
-rw-r--r--test/py/u_boot_console_sandbox.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/test/py/u_boot_console_sandbox.py b/test/py/u_boot_console_sandbox.py
index cef416d738f..27c6db8d719 100644
--- a/test/py/u_boot_console_sandbox.py
+++ b/test/py/u_boot_console_sandbox.py
@@ -27,6 +27,7 @@ class ConsoleSandbox(ConsoleBase):
super(ConsoleSandbox, self).__init__(log, config, max_fifo_fill=1024)
self.sandbox_flags = []
+ self.use_dtb = True
def get_spawn(self):
"""Connect to a fresh U-Boot instance.
@@ -53,16 +54,13 @@ class ConsoleSandbox(ConsoleBase):
cmd = []
if self.config.gdbserver:
cmd += ['gdbserver', self.config.gdbserver]
- cmd += [
- self.config.build_dir + fname,
- '-v',
- '-d',
- self.config.dtb
- ]
+ cmd += [self.config.build_dir + fname, '-v']
+ if self.use_dtb:
+ cmd += ['-d', self.config.dtb]
cmd += self.sandbox_flags
return Spawn(cmd, cwd=self.config.source_dir)
- def restart_uboot_with_flags(self, flags, expect_reset=False):
+ def restart_uboot_with_flags(self, flags, expect_reset=False, use_dtb=True):
"""Run U-Boot with the given command-line flags
Args:
@@ -70,6 +68,7 @@ class ConsoleSandbox(ConsoleBase):
expect_reset: Boolean indication whether this boot is expected
to be reset while the 1st boot process after main boot before
prompt. False by default.
+ use_dtb: True to use a device tree file, False to run without one
Returns:
A u_boot_spawn.Spawn object that is attached to U-Boot.
@@ -77,9 +76,11 @@ class ConsoleSandbox(ConsoleBase):
try:
self.sandbox_flags = flags
+ self.use_dtb = use_dtb
return self.restart_uboot(expect_reset)
finally:
self.sandbox_flags = []
+ self.use_dtb = True
def kill(self, sig):
"""Send a specific Unix signal to the sandbox process.