diff --git a/README.md b/README.md index 8be6705..7c432b9 100644 --- a/README.md +++ b/README.md @@ -296,6 +296,8 @@ slaves: lava-coordinator: Does the slave should ran a lava-coordinator expose_ser2net: Do ser2net ports need to be available on host joblimit: x Add a joblimit to the worker (default 0) + rawdevices: (optional) Add devpath inside worker + - devpath custom_volumes: - "name:path" Add a custom volume expose_ports: Expose port p1 on the host to p2 on the worker slave. diff --git a/boards-ci2.yaml b/boards-ci2.yaml index 6d15a4f..bf4c8ae 100644 --- a/boards-ci2.yaml +++ b/boards-ci2.yaml @@ -22,6 +22,8 @@ slaves: use_overlay_server: false use_tftp: false version: 2024.xx + raw_devices: + - '/dev/bus/usb' boards: - name: qemu-01 diff --git a/lavalab-gen.py b/lavalab-gen.py index 3f62bc1..aba88c6 100755 --- a/lavalab-gen.py +++ b/lavalab-gen.py @@ -425,7 +425,7 @@ def main(): "joblimit", "loglevel", "lava-coordinator", "lava_worker_token", "name", - "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "remote_user_token", + "raw_devices", "remote_user", "remote_master", "remote_address", "remote_rpc_port", "remote_proto", "remote_user_token", "tags", "use_docker", "use_nfs", "use_nbd", "use_overlay_server", "use_tftp", "use_tap", "version", @@ -596,6 +596,10 @@ def main(): fp.write("\n") fp.close() os.chmod("%s/scripts/extra_actions" % workerdir, 0o755) + if "raw_devices" in worker: + for rd in worker["raw_devices"]: + dockcomp_add_device(dockcomp, worker_name, f"{rd}:{rd}") + if "devices" in worker: udevdir = "%s/udev" % hostdir