1. Article purpose[edit source]
This article explains how to configure fastboot mode in U-Boot.
2. Fastboot[edit source]
Fastboot is a protocol that was originally created for Android and is primarily used to modify the flash filesystem via a USB connection from a host computer.
3. Fastboot in U-Boot[edit source]
Fastboot is supported in U-Boot. It's not necessarily enabled by default.
A U-Boot binary, and so a fip, can support only one mass storage device for fastboot. For instance, if a U-Boot is configured to support fastboot on eMMC it cannot be used to program the SD-Card with fastboot.
To enable fastboot or modify fastboot configuration, U-Boot configuration must be modified. This can be done with the SDK.
3.1. With fragments[edit source]
For example, to support fastboot on SD-Card on STM32MP157F-EV1 , following steps have to be followed.
- First of all, mmc device number must be identified. Information can be seen here.
For the STM32MP157F-EV1 Evaluation board SD-Card is on mmc0.
- Append the corresponding fragment to the default configuration
cat ../fragment-04-fastboot_mmc0.fb_cfg >> configs/stm32mp15_defconfig
- Build U-Boot as usual with the SDK
make -f $PWD/../Makefile.sdk UBOOT_DEFCONFIG=stm32mp15_defconfig DEVICETREE=stm32mp157f-ev1 all
[edit source]
For example, to support fastboot on SD-Card on STM32MP157F-EV1 , following steps have to be followed.
- First of all, mmc device number must be identified. Information can be seen here.
For the STM32MP157F-EV1 Evaluation board SD-Card is on mmc0.
- Generate the configuration for the board.
CONFIG=stm32mp15_defconfig ; make -f $PWD/../Makefile.sdk UBOOT_DEFCONFIG=${CONFIG} DEVICETREE=stm32mp157f-ev1 configure-${CONFIG}
- Configure fastboot
For mmc0 (SD-Card)
Device Drivers ---> Fastboot support ---> [*] Enable USB fastboot gadget [*] Enable FASTBOOT FLASH command (1) Define FASTBOOT MMC FLASH default device [ ] Enable EMMC_BOOT flash/erase [ ] Enable eMMC userdata partition flash/erase [ ] Enable the 'oem partconf' command [ ] Enable the 'oem bootbus' command
For mmc1 (eMMC)
Device Drivers ---> Fastboot support ---> [*] Enable USB fastboot gadget [*] Enable FASTBOOT FLASH command (1) Define FASTBOOT MMC FLASH default device [*] Enable EMMC_BOOT flash/erase (mmc1boot0) Target name for updating EMMC_BOOT1 (mmc1boot1) Target name for updating EMMC_BOOT2 [*] Enable eMMC userdata partition flash/erase (mmc1) Target name for updating EMMC_USER [*] Enable the 'oem partconf' command [*] Enable the 'oem bootbus' command