Looking for FreeBSD u-boot/kernel debugging help (BeagleBone Black)

Warner Losh imp at bsdimp.com
Sun Apr 27 18:37:43 UTC 2014


On Apr 27, 2014, at 11:04 AM, Ian Lepore <ian at FreeBSD.org> wrote:

> On Sat, 2014-04-26 at 16:34 -0700, Bakul Shah wrote:
>> On Sat, 26 Apr 2014 18:29:35 EDT Winston Smith <smith.winston.101 at gmail.com> wrote:
>>>                             I also discovered that if I disconnect my
>>> serial terminal and reconnect it, it seems to bring the FreeBSD kernel
>>> to a debug prompt of sorts -- is there any documentation on this?
>> 
>> I suspect disconnecting/reconnecting the serial cable looks like
>> a break to the kernel and that drops it into the debugger "ddb".
>> [Though I can't seem to send a real break to it using kermit!]
>> 
>> Type c and hit return to continue. 
>> 
>> To disable this behavior I think you can do
>> 	sysctl debug.kbd.break_to_debugger=0
>> or add
>> 	debug.kbd.break_to_debugger=0
>> to /etc/sysctl.conf
>> 
>> man 1 ddb -- for debugger commands
>> man 4 ddb -- for kernel config options to control ddb behavior
> 
> That's exactly correct -- connecting the cable sometimes leads to a
> spurious break being asserted on the line (a break is just a long
> sequence of zeroes with no start/stop/data bit transitions).
> 
> It's possible to configure a kernel without BREAK_TO_DEBUGGER and with
> ALT_BREAK_TO_DEBUGGER.  That eliminates most line-noise spurious breaks
> but still allows the <CR> ~ ^b break sequence (which could theoretically
> happen in a burst of line noise, but not likely).  A few of our kernels
> have BREAK_TO_DEBUGGER in the config, and I think that's probably a
> mistake.  Most folks these days don't know anything about breaks or how
> to generate one on purpose.  
> 
> Any objections to removing them and using only the safer ALT_BREAK
> option?

Please leave it in the ATMEL config, but I think you can remove it from the rest (including the specific atmel SoC boards).

Warner


More information about the freebsd-arm mailing list