Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BeagleBone Black doesn't boot without serial console (10.0 release)






On Fri-11-Oct-2024 14:36, Manuel Bouyer wrote:
 From the schematic here:
https://github.com/beagleboard/BeagleBone-Black/blob/master/BBB_SCH.pdf

there is a pulldown resitor on UART0_RX input. This means that without
a (powered up) USB/serial adapter, UART0_RX sees a logical 0 which
is most probably interpreted as a BREAK by the AM335x UART, and causes
the kernel to enter DDB.

The solution is to either rebuild a kernel without DDB, or tie UART0_RX to
a +3.3V pin.
Or patch the kernel sources like this:

Index: com.c
===================================================================
RCS file: /cvsroot/src/sys/dev/ic/com.c,v
retrieving revision 1.382
diff -u -p -u -r1.382 com.c
--- com.c	9 Dec 2022 00:35:58 -0000	1.382
+++ com.c	11 Oct 2024 12:33:45 -0000
@@ -2647,7 +2647,8 @@ comcnattach1(struct com_regs *regsp, int
cn_tab = &comcons;
  	cn_init_magic(&com_cnm_state);
-	cn_set_magic("\047\001"); /* default magic is BREAK */
+	// cn_set_magic("\047\001"); /* default magic is BREAK */
+	cn_set_magic("+++++");
comcons_info.frequency = frequency;
  	comcons_info.type = type;
@@ -2734,7 +2735,8 @@ com_kgdb_attach1(struct com_regs *regsp,
  		 * expects this to be initialized
  		 */
  		cn_init_magic(&com_cnm_state);
-		cn_set_magic("\047\001");
+		// cn_set_magic("\047\001");
+		cn_set_magic("+++++");
  	}
kgdb_attach(com_kgdb_getc, com_kgdb_putc, NULL);


Manuel, your proposed solution has been tested working.

This means i can plug and unplag the UART in J1 on BBB without entering
the debugger, the active ssh connection remains alive, and from the
other side of the "serial" (my computer) everything works after the plug-unplug,
it still can type commands.

As far (or as little) as i can understand, when i connect the UART to J1
by default "a signal" i generated which is the same signal that opens the debugger.

With your change the signal generated is different so the debugger does not pop up.

Ok, this works, but it would be very inconvenient for me or anybody else
to patch the kernel for BBB every time we need to prepare a new device.
I would be also very annoying to maintain on upgrades etc.

Would it be any bad to change this line in the main kernel ?

I don't see the need to call the debugger when a com is connected, but
I know nothing of kernel debugging/programming so this may be useful to somebody else.

From the user perspective it would be better to change, i never so any
other device, on any tested OS, calling the debugger when i connect to the serial console.

bye
Nicola





















Home | Main Index | Thread Index | Old Index