[U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions

Sam Protsenko semen.protsenko at linaro.org
Thu Jun 13 11:49:44 UTC 2019


Hi Igor,

Although we are thinking to use QSPI for boot speedup, it still would
be nice to see flashing to boot0 implemented. Technically, I don't see
much difficulties here, as we already can do this from U-Boot shell,
like this:

    => mmc dev 0 1
    => fatload mmc 1 ${loadaddr} tiboot3.bin
    => mmc write ${loadaddr} 0x0 0x400

Of course, boot procedure should be probably changed too, as ROM-code
must be given the access to boot0 partition:

    => mmc partconf 0 1 1 1
    => mmc bootbus 0 1 0 0

Anyway, that's not so difficult to add to "fastboot flash" U-Boot
implementation. The only thing I'm worrying about is how to
differentiate between User Data Area and Boot Area partitions in
fastboot tool. Because when we do:

    $ fastboot flash boot0 some.img

we might as well mean that boot0 is UDA partition name. So we have two
options here:
  1. In U-Boot: recognize "boot0" name as a special case and flash
into boot0 area instead of trying to flash into UDA area
  2. In fastboot tool: provide some new option so that user can
specify which area to use (boot area or UDA)

As I see it, once we decide on the course of action (#1 or #2), RFC
patch with initial implementation should be sent, so that we have more
specifics to talk about.

Thanks!

On Wed, Jun 12, 2019 at 4:23 PM Igor Opaniuk <igor.opaniuk at gmail.com> wrote:
>
> Hi,
>
> Currently a lot of boards started (AFAIK: Colibri/Apalis
> iMX6/iMX7/iMX8QXP; TI AM56XX [1] etc.) using hardware boot0/1
> partitions for storing U-boot blob (which obviously speeds up the
> booting process).
>
> Taking into account that current implementation of fastboot driver
> does support only flashing images to "software" partitions in the user
> data area, does it make sense to add also the same support for
> boot0/boot1?
>
> It will definitely simplify and unify the way of firmware flashing, as
> currently people are playing around with `mmc partinfo`/`mmc write`
> and flashing stuff manually instead of using fastboot (where it's
> enabled).
>
> My suggestion is to introduce custom handling for `boot0` and `boot1`
> in the same manner as done for `zimage` [2] [3] for re-packing Android
> boot image with the new zImage. Example of flashing:
>
> -> fastboot flash boot0 u-boot.img
>
> Question: are there any objections (why it should not be
> done)/limitations I'm not aware of?
>
> Thanks for your suggestions.
>
> [1] http://git.ti.com/cgit/cgit.cgi/ti-u-boot/ti-u-boot.git/tree/board/ti/am65x/README?h=ti-u-boot-2018.01
> [2] http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/fastboot/fb_mmc.c;h=90ca81da9b5f338f09a27873fb142d142a07933e;hb=HEAD#l389
> [3] http://git.denx.de/?p=u-boot.git;a=blob;f=drivers/fastboot/fb_mmc.c;h=90ca81da9b5f338f09a27873fb142d142a07933e;hb=HEAD#l188
>
> --
> Best regards - Freundliche GrĂ¼sse - Meilleures salutations
>
> Igor Opaniuk
>
> mailto: igor.opaniuk at gmail.com
> skype: igor.opanyuk
> +380 (93) 836 40 67
> http://ua.linkedin.com/in/iopaniuk


More information about the U-Boot mailing list