]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
fastboot: getvar: Add "is-userspace" variable
authorSam Protsenko <semen.protsenko@linaro.org>
Wed, 3 Jul 2019 16:00:22 +0000 (19:00 +0300)
committerMarek Vasut <marex@denx.de>
Thu, 8 Aug 2019 09:35:02 +0000 (11:35 +0200)
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>
Reviewed-by: Eugeniu Rosca <erosca@de.adit-jv.com>
drivers/fastboot/fb_getvar.c

index 9ee50544856d4888edfa0a78ba58d6167271d0bb..fd0823b2bfe1800f4b586211c13de4456e58ad3d 100644 (file)
@@ -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.
  *