diff options
Diffstat (limited to 'recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch')
-rw-r--r-- | recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch b/recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch new file mode 100644 index 0000000..d08843a --- /dev/null +++ b/recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch @@ -0,0 +1,43 @@ +# This change sets the bootdelay to 2 seconds. On old devices +# the bootdelay may be in the environment variable partitions. +# When updating a system, u-boot setenv command must be used +# to set the bootdelay to 2 in the environment. A bootdelay +# of zero will make it nearly impossible to enter U-Boot, +# and zero is the old default, and may be in the environment. +# For MTCDT only the unpowered EXAR serial to USB convertor +# leaks the output of the console back to the input in some +# cases. Therefore it is necessary to flush the UART before +# attempting to monitor keystrokes. The output of the +# console must be quiet, or in the case of the normal +# boot where the EXAR part is unpowered, the read of the +# keyboard may be reading output to the console screen. +# This problem never occurs if the EXAR part is connected +# to a PC, and is powered. +diff -Naru orig/common/autoboot.c new/common/autoboot.c +--- orig/common/autoboot.c 2019-08-15 10:56:58.183468370 -0500 ++++ new/common/autoboot.c 2019-08-15 10:30:11.363515940 -0500 +@@ -219,6 +219,12 @@ + printf("Hit any key to stop autoboot: %2d ", bootdelay); + #endif + ++ /* Flush input -- must be done because of loopback ++ * issue on MTCDT models with unpowered EXAR part ++ * which do loopback unintentionally by default. ++ */ ++ while (tstc()) ++ getc(); + /* + * Check if key already pressed + */ +diff -Naru orig/configs/at91sam9x5ek_nandflash_defconfig new/configs/at91sam9x5ek_nandflash_defconfig +--- orig/configs/at91sam9x5ek_nandflash_defconfig 2019-08-15 10:49:30.223481632 -0500 ++++ new/configs/at91sam9x5ek_nandflash_defconfig 2019-08-15 10:50:10.703480433 -0500 +@@ -3,7 +3,7 @@ + CONFIG_TARGET_AT91SAM9X5EK=y + CONFIG_SPL=n + CONFIG_SYS_EXTRA_OPTIONS="AT91SAM9X5,SYS_USE_NANDFLASH" +-CONFIG_BOOTDELAY=0 ++CONFIG_BOOTDELAY=2 + CONFIG_HUSH_PARSER=y + CONFIG_SYS_PROMPT="U-Boot> " + CONFIG_CMD_BOOTZ=y |