[U-Boot] [PATCH v2] fastboot: Remove "bootloader-version" variable

As per [1], there is no such fastboot variable as "bootloader-version". Only "version-bootloader" is supported. Let's reflect this and not confuse users further.
[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-...
Fixes: 3aab70afc531d1 ("usb/gadget: add the fastboot gadget") Signed-off-by: Sam Protsenko semen.protsenko@linaro.org --- Changes in v2: - add "Fixes:" tag - use fixed link (tag instead of branch) - remove section in link (which may be changed in future) - fixed bootloader version in doc (to not confuse the user)
doc/android/fastboot.txt | 6 +++--- drivers/fastboot/fb_getvar.c | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-)
diff --git a/doc/android/fastboot.txt b/doc/android/fastboot.txt index 431191c473..a1377b4b23 100644 --- a/doc/android/fastboot.txt +++ b/doc/android/fastboot.txt @@ -169,9 +169,9 @@ On the client side you can fetch the bootloader version for instance:
::
- $ fastboot getvar bootloader-version - bootloader-version: U-Boot 2014.04-00005-gd24cabc - finished. total time: 0.000s + $ fastboot getvar version-bootloader + version-bootloader: U-Boot 2019.07-rc4-00240-g00c9f2a2ec + Finished. Total time: 0.005s
or initiate a reboot:
diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c index fd0823b2bf..ebe5c8a104 100644 --- a/drivers/fastboot/fb_getvar.c +++ b/drivers/fastboot/fb_getvar.c @@ -12,7 +12,7 @@ #include <version.h>
static void getvar_version(char *var_parameter, char *response); -static void getvar_bootloader_version(char *var_parameter, char *response); +static void getvar_version_bootloader(char *var_parameter, char *response); static void getvar_downloadsize(char *var_parameter, char *response); static void getvar_serialno(char *var_parameter, char *response); static void getvar_version_baseband(char *var_parameter, char *response); @@ -37,12 +37,9 @@ static const struct { { .variable = "version", .dispatch = getvar_version - }, { - .variable = "bootloader-version", - .dispatch = getvar_bootloader_version }, { .variable = "version-bootloader", - .dispatch = getvar_bootloader_version + .dispatch = getvar_version_bootloader }, { .variable = "downloadsize", .dispatch = getvar_downloadsize @@ -131,7 +128,7 @@ static void getvar_version(char *var_parameter, char *response) fastboot_okay(FASTBOOT_VERSION, response); }
-static void getvar_bootloader_version(char *var_parameter, char *response) +static void getvar_version_bootloader(char *var_parameter, char *response) { fastboot_okay(U_BOOT_VERSION, response); }

On Wed, Jul 03, 2019 at 07:34:07PM +0300, Sam Protsenko wrote:
As per [1], there is no such fastboot variable as "bootloader-version". Only "version-bootloader" is supported. Let's reflect this and not confuse users further.
[1] https://android.googlesource.com/platform/system/core/+/refs/tags/android-q-...
Fixes: 3aab70afc531d1 ("usb/gadget: add the fastboot gadget") Signed-off-by: Sam Protsenko semen.protsenko@linaro.org
Changes in v2:
- add "Fixes:" tag
- use fixed link (tag instead of branch)
- remove section in link (which may be changed in future)
- fixed bootloader version in doc (to not confuse the user)
doc/android/fastboot.txt | 6 +++--- drivers/fastboot/fb_getvar.c | 9 +++------
With the note that this patch depends on the next revision of [1]:
Reviewed-by: Eugeniu Rosca erosca@de.adit-jv.com
FTR, I plan to submit v4 of [1] by the end of this week.
[1] https://patchwork.ozlabs.org/cover/1104242/ ("[U-Boot,v3,0/3] Add 'bcb' command to read/modify/write Android BCB")
Thanks for your patience.
participants (2)
-
Eugeniu Rosca
-
Sam Protsenko