]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
pico-imx7d: Add fastboot support
authorFabio Estevam <festevam@gmail.com>
Fri, 29 Jun 2018 18:19:10 +0000 (15:19 -0300)
committerStefano Babic <sbabic@denx.de>
Mon, 23 Jul 2018 08:59:48 +0000 (10:59 +0200)
fastboot tool is a convenient way to flash the eMMC, so
add support for it.

Examples of usages:

On the pico-imx7d U-Boot prompt:

=> fastboot 0

On the Linux PC connected via USB:

1. Retrieving the U-Boot version

$ sudo fastboot getvar bootloader-version -i 0x0525
bootloader-version: U-Boot 2018.07-rc1-03888-gde846f9
finished. total time: 0.000s

2. Resetting the board

$ sudo fastboot reboot -i 0x0525

(this causes the pico-imx7d to reboot)

Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
configs/pico-imx7d_defconfig
include/configs/pico-imx7d.h

index 04823ca439a82e5374837a63e49f1897b19b0de1..bff6b9ccb8c184628a0de5abefa58483756d0cac 100644 (file)
@@ -21,6 +21,12 @@ CONFIG_CMD_USB_MASS_STORAGE=y
 CONFIG_CMD_CACHE=y
 CONFIG_CMD_EXT4_WRITE=y
 CONFIG_DFU_MMC=y
+CONFIG_USB_FUNCTION_FASTBOOT=y
+CONFIG_FASTBOOT_BUF_ADDR=0x82000000
+CONFIG_FASTBOOT_BUF_SIZE=0x10000000
+CONFIG_FASTBOOT_FLASH=y
+CONFIG_FASTBOOT_FLASH_MMC_DEV=0
+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
 CONFIG_FSL_ESDHC=y
 CONFIG_PHYLIB=y
 CONFIG_USB=y
@@ -32,5 +38,4 @@ CONFIG_USB_GADGET_MANUFACTURER="FSL"
 CONFIG_USB_GADGET_VENDOR_NUM=0x0525
 CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
 CONFIG_CI_UDC=y
-CONFIG_USB_GADGET_DOWNLOAD=y
 CONFIG_OF_LIBFDT=y
index 23ac103f13066e82ad1160aef4b1e56fe6f5abd0..a6ebb045752ca8c2fc07f102900493a4e7f20c7d 100644 (file)
@@ -60,6 +60,7 @@
        "partitions=" \
                "uuid_disk=${uuid_gpt_disk};" \
                "name=rootfs,size=0,uuid=${uuid_gpt_rootfs}\0" \
+       "fastboot_partition_alias_system=rootfs\0" \
        "setup_emmc=mmc dev 0; gpt write mmc 0 $partitions; reset;\0" \
        BOOTENV