The OMAPL137 EVM only has one serial port available as ttyS2. Uboot uses this port to boot from, and the console is typically used on ttyS2 as well.
My problem is that I need to use ttyS2 for something else.
I have tried installing a ftdi based usb to serial converter on the usb port, setting the bootargs in Uboot to use console=ttyUSB0,115200n8, and enabling a getty in my inittab on ttyUSB0 rather than ttyS2. When I boot the board, the uboot command line comes up on ttyS2 as it should, but then the kernel boot messages continue to output on ttyS2 (nothing on ttyUSB0).
At the end of the kernel boot log, when the getty should come up, it prints:
"can't open /dev/ttyUSB0: No such device".
At that point, I have a line in my inittab that forces the ftdi adapter to install, because it hasn't been automounted yet. I use:
"tty1::once:/sbin/modprobe ftdi_sio vendor=0x0403 product=0x6001"
Then, still on ttyS2, the I see the kernel boot info where it detects the ftdi device on the USB and puts it on ttyUSB0. For some reason it continues with all of the same output the first time it set up USB, it detects the ftdi device AGAIN. Then i see "console [ttyUSB0] enabled". Nothing comes up on ttyUSB0, but ttyS2 does show "ftdi_sio ttyUSB0: ftdi_submit_read_urb - failed submitting read urb, error -22". It waits a few seconds and then repeats that like 5 times. Then I see "can't open /dev/ttyUSB0: Invalid argument". Meanwhile, I'm getting output on ttyUSB0 but it's all gibberish. I'm not entirely certain I'm using the right cabling between my PC and the EVM.
For reference, if I leave the bootargs in Uboot to conole=ttyS2 and just set the getty in my inittab to use ttyUSB0, I see the kernel boot on ttyS2 and the login prompt comes up as expected on ttyUSB0.
The problem with this is that I think the port is still occupied by the console because when I try to read from the port, the read() blocks indefinitely even though I know data is being transmitted. I'm certain that my application is working correctly, because when I boot with ttyS2 in my bootargs and as the getty in inittab, I can receive data fine over the ttyUSB0.
I'm not too concerned about uboot coming up over ttyUSB0, because I think that would take a lot of work, but can anyone help me get the console to come up over ttyUSB0 so that ttyS2 is free?