Currently, we use these commands to flash the DUT (high level, non f0cal functions omitted):
info "Rendering flash configuration"
info "Powering off DUT"
f0cal farm target set --power off $DEVICE
info "Adding flash configuraton"
f0cal farm target set --nfsroot $RENDERED $DEVICE
info "Powering on DUT"
f0cal farm target set --power on $DEVICE
info "Wait until flashed"
f0cal farm target connect --method=uart $DEVICE
info "Rendering boot configuration"
info "Powering off DUT"
f0cal farm target set --power off $DEVICE
info "Add boot configuration"
f0cal farm target set --nfsroot $RENDERED $DEVICE
info "Powering on DUT"
f0cal farm target set --power on $DEVICE
info "Booting flashed image"
f0cal farm target connect --method=uart $DEVICE
We need to get rid of the Wait until flashed step. The user here needs to coordinate the process, by waiting on the flashing to finish, deciding if it was successful and then powering off the DUT and adding the configuration so the DUT boots the flashed image. Using sleep here instead of watching the serial console is insufficient, as it is error-prone and does not provide feedback if the actual image was flashed.
To recap, we would need here a command which can:
check if the flashing was successfully finished, is in progress or failed (flashing was unsuccessful)
Another possibility is to provide the workflow command as described in #52 with proper error handling.
Currently, we use these commands to flash the DUT (high level, non f0cal functions omitted):
We need to get rid of the
Wait until flashed step
. The user here needs to coordinate the process, by waiting on the flashing to finish, deciding if it was successful and then powering off the DUT and adding the configuration so the DUT boots the flashed image. Using sleep here instead of watching the serial console is insufficient, as it is error-prone and does not provide feedback if the actual image was flashed.To recap, we would need here a command which can:
Another possibility is to provide the workflow command as described in #52 with proper error handling.