diff options
author | Corentin LABBE <clabbe@baylibre.com> | 2018-04-12 11:53:43 +0200 |
---|---|---|
committer | Corentin LABBE <clabbe@baylibre.com> | 2018-04-13 09:29:49 +0200 |
commit | 018f10b1c57760071fd20cd052b1eff5ec32ecd7 (patch) | |
tree | 2eaa45d39f5636bdfa7e6e1d71c5e51673b2812c | |
parent | ce5aedf52f6c67e849b31b22dc083dc56f02543c (diff) |
Add uboot_ipaddr
Some boards have broken uboot dhcp, so we need to set a static ip in
uboot.
This patch add a way to specify such IP via uboot_ipaddr.
-rw-r--r-- | README.md | 1 | ||||
-rwxr-xr-x | lavalab-gen.py | 2 |
2 files changed, 3 insertions, 0 deletions
@@ -220,6 +220,7 @@ lab-slave-XX: The name of the slave (where XX is a number) boardlist: devicename: Each board must be named by their device-type as "device-type-XX" (where XX is a number) type: the LAVA device-type of this device + uboot_ipaddr: (optional) a static IP to set in uboot macaddr: (Optional) the MAC address to set in uboot # One of uart or connection_command must be choosen uart: diff --git a/lavalab-gen.py b/lavalab-gen.py index 6e9a547..d01ccb1 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -117,6 +117,8 @@ def main(): elif "connection_command" in b: connection_command = b["connection_command"] device_line += template_device_connection_command.substitute(connection_command=connection_command) + if "uboot_ipaddr" in b: + device_line += "{%% set uboot_ipaddr_cmd = 'setenv ipaddr %s' %%}\n" % b["uboot_ipaddr"] if "macaddr" in b: device_line += '{% set uboot_set_mac = true %}' device_line += "{%% set uboot_mac_addr = '%s' %%}" % b["macaddr"] |