Commit Graph

14 Commits

Author SHA1 Message Date
Dmitry Baryshkov
f6bd2d01d7 watch: split implementation to aseparate file
Split CDBA's watching code to a separate file.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 18:06:19 +02:00
Dmitry Baryshkov
bde90b4a15 cdba: replace licence headers with SPDX identifiers
Replace all license headers with the SPDX-License-Identitier headers to
follow the current recommendations.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2024-03-30 18:06:19 +02:00
Bryan O'Donoghue
30e6838a12 cdba-server: Implement fastboot continue
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>
2024-01-17 02:08:44 +00:00
Krzysztof Kozlowski
581f14d8f6 Clean trailing white-spaces
Drop trailing white-spaces and tabs.  No functional changes.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
2023-12-03 20:07:06 +01:00
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