### Monitor Configuration Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/test.md This example outlines the essential components for configuring monitors in test jobs, including 'start' and 'end' strings for identifying test suite execution boundaries. ```yaml name: test_suite_name start: "start_string" end: "end_string" ``` -------------------------------- ### QEMU Job Example with Netdevice Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-qemu.md This YAML snippet demonstrates a QEMU job configuration that utilizes the `netdevice` setting for network booting. Ensure `netdevice` is set to `tap` for TFTP and OS installation network access. ```yaml --8<-- "jobs/qemu-iso.yaml" ``` -------------------------------- ### QEMU-ISO Boot Method Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-qemu.md Employ the 'qemu-iso' boot method with 'img' media to boot downloaded installer ISOs using QEMU. This is typically for automated OS installations. Auto-login credentials can be configured for the installer. ```yaml - boot: method: qemu-iso media: img auto_login: login_prompt: 'login:' username: root password_prompt: 'Password:' password: root prompts: - 'root@debian:' ``` -------------------------------- ### Common Boot Action Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/common.md This example demonstrates a typical boot action configuration, including timeout, method, commands, auto-login details, and expected prompts. ```yaml actions: - boot: timeout: minutes: 15 method: u-boot commands: nfs auto_login: login_prompt: 'login:' username: root password_prompt: "Password:" password: "secret" prompts: - 'root@device:~#' ``` -------------------------------- ### Install Docker and Docker Compose Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/remote-workers.md Install the required Docker and Docker Compose dependencies on the host system to use the docker-compose setup for LAVA. ```shell apt install docker.io docker-compose ``` -------------------------------- ### Deploy to ISO Installer Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-iso-installer.md YAML configuration for deploying to an ISO installer. This setup is used for operating systems that require an installation process from an ISO image. Currently tested with Debian installer and the `qemu-iso` boot method. ```yaml - deploy: to: iso-installer os: debian_installer images: iso: url: https://cdimage.debian.org/debian-cd/13.3.0/amd64/iso-cd/debian-13.3.0-amd64-netinst.iso image_arg: -drive file={iso},index=2,media=cdrom,readonly=on preseed: url: https://storage.lavacloud.io/health-checks/qemu/iso/preseed.cfg iso: kernel: /install.amd/vmlinuz initrd: /install.amd/initrd.gz installation_size: 3G timeout: minutes: 30 ``` -------------------------------- ### Boot Action Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/basic-tutorials/job-definition.md Example of a boot action within a LAVA job definition. Configures booting a QEMU device using software from 'tmpfs'. ```yaml boot: method: "tmpfs" ``` -------------------------------- ### Full Job Example with Musca Boot Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-musca.md A comprehensive job definition example that includes deploying a test binary, booting with the musca method, and setting up test monitors. This illustrates a complete workflow for Musca devices. ```yaml job_name: musca-b-health-check device_type: musca-b priority: medium visibility: public timeouts: job: minutes: 20 action: minutes: 10 actions: - deploy: to: musca images: test_binary: url: https://storage.lavacloud.io/health-checks/musca-b/tfm.hex - boot: method: musca - test: monitors: - name: "Secure_Test_Suites_Summary" start: "Non-Secure system" end: "starting\\.{3}" pattern: "Non-Secure system starting\\.{3}" fixupdict: '!': pass '': fail ``` -------------------------------- ### Environment Configuration Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/configuration/dispatcher.md Example of an environment configuration file. This file sets the process environment when spawning 'lava-run'. ```yaml --8<-- "config/env.yaml" ``` -------------------------------- ### Install Udev Rules for Source Installation Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/remote-workers.md When installing \`lava-dispatcher-host\` from source, manually install the udev rules file using the provided command. ```shell lava-dispatcher-host rules install ``` -------------------------------- ### Custom Boot Commands Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/common.md Example of custom boot commands that override device-type templates. These must retain placeholders for LAVA substitution. ```yaml - boot: method: ipxe commands: - dhcp net0 - set console console=ttyS0,115200n8 lava_mac={LAVA_MAC} - set extraargs ip=dhcp root=/dev/sda1 rw - kernel tftp://{SERVER_IP}/{KERNEL} ${extraargs} ${console} - initrd tftp://{SERVER_IP}/{RAMDISK} - boot ``` -------------------------------- ### Hardware DFU Job Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-dfu.md An example LAVA job demonstrating the DFU boot method for hardware devices. It includes deployment of multiple images with specific DFU arguments. ```yaml device_type: arduino101 job_name: zephyr dfu timeouts: job: minutes: 15 action: minutes: 5 actions: lava-test-monitor: seconds: 300 wait-usb-device: seconds: 20 flash-dfu: seconds: 60 connections: lava-test-monitor: seconds: 300 priority: medium visibility: public actions: - deploy: timeout: minutes: 3 to: tmpfs images: app: image_arg: --alt x86_app --download {app} url: https://storage.lavacloud.io/health-checks/arduino_101/app_kernel-zephyr.bin sensor_core: image_arg: --alt sensor_core --download {sensor_core} url: https://storage.lavacloud.io/health-checks/arduino_101/sensor_core-arc.bin ble_core: image_arg: --alt ble_core --download {ble_core} url: https://storage.lavacloud.io/health-checks/arduino_101/ble_core-image.bin - boot: method: dfu timeout: minutes: 10 - test: monitors: - name: simple-service start: S I M P L E S E R V I C E M E A S U R E M E N T S end: M A I L B O X M E A S U R E M E N T S pattern: 'Â\| (?P[a-z ]+) +Â\| +(?P\d+)Â\]' ``` -------------------------------- ### Example dd Writer Pipeline Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-secondary.md An example of the `dd` writer pipeline, demonstrating how `wget` downloads an image and pipes it to `dd` for writing to a specified device. ```shell /usr/bin/wget --no-check-certificate --no-proxy --connect-timeout=30 \ -S --progress=dot:giga \ -O - http://198.18.0.1/tmp/529/storage-deploy-23634l0i/image/ubuntu-24.04.4-preinstalled-server-arm64+raspi.img \ | dd of='/dev/disk/by-id/mmc-SE16G_0x5005f804' bs=4M ``` -------------------------------- ### Example GRUB Boot Action in a Job Definition Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-grub.md An example of a GRUB boot action within a complete LAVA job definition, including deployment and testing phases. ```yaml - boot: method: grub commands: nfs auto_login: login_prompt: 'login:' username: root prompts: - root@(.*):[/~]# - '/ #' timeout: minutes: 30 ``` -------------------------------- ### U-Boot DFU Job Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-dfu.md This example demonstrates a LAVA job using DFU to flash images for a U-Boot environment. It includes multiple deploy actions and command executions before booting. ```yaml device_type: rzn1 job_name: flash rzn1 using u-boot dfu timeouts: job: minutes: 10 action: minutes: 5 connection: minutes: 2 priority: medium visibility: public actions: - deploy: namespace: dfu to: tmpfs images: sf_fsbl: image_arg: --alt sf_fsbl --download {sf_fsbl} url: http://.../rzn1d-snarc-fsbl-secmon.img sf_uboot0: image_arg: --alt sf_uboot0 --download {sf_uboot0} url: http://.../u-boot-lces2-ddr.itb sf_uboot1: image_arg: --alt sf_uboot1 --download {sf_uboot1} url: http://.../u-boot-lces2-ddr.itb n_kernel1: image_arg: --alt n_kernel1 --download {n_kernel1} url: http://.../fitImage-1.0-r0-rzn1-snarc.itb - command: namespace: dfu name: set_boot_to_nand - boot: namespace: dfu method: dfu timeout: minutes: 10 - command: namespace: test name: set_boot_to_qspi - deploy: namespace: test to: overlay - boot: namespace: test connection-namespace: dfu method: bootloader bootloader: u-boot prompts: ["=>"] commands: ["run linux_bestla"] - boot: namespace: test timeout: minutes: 5 method: minimal reset: false auto_login: login_prompt: 'login:' username: 'root' password_prompt: "Password:" password: "P@ssword-1" login_commands: - 'P@ssword-1' - 'azertAZERT12345' - 'azertAZERT12345' - 'azertAZERT12345' prompts: - "root@rzn1-snarc:~# " - "root@rzn1-snarc:/tmp# " - "Current password: " - "New password: " - "Retype new password: " transfer_overlay: download_command: unset http_proxy ; dhclient eth1 ; cd /tmp ; wget unpack_command: tar -C / -xzf - test: namespace: test definitions: - repository: https://github.com/Linaro/test-definitions from: git path: automated/linux/busybox/busybox.yaml name: busybox timeout: minutes: 5 ``` -------------------------------- ### Entrypoint script for FVP Docker Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/device-setup/fvp.md This script starts the libvirtd daemon and then executes the main command passed to the container. It ensures the virtualization daemon is running before the FVP model starts. ```bash #!/bin/bash set -ex /usr/sbin/libvirtd & sleep 3 exec "$@" ``` -------------------------------- ### Start LAVA Services Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/instance/install.md Starts all the necessary LAVA services, including the web server, database, and various LAVA components. ```shell systemctl start apache2 systemctl start postgresql systemctl start lava-server-gunicorn systemctl start lava-publisher systemctl start lava-scheduler systemctl start lava-worker ``` -------------------------------- ### pyOCD TMPFS Deployment Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-tmpfs.md This example demonstrates deploying a Zephyr image to TMPFS for use with the pyOCD boot method. It specifies the image URL and a timeout. The boot method is set to pyOCD with a timeout. ```yaml - deploy: to: tmpfs images: zephyr: url: http://example.com/zephyr.bin timeout: minutes: 5 - boot: method: pyocd timeout: minutes: 5 ``` -------------------------------- ### Install Docker.io on Debian Testing/Sid Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/docker-worker.md Alternative Docker installation method for Debian Testing/Sid distributions if the official CE script is not supported. ```bash apt-get install docker.io ``` -------------------------------- ### BCU Command Examples Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-uuu.md These are examples of BCU commands that can be used with the UUU boot method. They include resetting the board to a specific boot mode, listing connected devices, and retrieving boot mode information. ```shell reset BOOTMODE_NAME # Reset the board and then boots from mentioned BOOTMODE_NAME. # Replace BOOTMODE_NAME with different options like emmc,sd, # usb which can be obtained from command bcu lsbootmode. # Replace the BOOTMODE_NAME with anyone of the mentioned. ``` ```shell lsftdi # List all the boards connected by ftdi device ``` ```shell lsboard # List all supported board models ``` ```shell get_boot_mode # Displays the boot mode set by BCU ``` -------------------------------- ### Deploy Action Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/basic-tutorials/job-definition.md Example of a deploy action within a LAVA job definition. Specifies deployment to 'tmpfs' and downloading the rootfs from a URL. ```yaml deploy: to: tmpfs rootfs: url: "http://images.validation.linaro.org/images/lava/qemu/rootfs.ext4.zsync" sha256: "a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890a1b2c3d4e5f67890" ``` -------------------------------- ### Full LAVA Job Example with Depthcharge Boot Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-depthcharge.md An example LAVA job definition demonstrating the deploy and boot actions, including Depthcharge boot with auto-login and specific prompts. ```yaml device_type: acer-cbv514-1h-34uz-brya job_name: depthcharge NFS boot example timeouts: job: minutes: 30 connection: minutes: 2 priority: medium visibility: public actions: - deploy: to: tftp kernel: url: https://example.com/bzImage modules: url: https://example.com/modules.tar.xz compression: xz ramdisk: url: https://example.com/bullseye-rootfs-amd64-initramfs.gz compression: gz nfsrootfs: url: https://example.com/bullseye-rootfs-amd64.tar.gz compression: gz timeout: minutes: 10 - boot: method: depthcharge commands: nfs auto_login: login_prompt: 'login:' username: user password_prompt: 'Password:' password: user login_commands: - sudo su prompts: - 'root@health' - 'user@health' timeout: minutes: 5 - test: definitions: - from: git repository: https://gitlab.com/lava/functional-tests.git path: posix/smoke-tests-basic.yaml name: smoke-tests timeout: minutes: 5 ``` -------------------------------- ### Install LAVA Server and PostgreSQL for Debian Bullseye Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/instance/install.md Installs the PostgreSQL database and LAVA server packages for Debian Bullseye. It also starts the PostgreSQL cluster and installs the LAVA dispatcher from backports. ```shell apt update apt install postgresql pg_ctlcluster 13 main start apt install lava-server apt install -t bullseye-backports lava-dispatcher ``` -------------------------------- ### Bootloader Action with Use Bootscript Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-bootloader.md This example shows how to use the `use_bootscript` option to write boot commands to an iPXE script. A prior `tftp` deploy action is required. ```yaml - boot: method: ipxe commands: ramdisk use_bootscript: true ``` -------------------------------- ### Fastboot Deploy with Apply Overlay Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-fastboot.md This example demonstrates how to configure an image for fastboot deployment with the `apply-overlay` option set to true, which applies the LAVA test overlay to the image. ```yaml - deploy: to: fastboot images: rootfs: url: https://example.com/rootfs.img.xz compression: xz apply-overlay: true ``` -------------------------------- ### Install LAVA Server and Dispatcher for Debian Bookworm Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/instance/install.md Installs the PostgreSQL database, LAVA server, and LAVA dispatcher packages for Debian Bookworm. It also starts the PostgreSQL cluster. ```shell apt update apt install postgresql pg_ctlcluster 15 main start apt install lava-server lava-dispatcher ``` -------------------------------- ### TestSet Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/test.md Demonstrates how to use TestSets to group related lava test cases within a single definition. TestSets are started and stopped using 'lava-test-set start' and 'lava-test-set stop' commands. ```yaml - test: definitions: - repository: run: steps: - lava-test-set start first_set - lava-test-case date --shell ntpdate-debian - ls / - lava-test-case mount --shell mount - lava-test-set stop - lava-test-case uname --shell uname -a ``` -------------------------------- ### Basic Notification Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/notifications.md Defines when notifications should be sent and includes example callback configurations for GET and POST requests. ```yaml notify: criteria: status: finished callbacks: - url: https://my-url/callback method: GET - url: https://remote-site/callback/lava?status={STATUS}&status_string={STATUS_STRING} method: POST dataset: all token: ci-callback content-type: json ``` -------------------------------- ### JLink Boot with Multiple Images Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-jlink.md This example shows how to flash multiple images using the jlink boot method. Each `loadfile` command specifies an image key (e.g., `{shell}`, `{hello_world}`) and the target address. Images must be deployed via `tmpfs`. ```yaml - boot: method: jlink commands: - loadfile {shell} 0x0 - loadfile {hello_world} 0x0 ``` -------------------------------- ### Extend Base FVP Device Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/device-setup/fvp.md Use this Jinja2 template to extend the base FVP configuration for a minimal setup. This is a starting point for defining your FVP device in LAVA. ```jinja {% extends "fvp.jinja2" %} ``` -------------------------------- ### Minimal Boot Method Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-minimal.md Use the minimal method to power on and boot the DUT without interaction. Specify expected prompts for the shell. ```yaml - boot method: minimal prompts: - 'root@debian:~#' ``` -------------------------------- ### QEMU Boot Method (tmpfs media) Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-qemu.md Use the 'qemu' boot method with 'tmpfs' media to boot downloaded images directly using QEMU. Configure auto-login details if needed. ```yaml - boot: method: qemu media: tmpfs prompts: - 'root@debian:' auto_login: login_prompt: 'login:' username: root ``` -------------------------------- ### Create Device Type via Command Line Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/device-setup/common.md Use either lavacli or lava-server to add a new device type to LAVA. Ensure the device type name matches your setup guide. ```shell lavacli device-types add ``` ```shell lava-server manage device-types add ``` -------------------------------- ### QEMU TMPFS Deployment Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-tmpfs.md This snippet shows how to deploy a rootfs image to TMPFS for use with the QEMU boot method. It specifies the image URL, compression type, and a timeout. The boot method is set to QEMU, using TMPFS, and includes login prompts and auto-login configuration. ```yaml - deploy: to: tmpfs images: rootfs: image_arg: -drive format=qcow2,file={rootfs} url: http://example.com/debian-buster.qcow2.zst compression: zstd timeout: minutes: 5 - boot: method: qemu media: tmpfs prompts: - "root@debian:" auto_login: login_prompt: "login:" username: root timeout: minutes: 5 ``` -------------------------------- ### Configure QEMU Interface Up Script Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/device-setup/qemu.md Sets up the /etc/qemu-ifup script to bring up the tap interface and assign it to the 'br-lava' bridge when QEMU starts. ```bash sudo cp /etc/qemu-ifup /etc/qemu-ifup.original sudo tee /etc/qemu-ifup > /dev/null << 'EOF' #!/bin/sh -ex TAP="$1" BRIDGE=br-lava ip link set "$TAP" up ip link set "$TAP" master "$BRIDGE" EOF ``` -------------------------------- ### Enable and Start LAVA Docker Worker Service Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/docker-worker.md Enable the lava-docker-worker service to start on boot and then start the service immediately. ```bash sudo systemctl enable lava-docker-worker.service sudo systemctl start lava-docker-worker.service ``` -------------------------------- ### Start LAVA Services with Foreman Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/developer/development/setup.md Starts all LAVA services using the 'foreman start' command, typically used when developing from source. ```shell foreman start ``` -------------------------------- ### UUU Built-in Scripts for Flashing Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-uuu.md This example demonstrates using UUU's built-in scripts to write bootloaders and root filesystems to eMMC or SD cards. The `{boot}` and `{system}` placeholders are replaced with image paths. ```yaml - uuu: -b emmc {boot} # Write bootloader to eMMC ``` ```yaml - uuu: -b emmc_all {boot} {system} # Write bootloader & rootfs to eMMC ``` ```yaml - uuu: -b sd {boot} # Write bootloader to SD card ``` ```yaml - uuu: -b sd_all {boot} {system} # Write bootloader & rootfs to SD card ``` -------------------------------- ### Display Job Start Time Source: https://gitlab.com/lava/lava/-/blob/master/lava_scheduler_app/templates/lava_scheduler_app/_job_timing.html Conditionally displays the time elapsed since the job started. If the job has not started, it shows '_not started_'. ```html {% if job.start_time %}{{ job.start_time|timesince }}{% else %}_not started_{% endif %} ``` -------------------------------- ### Sample Job with Flasher Deployment and USB-SD-Mux Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-flasher.md A comprehensive sample job demonstrating the flasher deployment method for a Raspberry Pi 3B+, including image details, boot configuration, and test definitions. ```yaml job_name: RPi3B flasher sample job device_type: bcm2837-rpi-3-b-plus priority: medium visibility: public timeouts: job: minutes: 30 actions: - deploy: to: flasher images: recovery_image: url: https://raspi.debian.net/tested/20231109_raspi_3_bookworm.img.xz compression: xz format: ext4 partition: 1 overlays: lava: true timeout: minutes: 15 - boot: method: minimal auto_login: login_prompt: 'login:' username: root prompts: - 'root@rpi3-20231109:' timeout: minutes: 5 - test: definitions: - from: inline repository: metadata: format: Lava-Test Test Definition 1.0 name: test-definition-example run: steps: - lava-test-case run-uname-a --shell uname -a - lava-test-case check-os-id --shell 'cat /etc/os-release | grep "ID=debian"' path: inline/test-definition-example.yaml name: test-suite-example timeout: minutes: 5 ``` -------------------------------- ### Install Docker CE Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/docker-worker.md Install Docker Community Edition using the official installation script. This is recommended over using Docker from Debian's official repository for better compatibility with lava-docker-worker. ```bash curl -fsSL https://get.docker.com -o get-docker.sh sh get-docker.sh ``` -------------------------------- ### Configure Fastboot Options Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/configuration/device-dictionary.md Provide a list of strings for additional options to the 'fastboot' command. ```jinja {% set fastboot_options = ['-S', '256M'] %} ``` -------------------------------- ### Basic UEFI Menu Boot Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-uefi-menu.md This snippet shows the basic configuration for the uefi-menu boot method, specifying the command to execute and expected prompts. ```yaml - boot: method: uefi-menu commands: fastboot prompts: - 'root@debian:~#' ``` -------------------------------- ### Install LAVA Debian Packages Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/developer/development/setup.md Installs the necessary LAVA packages and Git for development. ```shell apt-get install git postgresql apt-get install lava-coordinator lava-dispatcher lava-server ``` -------------------------------- ### Install Docker Dependencies Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/instance/install.md Installs necessary Docker and docker-compose packages on Debian-based systems. ```shell sudo apt update sudo apt install docker-compose ``` -------------------------------- ### Basic iPXE Boot Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-ipxe.md This snippet shows the basic configuration for booting a DUT using the iPXE method with NFS. A prior TFTP deploy action is required. ```yaml - boot: method: ipxe commands: nfs prompts: - 'root@debian:~#' ``` -------------------------------- ### Start Lava-worker Service Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/remote-workers.md Start the \`lava-worker\` service using systemctl after configuring its settings. ```shell systemctl start lava-worker ``` -------------------------------- ### Client Boot Action Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/advanced-tutorials/multinode.md Defines the client boot process with minimal method and auto-login. Essential for establishing an automated connection to the client. ```yaml - boot: role: - client method: minimal auto_login: login_prompt: 'login:' username: root prompts: - 'root@rpi4-20231108:' timeout: minutes: 5 ``` -------------------------------- ### Install Dependencies Source: https://gitlab.com/lava/lava/-/blob/master/share/labgrid2lava/README.md Installs necessary Python packages for Debian-based systems or within a virtual environment. ```bash sudo apt install python3-dacite python3-jinja2 python3-yaml ``` ```bash python3 -m venv .venv source .venv/bin/activate pip install --upgrade pip pip install dacite jinja2 PyYAML ``` -------------------------------- ### RPi4b USBG MS Sample Job Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-usbg-ms.md This comprehensive sample job demonstrates deploying and booting a disk image using the USBG-MS method on a Raspberry Pi 4B. It includes deployment, boot, and test actions with specific configurations for each stage. ```yaml job_name: RPi4B USBG MS sample job device_type: bcm2711-rpi-4-b visibility: public priority: medium timeouts: job: minutes: 15 connection: minutes: 2 actions: - deploy: to: usbg-ms image: url: https://raspi.debian.net/tested/20231109_raspi_4_bookworm.img.xz compression: xz format: ext4 partition: 1 overlays: lava: true timeout: minutes: 5 - boot: method: minimal auto_login: login_prompt: 'login:' username: root prompts: - 'root@rpi4-20231108:' timeout: minutes: 5 - test: definitions: - from: inline repository: metadata: format: Lava-Test Test Definition 1.0 name: test-definition-example run: steps: - lava-test-case run-uname-a --shell uname -a - lava-test-case check-os-id --shell 'cat /etc/os-release | grep "ID=debian"' path: inline/test-definition-example.yaml name: test-suite-example timeout: minutes: 5 ``` -------------------------------- ### Using new_connection Boot Method Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-new-connection.md This snippet demonstrates how to configure the `new_connection` boot method within a job definition. It specifies a namespace and the connection to use. ```yaml - boot: namespace: isolation connection: uart0 method: new_connection ``` -------------------------------- ### Install lavacli via PyPI Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/basic-tutorials/lavacli.md Install the lavacli tool using pip for Python 3. ```shell python3 -m pip install lavacli ``` -------------------------------- ### Basic GRUB Boot Configuration Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-grub.md This snippet shows the basic configuration for the GRUB boot method, specifying commands and expected prompts. ```yaml - boot: method: grub commands: ramdisk prompts: - 'root@debian:~#' timeout: minutes: 5 ``` -------------------------------- ### Install bmap-tools on Debian Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-secondary.md Installs the bmap-tools package on Debian-based systems, which is required for using `bmaptool`. ```shell sudo apt install bmap-tools ``` -------------------------------- ### Install wget on Debian Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-secondary.md Install the `wget` utility on Debian-based systems, which is required for downloading images. ```shell sudo apt install wget ``` -------------------------------- ### Server Boot Action Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/advanced-tutorials/multinode.md Defines the server boot process, specifying the method and expected prompts. Essential for establishing a connection to the server. ```yaml - boot: role: - server method: ssh prompts: - 'root@x13:~#' timeout: minutes: 5 ``` -------------------------------- ### Smoke Test YAML Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/basic-tutorials/test-definition.md Example of a basic smoke test definition in YAML format. ```yaml --8<-- "tests/smoke.yaml" ``` -------------------------------- ### Dispatcher Configuration Example Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/configuration/dispatcher.md Example of a dispatcher configuration file. This file controls the behavior of the dispatcher. ```yaml --8<-- "config/dispatcher.yaml" ``` -------------------------------- ### Example U-Boot Commands for DTBO Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-tftp.md Sequence of U-Boot commands to load and apply DTBO overlays, including resizing the base DTB. ```shell - fdt addr ${fdt_addr} - fdt resize 1048576 - tftp 0x93c00000 577262/tftp-deploy-o40xvdqb/dtbo0/overlay1.dtbo - fdt apply 0x93c00000 - tftp 0x93c00000 577262/tftp-deploy-o40xvdqb/dtbo1/overlay2.dtbo - fdt apply 0x93c00000 ``` -------------------------------- ### Install lavacli via Debian Package Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/user/basic-tutorials/lavacli.md Install the lavacli tool on Debian-based systems using apt-get. ```shell apt-get install lavacli ``` -------------------------------- ### Ramdisk Deployment - Skip Overlay Installation Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-tftp.md Configuration to skip installing the LAVA overlay into the ramdisk during deployment. ```yaml ramdisk: url: http://example.com/initrd.gz compression: gz install_overlay: false ``` -------------------------------- ### Ramdisk Deployment - Skip Module Installation Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-tftp.md Configuration to skip installing kernel modules into the ramdisk during deployment. ```yaml ramdisk: url: http://example.com/initrd.gz compression: gz install_modules: false ``` -------------------------------- ### Basic Downloads Deploy Action Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-downloads.md Use this action to download a root filesystem image with specified compression. The image is fetched from the provided URL. ```yaml actions: - deploy: to: downloads images: rootfs: url: https://example.com/rootfs.img.xz compression: xz ``` -------------------------------- ### UUU Deployment with Boot Partition Reference Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/deploy/to-uuu.md Illustrates how the 'boot' partition in the deploy action can be referenced in the UUU boot method commands. ```yaml - deploy: to: uuu images: boot: url: https://example.com/imx-boot-sd.bin-flash - boot: method: uuu commands: - uuu: -b sd {boot} ``` -------------------------------- ### Install Debian Dependencies Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/basic-tutorials/instance/install.md Installs essential packages required for setting up the LAVA repository on Debian systems. ```shell apt install ca-certificates gnupg2 wget ``` -------------------------------- ### Musca Boot Method with Prompts Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-musca.md This snippet demonstrates the use of the `prompts` option with the musca boot method. Use this when you need to wait for a specific string from the serial output before proceeding. ```yaml - boot: method: musca prompts: "string" ``` -------------------------------- ### Install UUU on Worker Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-uuu.md These commands demonstrate how to download, make executable, and install the UUU binary on a LAVA worker. ```shell wget https://github.com/NXPmicro/mfgtools/releases/download//uuu chmod a+x uuu mv uuu /usr/bin/uuu ``` -------------------------------- ### Basic Bootloader Action Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-bootloader.md This snippet demonstrates the basic usage of the `bootloader` method to power on the DUT and wait for the bootloader prompt, specifying `u-boot` as the bootloader type. ```yaml - boot: method: bootloader bootloader: u-boot commands: [] ``` -------------------------------- ### Install dfu-util Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/technical-references/job-definition/actions/boot/method-dfu.md Installs the necessary `dfu-util` package on the LAVA worker. This is a prerequisite for using the DFU boot method. ```shell sudo apt-get install dfu-util ``` -------------------------------- ### Install LAVA Dispatcher Source: https://gitlab.com/lava/lava/-/blob/master/doc/content/admin/advanced-tutorials/deploying-rpi4b-as-worker.md Install the lava-dispatcher package and perform a distribution upgrade to ensure all LAVA components are up-to-date. ```shell apt update apt install lava-dispatcher apt dist-upgrade -t bullseye ```