"can't open /dev/ttyO2: No such file or directory"

2,449 views
Skip to first unread message

gerard_mp

unread,
Aug 5, 2011, 10:01:39 AM8/5/11
to Beagle Board
Hello,

I've successfully built Kernel 3.0, using the patches provided in meta-
texasinstruments GIT repo. I've also built U-boot 2011.06 (also with
some patches from the same repo). Finally, I've build a base file
system using build-root. Everything seems to work well, Kernel shows
all messages, network turns up, but when it is to launch getty for
login prompt, it stucks forever showing each second:

can't open /dev/ttyO2: No such file or directory
can't open /dev/ttyO2: No such file or directory
...

Is there a known solution for that? May I should attach more details?

Thanks!

Robert Nelson

unread,
Aug 5, 2011, 10:08:35 AM8/5/11
to beagl...@googlegroups.com

In your config did you enable the omap serial driver? (ttyO2)
otherwise you may just have the older "generic" serial driver
enabled.. (ttyS2)..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

gerard_mp

unread,
Aug 5, 2011, 11:03:51 AM8/5/11
to Beagle Board
Yes, I have enabled it. When kernel boots up, omap-serial messages
appear identifying each ttyO.
The only thread I've found with a similar problem is
http://www.mail-archive.com/linux...@vger.kernel.org/msg42645.html .
However, the solution is not clearly explained.


On Aug 5, 4:08 pm, Robert Nelson <robertcnel...@gmail.com> wrote:

Ian Key

unread,
Aug 5, 2011, 10:38:17 AM8/5/11
to beagl...@googlegroups.com



From: Robert Nelson <robert...@gmail.com>
To: beagl...@googlegroups.com
Sent: Friday, 5 August 2011, 15:08
Subject: Re: [beagleboard] "can't open /dev/ttyO2: No such file or directory"

On Fri, Aug 5, 2011 at 9:01 AM, gerard_mp <gerard...@gmail.com> wrote:
> Hello,
>
> I've successfully built Kernel 3.0, using the patches provided in meta-
> texasinstruments GIT repo. I've also built U-boot 2011.06 (also with
> some patches from the same repo). Finally, I've build a base file
> system using build-root. Everything seems to work well, Kernel shows
> all messages, network turns up, but when it is to launch getty for
> login prompt, it stucks forever showing each second:
>
> can't open /dev/ttyO2: No such file or directory
> can't open /dev/ttyO2: No such file or directory

That looks like a capitol letter o (the letter before p). Should it not be a zero?

Ian


> ...
>
> Is there a known solution for that? May I should attach more details?

In your config did you enable the omap serial driver? (ttyO2)
otherwise you may just have the older "generic" serial driver
enabled.. (ttyS2)..

Regards,

--
Robert Nelson
http://www.rcn-ee.com/

--
You received this message because you are subscribed to the Google Groups "Beagle Board" group.
To post to this group, send email to beagl...@googlegroups.com.
To unsubscribe from this group, send email to beagleboard+unsub...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.



Bill Traynor

unread,
Aug 5, 2011, 11:54:54 AM8/5/11
to beagl...@googlegroups.com
On Fri, Aug 5, 2011 at 10:38, Ian Key <ian...@yahoo.com> wrote:
>
>
> ________________________________
> From: Robert Nelson <robert...@gmail.com>
> To: beagl...@googlegroups.com
> Sent: Friday, 5 August 2011, 15:08
> Subject: Re: [beagleboard] "can't open /dev/ttyO2: No such file or
> directory"
>
> On Fri, Aug 5, 2011 at 9:01 AM, gerard_mp <gerard...@gmail.com> wrote:
>> Hello,
>>
>> I've successfully built Kernel 3.0, using the patches provided in meta-
>> texasinstruments GIT repo. I've also built U-boot 2011.06 (also with
>> some patches from the same repo). Finally, I've build a base file
>> system using build-root. Everything seems to work well, Kernel shows
>> all messages, network turns up, but when it is to launch getty for
>> login prompt, it stucks forever showing each second:
>>
>> can't open /dev/ttyO2: No such file or directory
>> can't open /dev/ttyO2: No such file or directory
>
> That looks like a capitol letter o (the letter before p). Should it not be a
> zero?

Nope, it's a capital O, as in the letter after P.

Have a look at arch/arm/plat-omap/include/plat/omap-serial.h for the following:

/*
* Use tty device name as ttyO, [O -> OMAP]
* in bootargs we specify as console=ttyO0 if uart1
* is used as console uart.
*/
#define OMAP_SERIAL_NAME "ttyO"


>
> Ian
>
>> ...
>>
>> Is there a known solution for that? May I should attach more details?
>
> In your config did you enable the omap serial driver? (ttyO2)
> otherwise you may just have the older "generic" serial driver
> enabled.. (ttyS2)..
>
> Regards,
>
> --
> Robert Nelson
> http://www.rcn-ee.com/
>
> --
> You received this message because you are subscribed to the Google Groups
> "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to

> beagleboard...@googlegroups.com.


> For more options, visit this group at
> http://groups.google.com/group/beagleboard?hl=en.
>
>
>

> --
> You received this message because you are subscribed to the Google Groups
> "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to

> beagleboard...@googlegroups.com.

Sid Boyce

unread,
Aug 5, 2011, 12:06:09 PM8/5/11
to beagl...@googlegroups.com
It should be "zero2". How and why it's that way I don't know as ls -l /dev/tty* will return /dev/tty /dev/tty1 /dev/tty2 etc.
Regards
Sid.
-- 
Sid Boyce ... Hamradio License G3VBV, Licensed Private Pilot
Emeritus IBM/Amdahl Mainframes and Sun/Fujitsu Servers Tech Support
Senior Staff Specialist, Cricket Coach
Microsoft Windows Free Zone - Linux used for all Computing Tasks

Sid Boyce

unread,
Aug 5, 2011, 12:09:00 PM8/5/11
to beagl...@googlegroups.com
Oops, it /dev/tty_<letter O>2.
# l /dev/ttyO*
crw-rw---- 1 root dialout 252, 0 2011-06-27 15:36 /dev/ttyO0
crw-rw---- 1 root dialout 252, 1 2011-06-27 15:36 /dev/ttyO1
crw------- 1 root tty     252, 2 2011-08-04 16:16 /dev/ttyO2
crw-rw---- 1 root dialout 252, 3 2011-06-27 15:36 /dev/ttyO3


Regards
Sid.

On 05/08/11 15:38, Ian Key wrote:

gerard_mp

unread,
Aug 5, 2011, 12:48:35 PM8/5/11
to Beagle Board

As other people say, it is a capital "O", not a zero. Is it possible
that I have both, old generic and new enabled? I can see one message
from 8250 driver at startup, prior to omap-serial messages. I cannot
remove 8250 driver from menuconfig hm.. Probably some dependency?

Thanks.

On Aug 5, 4:38 pm, Ian Key <ian_...@yahoo.com> wrote:
> ________________________________
> From: Robert Nelson <robertcnel...@gmail.com>
> To: beagl...@googlegroups.com
> Sent: Friday, 5 August 2011, 15:08
> Subject: Re: [beagleboard] "can't open /dev/ttyO2: No such file or directory"
>
> On Fri, Aug 5, 2011 at 9:01 AM, gerard_mp <gerardmar...@gmail.com> wrote:
> > Hello,
>
> > I've successfully built Kernel 3.0, using the patches provided in meta-
> > texasinstruments GIT repo. I've also built U-boot 2011.06 (also with
> > some patches from the same repo). Finally, I've build a base file
> > system using build-root. Everything seems to work well, Kernel shows
> > all messages, network turns up, but when it is to launch getty for
> > login prompt, it stucks forever showing each second:
>
> > can't open /dev/ttyO2: No such file or directory
> > can't open /dev/ttyO2: No such file or directory
>
> That looks like a capitol letter o (the letter before p). Should it not be a zero?
>
> Ian
>
> > ...
>
> > Is there a known solution for that? May I should attach more details?
>
> In your config did you enable the omap serial driver? (ttyO2)
> otherwise you may just have the older "generic" serial driver
> enabled.. (ttyS2)..
>
> Regards,
>
> --
> Robert Nelsonhttp://www.rcn-ee.com/
>
> --
> You received this message because you are subscribed to the Google Groups "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.
> To unsubscribe from this group, send email to beagleboard...@googlegroups.com.

Gary Thomas

unread,
Aug 5, 2011, 12:01:45 PM8/5/11
to beagl...@googlegroups.com, gerard_mp
On 2011-08-05 09:03, gerard_mp wrote:
> Yes, I have enabled it. When kernel boots up, omap-serial messages
> appear identifying each ttyO.
> The only thread I've found with a similar problem is
> http://www.mail-archive.com/linux...@vger.kernel.org/msg42645.html .
> However, the solution is not clearly explained.

That message just reiterates what Robert already said.

Maybe this is a udev problem? If your network comes up, SSH into the
board and poke around...

> On Aug 5, 4:08 pm, Robert Nelson<robertcnel...@gmail.com> wrote:
>> On Fri, Aug 5, 2011 at 9:01 AM, gerard_mp<gerardmar...@gmail.com> wrote:
>>> Hello,
>>
>>> I've successfully built Kernel 3.0, using the patches provided in meta-
>>> texasinstruments GIT repo. I've also built U-boot 2011.06 (also with
>>> some patches from the same repo). Finally, I've build a base file
>>> system using build-root. Everything seems to work well, Kernel shows
>>> all messages, network turns up, but when it is to launch getty for
>>> login prompt, it stucks forever showing each second:
>>
>>> can't open /dev/ttyO2: No such file or directory
>>> can't open /dev/ttyO2: No such file or directory
>>> ...
>>
>>> Is there a known solution for that? May I should attach more details?
>>
>> In your config did you enable the omap serial driver? (ttyO2)
>> otherwise you may just have the older "generic" serial driver
>> enabled.. (ttyS2)..
>>
>> Regards,
>>
>> --
>> Robert Nelsonhttp://www.rcn-ee.com/
>

--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------

Gary Thomas

unread,
Aug 5, 2011, 12:13:28 PM8/5/11
to beagl...@googlegroups.com, Sid Boyce
On 2011-08-05 10:06, Sid Boyce wrote:
> It should be "zero2". How and why it's that way I don't know as ls -l /dev/tty* will return /dev/tty /dev/tty1 /dev/tty2 etc.

Hogwash. From my BeagleBoard, running Yocto with 2.6.37 kernel:
root@beagleboard:~# ls -l /dev/tty*
crw-rw-rw- 1 root tty 5, 0 Jul 26 13:23 /dev/tty
crw--w---- 1 root root 4, 0 Jul 26 13:23 /dev/tty0
crw--w--w- 1 root root 4, 1 Aug 4 00:26 /dev/tty1
crw--w---- 1 root tty 4, 10 Jul 26 13:23 /dev/tty10
crw--w---- 1 root tty 4, 11 Jul 26 13:23 /dev/tty11
crw--w---- 1 root tty 4, 12 Jul 26 13:23 /dev/tty12
crw--w---- 1 root tty 4, 13 Jul 26 13:23 /dev/tty13
crw--w---- 1 root tty 4, 14 Jul 26 13:23 /dev/tty14
crw--w---- 1 root tty 4, 15 Jul 26 13:23 /dev/tty15
crw--w---- 1 root tty 4, 16 Jul 26 13:23 /dev/tty16
crw--w---- 1 root tty 4, 17 Jul 26 13:23 /dev/tty17
crw--w---- 1 root tty 4, 18 Jul 26 13:23 /dev/tty18
crw--w---- 1 root tty 4, 19 Jul 26 13:23 /dev/tty19
crw--w---- 1 root tty 4, 2 Jul 26 13:23 /dev/tty2
...
crw--w---- 1 root tty 4, 63 Jul 26 13:23 /dev/tty63
crw--w---- 1 root tty 4, 7 Jul 26 13:23 /dev/tty7
crw--w---- 1 root tty 4, 8 Jul 26 13:23 /dev/tty8
crw--w---- 1 root tty 4, 9 Jul 26 13:23 /dev/tty9
crw------- 1 root root 253, 0 Aug 4 00:26 /dev/ttyO0
crw-rw---- 1 root dialout 253, 1 Jul 26 13:23 /dev/ttyO1
crw-rw---- 1 root dialout 253, 2 Jul 26 13:23 /dev/ttyO2
crw-rw---- 1 root dialout 4, 64 Jul 26 13:23 /dev/ttyS0
crw-rw---- 1 root dialout 4, 65 Jul 26 13:23 /dev/ttyS1
crw-rw---- 1 root dialout 4, 66 Jul 26 13:23 /dev/ttyS2
crw-rw---- 1 root dialout 4, 67 Jul 26 13:23 /dev/ttyS3

These devices are all created by udev when the system boots. If you're
not getting a list like this, it's a udev problem.

> On 05/08/11 15:38, Ian Key wrote:
>>
>>

>> ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>> *From:* Robert Nelson <robert...@gmail.com>
>> *To:* beagl...@googlegroups.com
>> *Sent:* Friday, 5 August 2011, 15:08
>> *Subject:* Re: [beagleboard] "can't open /dev/ttyO2: No such file or directory"

> --
> You received this message because you are subscribed to the Google Groups "Beagle Board" group.
> To post to this group, send email to beagl...@googlegroups.com.

> To unsubscribe from this group, send email to beagleboard...@googlegroups.com.


> For more options, visit this group at http://groups.google.com/group/beagleboard?hl=en.

--

Óscar Gómez Fuente

unread,
Feb 7, 2012, 3:15:16 PM2/7/12
to beagl...@googlegroups.com
Hi, Gerard I've got the same problem that you.

MLO: U-Boot SPL 2011.12-00201-g137703b-dirty
U-Boot: U-Boot 2011.12-00201-g137703b-dirty

Kernel: Linux-3.3.0-rc1-00287-gacb42a3

And roofs made with buildroot: Linux-3.3.0-rc1-00287-gacb42a3


MLO and  U-boot work fine but after of load uImage appears this message:

...


[ 5.314727] EXT3-fs (mmcblk0p2): using internal journal

[ 5.325714] EXT3-fs (mmcblk0p2): recovery complete

[ 5.330902] EXT3-fs (mmcblk0p2): mounted filesystem with ordered data mode

[ 5.338928] VFS: Mounted root (ext3 filesystem) on device 179:2.

[ 5.345916] Freeing init memory: 304K

Starting logging: OK

Initializing random number generator...

done.

Starting network...

run-parts: /etc/network/if-post-up.d: No such file or directory

Starting network time protocol daemon: ntpd.

Starting dropbear sshd:

OK

can't open /dev/ttyO2: No such file or directory

can't open /dev/ttyO2: No such file or directory


...


Did you solve the problem?

Thank you so much. Best regards.

tarak...@gmail.com

unread,
Mar 23, 2019, 11:50:12 PM3/23/19
to BeagleBoard
I faced the same issue.

I have built my rootfs using buildroot. The kernel image, MLO, and UBoot were built externally. And also the toolchain were used externally.

In my case, after the kernel boots(NFS-boot), before the login prompt, the serial terminal fails and the error is printed continuously "Can't open /dev/ttyO0. No such file or directory".
And I coudnt operate the system with my terminal(minicom). Luckily I installed ssh, so I could log in to the system using ssh. Then I used dmesg to see some logs:
# dmesg | grep tty
I found this message: WARNING: Your 'console=ttyO0' has been replaced by 'ttyS0'
So I just tried to rename my ttyS0 with ttyO0 back again. Magically my serial terminal was back to control. I don't know the details of how it worked but it did work.
All I have to find out is to let the kernel identify the appropriate tty device file correctly.

FYI, I am a beginner in Embedded Linux and Linux kernel as a whole so please bear with me.

Thank you.
Reply all
Reply to author
Forward
0 new messages