summaryrefslogtreecommitdiffstats
path: root/include/fastboot.h
Commit message (Collapse)AuthorAgeFilesLines
* 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>