From 18f97faa411078b95d042d207f5fff32bc8ece1d Mon Sep 17 00:00:00 2001 From: P Dheeraj Srujan Kumar Date: Thu, 31 Mar 2022 02:50:48 +0530 Subject: Update to internal 1-0.91 Signed-off-by: P Dheeraj Srujan Kumar --- ...sabling-serial-console-if-FFUJ-is-enabled.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch (limited to 'meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch') diff --git a/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch new file mode 100644 index 000000000..372d69e26 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-bsp/u-boot/files/0038-Disabling-serial-console-if-FFUJ-is-enabled.patch @@ -0,0 +1,51 @@ +From a9f5d0357701c817106cd158d377ef645309ccc2 Mon Sep 17 00:00:00 2001 +From: gokulsanker +Date: Wed, 8 Dec 2021 01:44:19 +0530 +Subject: [PATCH] If FFUJ is enabled serial console must be disabled + +FFUJ mode user is not allowed to enter uboot command +line interface. Serial console is disabled by creating +an indefinite sleep if FFUJ is enabled, same +functionality is used in whitely platforms + +Tested: +Serial console is disabled in FFUJ mode + +Signed-off-by: gokulsanker +--- + common/autoboot.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +diff --git a/common/autoboot.c b/common/autoboot.c +index 8a99780423..21e59feea7 100644 +--- a/common/autoboot.c ++++ b/common/autoboot.c +@@ -19,6 +19,7 @@ DECLARE_GLOBAL_DATA_PTR; + + #define MAX_DELAY_STOP_STR 32 + ++#define WAIT_STATE_TIMEOUT 10000 + #ifndef DEBUG_BOOTKEYS + #define DEBUG_BOOTKEYS 0 + #endif +@@ -271,9 +272,14 @@ static int abortboot(int bootdelay) + { + int abort = 0; + +- abort = gpio_abort(); +- if (abort) +- goto exit; ++ if (gpio_abort()) ++ { ++ printf("#### BMC is in disabled state(FFU Jumper is asserted), " ++ "So BMC serial console disabled. ####\n"); ++ while (1) { ++ mdelay(WAIT_STATE_TIMEOUT); ++ } ++ } + + if (bootdelay >= 0) + abort = __abortboot(bootdelay); +-- +2.17.1 + -- cgit v1.2.3