summaryrefslogtreecommitdiffstats
path: root/include/fastboot.h
Commit message (Collapse)AuthorAgeFilesLines
* include: add SPDX-License-IdentifierAhmad Fatoum2022-01-051-0/+2
| | | | | | | | | All these files lack a license statement, so add the default GPL-2.0-only. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220103120539.1730644-7-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot/dfu: use system partitions as fall backAhmad Fatoum2021-05-121-3/+3
| | | | | | | | | | | | | Use the new system partitions infrastructure to have fastboot and DFU fall back to using the same partitions if the global.usbgadget.dfu_function and global.fastboot_partitions are not set, respectively. No functional change intended for configurations that have SYSTEM_PARTITIONS disabled. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20210503114901.13095-13-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot net: implement fastboot over UDPEdmund Henniges2020-08-191-0/+3
| | | | | | | | | | | | | | This implements the UDP variant of the fastboot protocol. The only way to start the service for now is to compile with CONFIG_FASTBOOT_NET_ON_BOOT. The service will bind to the network interface that provides the IPv4 gateway. Sending an OKAY packet before performing a restart is necessary since contrary to USB the host will not notice when a UDP server disappears. Signed-off-by: Edmund Henniges <eh@emlix.com> Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: Add fastboot_abort()Sascha Hauer2020-08-191-0/+2
| | | | | | Add fastboot_abort() to allow aborting the current session. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: rename usbgadget.fastboot_* variables to fastboot.*Daniel Glöckner2020-08-191-0/+15
| | | | | | | | | | | | | There is nothing USB-specific in the defined usbgadget.fastboot_* variables. Rename them to be usable also for the UDP fastboot transport. The usbgadget.fastboot_function variable is used to define the files and devices accessible with the erase and flash commands. Since "function" is a term from the USB specification and the Fastboot specification uses the term "partition", we rename that variable to "fastboot.partitions". Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: Drop support for downloading to bufferSascha Hauer2020-06-181-3/+2
| | | | | | | | | | The option to download to a buffer instead of a file was introduced because in some workloads it is required to have a contiguous image in memory. With recent changes now ramfs can provide such a buffer via memmap API even when it downloaded the data to a file. This makes the explicit download to buffer option unnecessary, so remove it. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: Use unique tempfile nameSascha Hauer2020-05-201-0/+1
| | | | | | | | With fastboot over ethernet we now can have two instances of fastboot running in parallel. Make sure that both instances use a different temporary file to store data so that they do not influence each other. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
* fastboot: split generic code from USB gadgetEdmund Henniges2020-05-201-0/+66
The fastboot specification describes other protocols beyond USB. Allow these to reuse the generic parts of the existing fastboot code when they are implemented. Most of the changes in common/fastboot.c are due to the renaming of struct f_fastboot *f_fb to struct fastboot *fb. Signed-off-by: Edmund Henniges <eh@emlix.com> Signed-off-by: Daniel Glöckner <dg@emlix.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>