From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 11/12] fastboot command: Add -b option to export bbu handlers
Date: Wed, 27 Sep 2017 14:09:09 +0200 [thread overview]
Message-ID: <20170927120910.10516-12-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20170927120910.10516-1-s.hauer@pengutronix.de>
When -b is given the usbgadget command will automatically export the
registered bbu handlers via fastboot.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
commands/usbgadget.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/commands/usbgadget.c b/commands/usbgadget.c
index 59359098ad..507871edd2 100644
--- a/commands/usbgadget.c
+++ b/commands/usbgadget.c
@@ -33,11 +33,11 @@
static int do_usbgadget(int argc, char *argv[])
{
int opt, ret;
- int acm = 1, create_serial = 0, fastboot_set = 0;
+ int acm = 1, create_serial = 0, fastboot_set = 0, fastboot_export_bbu = 0;
const char *fastboot_opts = NULL, *dfu_opts = NULL;
struct f_multi_opts *opts;
- while ((opt = getopt(argc, argv, "asdA::D:")) > 0) {
+ while ((opt = getopt(argc, argv, "asdA::D:b")) > 0) {
switch (opt) {
case 'a':
acm = 1;
@@ -54,6 +54,9 @@ static int do_usbgadget(int argc, char *argv[])
fastboot_opts = optarg;
fastboot_set = 1;
break;
+ case 'b':
+ fastboot_export_bbu = 1;
+ break;
case 'd':
usb_multi_unregister();
return 0;
@@ -85,6 +88,7 @@ static int do_usbgadget(int argc, char *argv[])
opts->fastboot_opts.files = file_list_parse(fastboot_opts);
if (IS_ERR(opts->fastboot_opts.files))
goto err_parse;
+ opts->fastboot_opts.export_bbu = fastboot_export_bbu;
}
if (dfu_opts) {
@@ -119,6 +123,7 @@ BAREBOX_CMD_HELP_OPT ("-a", "Create CDC ACM function")
BAREBOX_CMD_HELP_OPT ("-s", "Create Generic Serial function")
BAREBOX_CMD_HELP_OPT ("-A [desc]", "Create Android Fastboot function. If 'desc' is not provided,")
BAREBOX_CMD_HELP_OPT ("", "trying to use 'global.usbgadget.fastboot_function' variable.")
+BAREBOX_CMD_HELP_OPT ("-b", "include registered barebox update handlers (fastboot specific)")
BAREBOX_CMD_HELP_OPT ("-D <desc>", "Create DFU function")
BAREBOX_CMD_HELP_OPT ("-d", "Disable the currently running gadget")
BAREBOX_CMD_HELP_END
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2017-09-27 12:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 12:08 usbgadget: fastboot: Allow to automatically " Sascha Hauer
2017-09-27 12:08 ` [PATCH 01/12] file_list: Add function to add an entry to the list Sascha Hauer
2017-09-27 12:09 ` [PATCH 02/12] file_list: Add function to get entry by its name Sascha Hauer
2017-09-27 12:09 ` [PATCH 03/12] file_list: Allow only unique names on list Sascha Hauer
2017-09-27 12:09 ` [PATCH 04/12] file_list: Fix memory leak in failure path Sascha Hauer
2017-09-27 12:09 ` [PATCH 05/12] file_list: Add GPL header to file Sascha Hauer
2017-09-27 12:09 ` [PATCH 06/12] file_list: Add error messages Sascha Hauer
2017-09-27 12:09 ` [PATCH 07/12] usbgadget: fastboot: Use function to find file_list entry by name Sascha Hauer
2017-09-27 12:09 ` [PATCH 08/12] bbu: Add function to iterate over registered handlers Sascha Hauer
2017-09-27 12:09 ` [PATCH 09/12] usbgadget command: catch errors when parsing the file list Sascha Hauer
2017-09-27 12:09 ` [PATCH 10/12] usbgadget: fastboot: Allow to automatically export the bbu handlers Sascha Hauer
2017-09-27 12:09 ` Sascha Hauer [this message]
2017-09-27 12:09 ` [PATCH 12/12] usbgadget autostart: add usbgadget.fastboot_bbu to automatically export " Sascha Hauer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170927120910.10516-12-s.hauer@pengutronix.de \
--to=s.hauer@pengutronix.de \
--cc=barebox@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox