mx6sabresd: Add fastboot support
PATCH v2 1/1 mx6sabresd: Add fastboot support
From: Fabio Estevam <[email protected]>
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
Shawn Guo described the following method for flashing the eMMC via flashboot:
"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 -i 0x0525' from host PC."
---
Changes since v1:
- Select CONFIG_EFI_PARTITION=y (Shawn)
- Provide the eMMC flashing procedure (Michael)
configs/mx6sabresd_defconfig | 7 +++++++ 1 file changed, 7 insertions(+)
configs/mx6sabresd_defconfig +7 -0
@@ -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
@@ -41,6 +47,7 @@ CONFIG_CMD_EXT4=y CONFIG_CMD_EXT4_WRITE=y CONFIG_CMD_FAT=y CONFIG_CMD_FS_GENERIC=y +CONFIG_EFI_PARTITION=y CONFIG_ENV_IS_IN_MMC=y CONFIG_SPI_FLASH=y CONFIG_SPI_FLASH_STMICRO=y
Signature · 1 line
2.7.4
PATCH v2 1/1 mx6sabresd: Add fastboot support
Quoted 55 lines · Fabio Estevam
From: Fabio Estevam <[email protected]>
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.000sShawn Guo described the following method for flashing the eMMC via flashboot:
"I booted the board into Debian via NFS, and then use gpart to create GPT partitions on the eMMC. With
CONFIG_EFI_PARTITIONenabled 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 partPartition Map for MMC device 2 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
10x000008000x000407ff"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
Quoted 7 lines
=> fastboot 0
At this point, I can do 'fastboot flash system system.img -i
0x0525' from host PC."Signed-off-by Fabio Estevam <[email protected]>---
Applied to u-boot-imx, thanks !
Best regards,
Stefano Babic
Signature · 5 lines
===================================================================== DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de =====================================================================