diff mbox series

[U-Boot,v2] fastboot: getvar: Add "is-userspace" variable

Message ID 20190703160022.31701-1-semen.protsenko@linaro.org
State Accepted
Commit 139db354b18014e224068a4f2b3b95e025812b17
Delegated to: Lukasz Majewski
Headers show
Series [U-Boot,v2] fastboot: getvar: Add "is-userspace" variable | expand

Commit Message

Sam Protsenko July 3, 2019, 4 p.m. UTC
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/+/refs/tags/android-q-preview-4/fastboot/README.md

Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
---
Changes in v2:
  - use the fixed link for tag instead of floating one for master branch
  - add "getvar:" in the commit title to be more specific

 drivers/fastboot/fb_getvar.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Eugeniu Rosca July 4, 2019, 3:08 p.m. UTC | #1
On Wed, Jul 03, 2019 at 07:00:22PM +0300, Sam Protsenko wrote:
> 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/+/refs/tags/android-q-preview-4/fastboot/README.md

FWIW, s/master/android-q-preview-4/ in the original link would have
worked as well.

> 
> Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
> ---
> Changes in v2:
>   - use the fixed link for tag instead of floating one for master branch
>   - add "getvar:" in the commit title to be more specific

Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>

Thanks!
diff mbox series

Patch

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.
  *