bcb: disable bcb write cmd by default [1/1]
PD#SWPL-148949
Problem:
change bcb by uboot cmd is unsafe
Solution:
disable bcb write cmd by default
Verify:
local
Change-Id: Iee8cbf863d20b4695d466337761eddce7518d2e5
Signed-off-by: Xindong Xu <xindong.xu@amlogic.com>
diff --git a/cmd/amlogic/cmd_bcb.c b/cmd/amlogic/cmd_bcb.c
index 69274cd..2d21427 100644
--- a/cmd/amlogic/cmd_bcb.c
+++ b/cmd/amlogic/cmd_bcb.c
@@ -48,6 +48,7 @@
char reserved[192];
};
+#if (IS_ENABLED(CONFIG_CMD_BCB))
static bool env_command_check(const char *cmd)
{
int index = 0;
@@ -97,6 +98,7 @@
strcopy = NULL;
return true;
}
+#endif
static int clear_misc_partition(char *clearbuf, int size)
{
@@ -278,6 +280,7 @@
return 0;
}
+#if (IS_ENABLED(CONFIG_CMD_BCB))
//uboot-command only valid once, not matter success or not
if (clear_misc_partition(clearbuf, sizeof(clearbuf)) < 0) {
printf("clear misc partition failed.\n");
@@ -308,6 +311,7 @@
printf("command mark(%s) not match %s,don't execute.\n",
command_mark, command);
}
+#endif
return 0;