

constants:

  # POSIX os (not AOSP)
  posix:
    lava_test_sh_cmd: /bin/sh
    lava_test_results_dir: /lava-%s
    lava_test_shell_file: ~/.bashrc

  # bootloader specific
  u-boot:
    interrupt-prompt: 'Hit any key to stop autoboot'
    interrupt-character: ' '
    interrupt_ctrl_list: []
    final-message: 'Starting kernel'
    error-messages:
      - 'Resetting CPU'
      - 'Must RESET board to recover'
      - 'TIMEOUT'
      - 'Retry count exceeded'
      - 'ERROR: The remote end did not respond in time.'
  grub:
    interrupt-prompt: 'for a command-line'
    interrupt-character: 'c'
    interrupt-newline: False
    error-messages:
      - "error: missing (.*) symbol."
  grub-efi:
    interrupt-prompt: 'for a command-line'
    interrupt-character: 'c'
    error-messages:
      - 'Undefined OpCode Exception PC at'
      - 'Synchronous Exception at'
      - "error: missing (.*) symbol."
  ipxe:
    interrupt-prompt: 'Press Ctrl-B for the iPXE command line'
    interrupt_ctrl_list: ['b']
    error-messages:
      - 'No configuration methods succeeded'
      - 'Connection timed out'

  # OS shutdown message
  # Override: set as the shutdown-message parameter of an Action.
  # SHUTDOWN_MESSAGE
  shutdown-message: 'The system is going down for reboot NOW'

  # Kernel starting message
  kernel-start-message: 'Linux version [0-9]'

  # Default shell prompt for AutoLogin
  # DEFAULT_SHELL_PROMPT
  default-shell-prompt: 'lava-test: # '

  # pexpect.spawn maxread
  # SPAWN_MAXREAD - in bytes, quoted as a string
  # 1 to turn off buffering, pexpect default is 2000
  # maximum may be limited by platform issues to 4092
  # avoid setting searchwindowsize:
  # Data before searchwindowsize point is preserved, but not searched.
  spawn_maxread: '4092'
commands:
    connections:
        uart0:
            connect: telnet localhost 2000
            tags:
            - primary
            - telnet
    hard_reset: /usr/local/lab-scripts/stm32_flash
    power_on: /usr/local/lab-scripts/stm32_flash
device_info: [{'board_id': '1900d00f3b1400a2'}]
parameters:
  # interfaces or device_ip or device_mac

  pass: # sata_uuid_sd_uuid_usb_uuid

  uimage:
    kernel: '0xc2000000'
    ramdisk: '0x45000000'
    dtb: '0xc4000000'
  bootm:
    kernel: '0xc2000000'
    ramdisk: '0x45000000'
    dtb: '0xc4000000'



actions:
  deploy:
    parameters:
      add_header: u-boot
      mkimage_arch: arm # string to pass to mkimage -A when adding UBoot headers
      append_dtb: False
      use_xip: False
    connections:
      lxc:
      fastboot:
      serial:
    methods:
      flasher:
        commands: /usr/local/lab-scripts/stm32_flash
      lxc:
      overlay:
      usb:
      tftp:
      nbd:
      ssh:
        options:
          - '-o'
          - 'Compression=yes'
          - '-o'
          - 'PasswordAuthentication=no'
          - '-o'
          - 'LogLevel=FATAL'

        host: ''
        port: 22
        user: root
        identity_file: dynamic_vm_keys/lava

  boot:
    connections:
      lxc:
      fastboot:
      serial:
    methods:
      minimal:
      ssh:
      u-boot:
        parameters:
          mkimage_arch: arm
          bootloader_prompt: =>
          interrupt_prompt: Hit any key to stop autoboot
          # character needed to interrupt u-boot, single whitespace by default
          interrupt_char: ""
          needs_interrupt: True
          # method specific stanza
        ums:
          commands:
          - ums 0 mmc 0
        nfs:
          commands:
          - setenv autoload no
          - setenv initrd_high 0xffffffff
          - setenv fdt_high 0xffffffff
          - dhcp
          - setenv serverip {SERVER_IP}
          - tftp {KERNEL_ADDR} {KERNEL}
          - tftp {RAMDISK_ADDR} {RAMDISK}
          - setenv initrd_size ${filesize}
          - tftp {DTB_ADDR} {DTB}
          # Always quote the entire string if the command includes a colon to support correct YAML.
          - "setenv bootargs 'console=ttyACM0,115200n8 root=/dev/nfs rw nfsroot={NFS_SERVER_IP}:{NFSROOTFS},tcp,hard,intr  ip=dhcp'"
          - '{BOOTX}'
        nbd:
          commands:
          - setenv autoload no
          - setenv initrd_high 0xffffffff
          - setenv fdt_high 0xffffffff
          - dhcp
          - setenv serverip {SERVER_IP}
          - tftp {KERNEL_ADDR} {KERNEL}
          - tftp {RAMDISK_ADDR} {RAMDISK}
          - setenv initrd_size ${filesize}
          - tftp {DTB_ADDR} {DTB}
          # Always quote the entire string if the command includes a colon to support correct YAML.
          - "setenv bootargs 'console=ttyACM0,115200n8 rw nbd.server={NBDSERVERIP} nbd.port={NBDSERVERPORT} root=/dev/ram0 ramdisk_size=16384 rootdelay=7   ip=dhcp verbose earlyprintk systemd.log_color=false ${extraargs} rw'"
          - '{BOOTX}'
        ramdisk:
          commands:
          - setenv autoload no
          - setenv initrd_high 0xffffffff
          - setenv fdt_high 0xffffffff
          - dhcp
          - setenv serverip {SERVER_IP}
          - tftp {KERNEL_ADDR} {KERNEL}
          - tftp {RAMDISK_ADDR} {RAMDISK}
          - setenv initrd_size ${filesize}
          - tftp {DTB_ADDR} {DTB}
          - "setenv bootargs 'console=ttyACM0,115200n8 root=/dev/ram0  ip=dhcp'"
          - '{BOOTX}'
        usb:
          commands:
          - usb start
          - setenv autoload no
          - "load usb 0:{ROOT_PART} {KERNEL_ADDR} {KERNEL}"
          - "load usb 0:{ROOT_PART} {RAMDISK_ADDR} {RAMDISK}"
          - "setenv initrd_size ${filesize}"
          - "load usb 0:{ROOT_PART} {DTB_ADDR} {DTB}"
          - "console=ttyACM0,115200n8 root={ROOT}  ip=dhcp"
          - '{BOOTX}'
        sata:
          commands:
          - scsi scan
          - setenv autoload no
          - "load scsi {ROOT_PART} {KERNEL_ADDR} {KERNEL}"
          - "load scsi {ROOT_PART} {RAMDISK_ADDR} {RAMDISK}; setenv initrd_size ${filesize}"
          - "load scsi {ROOT_PART} {DTB_ADDR} {DTB}"
          - "setenv bootargs 'console=ttyACM0,115200n8 root={ROOT}  ip=dhcp'"
          - '{BOOTX}'
timeouts:
  actions:
    apply-overlay-image:
      minutes: 2
    dd-image:
      minutes: 10
    download-retry:
      minutes: 5
    http-download:
      minutes: 5
    lava-test-shell:
      minutes: 3
    nfs-deploy:
      minutes: 10
    power-off:
      seconds: 10
    bootloader-commands:
      minutes: 3
    bootloader-interrupt:
      seconds: 30
    u-boot-interrupt:
      seconds: 30
    umount-retry:
      seconds: 45
    auto-login-action:
      minutes: 2
    bootloader-action:
      minutes: 3
    uboot-action:
      minutes: 3
    uboot-retry:
      minutes: 3
    bootloader-retry:
      minutes: 3
    boot-qemu-image:
      minutes: 2
    boot-image-retry:
      minutes: 2
    flash-uboot-ums:
      minutes: 20
  connections:
    dd-image:
      minutes: 10
    uboot-retry:
      seconds: 30
    bootloader-commands:
      seconds: 30
    auto-login-action:
      minutes: 2
    bootloader-interrupt:
      seconds: 30
    u-boot-interrupt:
      seconds: 30
    lava-test-shell:
      seconds: 10
