device_type: ${DEVICE_TYPE}
job_name: RPB OE boot ${MACHINE} ${MANIFEST_BRANCH} ${BUILD_NUMBER}

timeouts:
  job:
    minutes: 45
  action:
    minutes: 10
  connection:
    minutes: 2
priority: medium
visibility: public

context:
  test_character_delay: 10

protocols:
  lava-lxc:
    name: lxc-target
    template: debian
    distribution: debian
    release: stretch

actions:
- deploy:
    namespace: tlxc
    timeout:
      minutes: 15
    to: lxc
    packages:
    - wget
    - unzip
    os: debian

- boot:
    namespace: tlxc
    prompts:
    - 'root@(.*):/#'
    timeout:
      minutes: 5
    method: lxc

- test:
    namespace: tlxc
    timeout:
      minutes: 10
    definitions:
    - repository: https://git.linaro.org/qa/test-definitions.git
      from: git
      path: automated/linux/android-platform-tools/install.yaml
      name: install-android-platform-tools-r2700
      parameters:
        LINK: 'https://dl.google.com/android/repository/platform-tools_r27.0.0-linux.zip'

- deploy:
    timeout:
      minutes: 25
    to: fastboot
    namespace: target
    connection: lxc
    images:
      userdata:
        url: ${ROOTFS_SPARSE_BUILD_URL}
        compression: gz
        apply-overlay: true
    os: oe

- boot:
    namespace: target
    auto_login:
      login_prompt: 'am57xx-evm login:'
      username: root
    prompts:
    - 'root@am57xx-evm:'
    commands:
    - run findfdt
    - setenv console ttyS2,115200n8
    - setenv mmcdev 1
    - "setenv bootpart 1:f"
    - run mmcboot
    timeout:
      minutes: 15
    method: u-boot

metadata:
  machine: ${MACHINE}
  manifest branch: ${MANIFEST_BRANCH}
  manifest commit: ${MANIFEST_COMMIT}
  build url: ${BUILD_URL}
  build location: ${BASE_URL}${PUB_DEST}
