All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions
@ 2019-06-12 13:22 Igor Opaniuk
  2019-06-12 13:45 ` Marek Vasut
  2019-06-13 11:49 ` Sam Protsenko
  0 siblings, 2 replies; 3+ messages in thread
From: Igor Opaniuk @ 2019-06-12 13:22 UTC (permalink / raw)
  To: u-boot

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions
  2019-06-12 13:22 [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions Igor Opaniuk
@ 2019-06-12 13:45 ` Marek Vasut
  2019-06-13 11:49 ` Sam Protsenko
  1 sibling, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2019-06-12 13:45 UTC (permalink / raw)
  To: u-boot

On 6/12/19 3:22 PM, Igor Opaniuk 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

+CC Lukasz, Peng.


-- 
Best regards,
Marek Vasut

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions
  2019-06-12 13:22 [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions Igor Opaniuk
  2019-06-12 13:45 ` Marek Vasut
@ 2019-06-13 11:49 ` Sam Protsenko
  1 sibling, 0 replies; 3+ messages in thread
From: Sam Protsenko @ 2019-06-13 11:49 UTC (permalink / raw)
  To: u-boot

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@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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-13 11:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-12 13:22 [U-Boot] [RFC] fastboot: flashing to emmc hw boot (0, 1) partitions Igor Opaniuk
2019-06-12 13:45 ` Marek Vasut
2019-06-13 11:49 ` Sam Protsenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.