Replace all license headers with the SPDX-License-Identitier headers to
follow the current recommendations.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Add cdba-server side support for "fastboot continue" which allows
fastboot to continue its default boot process.
I find it useful to setup my boards with an additional SD card which I
frequently use the default image on eMMC to chroot to and populate
modules, rebooting into fastboot and subsequently booting via fastboot
a rootfs on the SD card.
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Pointer arithmetic should not be done on void pointers.
fastboot.c:223:37: warning: pointer of type ‘void *’ used in arithmetic [-Wpointer-arith]
223 | ptr += USB_DT_SS_EP_COMP_SIZE;
| ^~
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
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>