Starting ksh in boot image gives "sh: j_init: tcgetpgrp() fa

Q1. I am trying to start a shell from my boot image (see attached build
file).

When I run the fesh,
===========================(
[+script] .script = {

SYSNAME=nto
TERM=q-ansi

devc-pty

reopen /dev/con1

[+session] sh

}

[data=copy]

sh=fesh

===========================)
I get no errors.



When I run the ksh,
===========================(
[+script] .script = {

SYSNAME=nto
TERM=q-ansi

devc-pty

reopen /dev/con1

[+session] sh

}

[data=copy]

sh=ksh

===========================)
I get:

sh: j_init: tcgetpgrp() failed: Inappropriate I/O control operation
sh: warning: won’t have full job control


Q2. Also for the same build file, when I run pci-bios, I get:

Can’t locate PNP bios (No error)

Alain Achkar <js@simplytech.com> wrote:

When I run the ksh,
===========================(
[+script] .script = {

SYSNAME=nto
TERM=q-ansi

devc-pty

reopen /dev/con1

Do you actually run devc-con?

If not, the reopen will fail. Then the sh will be running on
the stdout of the boot process – essentially Proc’s debug device
which is NOT a proper terminal device. So, most of the tc*() library
will fail as they are terminal control routines.

fesh doesn’t provide job control, so it doesn’t get into many of
the tc*() routines, and in particular doesn’t do the tcgetpgrp(),
so won’t see the failure. The ksh provides more functionality, but
to do so, needs more terminal capabilities. This warning is that
it tried to get them, but couldn’t.

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com

Thanks David for the clarification - I am running devc-con.

Please verify the attached atx-base.build in the originial post in case
I am not invoking it properly (maybe wrong command-line args?)

I think devc-con is running since pidin shows it and since I can switch
consoles with Ctlr-Alt-1, Ctrl-Alt-2, Ctrl-Alt-3.

Any other suggestions?

Do you have sample build files other than the ones in the QNX docs?

David Gibbs wrote:

Alain Achkar <> js@simplytech.com> > wrote:

When I run the ksh,
===========================(
[+script] .script = {





SYSNAME=nto
TERM=q-ansi


devc-pty


reopen /dev/con1


Do you actually run devc-con?

If not, the reopen will fail. Then the sh will be running on
the stdout of the boot process – essentially Proc’s debug device
which is NOT a proper terminal device. So, most of the tc*() library
will fail as they are terminal control routines.

fesh doesn’t provide job control, so it doesn’t get into many of
the tc*() routines, and in particular doesn’t do the tcgetpgrp(),
so won’t see the failure. The ksh provides more functionality, but
to do so, needs more terminal capabilities. This warning is that
it tried to get them, but couldn’t.

-David

Alain Achkar <js@simplytech.com> wrote:

Thanks David for the clarification - I am running devc-con.

Please verify the attached atx-base.build in the originial post in case
I am not invoking it properly (maybe wrong command-line args?)

I missed that there was a build file attached to the original, sorry.
On a quick read through, I don’t see a problem.

I think devc-con is running since pidin shows it and since I can switch
consoles with Ctlr-Alt-1, Ctrl-Alt-2, Ctrl-Alt-3.

Any other suggestions?

Try using tinit? It may be worth using tinit anyway, configured with
the /etc/config/ttys file. (tinit has the advantage that, if you
accidentally exit the shell, say by typing “exit” or hitting ctrl-D,
it will start another one for you automatically).

Do you have sample build files other than the ones in the QNX docs?

Other than the ones in /boot/build, not really. There’s one in each
BSP, but they’re generally pretty target specific, rather than x86
friendly.

Hm… and as for the pci-bios errors, I seem to recall they are
benign. (As in, someone looked at them, and said…oops debugging
code, those shouldn’t be being printed out.)

-David

David Gibbs
QNX Training Services
dagibbs@qnx.com