All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sam Protsenko <semen.protsenko@linaro.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] fastboot: Add "is-userspace" variable
Date: Thu, 20 Jun 2019 16:40:26 +0300	[thread overview]
Message-ID: <20190620134026.3587-1-semen.protsenko@linaro.org> (raw)

As per documentation [1], Android-Q requires for bootloader to provide
"is-userspace" variable. "no" value should be always returned. This
patch implements this fastboot variable.

[1] https://android.googlesource.com/platform/system/core/+/master/fastboot/README.md#client-variables

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
 drivers/fastboot/fb_getvar.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
index 9ee5054485..fd0823b2bf 100644
--- a/drivers/fastboot/fb_getvar.c
+++ b/drivers/fastboot/fb_getvar.c
@@ -28,6 +28,7 @@ static void getvar_partition_type(char *part_name, char *response);
 #if CONFIG_IS_ENABLED(FASTBOOT_FLASH)
 static void getvar_partition_size(char *part_name, char *response);
 #endif
+static void getvar_is_userspace(char *var_parameter, char *response);
 
 static const struct {
 	const char *variable;
@@ -78,6 +79,9 @@ static const struct {
 		.variable = "partition-size",
 		.dispatch = getvar_partition_size
 #endif
+	}, {
+		.variable = "is-userspace",
+		.dispatch = getvar_is_userspace
 	}
 };
 
@@ -243,6 +247,11 @@ static void getvar_partition_size(char *part_name, char *response)
 }
 #endif
 
+static void getvar_is_userspace(char *var_parameter, char *response)
+{
+	fastboot_okay("no", response);
+}
+
 /**
  * fastboot_getvar() - Writes variable indicated by cmd_parameter to response.
  *
-- 
2.20.1

             reply	other threads:[~2019-06-20 13:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-20 13:40 Sam Protsenko [this message]
2019-06-20 14:45 ` [U-Boot] [PATCH] fastboot: Add "is-userspace" variable Igor Opaniuk
2019-06-21 14:16 ` Eugeniu Rosca
2019-07-03 15:56   ` Sam Protsenko

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=20190620134026.3587-1-semen.protsenko@linaro.org \
    --to=semen.protsenko@linaro.org \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.