If fastboot device is already present when starting cdba, cdba may miss
it. So enumerate usb devices via libudev to look for fastboot device
node.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
There are cases where fastboot simply disconnects, where it makes sense
to maintain the cdba connection, so return gracefully from
fastboot_download() when this happens.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Boards implementing a/b partitioning even for fastboot boot might
sometimes expire the counter and fail the boot. By always setting the
active image to 'a' we're catching this case and flipping it back, and
in other cases the operation becomes a nop.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
In some occations dev_path is not valid and we therefor can't
dereference it. Check for this and ignore any events without a dev_path.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>