public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] mx6sabresd: Add fastboot support
@ 2018-01-29 13:11 Fabio Estevam
  2018-01-29 15:23 ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2018-01-29 13:11 UTC (permalink / raw)
  To: u-boot

From: Fabio Estevam <fabio.estevam@nxp.com>

fastboot tool is a convenient way to flash the eMMC, so
add support for it.

Examples of usages:

On the mx6sabresd:

=> fastboot 0

On the Linux PC connected via USB:

$ sudo fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2018.01-00550-g7517cfe
finished. total time: 0.000s

$ sudo fastboot reboot -i 0x0525

(this causes the mx6sabresd to reboot)

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
---
The Linux PC runs Ubuntu 16.04 with fastboot version 1:6.0.1+r16-3.

 configs/mx6sabresd_defconfig | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/configs/mx6sabresd_defconfig b/configs/mx6sabresd_defconfig
index f6a53d6..feb385d 100644
--- a/configs/mx6sabresd_defconfig
+++ b/configs/mx6sabresd_defconfig
@@ -20,6 +20,12 @@ CONFIG_SPL_USB_HOST_SUPPORT=y
 CONFIG_SPL_USB_GADGET_SUPPORT=y
 CONFIG_SPL_USB_SDP_SUPPORT=y
 CONFIG_HUSH_PARSER=y
+CONFIG_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x12000000
+CONFIG_FASTBOOT_BUF_SIZE=0x10000000
+CONFIG_FASTBOOT_USB_DEV=0
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=2
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_SPL=y
 CONFIG_CMD_SPL_WRITE_SIZE=0x20000
-- 
2.7.4

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

* [U-Boot] [PATCH] mx6sabresd: Add fastboot support
  2018-01-29 13:11 [U-Boot] [PATCH] mx6sabresd: Add fastboot support Fabio Estevam
@ 2018-01-29 15:23 ` Shawn Guo
  2018-01-29 15:38   ` Michael Nazzareno Trimarchi
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Guo @ 2018-01-29 15:23 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 29, 2018 at 11:11:57AM -0200, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@nxp.com>
> 
> fastboot tool is a convenient way to flash the eMMC, so
> add support for it.
> 
> Examples of usages:
> 
> On the mx6sabresd:
> 
> => fastboot 0
> 
> On the Linux PC connected via USB:
> 
> $ sudo fastboot getvar bootloader-version -i 0x0525
> bootloader-version: U-Boot 2018.01-00550-g7517cfe
> finished. total time: 0.000s
> 
> $ sudo fastboot reboot -i 0x0525
> 
> (this causes the mx6sabresd to reboot)
> 
> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>

Tested-by: Shawn Guo <shawn.guo@linaro.org>

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

* [U-Boot] [PATCH] mx6sabresd: Add fastboot support
  2018-01-29 15:23 ` Shawn Guo
@ 2018-01-29 15:38   ` Michael Nazzareno Trimarchi
  2018-01-30  1:39     ` Shawn Guo
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Nazzareno Trimarchi @ 2018-01-29 15:38 UTC (permalink / raw)
  To: u-boot

Hi

On Mon, Jan 29, 2018 at 4:23 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> On Mon, Jan 29, 2018 at 11:11:57AM -0200, Fabio Estevam wrote:
>> From: Fabio Estevam <fabio.estevam@nxp.com>
>>
>> fastboot tool is a convenient way to flash the eMMC, so
>> add support for it.
>>
>> Examples of usages:
>>
>> On the mx6sabresd:
>>
>> => fastboot 0
>>
>> On the Linux PC connected via USB:
>>
>> $ sudo fastboot getvar bootloader-version -i 0x0525
>> bootloader-version: U-Boot 2018.01-00550-g7517cfe
>> finished. total time: 0.000s
>>
>> $ sudo fastboot reboot -i 0x0525
>>
>> (this causes the mx6sabresd to reboot)
>>
>> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
>
> Tested-by: Shawn Guo <shawn.guo@linaro.org>
>

are partition already defined? in sabre config. It's not used to know
the u-boot version ;)
Can you just update the commit message in how you perform the update?

Michael

_______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot



-- 
| Michael Nazzareno Trimarchi                     Amarula Solutions BV |
| COO  -  Founder                                      Cruquiuskade 47 |
| +31(0)851119172                                 Amsterdam 1018 AM NL |
|                  [`as] http://www.amarulasolutions.com               |

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

* [U-Boot] [PATCH] mx6sabresd: Add fastboot support
  2018-01-29 15:38   ` Michael Nazzareno Trimarchi
@ 2018-01-30  1:39     ` Shawn Guo
  0 siblings, 0 replies; 4+ messages in thread
From: Shawn Guo @ 2018-01-30  1:39 UTC (permalink / raw)
  To: u-boot

On Mon, Jan 29, 2018 at 04:38:27PM +0100, Michael Nazzareno Trimarchi wrote:
> Hi
> 
> On Mon, Jan 29, 2018 at 4:23 PM, Shawn Guo <shawn.guo@linaro.org> wrote:
> > On Mon, Jan 29, 2018 at 11:11:57AM -0200, Fabio Estevam wrote:
> >> From: Fabio Estevam <fabio.estevam@nxp.com>
> >>
> >> fastboot tool is a convenient way to flash the eMMC, so
> >> add support for it.
> >>
> >> Examples of usages:
> >>
> >> On the mx6sabresd:
> >>
> >> => fastboot 0
> >>
> >> On the Linux PC connected via USB:
> >>
> >> $ sudo fastboot getvar bootloader-version -i 0x0525
> >> bootloader-version: U-Boot 2018.01-00550-g7517cfe
> >> finished. total time: 0.000s
> >>
> >> $ sudo fastboot reboot -i 0x0525
> >>
> >> (this causes the mx6sabresd to reboot)
> >>
> >> Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
> >
> > Tested-by: Shawn Guo <shawn.guo@linaro.org>
> >
> 
> are partition already defined? in sabre config. It's not used to know
> the u-boot version ;)

Ah, yes.  I forgot to mention that I additionally enabled option
CONFIG_EFI_PARTITION to get GPT partition support.

@Fabio, can we add this option as well?

> Can you just update the commit message in how you perform the update?

I booted the board into Debian via NFS, and then use gpart to create GPT
partitions on the eMMC.  With CONFIG_EFI_PARTITION enabled in U-Boot, I
can list the partitions on eMMC as below.

=> mmc dev 2
switch to partitions #0, OK
mmc2(part 0) is current device
=> mmc part

Partition Map for MMC device 2  --   Partition Type: EFI

Part    Start LBA       End LBA         Name
        Attributes
        Type GUID
        Partition GUID
  1     0x00000800      0x000407ff      "boot"
        attrs:  0x0000000000000000
        type:   21686148-6449-6e6f-744e-656564454649
        guid:   6137f187-600c-4dc4-8a74-ee8f0250d455
  2     0x00040800      0x002987ff      "system"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   af78282f-21b5-4324-bf7a-f460d1ae0015
  3     0x00298800      0x003187ff      "vendor"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   15830513-0195-4e86-9b2c-cd3af5e14570
  4     0x00318800      0x003587ff      "cache"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   6e909a60-606b-4c43-bbd4-f780afd97302
  5     0x00358800      0x00ecbfde      "data"
        attrs:  0x0000000000000000
        type:   0fc63daf-8483-4772-8e79-3d69d8477de4
        guid:   9e79dc0b-35d9-40f0-b638-3e718362cb26
=> fastboot 0
 
At this point, I can do 'fastboot flash system system.img' from host PC.

Shawn

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

end of thread, other threads:[~2018-01-30  1:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-29 13:11 [U-Boot] [PATCH] mx6sabresd: Add fastboot support Fabio Estevam
2018-01-29 15:23 ` Shawn Guo
2018-01-29 15:38   ` Michael Nazzareno Trimarchi
2018-01-30  1:39     ` Shawn Guo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox