summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rwxr-xr-xlavalab-gen.py9
2 files changed, 9 insertions, 1 deletions
diff --git a/README.md b/README.md
index 91a0d72..5c7c57c 100644
--- a/README.md
+++ b/README.md
@@ -266,6 +266,7 @@ slaves:
default_slave: Does this slave is the default slave where to add boards (default: lab-slave-0)
bind_dev: Bind /dev from host to slave. This is needed when using some HID PDU
use_nfs: Does the LAVA dispatcher will run NFS jobs
+ arch: The arch of the worker (if not x86_64), only accept arm64
expose_ser2net: Do ser2net ports need to be available on host
expose_ports: Expose port p1 on the host to p2 on the worker slave.
- p1:p2
diff --git a/lavalab-gen.py b/lavalab-gen.py
index af01b2a..65e2560 100755
--- a/lavalab-gen.py
+++ b/lavalab-gen.py
@@ -281,7 +281,7 @@ def main():
else:
slaves = workers["slaves"]
for slave in slaves:
- keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel", "use_nfs" ]
+ keywords_slaves = [ "name", "host", "dispatcher_ip", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "extra_actions", "zmq_auth_key", "zmq_auth_key_secret", "default_slave", "export_ser2net", "expose_ser2net", "remote_user_token", "zmq_auth_master_key", "expose_ports", "env", "bind_dev", "loglevel", "use_nfs", "arch" ]
for keyword in slave:
if not keyword in keywords_slaves:
print("WARNING: unknown keyword %s" % keyword)
@@ -329,6 +329,13 @@ def main():
worker = slave
worker_name = name
slave_master = None
+ if "arch" in worker:
+ if worker["arch"] == 'arm64':
+ dockerfile = open("%s/Dockerfile" % workerdir, "r+")
+ dockerfilec = dockerfile.read().replace("lava-slave-base", "lava-slave-base-arm64")
+ dockerfile.seek(0)
+ dockerfile.write(dockerfilec)
+ dockerfile.close()
#NOTE remote_master is on slave
if not "remote_master" in worker:
remote_master = "lava-master"