Skip to contentSkip to conversation

At start of autoboot check, flush any pending RX bytes

PATCH New Craig McQueen 4 participants 10 messages Dec 21, 2015 – Jan 20, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

 common/autoboot.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
common/autoboot.c +15 -5
index c11fb31..3ab51d9 100644
@@ -230,19 +230,29 @@ static int abortboot_normal(int bootdelay)
 		printf("Hit any key to stop autoboot: %2d ", bootdelay);
 #endif
 
-#if defined CONFIG_ZERO_BOOTDELAY_CHECK
 	/*
-	 * Check if key already pressed
-	 * Don't check if bootdelay < 0
+	 * Flush any pending input key presses.
+	 * On some systems, there might be some junk input.
+	 * No need if bootdelay < 0.
 	 */
 	if (bootdelay >= 0) {
-		if (tstc()) {	/* we got a key press	*/
+		ts = get_timer(0);
+		while (tstc()) {	/* we got a key press	*/
 			(void) getc();  /* consume input	*/
+#if defined CONFIG_ZERO_BOOTDELAY_CHECK
 			puts("\b\b\b 0");
 			abort = 1;	/* don't auto boot	*/
+			break;
+#else
+			/*
+			 * Sanity check just to avoid infinite loop. It should
+			 * never happen if hardware is working as expected.
+			 */
+			if (get_timer(ts) >= 1000)
+				break;
+#endif
 		}
 	}
-#endif
 
 	while ((bootdelay > 0) && (!abort)) {
 		--bootdelay;
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Hi Craig,

Quoted 9 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

One option might be to clear out the UART input buffer when the driver is probed. You could copy the TI maintainer also, for comments.

At present I can press a key before U-Boot comes up and it will be picked up. I suspect that this patch would break that, although I have not tested it.

Quoted 46 lines
 common/autoboot.c | 20 +++++++++++++++-----
 1 file changed, 15 insertions(+), 5 deletions(-)
common/autoboot.c +15 -6
index c11fb31..3ab51d9 100644
@@ -230,19 +230,29 @@ static int abortboot_normal(int bootdelay)
                printf("Hit any key to stop autoboot: %2d ", bootdelay);
 #endif
 
-#if defined CONFIG_ZERO_BOOTDELAY_CHECK
        /*
-        * Check if key already pressed
-        * Don't check if bootdelay < 0
+        * Flush any pending input key presses.
+        * On some systems, there might be some junk input.
+        * No need if bootdelay < 0.
         */
        if (bootdelay >= 0) {
-               if (tstc()) {   /* we got a key press   */
+               ts = get_timer(0);
+               while (tstc()) {        /* we got a key press   */
                        (void) getc();  /* consume input        */
+#if defined CONFIG_ZERO_BOOTDELAY_CHECK
                        puts("\b\b\b 0");
                        abort = 1;      /* don't auto boot      */
+                       break;
+#else
+                       /*
+                        * Sanity check just to avoid infinite loop. It should
+                        * never happen if hardware is working as expected.
+                        */
+                       if (get_timer(ts) >= 1000)
+                               break;
+#endif
                }
        }
-#endif
 
        while ((bootdelay > 0) && (!abort)) {
                --bootdelay;
--

2.1.4

Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Regards,
Simon

#2 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 13 lines · Simon Glass

Hi Craig,

Quoted 9 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

Quoted 6 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/180927de/attachment.sig>
#3 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 22 lines · Tom Rini
Quoted 12 lines · Simon Glass

Hi Craig,

Quoted 8 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same

issue.

Quoted 7 lines
Quoted 5 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

Quoted 8 lines

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

I actually enabled this feature this week by default for beagleboard.org:

configs/am335x_evm_defconfig +4 -1
index 27cb881..8699953 100644
@@ -3,7 +3,10 @@ CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
-CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
+CONFIG_AUTOBOOT_DELAY_STR="d"
+CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y

It'll take time to replace older images but on target users can just:

cd /opt/scripts/tools/developers/
git pull
sudo ./update_bootloader.sh

U-Boot SPL 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31) Trying to boot from MMC
bad magic

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600), Build:
jenkins-github_Bootloader-Builder-313

Watchdog enabled

I2C:   ready
DRAM:  512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1

Using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=>

Regards,

Signature · 2 lines
Robert Nelson
https://rcn-ee.com/
#4 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 72 lines · Robert Nelson
Quoted 22 lines · Tom Rini
Quoted 12 lines · Simon Glass

Hi Craig,

Quoted 8 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same

issue.

Quoted 7 lines
Quoted 5 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

Quoted 8 lines

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

I actually enabled this feature this week by default for beagleboard.org:

configs/am335x_evm_defconfig +4 -1
index 27cb881..8699953 100644
@@ -3,7 +3,10 @@ CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
-CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
+CONFIG_AUTOBOOT_DELAY_STR="d"
+CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y

It'll take time to replace older images but on target users can just:

cd /opt/scripts/tools/developers/
git pull
sudo ./update_bootloader.sh

U-Boot SPL 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31) Trying to boot from MMC
bad magic

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600), Build:
jenkins-github_Bootloader-Builder-313

Watchdog enabled

I2C:   ready
DRAM:  512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Quoted 6 lines

Using default environment

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=>

Space eh? OK. Now would be the time to push this upstream as the merge window just opened :)

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/eda9797c/attachment.sig>
#5 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 79 lines · Tom Rini
Quoted 5 lines · Robert Nelson
Quoted 3 lines · Tom Rini
Quoted 2 lines · Simon Glass

Hi Craig,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally

halts at

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same

issue.

Quoted 4 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't

entirely

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

fix it.

I wonder if this can be fixed for that board only?

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC

as

Quoted 7 lines
Quoted 5 lines

that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

I actually enabled this feature this week by default for beagleboard.org

:

Quoted 40 lines
configs/am335x_evm_defconfig +4 -1
index 27cb881..8699953 100644
@@ -3,7 +3,10 @@ CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
-CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
+CONFIG_AUTOBOOT_DELAY_STR="d"
+CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y

It'll take time to replace older images but on target users can just:

cd /opt/scripts/tools/developers/
git pull
sudo ./update_bootloader.sh

U-Boot SPL 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31) Trying to boot from MMC
bad magic

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600), Build:
jenkins-github_Bootloader-Builder-313

Watchdog enabled

I2C:   ready
DRAM:  512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1

Using default environment

Quoted 8 lines
Quoted 4 lines

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=>

Space eh? OK. Now would be the time to push this upstream as the merge window just opened :)

That seemed like the most common when i looked at it..

grep -R "AUTOBOOT_PROMPT" configs/*defconfig

Do you want me to hit all 3 bbb related configs?

beagleboard.org uses: am335x_evm_defconfig

I know some users use:
am335x_boneblack_defconfig
am335x_boneblack_vboot_defconfig

Regards,

Signature · 2 lines
Robert Nelson
https://rcn-ee.com/
#6 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 94 lines · Robert Nelson
Quoted 79 lines · Tom Rini
Quoted 5 lines · Robert Nelson
Quoted 3 lines · Tom Rini
Quoted 2 lines · Simon Glass

Hi Craig,

Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 6 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally

halts at

Quoted 7 lines
Quoted 7 lines
Quoted 2 lines
Quoted 2 lines

the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same

issue.

Quoted 4 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't

entirely

Quoted 7 lines
Quoted 7 lines
Quoted 3 lines
Quoted 1 line

fix it.

I wonder if this can be fixed for that board only?

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC

as

Quoted 7 lines
Quoted 5 lines

that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

I actually enabled this feature this week by default for beagleboard.org

:

Quoted 40 lines
configs/am335x_evm_defconfig +4 -1
index 27cb881..8699953 100644
@@ -3,7 +3,10 @@ CONFIG_TARGET_AM335X_EVM=y
 CONFIG_SPL_STACK_R_ADDR=0x82000000
 CONFIG_SPL=y
 CONFIG_SPL_STACK_R=y
-CONFIG_SYS_EXTRA_OPTIONS="NAND"
+CONFIG_AUTOBOOT_KEYED=y
+CONFIG_AUTOBOOT_PROMPT="Press SPACE to abort autoboot in %d seconds\n"
+CONFIG_AUTOBOOT_DELAY_STR="d"
+CONFIG_AUTOBOOT_STOP_STR=" "
 # CONFIG_CMD_IMLS is not set
 # CONFIG_CMD_FLASH is not set
 CONFIG_CMD_GPIO=y

It'll take time to replace older images but on target users can just:

cd /opt/scripts/tools/developers/
git pull
sudo ./update_bootloader.sh

U-Boot SPL 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31) Trying to boot from MMC
bad magic

U-Boot 2016.01-00001-g4eb802e (Jan 13 2016 - 11:14:31 -0600), Build:
jenkins-github_Bootloader-Builder-313

Watchdog enabled

I2C:   ready
DRAM:  512 MiB
Reset Source: Global external warm reset has occurred.
Reset Source: Power-on reset has occurred.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1

Using default environment

Quoted 8 lines
Quoted 4 lines

Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Press SPACE to abort autoboot in 2 seconds
=>

Space eh? OK. Now would be the time to push this upstream as the merge window just opened :)

That seemed like the most common when i looked at it..

grep -R "AUTOBOOT_PROMPT" configs/*defconfig

Quoted 7 lines

Do you want me to hit all 3 bbb related configs?

beagleboard.org uses: am335x_evm_defconfig

I know some users use:
am335x_boneblack_defconfig
am335x_boneblack_vboot_defconfig

Yeah, hit those two as well please. We can ignore the NOR ones since people with a NOR cape likely have their UART hooked up anyhow and that's iirc when the junk is a big problem.

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160114/e4abdbbc/attachment.sig>
#7 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

In reply to Tom Rini
Quoted 23 lines

Tom Rini wrote:

Quoted 13 lines · Simon Glass

Hi Craig,

Quoted 9 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

Quoted 6 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

Quoted 7 lines

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

Other options such as CONFIG_AUTOBOOT_KEYED_CTRLC sound like a work-around of the problem, rather than a fix of the root-cause. But maybe that's just my opinion. Simon Glass' suggestion (clear out the UART input buffer when the driver is probed) sounded reasonable, but I haven't tried it.

I think BeagleBone Black definitely needs _some_ sort of fix -- currently BBB can randomly fail to boot, which isn't good. If my patch isn't wanted, then please implement a suitable alternative.

It could be worth checking the UART's error flags (break, framing error, parity error, etc), and ignoring a byte with any error. But it looks as though the U-Boot code would need more extensive changes to support that.

On what BeagleBone list do you suggest this should be brought up?

Signature · 1 line
Craig McQueen
#8 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Hi,

Quoted 28 lines · Craig McQueen
Quoted 28 lines

Tom Rini wrote:

Quoted 13 lines · Simon Glass

Hi Craig,

Quoted 9 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

Quoted 6 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

Quoted 4 lines
Quoted 2 lines

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

Other options such as CONFIG_AUTOBOOT_KEYED_CTRLC sound like a work-around of the problem, rather than a fix of the root-cause. But maybe that's just my opinion. Simon Glass' suggestion (clear out the UART input buffer when the driver is probed) sounded reasonable, but I haven't tried it.

Since it seems like a hardware bug, we can only have a workaround. A real fix would involve fixing the root cause, i.e. fixing the hardware.

Quoted 2 lines

I think BeagleBone Black definitely needs _some_ sort of fix -- currently BBB can randomly fail to boot, which isn't good. If my patch isn't wanted, then please implement a suitable alternative.

How about what Tom suggested? Ctrl-C is not likely to happen by accident.

Quoted 2 lines

It could be worth checking the UART's error flags (break, framing error, parity error, etc), and ignoring a byte with any error. But it looks as though the U-Boot code would need more extensive changes to support that.

I'm not sure. You could add a Kconfig option to flush the UART on probe().

Quoted 6 lines

On what BeagleBone list do you suggest this should be brought up?

--
Craig McQueen

Regads,
Simon

#9 lore raw

PATCH 1/1 At start of autoboot check, flush any pending RX bytes

Quoted 36 lines · Simon Glass

Hi,

Quoted 28 lines · Craig McQueen
Quoted 28 lines

Tom Rini wrote:

Quoted 13 lines · Simon Glass

Hi Craig,

Quoted 9 lines · Craig McQueen

This is to avoid the boot sequence halting due to initial "junk" received on serial input.

---
I have found that on the BeagleBone Black, U-Boot occasionally halts at the U-Boot prompt at boot-up, whether power-up, warm external reset or software reset. I have seen other people report the same issue.

Quoted 6 lines
Quoted 4 lines

This seems to be due to U-Boot receiving "junk" data on the serial console. The BeagleBone Black has a pull-down resistor which was apparently added to try to mitigate this issue, but it doesn't entirely fix it.

I wonder if this can be fixed for that board only?

No, and it's not -exactly- a that board only problem. It's a HW design issue that can show up elsewhere too. I _think_ however in this case the answer would be to migrate to perhaps CONFIG_AUTOBOOT_KEYED_CTRLC as that's one of the reason various other boards use that set of options.

Quoted 4 lines
Quoted 2 lines

I would suggest bringing this up on the beaglebone list to see what the various people that ship and support these boards think, thanks!

Other options such as CONFIG_AUTOBOOT_KEYED_CTRLC sound like a work-around of the problem, rather than a fix of the root-cause. But maybe that's just my opinion. Simon Glass' suggestion (clear out the UART input buffer when the driver is probed) sounded reasonable, but I haven't tried it.

Quoted 8 lines

Since it seems like a hardware bug, we can only have a workaround. A real fix would involve fixing the root cause, i.e. fixing the hardware.

Quoted 2 lines

I think BeagleBone Black definitely needs _some_ sort of fix -- currently BBB can randomly fail to boot, which isn't good. If my patch isn't wanted, then please implement a suitable alternative.

How about what Tom suggested? Ctrl-C is not likely to happen by accident.

This should be good enough for everyone, it'll look for an exact match over serial "<space>" otherwise it'll ignore everything else:

http://lists.denx.de/pipermail/u-boot/2016-January/241286.html

Regards,

Signature · 2 lines
Robert Nelson
https://rcn-ee.com/