[U-Boot] [RFC PATCH v2 17/20] fastboot: Guard getvar:partition-type/size with MMC

Joe Hershberger joe.hershberger at gmail.com
Thu May 3 21:26:07 UTC 2018


On Mon, Apr 30, 2018 at 3:32 AM, Alex Kiernan <alex.kiernan at gmail.com> wrote:
> Add guard for partition-type/size against MMC as we need that in order
> to lookup partitions.

Why? It seems you should just be using mtdparts when NAND is enabled instead.

>
> Signed-off-by: Alex Kiernan <alex.kiernan at gmail.com>
> ---
>
> Changes in v2: None
>
>  drivers/fastboot/fb_getvar.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/drivers/fastboot/fb_getvar.c b/drivers/fastboot/fb_getvar.c
> index aa68371..7989a19 100644
> --- a/drivers/fastboot/fb_getvar.c
> +++ b/drivers/fastboot/fb_getvar.c
> @@ -55,6 +55,7 @@ void fb_getvar(char *cmd_parameter, char *response)
>                         fastboot_okay("yes", response);
>                 else
>                         fastboot_okay("no", response);
> +#if CONFIG_IS_ENABLED(FASTBOOT_FLASH_MMC)
>         } else if (!strcmp_l1("partition-type", cmd_parameter) ||
>                    !strcmp_l1("partition-size", cmd_parameter)) {
>                 disk_partition_t part_info;
> @@ -74,6 +75,7 @@ void fb_getvar(char *cmd_parameter, char *response)
>                         fastboot_response("OKAY", response,
>                                           "0x%016x", (int)part_info.size);
>                 }
> +#endif
>         } else {
>  #define FASTBOOT_ENV_PREFIX    "fastboot."
>                 char envstr[FASTBOOT_RESPONSE_LEN];
> --
> 2.7.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot


More information about the U-Boot mailing list