2018-05-29 15:30:39 +00:00
|
|
|
menu "Fastboot support"
|
2016-08-16 00:26:26 +00:00
|
|
|
|
2018-05-29 15:30:39 +00:00
|
|
|
config FASTBOOT
|
|
|
|
bool
|
|
|
|
imply ANDROID_BOOT_IMAGE
|
|
|
|
imply CMD_FASTBOOT
|
2016-08-16 00:26:26 +00:00
|
|
|
|
|
|
|
config USB_FUNCTION_FASTBOOT
|
|
|
|
bool "Enable USB fastboot gadget"
|
2018-05-29 15:30:39 +00:00
|
|
|
depends on USB_GADGET
|
|
|
|
default y if ARCH_SUNXI && USB_MUSB_GADGET
|
|
|
|
select FASTBOOT
|
2017-09-07 08:29:51 +00:00
|
|
|
select USB_GADGET_DOWNLOAD
|
2016-08-16 00:26:26 +00:00
|
|
|
help
|
|
|
|
This enables the USB part of the fastboot gadget.
|
|
|
|
|
2018-05-29 15:30:53 +00:00
|
|
|
config UDP_FUNCTION_FASTBOOT
|
|
|
|
depends on NET
|
|
|
|
select FASTBOOT
|
|
|
|
bool "Enable fastboot protocol over UDP"
|
|
|
|
help
|
|
|
|
This enables the fastboot protocol over UDP.
|
|
|
|
|
2022-01-13 07:40:06 +00:00
|
|
|
config UDP_FUNCTION_FASTBOOT_PORT
|
|
|
|
depends on UDP_FUNCTION_FASTBOOT
|
|
|
|
int "Define FASTBOOT UDP port"
|
|
|
|
default 5554
|
|
|
|
help
|
|
|
|
The fastboot protocol requires a UDP port number.
|
|
|
|
|
2018-05-29 15:30:39 +00:00
|
|
|
if FASTBOOT
|
2016-08-16 00:26:26 +00:00
|
|
|
|
|
|
|
config FASTBOOT_BUF_ADDR
|
|
|
|
hex "Define FASTBOOT buffer address"
|
2017-08-25 21:50:27 +00:00
|
|
|
default 0x82000000 if MX6SX || MX6SL || MX6UL || MX6SLL
|
|
|
|
default 0x81000000 if ARCH_OMAP2PLUS
|
|
|
|
default 0x42000000 if ARCH_SUNXI && !MACH_SUN9I
|
|
|
|
default 0x22000000 if ARCH_SUNXI && MACH_SUN9I
|
|
|
|
default 0x60800800 if ROCKCHIP_RK3036 || ROCKCHIP_RK3188 || \
|
|
|
|
ROCKCHIP_RK322X
|
|
|
|
default 0x800800 if ROCKCHIP_RK3288 || ROCKCHIP_RK3329 || \
|
|
|
|
ROCKCHIP_RK3399
|
|
|
|
default 0x280000 if ROCKCHIP_RK3368
|
|
|
|
default 0x100000 if ARCH_ZYNQMP
|
2018-09-25 14:40:23 +00:00
|
|
|
default 0 if SANDBOX
|
2016-08-16 00:26:26 +00:00
|
|
|
help
|
|
|
|
The fastboot protocol requires a large memory buffer for
|
|
|
|
downloads. Define this to the starting RAM address to use for
|
|
|
|
downloaded images.
|
|
|
|
|
|
|
|
config FASTBOOT_BUF_SIZE
|
|
|
|
hex "Define FASTBOOT buffer size"
|
2017-08-25 21:50:27 +00:00
|
|
|
default 0x8000000 if ARCH_ROCKCHIP
|
|
|
|
default 0x6000000 if ARCH_ZYNQMP
|
|
|
|
default 0x2000000 if ARCH_SUNXI
|
2018-09-25 14:40:23 +00:00
|
|
|
default 0x8192 if SANDBOX
|
2017-08-25 21:50:27 +00:00
|
|
|
default 0x7000000
|
2016-08-16 00:26:26 +00:00
|
|
|
help
|
|
|
|
The fastboot protocol requires a large memory buffer for
|
|
|
|
downloads. This buffer should be as large as possible for a
|
|
|
|
platform. Define this to the size available RAM for fastboot.
|
|
|
|
|
2016-10-24 15:41:10 +00:00
|
|
|
config FASTBOOT_USB_DEV
|
|
|
|
int "USB controller number"
|
2018-05-29 15:30:39 +00:00
|
|
|
depends on USB_FUNCTION_FASTBOOT
|
2016-10-24 15:41:10 +00:00
|
|
|
default 0
|
|
|
|
help
|
|
|
|
Some boards have USB OTG controller other than 0. Define this
|
|
|
|
option so it can be used in compiled environment (e.g. in
|
|
|
|
CONFIG_BOOTCOMMAND).
|
|
|
|
|
2016-08-16 00:26:26 +00:00
|
|
|
config FASTBOOT_FLASH
|
|
|
|
bool "Enable FASTBOOT FLASH command"
|
2019-11-19 08:26:18 +00:00
|
|
|
default y if ARCH_SUNXI || ARCH_ROCKCHIP
|
2019-10-03 17:50:03 +00:00
|
|
|
depends on MMC || (MTD_RAW_NAND && CMD_MTDPARTS)
|
2018-05-29 15:30:52 +00:00
|
|
|
select IMAGE_SPARSE
|
2016-08-16 00:26:26 +00:00
|
|
|
help
|
|
|
|
The fastboot protocol includes a "flash" command for writing
|
|
|
|
the downloaded image to a non-volatile storage device. Define
|
|
|
|
this to enable the "fastboot flash" command.
|
|
|
|
|
2021-02-10 08:29:03 +00:00
|
|
|
config FASTBOOT_UUU_SUPPORT
|
|
|
|
bool "Enable FASTBOOT i.MX UUU special command"
|
|
|
|
help
|
|
|
|
The fastboot protocol includes "UCmd" and "ACmd" command.
|
|
|
|
Be aware that you provide full access to any U-Boot command,
|
|
|
|
including working with memory and may open a huge backdoor,
|
|
|
|
when enabling this option.
|
|
|
|
|
2017-12-07 17:26:17 +00:00
|
|
|
choice
|
|
|
|
prompt "Flash provider for FASTBOOT"
|
|
|
|
depends on FASTBOOT_FLASH
|
|
|
|
|
|
|
|
config FASTBOOT_FLASH_MMC
|
|
|
|
bool "FASTBOOT on MMC"
|
|
|
|
depends on MMC
|
|
|
|
|
|
|
|
config FASTBOOT_FLASH_NAND
|
|
|
|
bool "FASTBOOT on NAND"
|
2019-10-03 17:50:03 +00:00
|
|
|
depends on MTD_RAW_NAND && CMD_MTDPARTS
|
2017-12-07 17:26:17 +00:00
|
|
|
|
|
|
|
endchoice
|
|
|
|
|
2016-08-16 00:26:26 +00:00
|
|
|
config FASTBOOT_FLASH_MMC_DEV
|
|
|
|
int "Define FASTBOOT MMC FLASH default device"
|
2017-12-07 17:26:17 +00:00
|
|
|
depends on FASTBOOT_FLASH_MMC
|
2019-11-19 08:26:18 +00:00
|
|
|
default 0 if ARCH_ROCKCHIP
|
sunxi: Remove the MMC index hack
The current code, if there's both an eMMC and an MMC slot available on the
board, will swap the MMC indices based on whether we booted from the eMMC
or the MMC. This way, the MMC we're supposed to boot on will always have
the index 0.
However, this causes various issues, for example when using other
components that base their behaviour on the MMC index, such as fastboot.
Let's remove that hack, and take the opposite approach. The MMC will always
have the same index, but the bootcmd will pick the same device than the one
we booted from. This is done through the introduction of the mmc_bootdev
environment variable that will be filled by the board code based on the
boot device informations we can get from the SoC.
In order to not introduce regressions, we also need to adjust the fastboot
MMC device and the environment device in order to set it to the eMMC, over
the MMC, like it used to be the case.
Tested-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-08-23 08:12:22 +00:00
|
|
|
default 0 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA = -1
|
|
|
|
default 1 if ARCH_SUNXI && MMC_SUNXI_SLOT_EXTRA != -1
|
2016-08-16 00:26:26 +00:00
|
|
|
help
|
|
|
|
The fastboot "flash" command requires additional information
|
|
|
|
regarding the non-volatile storage device. Define this to
|
|
|
|
the eMMC device that fastboot should use to store the image.
|
2017-10-13 21:29:20 +00:00
|
|
|
|
2018-05-29 15:30:51 +00:00
|
|
|
config FASTBOOT_FLASH_NAND_TRIMFFS
|
|
|
|
bool "Skip empty pages when flashing NAND"
|
|
|
|
depends on FASTBOOT_FLASH_NAND
|
|
|
|
help
|
|
|
|
When flashing NAND enable the DROP_FFS flag to drop trailing all-0xff
|
|
|
|
pages.
|
|
|
|
|
2021-01-27 13:46:47 +00:00
|
|
|
config FASTBOOT_MMC_BOOT_SUPPORT
|
|
|
|
bool "Enable EMMC_BOOT flash/erase"
|
|
|
|
depends on FASTBOOT_FLASH_MMC
|
2020-01-16 08:11:42 +00:00
|
|
|
help
|
|
|
|
The fastboot "flash" and "erase" commands normally does operations
|
2021-01-27 13:46:47 +00:00
|
|
|
on eMMC userdata. Define this to enable the special commands to
|
|
|
|
flash/erase eMMC boot partition.
|
|
|
|
The default target name for updating eMMC boot partition 1/2 is
|
|
|
|
CONFIG_FASTBOOT_MMC_BOOT1_NAME/CONFIG_FASTBOOT_MMC_BOOT2_NAME.
|
2020-01-16 08:11:42 +00:00
|
|
|
|
|
|
|
config FASTBOOT_MMC_BOOT1_NAME
|
|
|
|
string "Target name for updating EMMC_BOOT1"
|
2021-01-27 13:46:47 +00:00
|
|
|
depends on FASTBOOT_MMC_BOOT_SUPPORT
|
2020-01-16 08:11:42 +00:00
|
|
|
default "mmc0boot0"
|
|
|
|
help
|
|
|
|
The fastboot "flash" and "erase" commands support operations on
|
|
|
|
EMMC_BOOT1. This occurs when the specified "EMMC_BOOT1 name" on
|
|
|
|
the "fastboot flash" and "fastboot erase" commands match the value
|
|
|
|
defined here.
|
|
|
|
The default target name for updating EMMC_BOOT1 is "mmc0boot0".
|
|
|
|
|
2021-01-27 13:46:47 +00:00
|
|
|
config FASTBOOT_MMC_BOOT2_NAME
|
|
|
|
string "Target name for updating EMMC_BOOT2"
|
|
|
|
depends on FASTBOOT_MMC_BOOT_SUPPORT
|
|
|
|
default "mmc0boot1"
|
|
|
|
help
|
|
|
|
The fastboot "flash" and "erase" commands support operations on
|
|
|
|
EMMC_BOOT2. This occurs when the specified "EMMC_BOOT2 name" on
|
|
|
|
the "fastboot flash" and "fastboot erase" commands match the value
|
|
|
|
defined here.
|
|
|
|
The default target name for updating EMMC_BOOT2 is "mmc0boot1".
|
|
|
|
|
2021-01-27 13:46:46 +00:00
|
|
|
config FASTBOOT_MMC_USER_SUPPORT
|
|
|
|
bool "Enable eMMC userdata partition flash/erase"
|
|
|
|
depends on FASTBOOT_FLASH_MMC
|
|
|
|
help
|
|
|
|
Define this to enable the support "flash" and "erase" command on
|
|
|
|
eMMC userdata. The "flash" command only update the MBR and GPT
|
|
|
|
header when CONFIG_EFI_PARTITION is supported.
|
|
|
|
The "erase" command erase all the userdata.
|
|
|
|
This occurs when the specified "partition name" on the
|
|
|
|
fastboot command line matches the value CONFIG_FASTBOOT_MMC_USER_NAME.
|
|
|
|
|
2020-01-16 08:11:42 +00:00
|
|
|
config FASTBOOT_MMC_USER_NAME
|
2021-01-27 13:46:46 +00:00
|
|
|
string "Target name for updating EMMC_USER"
|
|
|
|
depends on FASTBOOT_MMC_USER_SUPPORT
|
2020-01-16 08:11:42 +00:00
|
|
|
default "mmc0"
|
|
|
|
help
|
2021-01-27 13:46:46 +00:00
|
|
|
The fastboot "flash" and "erase" command supports EMMC_USER.
|
|
|
|
This occurs when the specified "EMMC_USER name" on the
|
|
|
|
"fastboot flash" and the "fastboot erase" commands match the value
|
|
|
|
defined here.
|
2020-01-16 08:11:42 +00:00
|
|
|
The default target name for erasing EMMC_USER is "mmc0".
|
|
|
|
|
2016-09-09 08:27:18 +00:00
|
|
|
config FASTBOOT_GPT_NAME
|
|
|
|
string "Target name for updating GPT"
|
2018-05-29 15:30:42 +00:00
|
|
|
depends on FASTBOOT_FLASH_MMC && EFI_PARTITION
|
2016-09-09 08:27:18 +00:00
|
|
|
default "gpt"
|
|
|
|
help
|
|
|
|
The fastboot "flash" command supports writing the downloaded
|
|
|
|
image to the Protective MBR and the Primary GUID Partition
|
|
|
|
Table. (Additionally, this downloaded image is post-processed
|
|
|
|
to generate and write the Backup GUID Partition Table.)
|
|
|
|
This occurs when the specified "partition name" on the
|
|
|
|
"fastboot flash" command line matches the value defined here.
|
|
|
|
The default target name for updating GPT is "gpt".
|
|
|
|
|
|
|
|
config FASTBOOT_MBR_NAME
|
|
|
|
string "Target name for updating MBR"
|
2018-05-29 15:30:42 +00:00
|
|
|
depends on FASTBOOT_FLASH_MMC && DOS_PARTITION
|
2016-09-09 08:27:18 +00:00
|
|
|
default "mbr"
|
|
|
|
help
|
|
|
|
The fastboot "flash" command allows to write the downloaded image
|
|
|
|
to the Master Boot Record. This occurs when the "partition name"
|
|
|
|
specified on the "fastboot flash" command line matches the value
|
|
|
|
defined here. The default target name for updating MBR is "mbr".
|
|
|
|
|
2018-05-29 15:30:54 +00:00
|
|
|
config FASTBOOT_CMD_OEM_FORMAT
|
|
|
|
bool "Enable the 'oem format' command"
|
|
|
|
depends on FASTBOOT_FLASH_MMC && CMD_GPT
|
|
|
|
help
|
|
|
|
Add support for the "oem format" command from a client. This
|
|
|
|
relies on the env variable partitions to contain the list of
|
|
|
|
partitions as required by the gpt command.
|
|
|
|
|
2021-01-27 13:46:48 +00:00
|
|
|
config FASTBOOT_CMD_OEM_PARTCONF
|
|
|
|
bool "Enable the 'oem partconf' command"
|
|
|
|
depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
|
|
|
|
help
|
|
|
|
Add support for the "oem partconf" command from a client. This set
|
|
|
|
the mmc boot-partition for the selecting eMMC device.
|
|
|
|
|
2021-01-27 13:46:49 +00:00
|
|
|
config FASTBOOT_CMD_OEM_BOOTBUS
|
|
|
|
bool "Enable the 'oem bootbus' command"
|
|
|
|
depends on FASTBOOT_FLASH_MMC && SUPPORT_EMMC_BOOT
|
|
|
|
help
|
|
|
|
Add support for the "oem bootbus" command from a client. This set
|
|
|
|
the mmc boot configuration for the selecting eMMC device.
|
|
|
|
|
2016-11-13 21:26:13 +00:00
|
|
|
endif # FASTBOOT
|
2018-05-29 15:30:39 +00:00
|
|
|
|
|
|
|
endmenu
|