need an example build file to start qnet (without tcpip)

I am working on a pc-104 system and have a desktop pc with qnx on it. The
pc-104 has an ethernet port on it.

pci -v reports:

vendor 100bh, National Semiconductor
device 20h, DP83815 10/100 Mb/s Ethernet controller

so I would assume I need:
devn-ns83815.so - right driver ???
io-net - to load driver and protocol
npm-qnet.so - for qnet protocol

devc-ser8250 - for a console
devc-con - if the vga board is plugged in (not in final version)
devb-fdc - for “sneaker.net” file transfers (not needed once qnet works)
devb-eide - for built in 32Mb flash IDE drive (boot and test code during
development)
fs-qnx4.so - to access qnx root.qfs file on flash drive
fs-dos.so - to access fat format partition on flash drive
cam-disk.so - for disk access
devb-ram - for a ram disk
io-blk.so - for disks ??
libc.so - standard library for “C” generated code
libcam.so - for cam-disk.so
pci-bios - for pci access

and some utility programs:
cat
chkdosfs
chkfsys
cp
df
dinit
echo
fdisk
fesh
hd
ln
ls
mkdir
more
mount
mqueue
mv
pci
pidin
pipe
ps
pwd
qcp
qtalk
rm
rz
seedres
shutdown
sin
slay
sleep
spatch
stty
sz
tinit
umount
unlink
use

Now you are probably thinking that I don’t need all this in the image if I
can connect via network. Problem is… The network connection is just for
debugging. It won’t be there once the board goes into its box, so all the
tools and apps have to be in the image or file system. You get free
compression if they are in the image.

The final configuration will have us booting from an image in about 1.2Mb of
flash on the mainboard that looks to it’s bios like a floppy drive. Problem
is that QNX’s devb-fdc does not see it as a floppy, because it doesn’t use
bios to access it, so once the boot image loads, nothing else is coming off
that pseudo floppy. Everything has to go into the image.

I want to be able to boot and run my app stand-alone, then connect an
ethernet cable, and access the box from a laptop or desktop running Qnx
(change the boot file, etc…).

Alternatively… If I can’t fit what I need on the floppy, we can add in the
32Mb flash drive on the final product, but I would prefer to avoid the extra
cost if we can do without it. It should be no problem fitting our
application and some subset of the tools on the 1.2Mb I have available.

Thanks,

John Eddy

John Eddy <john.h.eddy@lmco.com> wrote:

I am working on a pc-104 system and have a desktop pc with qnx on it. The
pc-104 has an ethernet port on it.

Well, if you start qnet on both your laptop and the board then they will
each see each other in /net. You can then start a remote shell on the board
using…

on -f sh

And then setup your paths to point back at your laptop…

export PATH=$PATH:/net/laptop/bin:/net/laptop/usr/bin:…

As an example of a slave device that relies pretty much 100% on a remote
qnet machine for files look here:

http://qnx.wox.org/qnx/qnet-smp.build

chris


Chris McKillop <cdm@qnx.com> “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

Chris,

Thanks for the example.
There are a few things in there that It would have taken me a while to
figure out through trial and error.

I probably won’t be using the lower half that loads the tcp-ip stack. Since
it does not appear to be needed to get qnet running. Once qnet is working, I
really won’t have a need for tcp-ip.

I am curious as to why qnet is not started by default like tcp-ip is on the
standard install for pc’s under 6.2.1 NC,SE,PE. It seems like it would be
the thing to do.

Thanks again,

John Eddy


“Chris McKillop” <cdm@qnx.com> wrote in message
news:b9enul$mvk$2@nntp.qnx.com

John Eddy <> john.h.eddy@lmco.com> > wrote:
I am working on a pc-104 system and have a desktop pc with qnx on it.
The
pc-104 has an ethernet port on it.


Well, if you start qnet on both your laptop and the board then they will
each see each other in /net. You can then start a remote shell on the
board
using…

on -f sh

And then setup your paths to point back at your laptop…

export PATH=$PATH:/net/laptop/bin:/net/laptop/usr/bin:…

As an example of a slave device that relies pretty much 100% on a remote
qnet machine for files look here:

http://qnx.wox.org/qnx/qnet-smp.build

chris


Chris McKillop <> cdm@qnx.com> > “The faster I go, the behinder I get.”
Software Engineer, QSSL – Lewis Carroll –
http://qnx.wox.org/

I am curious as to why qnet is not started by default like tcp-ip is on the
standard install for pc’s under 6.2.1 NC,SE,PE. It seems like it would be
the thing to do.

It was on 6.1 NC (equivalent).

And I guess there were lots of complaints with qnet started as default
(ex: “mount” output confusing)

kabe

Then mabe the documentation should change to note that it is NOT started by
default, and explain how to start it manually once tcp-ip is already up and
running.

A little thing like putting the bind=en0, host=prometheous.software.now can
hang you up for a while. The examples I kept seeing say just to do:
io-net -n ns83815 -p qnet

that did nothing, but …

io-net -n ns83815 -p qnet bind=en0,host=prometheous.software.now

and on the desktop/laptop
io-net -n i82544 -p qnet bind=en0,host=sgwlc1.software.now

gives me a working qnet setup

Thanks again,

John Eddy

<kabe@sra-tohoku.co.jp> wrote in message news:b9o2hb$m8f$1@inn.qnx.com

I am curious as to why qnet is not started by default like tcp-ip is on
the
standard install for pc’s under 6.2.1 NC,SE,PE. It seems like it would
be
the thing to do.

It was on 6.1 NC (equivalent).

And I guess there were lots of complaints with qnet started as default
(ex: “mount” output confusing)

kabe

john.h.eddy@lmco.com sed in <b9o911$tg$1@inn.qnx.com>:

Then mabe the documentation should change to note that it is NOT started by
default, and explain how to start it manually once tcp-ip is already up and
running.

It is fully mentioned in the release notes.
URL:http://www.qnx.com/support/releasenotes/momentics_62r.html#QNETBUGS

Qnet isn’t started by default with this release. In order to have it start
automatically, you must touch /etc/system/config/useqnet and then reboot.


kabe

Kabe,

Thanks for the reference.
I just glanced over the release notes when I installed.
I must have missed the part about installing it.
I vaugely remember the part about binding, although it does work without
specifying the bind=en0. That must be default.

I am using: “io-net -dns83815 -pqnet host=purple…” on the embedded box (it
is purple).
and : “io-net -dns83815 -pqnet host=black…” on the desktop machine (it has
a black case).

What I was referring to was more the help documentation. It has been far too
long since I installed this to remember what was in the release notes, but I
use the help search features every day. The references in there kept saying
that qnet is enabled by default, and didn’t show any examples of starting
q-net on a machine that didn’t already have a node name defined.

I did some programming under qnx2 and qnx4 about 10 years back, and qnet was
something we just used without thinking about it. TCP/IP was not an option
back then, and we were using ARCNET (not till about the time I stopped using
it, differnet job). I was surprised when I started using Qnx again, and qnet
wasn’t there. I got use to it NOT being there, and had problems with the
starting it up syntax. Way back when, the “node” was a hardware thing tied
to your ARCNET card.

Qnet is MUCH better suited to what I need to do on the embedded box than
TCP/IP, or serial were. Less overhead, built in access to the remote file
system, ability to run code on the other box, access it’s io…

It took me a while to find the “on” command for running code on the other
box too. Is there a good reference for all things qnet and remote running of
code, etc… The “Remote Access and Debugging” section I found in the help is
mostly geared to photon apps, and running gdb.

What is the qnet equivalent to telneting into the remote box for example. I
have tried running a shell on purple, but when I run a command in that
shell, it runs on black by default…

Thanks,

John Eddy

<kabe@sra-tohoku.co.jp> wrote in message news:b9oi7s$aaj$1@inn.qnx.com

john.h.eddy@lmco.com > sed in <b9o911$tg$> 1@inn.qnx.com> >:

Then mabe the documentation should change to note that it is NOT
started by
default, and explain how to start it manually once tcp-ip is already up
and
running.

It is fully mentioned in the release notes.
URL:> http://www.qnx.com/support/releasenotes/momentics_62r.html#QNETBUGS

Qnet isn’t started by default with this release. In order to have it
start
automatically, you must touch /etc/system/config/useqnet and then
reboot.


kabe

John Eddy <john.h.eddy@lmco.com> wrote in message
news:b9qptc$sl9$1@inn.qnx.com

[snip]

It took me a while to find the “on” command for running code on the other
box too. Is there a good reference for all things qnet and remote running
of
code, etc… The “Remote Access and Debugging” section I found in the help
is
mostly geared to photon apps, and running gdb.

“on” is your friend. As for remote debuging, our tools guy have something
to run debug protocol over QNET, but I don’t think they ever released it.

What is the qnet equivalent to telneting into the remote box for example.
I
have tried running a shell on purple, but when I run a command in that
shell, it runs on black by default…

on -f purple login

-xtang

Ok, but what do I need to put on “purple” to let me run login?
It has very little on it right now, and login isn’t there.
I assume this requires a few configuration files at the very least??
I am running fesh directly without logging in now.

I tried on -f purple /net/black/bin/login
and it would not take any passwords I could think to use, so it is probably
not happy with no /etc/passwd and no /etc/shadow

on -f purple ls /etc returns:
config termcap

on -f purple ls /dev returns:
con1 con7 hd1t4 pci shmem
con2 con8 io-net pipe text
con3 console kbd ser1 tty
con4 hd0 mem ser2 zero
con5 hd0t77 netmgr ser3
con6 hd1 null ser4

on -f purple ls /var returns:
ls: No such file or directory (/var)

from the files section in the help for loging, I assume I am missing:
/dev/log
/etc/group
/etc/default/login
/etc/passwd
/etc/shadow
/var/log/utmp
/var/log/wtmp
/var/log/lastlog
and of course /bin/login

and I will need to put some of these files in the ram disk (logs for
example) so that I don’t frag my flash, or fail because they can’t be
modified.

Isn’t there an easier way to do this?? I am not looking to verify passwords.
I am using a single crossover cable between the two machines, and there will
not be a cable connected to this box except if I am debugging it, or doing
development.

Thanks,

John Eddy

“Xiaodan Tang” <xtang@qnx.com> wrote in message
news:ba6sl7$c6i$1@nntp.qnx.com

John Eddy <> john.h.eddy@lmco.com> > wrote in message
news:b9qptc$sl9$> 1@inn.qnx.com> …

[snip]

It took me a while to find the “on” command for running code on the
other
box too. Is there a good reference for all things qnet and remote
running
of
code, etc… The “Remote Access and Debugging” section I found in the
help
is
mostly geared to photon apps, and running gdb.

“on” is your friend.

!!YES IT IS!!
Can you recommend any other qnet “friends”?

As for remote debuging, our tools guy have something
to run debug protocol over QNET, but I don’t think they ever released it.

What is the qnet equivalent to telneting into the remote box for
example.
I
have tried running a shell on purple, but when I run a command in that
shell, it runs on black by default…

on -f purple login

-xtang

Just curioius, why do you need to run login on that node?

Kevin

“John Eddy” <john.h.eddy@lmco.com> wrote in message
news:baaih7$3qa$1@inn.qnx.com

Ok, but what do I need to put on “purple” to let me run login?
It has very little on it right now, and login isn’t there.
I assume this requires a few configuration files at the very least??
I am running fesh directly without logging in now.

I tried on -f purple /net/black/bin/login
and it would not take any passwords I could think to use, so it is
probably
not happy with no /etc/passwd and no /etc/shadow

on -f purple ls /etc returns:
config termcap

on -f purple ls /dev returns:
con1 con7 hd1t4 pci shmem
con2 con8 io-net pipe text
con3 console kbd ser1 tty
con4 hd0 mem ser2 zero
con5 hd0t77 netmgr ser3
con6 hd1 null ser4

on -f purple ls /var returns:
ls: No such file or directory (/var)

from the files section in the help for loging, I assume I am missing:
/dev/log
/etc/group
/etc/default/login
/etc/passwd
/etc/shadow
/var/log/utmp
/var/log/wtmp
/var/log/lastlog
and of course /bin/login

and I will need to put some of these files in the ram disk (logs for
example) so that I don’t frag my flash, or fail because they can’t be
modified.

Isn’t there an easier way to do this?? I am not looking to verify
passwords.
I am using a single crossover cable between the two machines, and there
will
not be a cable connected to this box except if I am debugging it, or doing
development.

Thanks,

John Eddy

“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:ba6sl7$c6i$> 1@nntp.qnx.com> …

John Eddy <> john.h.eddy@lmco.com> > wrote in message
news:b9qptc$sl9$> 1@inn.qnx.com> …

[snip]

It took me a while to find the “on” command for running code on the
other
box too. Is there a good reference for all things qnet and remote
running
of
code, etc… The “Remote Access and Debugging” section I found in the
help
is
mostly geared to photon apps, and running gdb.

“on” is your friend.

!!YES IT IS!!
Can you recommend any other qnet “friends”?

As for remote debuging, our tools guy have something
to run debug protocol over QNET, but I don’t think they ever released
it.

What is the qnet equivalent to telneting into the remote box for
example.
I
have tried running a shell on purple, but when I run a command in that
shell, it runs on black by default…

on -f purple login

-xtang

\

I don’t need to run login.

All I wanted was to run a copy of the shell on the embedded machine with the
output to the terminal window on the development machine.

embedded system=purple, development system=black

I tried:

“on -n purple fesh”
but this didn’t act as if I were at a terminal connected to that machine.

on -n purple fesh
pidin -fA
shows me the processes running on black, not purple for example.

I tried:

“on -f purple fesh”
but that still seemed to leave me in the directory on black.

OOPS
I just found out today, while verifying my examples for this post, that this
actually does what I wanted!!!
The only strangness is that it leaves me looking back at black…
pwd yields “/net/black…/root”
so it looked like I was still on black, but I wasn’t.

I guess I have what I was looking for now, except that I keep creating
zombies this way.
Is there any way to shoot them in the head or burn their bodies (RE-Resident
Evil) so they will go away permenantly.
I have to do a shutdown on purple occasionally just to kill the lot of them
off.

Thanks


John Eddy


“Kevin Stallard” <kevin@fffflyingrobbbotsss.com> wrote in message
news:baaqtt$djd$1@inn.qnx.com

Just curioius, why do you need to run login on that node?

Kevin

“John Eddy” <> john.h.eddy@lmco.com> > wrote in message
news:baaih7$3qa$> 1@inn.qnx.com> …
Ok, but what do I need to put on “purple” to let me run login?
It has very little on it right now, and login isn’t there.
I assume this requires a few configuration files at the very least??
I am running fesh directly without logging in now.

I tried on -f purple /net/black/bin/login
and it would not take any passwords I could think to use, so it is
probably
not happy with no /etc/passwd and no /etc/shadow

on -f purple ls /etc returns:
config termcap

on -f purple ls /dev returns:
con1 con7 hd1t4 pci shmem
con2 con8 io-net pipe text
con3 console kbd ser1 tty
con4 hd0 mem ser2 zero
con5 hd0t77 netmgr ser3
con6 hd1 null ser4

on -f purple ls /var returns:
ls: No such file or directory (/var)

from the files section in the help for loging, I assume I am missing:
/dev/log
/etc/group
/etc/default/login
/etc/passwd
/etc/shadow
/var/log/utmp
/var/log/wtmp
/var/log/lastlog
and of course /bin/login

and I will need to put some of these files in the ram disk (logs for
example) so that I don’t frag my flash, or fail because they can’t be
modified.

Isn’t there an easier way to do this?? I am not looking to verify
passwords.
I am using a single crossover cable between the two machines, and there
will
not be a cable connected to this box except if I am debugging it, or
doing
development.

Thanks,

John Eddy

“Xiaodan Tang” <> xtang@qnx.com> > wrote in message
news:ba6sl7$c6i$> 1@nntp.qnx.com> …

John Eddy <> john.h.eddy@lmco.com> > wrote in message
news:b9qptc$sl9$> 1@inn.qnx.com> …

[snip]

It took me a while to find the “on” command for running code on the
other
box too. Is there a good reference for all things qnet and remote
running
of
code, etc… The “Remote Access and Debugging” section I found in the
help
is
mostly geared to photon apps, and running gdb.

“on” is your friend.

!!YES IT IS!!
Can you recommend any other qnet “friends”?

As for remote debuging, our tools guy have something
to run debug protocol over QNET, but I don’t think they ever released
it.

What is the qnet equivalent to telneting into the remote box for
example.
I
have tried running a shell on purple, but when I run a command in
that
shell, it runs on black by default…

on -f purple login

-xtang



\

John Eddy <john.h.eddy@lmco.com> wrote in message
news:bab375$ms8$1@inn.qnx.com

I don’t need to run login.

All I wanted was to run a copy of the shell on the embedded machine with
the
output to the terminal window on the development machine.

embedded system=purple, development system=black

I tried:

“on -n purple fesh”
but this didn’t act as if I were at a terminal connected to that machine.

on -n purple fesh
pidin -fA
shows me the processes running on black, not purple for example.

I tried:

“on -f purple fesh”
but that still seemed to leave me in the directory on black.

OOPS
I just found out today, while verifying my examples for this post, that
this
actually does what I wanted!!!
The only strangness is that it leaves me looking back at black…
pwd yields “/net/black…/root”
so it looked like I was still on black, but I wasn’t.

Yes. it is the “login” process to set you PWD (plus someother setups).
if you run “on -f purple sh”, your shell IS running on purple, your ROOT
is /net/purple, but your PWD is still whereever you from.
(/net/block…/root)
This is correct, because there is no guarentee that “purple” also have a
“/root” that we can move into.

Usually, “on -f purple sh” and follow a “cd” will serve your needs.

I guess I have what I was looking for now, except that I keep creating
zombies this way.
Is there any way to shoot them in the head or burn their bodies
(RE-Resident
Evil) so they will go away permenantly.
I have to do a shutdown on purple occasionally just to kill the lot of
them
off.

There is no way to get rid of a zombie, what you want to do, is to figure
out
who is the zombie’s parent (pidin fam), and check out why their parents left
the child being zombie.

-xtang