[PATCH 8/9] fastboot: Allow u-boot-style partitions

Simon Glass sjg at chromium.org
Thu Jan 7 13:36:20 CET 2021


On Mon, 4 Jan 2021 at 09:53, Sean Anderson <sean.anderson at seco.com> wrote:
>
>
>
> On 12/31/20 5:48 PM, Sean Anderson wrote:
>  > This adds support for partitions of the form "dev.hwpart:part" and
>  > "dev#partname". This allows one to flash to eMMC boot partitions without
>  > having to use CONFIG_FASTBOOT_MMC_BOOT1_SUPPORT. It also allows one to
>  > flash to an entire device without needing CONFIG_FASTBOOT_MMC_USER_NAME.
>  > Lastly, one can also flash MMC devices other than
>  > CONFIG_FASTBOOT_FLASH_MMC_DEV.
>  >
>  > Because devices can be specified explicitly,
> CONFIG_FASTBOOT_FLASH_MMC_DEV
>  > is used only when necessary for existing functionality. For those cases,
>  > fastboot_mmc_get_dev has been added as a helper function. This allows
>  >
>  > There should be no conflicts with the existing system, but just in
> case, I
>  > have ordered detection of these names after all existing names.
>  >
>  > The fastboot_mmc_part test has been updated for these new names.
>  >
>  > Signed-off-by: Sean Anderson <sean.anderson at seco.com>
>  > ---
>  >
>  >   drivers/fastboot/fb_mmc.c | 150 +++++++++++++++++++++++---------------
>  >   test/dm/fastboot.c        |  37 +++++++++-
>  >   2 files changed, 127 insertions(+), 60 deletions(-)
>  >
>  > diff --git a/drivers/fastboot/fb_mmc.c b/drivers/fastboot/fb_mmc.c
>  > index b0610d3151..a52b1e3ed6 100644
>  > --- a/drivers/fastboot/fb_mmc.c
>  > +++ b/drivers/fastboot/fb_mmc.c
>  > @@ -37,6 +37,7 @@ static int raw_part_get_info_by_name(struct
> blk_desc *dev_desc,
>  >      char *raw_part_desc;
>  >      const char *argv[2];
>  >      const char **parg = argv;
>  > +    int ret;
>  >
>  >      /* check for raw partition descriptor */
>  >      strcpy(env_desc_name, "fastboot_raw_partition_");
>  > @@ -60,7 +61,7 @@ static int raw_part_get_info_by_name(struct
> blk_desc *dev_desc,
>  >
>  >      info->start = simple_strtoul(argv[0], NULL, 0);
>  >      info->size = simple_strtoul(argv[1], NULL, 0);
>  > -    info->blksz = dev_desc->blksz;
>  > +    info->blksz = *dev_desc->blksz;
>  >      strncpy((char *)info->name, name, PART_NAME_LEN);
>
> Looks like this slipped through while rebasing. The above two hunks
> shouldn't have been included; will be fixed in v2.

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list