Hi, guys,

 

I currently have 2 jobs:

 

Job1:

actions:

- boot:

    failure_retry: 4

    method: bootloader

    bootloader: u-boot

    commands: []

    prompts: ['=>']

    timeout:

      minutes: 2

 

- test:

    timeout:

      minutes: 4

    interactive:

    - name: check-uboot

      prompts: ["=> ", "/ # "]

      script:

      - command: "printenv"

        name: printenv

        successes:

        - message: "soc_type=imx93"

 

Job2:

actions:

- deploy:

    to : uuu

    images :

      boot :

        url : /path/to/bootloader

- boot:

    method: uuu

    commands :

      - bcu: reset usb

      - uuu: -b sd {boot}

      - bcu: deinit

    timeout:

      minutes: 2

- boot:

    method: bootloader

    bootloader: u-boot

    commands: []

    prompts: ['=>']

    timeout:

      minutes: 2

- test:

    interactive:

    - name: check-uboot

      prompts: ["=> ", "/ # "]

      script:

      - command: "printenv"

        name: printenv

        successes:

        - message: "soc_type=imx93"

    timeout:

      minutes: 2

 

The first job just boot the board and check if the bootloader ok, the second job flash a new bootloader to board everytime before check the bootloader.

I wonder if possible for me to combine the two, define next logic in a job:

 

1. Boot the board to check the uboot

2. If uboot is ok, then the job finish

3. If uboot not ok or action timeout, then go to flash action to flash new bootloader to the device, then job finish.

 

The idea is: the step 3 is optional, we only flash a new bootloader when previous boot action failure.

 

Regards,

Larry