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 Sun-13-Oct-2024 16:08, Martin Husemann wrote:
On Sun, Oct 13, 2024 at 04:01:22PM +0200, Dr. Nicola Mingotti wrote:
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.
No, you are misunderstanding. There are two points:

  1) The kernel debugger is invoked when the serial port senses a BRK
     condition on the port. This is important for everyone when debugging
     a kernel. The change manuel porposed is one way to change this,
     another (a lot better) change is to use options CNMAGIC to customize
     this signal for your own kernel (e.g. use options CNMAGIC="\"+++++\"").

     This is something we do not want to change for the default kernels.

  2) Some hardware generates a bogus BRK condition when the serial connector
     is removed or pluged in. This can be fixed at the hardware level
     via pull-up resistors, but a lot easier is to (localy) work around
     it by just configuring a different CNMAGIC.

     If you system boots up automatically and you don't need serial console
     untill you reach userland, you can configure this (besides custom
     kernel aproaches from (1)) via setting hw.cnmagic in /etc/sysctl.conf

     This way you do not need a customized kernel and the change is still
     local to your setup.


Martin

Hi Martin,

(this post came out a bit too long and chatty, if in short time read from ** Personally the problem for me is solved .... )

I see, still permit me to propose solution, which i think will help
new potential users trying NetBSD in embedded platforms
without getting surprises. And will leave the kernel as it is.

Intro considerations

1. Let's exclude modding the BBB connector  with a resistor.
This is out of reach for (i estimate) minimum 50% of potential users. Many times
these platform are an introduction to the world of electronics for the user,
so it was for me, when i started i had no idea what a pull-down was.
Also, all users of some platforms (which ones?) should be informed of the modding, where do we write it ?

2. The serial console (in BBB this is the  J1, in RPI is 3 pins on the GPIO, on a BBB-AI it has a special connector, so does in the RPi5 ... ) is used by default in all platform to configure the machines without keyboard and screen or when there are problem with the network. The machine behave wired: you take it to the office and serial console to it. Often is the first way a user logs into the new system. It should be safe. No surprises.

3. The newcomer in NetBSD in general can not be supposed to be able to even
recognize the debugger prompt, so it happened to me.

4. Most newcomer will come from Linux (preinstalled) since Linux is
In Linux as of today, the user is shielded from the concept of
recompiling the kernel and it never happened to me to be sent
to the kernel debugger in a stable OS release.

=> To reduce the frustration of the new user trying NetBSD <=

Tenet-1. The user of RELEASE  should not be asked to recompile the kernel in the first days of use of the system, e.g. to be able to use the serial console with ease, not to be bound to plug it it before boot and remove it only after power-down, which sounds like a very unusual requirement.

Tenet-2. The user of RELEASE should not be thrown into the kernel debugger
if he did not asked for it. Indeed we can't expect a beginner to be able to debug their kernel.

Existing way of solution.
It is very good there option to avoid recompiling the kernel via sysctl configuration !

** Personally the problem for me is solved, i know now i will put the sysctl configuration in all of my little devices **

But there are other Nicola, other new users out there, they will try NetBSD in embedded, get a bootable arm image, plug in the microSD, power the thing ... and doh, i forgot to pulgin the serial let's do it now => surprise.
I see Joel saying that he also hit the issue in another board.

I propose to set the sysctl parameter by default in all the RELEASE for bootable arm images from now on. (Of course, you know better the scope, this is just a simplistic attempt to set a policy )

It goes without saying this is just a beginner opinion and I will not push the thing further.

good night

nicola





































Home | Main Index | Thread Index | Old Index