Hello,
Le ven. 22 sept. 2023 à 09:23, Larry Shen larry.shen@nxp.com a écrit :
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:
Boot the board to check the uboot
If uboot is ok, then the job finish
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.
There is currently no way for LAVA to successfully finish a job without running the full pipeline. It would be possible to use an interactive test definition to raise an exception when the right bootloader is found.
What are you trying to achieve exactly? (there is maybe another way to do it).
Rgds