-1

I am just getting started with the BBB booting from a micro SD card. I loaded the BeagleBone Black Debian Wheezy 7.0.0 image onto micro SD card as instructed at: http://elinux.org/Beagleboard:Debian_On_BeagleBone_Black

Until now I have been booting from the flash on the BBB and using the mini USB to USB cable as well as a USB to TTL Serial using an FTDI cable. In both cases I can open a terminal session with the board. My question is: When booting from the micro SD card can I also use one of the two serial connections to open a terminal session.

When I followed the booting instructions the board did start up (as noted by the LEDs) but the terminal remained unconnected.

There is a note at the website stating: "Also make sure you have a keyboard, mouse, display, and Ethernet connected" I am thinking when the BBB is booted from the SD card the image isn't configured to open a terminal session via the USB connection, only via an Ethernet connection. Your insight is appreciated. Thanks Jim

JimCzek
  • 305
  • 3
  • 16

1 Answers1

1

I don't have specific experience with BBB or even Debian, but here is some information that might help.

First, in order to use a serial console, the kernel has to be compiled with that option enabled. From a quick google search, I am guessing that the Debian kernels do have serial console support enabled so hopefully that aspect should be ok.

The next aspect is that the kernel needs to be told which serial port(s) should be used as consoles. This is specified with the 'console' kernel command line argument, which would look something like this:

console=ttyS0,115200

The kernel gets its command line arguments from the bootloader. From what I read, the Beaglebone uses UBoot, and is configured to read them from a file called uEnv.txt which should be placed in the boot partition, alongside the kernel. This file should contain a line with the text

optargs= console=ttyS0,115200

If that file already exists, just add the 'console=...' to any existing arguments.

Having done this, Linux should consider the serial port as a console, configured at the baud rate shown after the comma. You should start to see kernel output as the kernel boots up, but you still may not be able to log in using the serial port. To do that, you need to add a line to the file /etc/inittab, telling the system to start a program called getty towards the serial port, which allows you to log in.

So, edit /etc/inittab and add a line like this:

s0:2345:respawn:/sbin/getty -L 115200 ttyS0 vt102

Needless to say, if you cannot even log into the machine, editing these files might present somewhat of a challenge. You might have to mount the sd card on another linux system so that you can modify the needed files.

Hopefully, after doing this and booting the system up on it's new configuration, you will be able to log in via the serial port.

Some references:

harmic
  • 22,855
  • 3
  • 52
  • 72