Disabling Serial port ttyO2 in Overo built with Yocto

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Disabling Serial port ttyO2 in Overo built with Yocto

deva prakash
Hi all,

I am trying to use the serial port ttyO2 in the overo to connect to a serial device. Since that serial port is configured as a console port I am unable to use it. I looked up in the forums and there were suggestions to comment the getty line in /etc/inittab file. But I couldn't locate the inittab file in any of the folders. Since I am using the Yocto build, should I look at some other file? or Is there any other way by which I can free up the serial port ttyO2?

Thanks,
Devaprakash

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

Ash Charles
Hi Devaprakash,

In systemd-based systems, a getty is automatically started on the
device indicated by the 'console=<dev>' kernel parameter [1].  Yocto
uses the SERIAL_CONSOLES (SERIAL_CONSOLE as used in the meta-gumstix
layer is apparently deprecated...I learned something thanks to your
email...I should update this!) parameter [2] to configure this.

Depending on at what stage you need the serial port to be quiet,
you'll need to make a couple changes.
1. Just while board is operating in user space: probably just clear
out the SERIAL_CONSOLE variable.  You may need to stop [1] too.
2. Kernel boot + User space: modify the u-boot environment so it
doesn't pass a 'console' argument to the kernel.  I suspect the
'quiet' kernel parameter won't be enough.
3. U-boot + Kernel boot + User space: I suspect you'll need to mess
about with the CONFIG_CONS_INDEX u-boot parameter (and friends) to
redirect console output to a different uart.

Even with all of this, when Overo COMs boot, you'll still get some
random text burped out on the serial port---this is the OMAP3 boot rom
(i.e. unchangeable) testing to see if this UART is a bootable
interface.

HTH,
Ash

[1] http://0pointer.de/blog/projects/serial-console.html
[2] http://www.yoctoproject.org/docs/1.7.1/mega-manual/mega-manual.html#var-SERIAL_CONSOLES

On Mon, Feb 2, 2015 at 4:30 PM, deva prakash <[hidden email]> wrote:

> Hi all,
>
> I am trying to use the serial port ttyO2 in the overo to connect to a serial
> device. Since that serial port is configured as a console port I am unable
> to use it. I looked up in the forums and there were suggestions to comment
> the getty line in /etc/inittab file. But I couldn't locate the inittab file
> in any of the folders. Since I am using the Yocto build, should I look at
> some other file? or Is there any other way by which I can free up the serial
> port ttyO2?
>
> Thanks,
> Devaprakash
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

allsey87
Hi Ash,

Couldn't you just modify the pin muxing in board-overo.h so that the RX/TX signals aren't routed to any pads? 

Michael

On 5 February 2015 at 18:29, Ash Charles <[hidden email]> wrote:
Hi Devaprakash,

In systemd-based systems, a getty is automatically started on the
device indicated by the 'console=<dev>' kernel parameter [1].  Yocto
uses the SERIAL_CONSOLES (SERIAL_CONSOLE as used in the meta-gumstix
layer is apparently deprecated...I learned something thanks to your
email...I should update this!) parameter [2] to configure this.

Depending on at what stage you need the serial port to be quiet,
you'll need to make a couple changes.
1. Just while board is operating in user space: probably just clear
out the SERIAL_CONSOLE variable.  You may need to stop [1] too.
2. Kernel boot + User space: modify the u-boot environment so it
doesn't pass a 'console' argument to the kernel.  I suspect the
'quiet' kernel parameter won't be enough.
3. U-boot + Kernel boot + User space: I suspect you'll need to mess
about with the CONFIG_CONS_INDEX u-boot parameter (and friends) to
redirect console output to a different uart.

Even with all of this, when Overo COMs boot, you'll still get some
random text burped out on the serial port---this is the OMAP3 boot rom
(i.e. unchangeable) testing to see if this UART is a bootable
interface.

HTH,
Ash

[1] http://0pointer.de/blog/projects/serial-console.html
[2] http://www.yoctoproject.org/docs/1.7.1/mega-manual/mega-manual.html#var-SERIAL_CONSOLES

On Mon, Feb 2, 2015 at 4:30 PM, deva prakash <[hidden email]> wrote:
> Hi all,
>
> I am trying to use the serial port ttyO2 in the overo to connect to a serial
> device. Since that serial port is configured as a console port I am unable
> to use it. I looked up in the forums and there were suggestions to comment
> the getty line in /etc/inittab file. But I couldn't locate the inittab file
> in any of the folders. Since I am using the Yocto build, should I look at
> some other file? or Is there any other way by which I can free up the serial
> port ttyO2?
>
> Thanks,
> Devaprakash
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming. The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users


------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

Ash Charles
On Thu, Feb 5, 2015 at 9:43 AM, Michael Allwright <[hidden email]> wrote:
> Couldn't you just modify the pin muxing in board-overo.h so that the RX/TX
> signals aren't routed to any pads?
Seems very reasonable and worth a shot!  Good idea :)
--Ash

------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

loktiing
This post has NOT been accepted by the mailing list yet.
This post was updated on .
Hi, would like to know how do you modify the pin muxing in board-overo.c, I could not find any code section to tell gumstix to switch off console output to /dev/ttyO2 completely.

I only managed to configure boot.src to make console to stay quiet from Kernel boot + User space stages. But when I boot up the gumstix, I still get kernel messages thrown out from console just like what is shown in the picture:

Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

loktiing
This post has NOT been accepted by the mailing list yet.
I have tried pin muxing method in /board/overo/overo.h and it seems to disable the UART3 completely (not just console, but also other use). I could not use UART3 for communicating with external device.

So I think the only way to disable "U-boot + kernel boot + user space" consoles is by configuring the CONFIG_CONS_INDEX, but I have yet to test out this part. If anyone has idea kindly share. Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Disabling Serial port ttyO2 in Overo built with Yocto

loktiing
This post has NOT been accepted by the mailing list yet.
I found a way to enable the UART3 for other application usage without having kernel console messages being thrown out.

Before boot-up, disable UART3 pinmux in overo.h by switching UART3 pinmux from MODE 0 to MODE 7 (safe mode)
  Replace:
        MUX_VAL(CP(UART3_CTS_RCTX), (IEN  | PTD | EN  | M0)) /*UART3_CTS_RCTX*/\
        MUX_VAL(CP(UART3_RX_IRRX), (IEN  | PTU | EN  | M0)) /*UART3_RX_IRRX*/\
        MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M0)) /*UART3_TX_IRTX*/\
       
        With:
        MUX_VAL(CP(UART3_CTS_RCTX), (IEN  | PTD | EN  | M7)) /*UART3_CTS_RCTX*/\
        MUX_VAL(CP(UART3_RX_IRRX), (IEN  | PTU | EN  | M7)) /*UART3_RX_IRRX*/\
        MUX_VAL(CP(UART3_TX_IRTX), (IDIS | PTD | DIS | M7)) /*UART3_TX_IRTX*/\

and also modify u-boot script to send kernel console to null.

After boot-up in the user-space, enable the uart3 by doing the following:

echo 0x108 > /sys/kernel/debug/omap_mux/uart3_cts_rctx
echo 0x00 > /sys/kernel/debug/omap_mux/uart3_tx_irtx
echo 0x100 > /sys/kernel/debug/omap_mux/uart3_rx_irrx