diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2018-11-30 10:31:49 +0100 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2018-11-30 10:35:14 +0100 |
commit | 891768d7bc5c77e9cb4c99d67f40354c50082161 (patch) | |
tree | f1d8223cf194c50b33d137eb16aa46c0385aaf03 /lavalab-gen.py | |
parent | 5227dbc047a9c2783f0c220794953afe7644f069 (diff) |
lavalab-gen.py: Made ser2net the default
This patch makes ser2net the default uart handler.
Diffstat (limited to 'lavalab-gen.py')
-rwxr-xr-x | lavalab-gen.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/lavalab-gen.py b/lavalab-gen.py index e9c228f..f52805e 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -464,15 +464,18 @@ def main(): dc_devices = dockcomp["services"][worker_name]["devices"] if not "bind_dev" in slave: dc_devices.append("/dev/%s:/dev/%s" % (board_name, board_name)) - use_conmux = True - use_ser2net = False + use_conmux = False + use_ser2net = True use_screen = False - if "use_ser2net" in uart: - use_conmux = False - use_ser2net = True if "use_screen" in uart: - use_conmux = False - use_screen = True + use_screen = uart["use_screen"] + if "use_conmux" in uart: + use_conmux = uart["use_conmux"] + if "use_ser2net" in uart: + use_ser2net = uart["use_ser2net"] + if (use_conmux and use_ser2net) or (use_conmux and use_screen) or (use_screen and use_ser2net): + print("ERROR: Only one uart handler must be configured") + sys.exit(1) if use_conmux: conmuxline = template_conmux.substitute(board=board_name, baud=baud) device_line += template_device_conmux.substitute(board=board_name) |