MA-13785 remove the fastboot command of ucmd and acmd

To avoid end user executing uboot command through fastboot, the fastboot
command of "ucmd" and "acmd" in the uboot to be flashed into
non-volatile storage device is removed in this partch.

Change-Id: I999b8688a53c2201d02979be68266afc110dfb15
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
This commit is contained in:
faqiang.zhu 2018-12-17 13:05:33 +08:00
parent 2ee4bd1214
commit 9da9e76a44
18 changed files with 43 additions and 0 deletions

View File

@ -1,5 +1,12 @@
comment "FASTBOOT"
config NOT_UUU_BUILD
bool "Disable features used by uuu"
help
This disables the features used by uuu, so that users can't
execute u-boot command other than fastboot throuth the fastboot
function provided by uuu.
menuconfig FASTBOOT
bool "Fastboot support"
depends on USB_GADGET

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_DM_ETH=y
CONFIG_DM_USB=y
CONFIG_ENV_IS_IN_MMC=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -63,3 +63,5 @@ CONFIG_VIDEO=y
CONFIG_DM_ETH=y
CONFIG_FSL_QSPI=y
CONFIG_IMX_BOOTAUX=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -65,3 +65,5 @@ CONFIG_USB_ETHER_ASIX=y
CONFIG_VIDEO=y
CONFIG_ERRNO_STR=y
CONFIG_DM_ETH=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -49,3 +49,5 @@ CONFIG_USB_ETHER_RTL8152=y
CONFIG_VIDEO=y
CONFIG_FLASH_MCUFIRMWARE_SUPPORT=y
CONFIG_IMX_NORTHWEST_MIPI_DSI=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -60,3 +60,5 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5
CONFIG_SPL_USB_HOST_SUPPORT=y
CONFIG_SPL_USB_GADGET_SUPPORT=y
CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -74,3 +74,5 @@ CONFIG_SDP_LOADADDR=0x40400000
CONFIG_SPL_USB_HOST_SUPPORT=y
CONFIG_SPL_USB_GADGET_SUPPORT=y
CONFIG_SPL_USB_SDP_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -76,3 +76,5 @@ CONFIG_USB_XHCI_IMX8M=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GADGET=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -92,3 +92,5 @@ CONFIG_CMD_MEMTEST=y
CONFIG_SPL=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -116,3 +116,5 @@ CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -92,3 +92,5 @@ CONFIG_CMD_MEMTEST=y
CONFIG_SPL=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -118,3 +118,5 @@ CONFIG_SPL_GPIO_SUPPORT=y
CONFIG_SPL_ENV_SUPPORT=y
CONFIG_SPL_LIBDISK_SUPPORT=y
CONFIG_NOT_UUU_BUILD=y

View File

@ -3979,6 +3979,7 @@ static void cb_erase(struct usb_ep *ep, struct usb_request *req)
}
#endif
#ifndef CONFIG_NOT_UUU_BUILD
static void cb_run_uboot_cmd(struct usb_ep *ep, struct usb_request *req)
{
char *cmd = req->buf;
@ -4022,6 +4023,7 @@ static void cb_run_uboot_acmd(struct usb_ep *ep, struct usb_request *req)
fastboot_func->in_req->complete = do_acmd_complete;
fastboot_tx_write_str("OKAY");
}
#endif
#ifdef CONFIG_AVB_SUPPORT
static void cb_set_active_avb(struct usb_ep *ep, struct usb_request *req)
@ -4393,6 +4395,7 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = {
.cb = cb_set_active_avb,
},
#endif
#ifndef CONFIG_NOT_UUU_BUILD
{
.cmd = "UCmd:",
.cb = cb_run_uboot_cmd,
@ -4400,6 +4403,7 @@ static const struct cmd_dispatch_info cmd_dispatch_info[] = {
{ .cmd ="ACmd:",
.cb = cb_run_uboot_acmd,
},
#endif
#endif
{
.cmd = "reboot",