Commit Graph

10 Commits

Author SHA1 Message Date
Krzysztof Kozlowski
88c3196473 fastboot: fix -Wpointer-arith
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>
2023-05-08 15:02:37 -05:00
Dmitry Baryshkov
a2d9cb9969 fastboot: enumerate devices on start
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>
2020-09-28 10:26:18 -05:00
Amit Kucheria
c5cbe74df2 bad: Rename to cdba-server
cdba-server more accurately reflects its purpose now.

Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
2020-06-10 10:10:23 -07:00
Bjorn Andersson
193c195c2a fastboot: Use stderr to communicate status messages
Use stderr to communicate status messages from fastboot boot, rather
than stdout.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-11-30 11:04:56 -08:00
Bjorn Andersson
fcfb7ad05f fastboot: Don't tear down link when fastboot download fails
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>
2018-11-30 11:02:14 -08:00
Bjorn Andersson
6c5bd3c77e cdba: Add license header where missing
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-12 19:09:15 -07:00
Bjorn Andersson
65d297b99d fastboot: Support set_active
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>
2018-03-12 17:44:17 -07:00
Bjorn Andersson
1ea73dfbed fastboot: Cleanup and fix crash
Clean up some old and broken code in the fastboot implementation.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-12 17:44:17 -07:00
Bjorn Andersson
48d186f3d0 fastboot: Check validity of dev_path
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>
2018-03-12 17:44:17 -07:00
Bjorn Andersson
4efcfb4456 bad: Add initial cdba backend implementation
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-03-12 17:43:55 -07:00