OS image: tinit/ksh

Hello,

I am trying to build a OS image for a cf-disk (IDE) on a x86 with QNX 6.3.2 PE.

Basically it is no problem, but I can’t get ksh and tinit to work together from my sysinit script.

(All apps are present on the cf disk.)

Here are snippets from my buildfile etc:


Buildfile:

[+script] startup-script = {
procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

Not Needed for a 486

seedres

pci-bios &

waitfor /dev/pci

devb-eide &
waitfor /dev/hd0t77 10

mount /dev/hd0t77 /
waitfor /etc 10

[+session] ksh /etc/config/sysinit
}

/etc/config/sysinit:

#!/bin/sh

echo “Sysinit started”

export PATH=/sbin:/bin

devc-con -n4 &
reopen /dev/con1

pipe &
mqueue &
devc-pty &

export SYSNAME=nto
export TERM=qansi

tinit &

/etc/config/ttys:

con1 “/bin/ksh” qansi-m on
con2 “/bin/ksh” qansi-m on
con3 “/bin/ksh” qansi-m on
con4 “/bin/ksh” qansi-m on

I get no errors, but I can’t enter any command.
I see the message “Sysinit started”.
I also don’t get an “#” sign. I can switch to the 4 consoles, but I can’t
use them.

If I start the shells directly from the bootfile, all works fine.

What I basically want:

An OS image which only starts the IDE driver and mount /.
Then pass the control to a sysinit script.

The sysinit script should start (and restart using tinit) 4 consoles.

If that works, I want to add network etc.

But I can’t get these consoles to work from inside the sysinit script.

Thank you very much for the help !

Best regards

Fiffi

I think you might need to include shared lib and some binary files into your image if you haven’t done so already. also why don’t you try to have one startup-script file instead of many different ones. I don’t see the point of having sysinit and ttys
ie:

libc.so
io-blk.so
cam-disk.so
devc-con
waitfor
pipe
mqueue
devb-eide
sh=/bin/ksh

etc…

The shared libs and binarys are inside the image.

I want to have a sysinit file, that the startup can be easily be changed with a text editor on the target or via e.g. SAMBA. (No need for mkifs on the target …)

The consoles are only for service/maintenance, when a monitor and keyboard will be connected.

tinit should restart the shell when a user enters “exit”…

can you post your complete build file, I’ll try to build it and debug it.

In the attachment is the build file, the sysinit file and the output of “ls -ortR” on the root filesystem of the cf-disk.

Thank you very much for your help !

I found the errors in the build file and the sysinit file.

The main problem was, that I started tinit using “tinit &” instead of “tinit”.

In the attachment are the working files.