diff options
author | Ye Li <ye.li@nxp.com> | 2018-06-05 01:34:41 -0700 |
---|---|---|
committer | Ye Li <ye.li@nxp.com> | 2018-06-13 03:06:25 -0700 |
commit | 2c840c82b3558267650b98735790ac7151644ae1 (patch) | |
tree | b62bd46f634e8a76ec122085113a92a967db6288 /cmd | |
parent | 4ec81a0b075d8d853ac696172660a7771064405d (diff) |
MLK-18591-3 android: Add FSL android fastboot support
Porting the FSL android fastboot features from imx u-boot v2017.03 to
support all SoCs: imx6/imx7/imx7ulp/imx8/imx8m
Signed-off-by: Ye Li <ye.li@nxp.com>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/fastboot.c | 4 | ||||
-rw-r--r-- | cmd/fastboot/Kconfig | 42 | ||||
-rw-r--r-- | cmd/read.c | 4 |
3 files changed, 48 insertions, 2 deletions
diff --git a/cmd/fastboot.c b/cmd/fastboot.c index 8adcca592d5..be4a11f9b7d 100644 --- a/cmd/fastboot.c +++ b/cmd/fastboot.c @@ -23,7 +23,11 @@ static int do_fastboot(cmd_tbl_t *cmdtp, int flag, int argc, char *const argv[]) return CMD_RET_USAGE; usb_controller = argv[1]; +#ifdef CONFIG_FASTBOOT_USB_DEV + controller_index = CONFIG_FASTBOOT_USB_DEV; +#else controller_index = simple_strtoul(usb_controller, NULL, 0); +#endif ret = board_usb_init(controller_index, USB_INIT_DEVICE); if (ret) { diff --git a/cmd/fastboot/Kconfig b/cmd/fastboot/Kconfig index 0d2c2f131e6..63b65b6ab9d 100644 --- a/cmd/fastboot/Kconfig +++ b/cmd/fastboot/Kconfig @@ -26,6 +26,48 @@ config CMD_FASTBOOT See doc/README.android-fastboot for more information. +config FSL_FASTBOOT + bool "Enable FSL fastboot support" + select BCB_SUPPORT + help + This enables FSL implementation for Android fastboot. + +if FSL_FASTBOOT + +config ANDROID_RECOVERY + bool "Enable the recovery boot function" + help + This enables the Android Recovery boot function. + +config CMD_BOOTA + bool "Enable the boota command" + help + This enables the boota command for booting android images. + +config BCB_SUPPORT + bool + +choice + prompt "Android Image Storage select" + default FASTBOOT_STORAGE_MMC + +config FASTBOOT_STORAGE_MMC + bool "Using eMMC/SD for Android fastboot storage media" + +config FASTBOOT_STORAGE_NAND + bool "Using NAND flash for Android fastboot storage media" + +config FASTBOOT_STORAGE_SATA + bool "Using SATA disk for Android fastboot storage media" + +endchoice + +config FASTBOOT_SATA_NO + int "Sata device index" + depends on FASTBOOT_STORAGE_SATA + +endif #FSL_FASTBOOT + if USB_FUNCTION_FASTBOOT config FASTBOOT_BUF_ADDR diff --git a/cmd/read.c b/cmd/read.c index 82c2d9ad994..7011d2869ef 100644 --- a/cmd/read.c +++ b/cmd/read.c @@ -12,7 +12,7 @@ #include <command.h> #include <part.h> -int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) +int do_raw_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) { char *ep; struct blk_desc *dev_desc = NULL; @@ -75,7 +75,7 @@ int do_read(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) } U_BOOT_CMD( - read, 6, 0, do_read, + read, 6, 0, do_raw_read, "Load binary data from a partition", "<interface> <dev[:part]> addr blk# cnt" ); |