kernelci / kernelci-pipeline

Modular pipeline based on the KernelCI API
GNU Lesser General Public License v2.1
6 stars 19 forks source link

config/pipeline.yaml: add qcs6490-rb3gen2 boot test #623

Closed mwasilew closed 3 months ago

mwasilew commented 4 months ago

Before merging this PR it is required to merge https://github.com/kernelci/kernelci-core/pull/2565.

mwasilew commented 4 months ago

@JenySadadia @pawiecz please let me know if I missed something. I wasn't able to generate proper test job template. The missing bit was dtb URL. The job was scheduled properly after I added the URL by hand. Example job: https://lava.infra.foundries.io/scheduler/job/43787/definition

This was partially generated with:

kci job generate -c kernelci-pipeline/config/pipeline.yaml --runtime=lava-qualcomm --platform=qcs6490-rb3gen2 6656c29ca901419b4a8a7ebe

Board fails to boot, but I don't think this is an issue with the setup.

pawiecz commented 4 months ago

Board fails to boot, but I don't think this is an issue with the setup.

Looks like boot prompt needs adjustment (fastboot definition vs u-boot template)

mwasilew commented 4 months ago

I fixed the prompt and it's detected now. However there is an issue with lava overlay which I don't think can be fixed without patching lava. With fastboot boot there is no other way of delivering the overlay than transfer_overlay. This requires networking and I really don't want to add this dependency.

mwasilew commented 4 months ago

I fixed the overlay issue. Turns out it was already supported in LAVA (at least for ramdisk). Corrected version of the patch is now available in https://github.com/kernelci/kernelci-core/pull/2565

pawiecz commented 4 months ago

Hi @mwasilew

I wasn't able to generate proper test job template. The missing bit was dtb URL. The job was scheduled properly after I added the URL by hand. Example job: https://lava.infra.foundries.io/scheduler/job/43787/definition

This was partially generated with:

kci job generate -c kernelci-pipeline/config/pipeline.yaml --runtime=lava-qualcomm --platform=qcs6490-rb3gen2 6656c29ca901419b4a8a7ebe

I tried to reproduce the issue you encountered but I was unable to do so (Python 3.8). TestJob definition rendered from this PR and https://github.com/kernelci/kernelci-core/pull/2565 (using your call mentioned above) had dtb URL substituted:


# KernelCI API & Pipeline experiments
#
# This is a work-in-progress template to add LAVA support with the new KernelCI
# API & Pipeline.
#
# Things left to add:
# * instance name (staging, AKS...)
# * priority
# * timeout
# * modules
# * kernel image name
# * UEFI binaries for QEMU etc.
# * rootfs URL
# * Docker image for QEMU

job_name: "[None] 6656c29ca901419b4a8a7ebe baseline-arm64 next-20240529"

device_type: qcs6490-rb3gen2

visibility: public

priority: 10

timeouts:
  action:
    minutes: 10
  actions:
    power-off:
      seconds: 30
  job:
    minutes: 30
  queue:
    days: 2

notify:
  callback:
    content-type: json
    dataset: all
    method: POST
    token: kernelci-lab-qualcomm
    url: https://staging.kernelci.org:9100/node/6656c29ca901419b4a8a7ebe
  criteria:
    status: finished

metadata:
  node_id: 6656c29ca901419b4a8a7ebe
  # The full YAML configuration can't yet be added as-is, only strings and
  # integers are accepted by the schema.  See this issue for more details:
  # https://git.lavasoftware.org/lava/lava/-/issues/610
  api_config_name: staging
  storage_config_name: 

actions:

- deploy:
    images:
      image:
        url: 'https://kciapistagingstorage1.file.core.windows.net/staging/kbuild-gcc-10-arm64-6656bac5a901419b4a8a7ab2/Image?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2024-10-17T19:19:12Z&st=2023-10-17T11:19:12Z&spr=https&sig=sLmFlvZHXRrZsSGubsDUIvTiv%2BtzgDq6vALfkrtWnv8%3D'
      dtb:
        url: 'https://kciapistagingstorage1.file.core.windows.net/staging/kbuild-gcc-10-arm64-6656bac5a901419b4a8a7ab2/dtbs/qcom/qcs6490-rb3gen2.dtb?sv=2022-11-02&ss=f&srt=sco&sp=r&se=2024-10-17T19:19:12Z&st=2023-10-17T11:19:12Z&spr=https&sig=sLmFlvZHXRrZsSGubsDUIvTiv%2BtzgDq6vALfkrtWnv8%3D'
      ramdisk:
        url: 'http://storage.kernelci.org/images/rootfs/buildroot/buildroot-baseline/20230703.0/arm64/rootfs.cpio.gz'
     postprocess:
      docker:
        image: ghcr.io/mwasilew/docker-mkbootimage:master
        steps:
        - mkbootimg --header_version 2 --kernel Image --dtb qcs6490-rb3gen2.dtb --cmdline "earlycon clk_ignore_unused pd_ignore_unused audit=0" --ramdisk rootfs.cpio.gz --output boot.img
    to: downloads

- deploy:
    images:
      boot:
        url: 'downloads://boot.img'
    timeout:
      minutes: 2
    to: download

- boot:
    prompts:
    - '/ #'
    failure_retry: 3
    timeout:
      minutes: 10
    timeouts:
      bootloader-commands:
        minutes: 3
      auto-login-action:
        minutes: 2
    method: fastboot

- test:
    definitions:
    - from: inline
      lava-signal: kmsg
      name: dmesg
      path: inline/dmesg.yaml
      repository:
        metadata:
          description: baseline test plan
          environment:
            - lava-test-shell
          format: Lava-Test Test Definition 1.0
          name: baseline
          os:
            - debian
          scope:
            - functional
        run:
          steps:
            - |
                KERNELCI_LAVA=y /bin/sh /opt/kernelci/dmesg.sh
                foo

    timeout:
      minutes: 1

Unfortunately this definition doesn't work perfectly, either - I'll post details in the PR adding the template.

Edit: YAML dumping details: https://github.com/kernelci/kernelci-core/pull/2565#discussion_r1625662216

mwasilew commented 4 months ago

@pawiecz I fixed the missing overlay earlier today. If you pull the latest version of https://github.com/kernelci/kernelci-core/pull/2565, it should work. I have an example here: https://lava.infra.foundries.io/scheduler/job/44198 Slightly different artifacts to download, but the main issue with missing overlay is fixed.

nuclearcat commented 3 months ago

Thanks, merging