/dev/tty on PPC

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael

Run devc-pty on your target.

Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael








\

Jay Greig schrieb:

Run devc-pty on your target.

It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is no
/dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell to
have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a runnig
process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael

Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael








\

My apologies, I replied too quickly. On x86, the default terminal is
set to be the console (devc-con), while on an embedded non-x86 target,
the default terminal is often set to be the first serial port. You will
have to run the serial driver (devc-ser[whatever]) in order to get /dev/tty.

Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.


It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is no
/dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell to
have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a runnig
process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael








\

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal is
set to be the console (devc-con), while on an embedded non-x86 target,
the default terminal is often set to be the first serial port. You will
have to run the serial driver (devc-ser[whatever]) in order to get
/dev/tty.
It is already running, but no /dev/tty.

/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon terminal
it is an alias for /dev/ttypX, on the pc text-console(devc-con) it is an
alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using /dev/tty.

-Michael


Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.



It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is
no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell
to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael








\

Can you post a small build file that demonstrates this. Procnto does register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal is
set to be the console (devc-con), while on an embedded non-x86 target,
the default terminal is often set to be the first serial port. You
will have to run the serial driver (devc-ser[whatever]) in order to
get /dev/tty.

It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon terminal
it is an alias for /dev/ttypX, on the pc text-console(devc-con) it is an
alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using /dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.




It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is
no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell
to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael









\


cburgess@qnx.com

I found the place in my buildfile, which cause my problem:

[+session] fesh /etc/system/sysinit # Call startup script

With this line I call my startup-script on the actual root filesystem.
Last line in my sysinit file is “exec login”, so I never come back to
the buildfile script.

It looks like my sysinit script does not inherit the /dev/tty from the
buildfile script.
If I exit my sysinit script and start a fesh in the buildfile script,
/dev/tty comes back.

You can test this by calling following script with “fesh /myScript” from
your buildfile:

myScript

exec fesh

myScript end

If this behaviour is correct, what is the recommended way to give
control to my startup-script, without loosing /dev/tty?

-Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal is
set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever]) in
order to get /dev/tty.


It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon terminal
it is an alias for /dev/ttypX, on the pc text-console(devc-con) it is
an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.





It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is
no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell
to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael









\

I have made some additional Tests.
My problem is independent from CPU architecture. Sorry about my former
assumption.
Attached you will find a floppy image for x86 PC:

  • At the first prompt type “els /dev” => Not there.
  • Type “exit” and you will get back to the ifs-Script, type “els
    /dev/tty” => /dev/tty shows up again.

Additionally attached you will find the used ifs build file.

If you have any workaround, to give control to my start script without
loosing /dev/tty, please let me know.

Thanks in advance
Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal is
set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever]) in
order to get /dev/tty.


It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon terminal
it is an alias for /dev/ttypX, on the pc text-console(devc-con) it is
an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.





It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there is
no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a shell
to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael









\

Unfortunately the build file attachment is 0 bytes in size

Michael Tasche wrote:

I have made some additional Tests.
My problem is independent from CPU architecture. Sorry about my former
assumption.
Attached you will find a floppy image for x86 PC:

  • At the first prompt type “els /dev” => Not there.
  • Type “exit” and you will get back to the ifs-Script, type “els
    /dev/tty” => /dev/tty shows up again.

Additionally attached you will find the used ifs build file.

If you have any workaround, to give control to my start script without
loosing /dev/tty, please let me know.

Thanks in advance
Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal
is set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever])
in order to get /dev/tty.



It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon
terminal it is an alias for /dev/ttypX, on the pc
text-console(devc-con) it is an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.






It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there
is no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a
shell to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael











\


cburgess@qnx.com

Ok, I reproduced this and found a bug. The /dev/tty device is not created until the last
executable in the boot script has finished (or is in the background)

So the workaround for now is to change your command to

[+session] fesh /startup-script &

and then at the end of startup-script

exec login < /dev/con1

Michael Tasche wrote:

I found the place in my buildfile, which cause my problem:

[+session] fesh /etc/system/sysinit # Call startup script

With this line I call my startup-script on the actual root filesystem.
Last line in my sysinit file is “exec login”, so I never come back to
the buildfile script.

It looks like my sysinit script does not inherit the /dev/tty from the
buildfile script.
If I exit my sysinit script and start a fesh in the buildfile script,
/dev/tty comes back.

You can test this by calling following script with “fesh /myScript” from
your buildfile:

myScript

exec fesh

myScript end

If this behaviour is correct, what is the recommended way to give
control to my startup-script, without loosing /dev/tty?

-Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal
is set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever])
in order to get /dev/tty.



It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon
terminal it is an alias for /dev/ttypX, on the pc
text-console(devc-con) it is an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.






It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there
is no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a
shell to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael










\


cburgess@qnx.com

Colin Burgess schrieb:

Unfortunately the build file attachment is 0 bytes in size
Ups, my fault.

I attached it again.

Michael Tasche wrote:

I have made some additional Tests.
My problem is independent from CPU architecture. Sorry about my former
assumption.
Attached you will find a floppy image for x86 PC:

  • At the first prompt type “els /dev” => Not there.
  • Type “exit” and you will get back to the ifs-Script, type “els
    /dev/tty” => /dev/tty shows up again.

Additionally attached you will find the used ifs build file.

If you have any workaround, to give control to my start script without
loosing /dev/tty, please let me know.

Thanks in advance
Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal
is set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever])
in order to get /dev/tty.




It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon
terminal it is an alias for /dev/ttypX, on the pc
text-console(devc-con) it is an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.







It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there
is no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a
shell to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael











\

Colin,
many thanks for the workaround.

-Michael

Colin Burgess schrieb:

Ok, I reproduced this and found a bug. The /dev/tty device is not
created until the last
executable in the boot script has finished (or is in the background)

So the workaround for now is to change your command to

[+session] fesh /startup-script &

and then at the end of startup-script

exec login < /dev/con1

Michael Tasche wrote:

I found the place in my buildfile, which cause my problem:

[+session] fesh /etc/system/sysinit # Call startup script

With this line I call my startup-script on the actual root filesystem.
Last line in my sysinit file is “exec login”, so I never come back to
the buildfile script.

It looks like my sysinit script does not inherit the /dev/tty from the
buildfile script.
If I exit my sysinit script and start a fesh in the buildfile script,
/dev/tty comes back.

You can test this by calling following script with “fesh /myScript”
from your buildfile:

myScript

exec fesh

myScript end

If this behaviour is correct, what is the recommended way to give
control to my startup-script, without loosing /dev/tty?

-Michael

Colin Burgess schrieb:

Can you post a small build file that demonstrates this. Procnto does
register /dev/tty on all platforms (and yes it’s a magic
file that points to the controlling terminal of the process)

I see it on PPC targets here…

Michael Tasche wrote:

Jay Greig schrieb:

My apologies, I replied too quickly. On x86, the default terminal
is set to be the console (devc-con), while on an embedded non-x86
target, the default terminal is often set to be the first serial
port. You will have to run the serial driver (devc-ser[whatever])
in order to get /dev/tty.




It is already running, but no /dev/tty.
/dev/tty points to the actual console of a running process.
On a serial console it is an alias for /dev/serX, on a photon
terminal it is an alias for /dev/ttypX, on the pc
text-console(devc-con) it is an alias for /dev/conX,…
It seems to me, that only procnto can manage this.
But why is this feature not there on non-x86 targets?
Should be a hardware independent feature, shouldn’t it?

Many open-source projects, like openssh, dropbear etc. are using
/dev/tty.

-Michael



Michael Tasche wrote:

Jay Greig schrieb:

Run devc-pty on your target.







It runs already and I have /dev/ttyp0, /dev/ttyp1, …, but there
is no /dev/tty.
On x86 you only need procnto, a devc-xxx for console I/O and a
shell to have a /dev/tty.

/dev/tty seems to be an alias for the actual console device of a
runnig process.
So “echo Hello >/dev/tty” does the same as “echo Hello”.

Looks like procnto installs /dev/tty on x86, but not on ppc.
Any ideas?

-Michael


Michael Tasche wrote:

Hi all,

how can I get the device /dev/tty on PPC-Targets.
On a minimal x86-system the device ist there.
Does QNX only support /dev/tty on x86-Systems?

Thanks in advance
Michael










\