[U-Boot] [PATCH] test/py: Add support for loading image via tftp to specified location

Michal Simek michal.simek at xilinx.com
Thu Mar 31 10:32:09 CEST 2016


For example this setting:

env__net_tftp_readable_file = {
    "fn": "ep108/image.ub",
    "addr": "0x10000000",
    "size": 25846296,
    "crc32": "b726f9de",
}

Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---

 test/py/tests/test_net.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/py/tests/test_net.py b/test/py/tests/test_net.py
index 07393eb1fdf8..4c578273aee3 100644
--- a/test/py/tests/test_net.py
+++ b/test/py/tests/test_net.py
@@ -135,7 +135,12 @@ def test_net_tftpboot(u_boot_console):
     if not f:
         pytest.skip('No TFTP readable file to read')
 
-    addr = u_boot_utils.find_ram_base(u_boot_console)
+    addr = f.get('addr', None)
+    if addr:
+        addr = int(addr,16)
+    else:
+        addr = u_boot_utils.find_ram_base(u_boot_console)
+
     fn = f['fn']
     output = u_boot_console.run_command('tftpboot %x %s' % (addr, fn))
     expected_text = 'Bytes transferred = '
-- 
1.9.1



More information about the U-Boot mailing list