Commit b053775c03629d4b96e865ce66db89ebce643e91

Authored by faqiang.zhu
1 parent 9a3d4a6b84

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 17 changed files with 41 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_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
... ... @@ -3937,6 +3937,7 @@
3937 3937 }
3938 3938 #endif
3939 3939  
  3940 +#ifndef CONFIG_NOT_UUU_BUILD
3940 3941 static void cb_run_uboot_cmd(struct usb_ep *ep, struct usb_request *req)
3941 3942 {
3942 3943 char *cmd = req->buf;
... ... @@ -3980,6 +3981,7 @@
3980 3981 fastboot_func->in_req->complete = do_acmd_complete;
3981 3982 fastboot_tx_write_str("OKAY");
3982 3983 }
  3984 +#endif
3983 3985  
3984 3986 #ifdef CONFIG_AVB_SUPPORT
3985 3987 static void cb_set_active_avb(struct usb_ep *ep, struct usb_request *req)
... ... @@ -4351,6 +4353,7 @@
4351 4353 .cb = cb_set_active_avb,
4352 4354 },
4353 4355 #endif
  4356 +#ifndef CONFIG_NOT_UUU_BUILD
4354 4357 {
4355 4358 .cmd = "UCmd:",
4356 4359 .cb = cb_run_uboot_cmd,
... ... @@ -4358,6 +4361,7 @@
4358 4361 { .cmd ="ACmd:",
4359 4362 .cb = cb_run_uboot_acmd,
4360 4363 },
  4364 +#endif
4361 4365 #endif
4362 4366 {
4363 4367 .cmd = "reboot",