summaryrefslogtreecommitdiff
path: root/recipes-bsp
diff options
context:
space:
mode:
authorJohn Klug <john.klug@multitech.com>2019-08-15 14:23:40 -0500
committerJohn Klug <john.klug@multitech.com>2019-08-15 14:23:40 -0500
commitb3a9ca6f93ba8be288e626160ef346450323b4ad (patch)
treecedf2a31617c4e3be9245e233925c375d05ba3ce /recipes-bsp
parent0a99d37c87d2965bff47f10a7b73fc3fa02a1e93 (diff)
downloadmeta-multitech-atmel-b3a9ca6f93ba8be288e626160ef346450323b4ad.tar.gz
meta-multitech-atmel-b3a9ca6f93ba8be288e626160ef346450323b4ad.tar.bz2
meta-multitech-atmel-b3a9ca6f93ba8be288e626160ef346450323b4ad.zip
Fix EXAR debug port issue on MTCDT, which caused boot hangs
Diffstat (limited to 'recipes-bsp')
-rw-r--r--recipes-bsp/u-boot/u-boot-2016.09.01/mtcdt_flush_console_autoboot.patch43
-rw-r--r--recipes-bsp/u-boot/u-boot.inc2
-rw-r--r--recipes-bsp/u-boot/u-boot_2016.09.01.bb3
3 files changed, 46 insertions, 2 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
diff --git a/recipes-bsp/u-boot/u-boot.inc b/recipes-bsp/u-boot/u-boot.inc
index 56265ff..8854181 100644
--- a/recipes-bsp/u-boot/u-boot.inc
+++ b/recipes-bsp/u-boot/u-boot.inc
@@ -4,7 +4,7 @@ SECTION = "bootloaders"
PROVIDES = "virtual/bootloader"
# New U-Boot with suppressed version.
-PR="m2"
+PR="m3"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://Licenses/README;md5=a2c678cfd4a4d97135585cad908541c6"
diff --git a/recipes-bsp/u-boot/u-boot_2016.09.01.bb b/recipes-bsp/u-boot/u-boot_2016.09.01.bb
index d94ba56..3771ee1 100644
--- a/recipes-bsp/u-boot/u-boot_2016.09.01.bb
+++ b/recipes-bsp/u-boot/u-boot_2016.09.01.bb
@@ -14,7 +14,8 @@ SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
file://hide_uboot_version.patch"
SRC_URI_append_mtcdt = " \
- file://mtcdt.patch"
+ file://mtcdt.patch \
+ file://mtcdt_flush_console_autoboot.patch"
SRC_URI_append_mtcap = " \
file://mtcdt.patch"