Commit 9da9e76a44ea11a67361225af459a9c80c7153a0

Authored by faqiang.zhu
1 parent 2ee4bd1214

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>

Showing 18 changed files with 43 additions and 0 deletions Side-by-side Diff

cmd/fastboot/Kconfig
1 1 comment "FASTBOOT"
2 2  
  3 +config NOT_UUU_BUILD
  4 + bool "Disable features used by uuu"
  5 + help
  6 + This disables the features used by uuu, so that users can't
  7 + execute u-boot command other than fastboot throuth the fastboot
  8 + function provided by uuu.
  9 +
3 10 menuconfig FASTBOOT
4 11 bool "Fastboot support"
5 12 depends on USB_GADGET
configs/imx6dlsabreautoandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6dlsabresdandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6qpsabreautoandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6qpsabresdandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6qsabreautoandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6qsabresdandroid_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_DM_USB=y
50 50  
51 51 CONFIG_ENV_IS_IN_MMC=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx6sxsabresdandroid_defconfig
... ... @@ -63,4 +63,6 @@
63 63 CONFIG_DM_ETH=y
64 64 CONFIG_FSL_QSPI=y
65 65 CONFIG_IMX_BOOTAUX=y
  66 +
  67 +CONFIG_NOT_UUU_BUILD=y
configs/imx7dsabresdandroid_defconfig
... ... @@ -65,4 +65,6 @@
65 65 CONFIG_VIDEO=y
66 66 CONFIG_ERRNO_STR=y
67 67 CONFIG_DM_ETH=y
  68 +
  69 +CONFIG_NOT_UUU_BUILD=y
configs/imx7ulp_evk_android_defconfig
... ... @@ -49,4 +49,6 @@
49 49 CONFIG_VIDEO=y
50 50 CONFIG_FLASH_MCUFIRMWARE_SUPPORT=y
51 51 CONFIG_IMX_NORTHWEST_MIPI_DSI=y
  52 +
  53 +CONFIG_NOT_UUU_BUILD=y
configs/imx8mm_evk_android_defconfig
... ... @@ -60,4 +60,6 @@
60 60 CONFIG_SPL_USB_HOST_SUPPORT=y
61 61 CONFIG_SPL_USB_GADGET_SUPPORT=y
62 62 CONFIG_SPL_USB_SDP_SUPPORT=y
  63 +
  64 +CONFIG_NOT_UUU_BUILD=y
configs/imx8mq_aiy_android_defconfig
... ... @@ -74,4 +74,6 @@
74 74 CONFIG_SPL_USB_HOST_SUPPORT=y
75 75 CONFIG_SPL_USB_GADGET_SUPPORT=y
76 76 CONFIG_SPL_USB_SDP_SUPPORT=y
  77 +
  78 +CONFIG_NOT_UUU_BUILD=y
configs/imx8mq_evk_android_defconfig
... ... @@ -76,4 +76,6 @@
76 76 CONFIG_USB_XHCI_DWC3=y
77 77 CONFIG_USB_DWC3=y
78 78 CONFIG_USB_DWC3_GADGET=y
  79 +
  80 +CONFIG_NOT_UUU_BUILD=y
configs/imx8qm_mek_android_defconfig
... ... @@ -92,4 +92,6 @@
92 92 CONFIG_SPL=y
93 93 CONFIG_SPL_MMC_SUPPORT=y
94 94 CONFIG_SPL_GPIO_SUPPORT=y
  95 +
  96 +CONFIG_NOT_UUU_BUILD=y
configs/imx8qm_mek_androidauto_trusty_defconfig
... ... @@ -116,4 +116,6 @@
116 116  
117 117 CONFIG_SPL_ENV_SUPPORT=y
118 118 CONFIG_SPL_LIBDISK_SUPPORT=y
  119 +
  120 +CONFIG_NOT_UUU_BUILD=y
configs/imx8qxp_mek_android_defconfig
... ... @@ -92,4 +92,6 @@
92 92 CONFIG_SPL=y
93 93 CONFIG_SPL_MMC_SUPPORT=y
94 94 CONFIG_SPL_GPIO_SUPPORT=y
  95 +
  96 +CONFIG_NOT_UUU_BUILD=y
configs/imx8qxp_mek_androidauto_trusty_defconfig
... ... @@ -118,4 +118,6 @@
118 118  
119 119 CONFIG_SPL_ENV_SUPPORT=y
120 120 CONFIG_SPL_LIBDISK_SUPPORT=y
  121 +
  122 +CONFIG_NOT_UUU_BUILD=y
drivers/usb/gadget/f_fastboot.c
... ... @@ -3979,6 +3979,7 @@
3979 3979 }
3980 3980 #endif
3981 3981  
  3982 +#ifndef CONFIG_NOT_UUU_BUILD
3982 3983 static void cb_run_uboot_cmd(struct usb_ep *ep, struct usb_request *req)
3983 3984 {
3984 3985 char *cmd = req->buf;
... ... @@ -4022,6 +4023,7 @@
4022 4023 fastboot_func->in_req->complete = do_acmd_complete;
4023 4024 fastboot_tx_write_str("OKAY");
4024 4025 }
  4026 +#endif
4025 4027  
4026 4028 #ifdef CONFIG_AVB_SUPPORT
4027 4029 static void cb_set_active_avb(struct usb_ep *ep, struct usb_request *req)
... ... @@ -4393,6 +4395,7 @@
4393 4395 .cb = cb_set_active_avb,
4394 4396 },
4395 4397 #endif
  4398 +#ifndef CONFIG_NOT_UUU_BUILD
4396 4399 {
4397 4400 .cmd = "UCmd:",
4398 4401 .cb = cb_run_uboot_cmd,
... ... @@ -4400,6 +4403,7 @@
4400 4403 { .cmd ="ACmd:",
4401 4404 .cb = cb_run_uboot_acmd,
4402 4405 },
  4406 +#endif
4403 4407 #endif
4404 4408 {
4405 4409 .cmd = "reboot",