Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Building io-pkt for ppc in Momentics using XP: Page 1 of 2 (27 Items)
   
Building io-pkt for ppc in Momentics using XP  
Greetings,

I have ran into an interesting issue and I was wondering if anyone has any suggestions. I have two ppc targets: ppc8260 
and ppc8548. I was able to take the prebuilt binaries in Milestone0 and run them on the ppc8260 without problems, but 
these same binaries cause a SIGSEGV error on the ppc8548. I have tried fetching the source, but building has been quite 
troublesome. I would like to use Momentics to build and debug io-pkt. I create a standard make project, set the build 
environment for ppc, using gcc 3.3.5. When I build I end up with numerous errors of variables not being defined. I 
noticed that several include files were missing, and that they were in the Milestone0, so I copied the ones I needed 
into my qnx632/usr/include. I am still left with several variables not being defined. I have a self hosted x86 QNX 
workstation, which I was able to do a "make CPULIST=ppc install" and it completed without errors, and I copy them to the
 ppc targets, and they BOTH segfault! That surprised me, because the prebuilts worked on the 8260. Below is the result 
of the SIGSEGV error and the all the information in the log. I am using an io-net driver, so I have devnp-shim in my /
bin directory. If anyone has any ideas on what I can do to get this built in momentics I'd greatly appreciate it. Many 
thanks.


----INFORMATION----
Process 12295 (io-pkt-v4) terminated SIGSEGV code=1 fltno=11 ip=fe37aae0 mapaddr=00002ae0. ref=00000000
ifconfig: socket: Address family not supported by protocol family


# sloginfo
Time             Sev Major Minor Args
Jan 01 00:00:00    5    14     0 tcpip starting
Jan 01 00:00:00    3    14     0 Unable to attach to pci server: No such file or                              directory
Jan 01 00:00:00    3    14     0 Using pseudo random generator.  See "random" op                             tion
Jan 01 00:00:01    3    25     0 Couldn't initialize listen service: tcp (Addres                             s family 
not supported by protocol family)
RE: Building io-pkt for ppc in Momentics using XP  
Hi Hayder:
	One of the first things to find out is where the crash is occurring.
Let's start with the initial crash.   The fact that the binaries work on an
8260 and not on an 8548 seems to point to a driver problem or something
missing in your image.

What drivers are you running in each case? What is your command line? If you
start io-pkt-v4 with no driver specified, does it run as expected?
Can you then mount the drivers in question using the mount command instead
of specifying them on the io-pkt command line? 
Can you start the drivers with the verbose option and see if additional
information is printed out?

As a side note, devnp-shim.so must be located in a path that is included in
the LD_LIBRARY_PATH. "\bin" is not the usual location for this (but this
seems to work for you, so maybe it's OK).

If you want to use pre-built binaries I would recommend using the load
marked Custom Engineering (and not the milestone 0 build) since it's a more
up to date version.   I'll look at getting a recent milestone build posted
shortly.

With regards to your build, what include files were missing?  Did the build
from the command line run without problems and is it only the integration
with Momentics that caused the failure?  This sounds like a problem with
either your staging area set up or your installation.

What I would recommend for Momentics is to create a project for the stack
that uses a subset of the overall io-pkt project.

First off, download the source as described in the wiki (make sure that you
have your staging area and environment variables properly set up) and do a
"make install" from the top level so that all of the source is built and the
staging area is properly filled.

To pull just the stack into Momentics, create a new Standard Make C project,
add in a suitable project name and unset "Use default location".

For the Location, fill in the path to (path to)/trunk/sys/target.
This will let you build all of the stack variants (which can take a bit of
time).  If you wanted to work with just the PPC stack builds, you would go
down one level and change the path to .../target/ppc which will shorten your
build times.

If you want to be able to build the binaries and have them automatically
installed to your staging area, you need to right click on the project click
on "Build make target...", click on "Add", "Target Name:" install  "Make
target:" install "Create".

Now you can do a make install which will copy the new stack into the staging
area.

You can also add in a debug variant so that you can step through the source.
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/HomePa
ge

Note the section on "Debugging".

NOTE:  You MUST have your staging area AND your environment variables set up
correctly.  This might be why the include files weren't showing up.

From
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source
_Guide

"Just a couple of notes on the QCONF_OVERRIDE environment variable. On
windows, in a DOS shell, use the SET command (there is no export). You can
make the env var "stick" by right clicking on "My Computer" (select
Properties). Select the "Advanced" tab and click on the "Environment
Variables" button (bottom left in XP). Click on the "New" button and add in
QCONF_OVERRIDE and the value and "OK" your way out and, the next time you
start a DOS shell, QCONF_OVERRIDE will already be set up for you. If you're
running self-hosted (or under Linux), you can add the export command to your
.profile script and it will also automatically get set when you start a new
terminal session."



	Robert.


-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Tuesday, April 15, 2008 2:51 PM
To: builds-networking
Subject: Building io-pkt for ppc in Momentics using XP

Greetings,

I have ran into an interesting issue and I was wondering if anyone has...
View Full Message
Re: RE: Building io-pkt for ppc in Momentics using XP  
Rob,

Thanks for the reply! I downloaded the source and created the stage directory and did a "make CPULIST=ppc install". I 
was able to take the binary for io-pkt and successfully run it on the ppc8260. However, the same binary seg faults on 
the ppc8548. We are using the devnp-mp85xx driver that was built with the core_networking, and when io-pkt is ran by 
itself without loading any drivers it seg faults. We tried to follow the wiki on creating a debug build, but the 
addvariant did not work. I am running it in the following way

c:\qnx632\host\win32\x86\usr\bin\ksh.exe (path to)\addvariant o.v4.g,

this said xargs not found

I tried using as: addvariant nto ppc o.v4.g, addvariant -i OS ppc o.v4.g, these did not work either. What is the proper 
way to run the command? Also, when you create a standard make c project in Momentics, I found the way you can select 
what architecture you want, but I could not find the choice for debug or release, is there one?

Do you have any ideas what would cause io-pkt-v4 to seg fault on the 8548? We have tcpip.so as a symbolic link to npm-
tcpip-4, libsocket, ifconfig, and from my understanding devnp-mpc85xx is already a pkt driver, so we don't need the shim
. 

Thanks.
--H
Re: RE: Building io-pkt for ppc in Momentics using XP  
Rob,

I got through the xargs error. Needed to install cygwin!!! Now when I go to do the make install, it says make install is
 up to date.

Note: instead of using o.v4 mine was o.be.v4, I think they are the same.

What else do I have to do in order to get the debug build going? I tried doing a make CCOPTS=-O0 DEBUG=-g CPULIST=ppc 
install from the main /trunk, but it creates nondebug executables. Thanks.
RE: RE: Building io-pkt for ppc in Momentics using XP  
Cool!

 I'm very surprised that you had to install cygwin though. All of those
dependencies should have been resolved with the installation of the 6.3.2
development environment.


Did you do a "make clean" before the "make CCOPTS..." etc?  If not then the
make wouldn't have re-built things and you'd be left with your original
non-debug binaries.  Execute the make commands in the trunk/sys/target/ppc
directory so you don't have to end up re-building the world.

The instructions on the wiki are for an x86 platform so you would indeed be
creating an o.be.v4.g directory for a specific debug binary.  This creates
and io-pkt-v4_g binary independently from io-pkt-v4 whereas the "make
CCOPTS..." makes io-pkt-v4 a debug version.

If you're using the IDE, I wouldn't use the IDE to change the make
infrastructure.  Also, with a standard make, options for "debug" and
"release" don't exist since the IDE didn't create and shouldn't modify the
make files.

I'm a bit puzzled about your reference to npm-*.  From the io-net migration
Wiki:

"The IP stack is an integral part of io-pkt. io-pkt can not be started
without it. This means that it isn't necessary to specify the "-ptcpip"
option to the stack unless there are additional parameters (e.g. prefix=...)
that need to be passed in. If the "-ptcpip" option is passed, it will be
accepted with no effect."

So while specifying the library shouldn't matter, it does add some confusion
to the mix.

Exactly what command line are you using to start io-pkt?


	Robert.

P.S. Just to let you know, I can guarantee that the 8548 binary works since
I've actually got one running on my desk as we speak, so we've either got a
build or configuration issue here.


-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Thursday, April 17, 2008 11:57 AM
To: builds-networking
Subject: Re: RE: Building io-pkt for ppc in Momentics using XP

Rob,

I got through the xargs error. Needed to install cygwin!!! Now when I go to
do the make install, it says make install is up to date.

Note: instead of using o.v4 mine was o.be.v4, I think they are the same.

What else do I have to do in order to get the debug build going? I tried
doing a make CCOPTS=-O0 DEBUG=-g CPULIST=ppc install from the main /trunk,
but it creates nondebug executables. Thanks.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post6997
RE: RE: Building io-pkt for ppc in Momentics using XP  
Hi Hayder:

	Just to provide feedback on the xargs error...  You're quite right
that addvariant doesn't work on windows.  This has been fixed internally.

	Robert.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Thursday, April 17, 2008 11:57 AM
To: builds-networking
Subject: Re: RE: Building io-pkt for ppc in Momentics using XP

Rob,

I got through the xargs error. Needed to install cygwin!!! Now when I go to
do the make install, it says make install is up to date.

Note: instead of using o.v4 mine was o.be.v4, I think they are the same.

What else do I have to do in order to get the debug build going? I tried
doing a make CCOPTS=-O0 DEBUG=-g CPULIST=ppc install from the main /trunk,
but it creates nondebug executables. Thanks.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post6997
Re: RE: RE: Building io-pkt for ppc in Momentics using XP  
Thanks for the info. When I was able to get addvariant to work, the folders were made, but make clean resulted in make 
clean is up to date, and make install, was make install is up to date. I tried doing the whole make CCOPTS=..... debug 
method, and it built, but not a debug build. I am now trying to build it again, and the results are erratic. Sometimes 
creating the stage part works, sometimes it doesnt, I'm yet to get consistent results. I am trying to create a debug 
build on my qnx workstation, because I think that is a better way to go.

Now, the exact line I use to start io-pkt on the 8548 is::

io-pkt-v4 -d mpc85xx mac=110011001100 -ptcpip

then I wait for /dev/socket
and ifconfig en0 address

(the mac argument is put in there, I dont know if the driver required one or not, but io-net picks up the real mac 
address)

then I tried just using:

io-pkt-v4

this seg faulted as well.

We are using the 8548ads bsp, which one are using? Thanks for your help.
RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
Hmmm....  The fact that the results are erratic points to a build
configuration problem of some sort.  I regularly use windows to build on, so
it should build fine.  

Are you sure that your staging area and QCONF_OVERRIDE var is setup properly
(as in
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Source
_Guide
)?

What does the output from "set" return? (Of specific interest are (e.g.
here are mine...) 

QCONF_OVERRIDE=c:/community/qconf-override.mk
QNX_CONFIGURATION=C:\Program Files\QNX Software Systems
QNX_HOST=C:/QNX632/host/win32/x86
QNX_TARGET=C:/QNX632/target/qnx6

What does the contents of your qconf-override.mk file look like?
(Here's mine)
USE_INSTALL_ROOT=1
INSTALL_ROOT_nto=c:/community/stage



As a side note, you wouldn't get an en0 device if you are using the devnp
drive.  You'd get a tsec0 device.

Just to triple check:
	Are you sure that you have the PPC variant of the executable in your
image?  
	Do you also have the io-pkt versions of ifconfig and libsocket.so
included?
	Do you have fpemu.so included in your image (This shouldn't
matter... Just a wild guess)?

Can you show me what your build file looks like?  

I'm just using the standard 8548cds BSP on an MPC8548CDS platform.

As a side note, I think that the bit set in the first byte for the MAC is
the multicast bit and you really don't want to have that set as your MAC
address :).  Use something like 0011223344 or something similar.

	R.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Thursday, April 17, 2008 4:08 PM
To: builds-networking
Subject: Re: RE: RE: Building io-pkt for ppc in Momentics using XP

Thanks for the info. When I was able to get addvariant to work, the folders
were made, but make clean resulted in make clean is up to date, and make
install, was make install is up to date. I tried doing the whole make
CCOPTS=..... debug method, and it built, but not a debug build. I am now
trying to build it again, and the results are erratic. Sometimes creating
the stage part works, sometimes it doesnt, I'm yet to get consistent
results. I am trying to create a debug build on my qnx workstation, because
I think that is a better way to go.

Now, the exact line I use to start io-pkt on the 8548 is::

io-pkt-v4 -d mpc85xx mac=110011001100 -ptcpip

then I wait for /dev/socket
and ifconfig en0 address

(the mac argument is put in there, I dont know if the driver required one or
not, but io-net picks up the real mac address)

then I tried just using:

io-pkt-v4

this seg faulted as well.

We are using the 8548ads bsp, which one are using? Thanks for your help.


_______________________________________________
Builds
http://community.qnx.com/sf/go/post7013
RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
I'm wondering if you might have inadvertently "broken" the build directories
by changing the build targets in the IDE.  You might want to try deleting
sys/target and use svn to pull in new copies.  Don't use the IDE to change
any build properties....

When I do a "make clean" from the appropriate directory, I get:

C:\Community\networking\trunk\sys\target\ppc\o.be.v4>make clean
make -C ../libkern clean
make[1]: Entering directory
`C:/Community/networking/trunk/sys/target/ppc/libker
n'
make -j 1 -Ca.be -fMakefile clean
make[2]: Entering directory
`C:/Community/networking/trunk/sys/target/ppc/libker
n/a.be'
C:/QNX632/host/win32/x86/usr/bin/rm -f  libkern.a  *.pinfo *.o *.err *.map
mapfi
le *.sym *.i
make[2]: Leaving directory
`C:/Community/networking/trunk/sys/target/ppc/libkern
/a.be'
make[1]: Leaving directory
`C:/Community/networking/trunk/sys/target/ppc/libkern
'
C:/QNX632/host/win32/x86/usr/bin/rm -f  io-pkt-v4  *.pinfo *.o *.err *.map
mapfi
le *.sym *.i asmoff.def C:/Community/networking/trunk/sys/static_drvrs.h
libkern
 C:/Community/networking/trunk/sys/target/ppc/o.be.v4/bridge.h
C:/Community/netw
orking/trunk/sys/target/ppc/o.be.v4/gre.h
C:/Community/networking/trunk/sys/targ
et/ppc/o.be.v4/gif.h
C:/Community/networking/trunk/sys/target/ppc/o.be.v4/pppoe.
h C:/Community/networking/trunk/sys/target/ppc/o.be.v4/opt_pppoe.h
C:/Community/
networking/trunk/sys/target/ppc/o.be.v4/opt_ipsec.h
C:/Community/networking/trun
k/sys/target/ppc/o.be.v4/opt_inet.h
C:/Community/networking/trunk/sys/target/ppc
/o.be.v4/opt_mrouting.h
C:/Community/networking/trunk/sys/target/ppc/o.be.v4/opt
_gateway.h C:/Community/networking/trunk/sys/target/ppc/o.be.v4/ppp.h
C:/Communi
ty/networking/trunk/sys/target/ppc/o.be.v4/opt_ppp.h
C:/Community/networking/tru
nk/sys/nw_tls.h C:/Community/networking/trunk/sys/nw_sync.h
C:/Community/network
ing/trunk/sys/buildenv/tls_tst.o
C:/Community/networking/trunk/sys/buildenv/tls_
tst.c C:/Community/networking/trunk/sys/nw_tls.h
C:/Community/networking/trunk/s
ys/buildenv/sync_tst.o C:/Community/networking/trunk/sys/buildenv/sync_tst.c
C:/
Community/networking/trunk/sys/nw_sync.h

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Thursday, April 17, 2008 4:08 PM
To: builds-networking
Subject: Re: RE: RE: Building io-pkt for ppc in Momentics using XP

Thanks for the info. When I was able to get addvariant to work, the folders
were made, but make clean resulted in make clean is up to date, and make
install, was make install is up to date. I tried doing the whole make
CCOPTS=..... debug method, and it built, but not a debug build. I am now
trying to build it again, and the results are erratic. Sometimes creating
the stage part works, sometimes it doesnt, I'm yet to get consistent
results. I am trying to create a debug build on my qnx workstation, because
I think that is a better way to go.

Now, the exact line I use to start io-pkt on the 8548 is::

io-pkt-v4 -d mpc85xx mac=110011001100 -ptcpip

then I wait for /dev/socket
and ifconfig en0 address

(the mac argument is put in there, I dont know if the driver required one or
not, but io-net picks up the real mac address)

then I tried just using:

io-pkt-v4

this seg faulted as well.

We are using the 8548ads bsp, which one are using? Thanks for your help.


_______________________________________________
Builds
http://community.qnx.com/sf/go/post7013
Re: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

I'm not sure if something got corrupted somewhere, but these are the steps I follow for creating the staging area and 
results:

results of interest for set:

QCONF_OVERRIDE=c:/community/qconf-override.mk
QNX_CONFIGURATION=C:\Program Files\QNX Software Systems
QNX_HOST=C:/QNX632/host/win32/x86
QNX_TARGET=C:/QNX632/target/qnx6

contents of qconf-override.mk
USE_INSTALL_ROOT=1
INSTALL_ROOT_nto=C:/community/stage
VERSION=6.3.2

run hide-gnu script:
C:\community>c:\QNX632\host\win32\x86\usr\bin\ksh.exe hide-gnu.sh c:/community
Locating GNUmakefile's in c:/community
Touching c:/community/trunk/utils/t/tcpdump/win32/prj/Makefile.dnm

mkdir stage
cd trunk

make OSLIST=nto hinstall

result of make:
c:/community/trunk/lib/socket/public/arpa/tftp.h -> c:/community/stage/usr/include/arpa/tftp.h
cp: c:/community/stage/usr/include/arpa/tftp.h: Invalid argument

..............

C:/community/trunk/crypto/dist2/openssl/crypto/store/store.h -> c:/community/stage/usr/include/openssl/store.h
cp: c:/community/stage/usr/include/openssl/store.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/txt_db/txt_db.h -> c:/community/stage/usr/include/openssl/txt_db.h
cp: c:/community/stage/usr/include/openssl/txt_db.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/ui/ui.h -> c:/community/stage/usr/include/openssl/ui.h
cp: c:/community/stage/usr/include/openssl/ui.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/ui/ui_compat.h -> c:/community/stage/usr/include/openssl/ui_compat.h
cp: c:/community/stage/usr/include/openssl/ui_compat.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509/x509.h -> c:/community/stage/usr/include/openssl/x509.h
cp: c:/community/stage/usr/include/openssl/x509.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509/x509_vfy.h -> c:/community/stage/usr/include/openssl/x509_vfy.h
cp: c:/community/stage/usr/include/openssl/x509_vfy.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509v3/x509v3.h -> c:/community/stage/usr/include/openssl/x509v3.h
cp: c:/community/stage/usr/include/openssl/x509v3.h: Invalid argument
make[4]: [hinstall] Error 1 (ignored)
C:/community/trunk/lib/crypto/openssl/opensslconf.h -> c:/community/stage/usr/include/openssl/opensslconf.h
cp: c:/community/stage/usr/include/openssl/opensslconf.h: Invalid argument
make[4]: *** [hinstall] Error 1
make[4]: Leaving directory `C:/community/trunk/lib/crypto/arm/a.be'
make[3]: *** [hinstall] Error 2
make[3]: Leaving directory `C:/community/trunk/lib/crypto/arm'
make[2]: *** [hinstall] Error 2
make[2]: Leaving directory `C:/community/trunk/lib/crypto'
make[1]: *** [hinstall] Error 2
make[1]: Leaving directory `C:/community/trunk/lib'
make: *** [hinstall] Error 2

It says invalid arguments but the files are copied into stage until it errors in the openssl.

Now these steps were working yesterday morning, but starting in the afternoon it stopped working.

So, I shifted gears to the qnx workstation. I can build release/debug using make <OPTIONS> install. The binary I'm left 
with for io-pkt-v4 is 3.2 meg, which is bigger than the release of 700kb, so I'm assuming it built a proper debug binary
. In momentics I create a standard make c project, make the default directory /root/trunk. It refreshes everything. I go
 to sys/target/ppc/o.be.v4, the io-pkt-v4 binary is there, right click and do a debug as debug, select my ppc8260 target
, tell it to debug. It says attached to process XXXXX, msgnak received - resending, then it says target has timed out. I
 have a serial connection to the target as well, and if I do a pidin, the process gets started up, and goes into the 
stopped state. Other projects I can debug just fine.

I tried using command line ntoppc-gdb. When it starts up I enter:

target qnx 10.4.0.7:8000 (I have pdebug 8000 running on target)
connects to remote...
View Full Message
Re: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

I double checked and we are using the same system. Would it be possible for you to send us your image, so see if it 
works?

Many thanks,

--H
RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
Hmmm...  My current build has a bunch of custom stuff in it so I'd have to
re-work it to get it to you.

Let's take a quick shot at the debugging first since that should locate the
problem immediately.

	R.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Friday, April 18, 2008 10:09 AM
To: builds-networking
Subject: Re: RE: RE: RE: Building io-pkt for ppc in Momentics using XP

R,

I double checked and we are using the same system. Would it be possible for
you to send us your image, so see if it works?

Many thanks,

--H

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7045
RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
Ahhhhh!  Ok.  I think I now know what your problem is. Given that you're
connecting into the 8548 with the tools, you must already be running a
stack.  As soon as io-pkt starts running, it "takes over" from the old stack
and you lose your connection to the host so, from the host point of view,
things look ok, but you're debug session stops working.

Luckily, multiple stacks aren't an issue for Neutrino.  The way to get
around this is to start you initial stack with an alternate prefix.  Given
that you're using the io-net version of the stack, do the following:

# io-net -dmpc85xx syspage -ptcpip prefix=/alt
# SOCK=/alt ifconfig en0 xxx.xxx.xxx.xxx
# SOCK=/alt qconn

Adding the "SOCK=" setting before the command gets the socket library to
look for /alt/dev/socket instead of the usual /dev/socket so that when
io-pkt is started by the debugger, it won't conflict.

(See the last section of
http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Faq_wi
ki_page
)

If you're starting io-pkt with a driver specified on the command line
through your launch configuration, you also have to make sure that you don't
specify the same device.  You can specify the device using the "pci=" option
to the driver 

(e.g. io-net -dmpc85xx syspage,pci=0 -ptcpip prefix=/alt
	io-pkt-v4 -dmpc85xx syspage,pci=1 )

	Robert.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Friday, April 18, 2008 9:10 AM
To: builds-networking
Subject: Re: RE: RE: RE: Building io-pkt for ppc in Momentics using XP

R,

I'm not sure if something got corrupted somewhere, but these are the steps I
follow for creating the staging area and results:

results of interest for set:

QCONF_OVERRIDE=c:/community/qconf-override.mk
QNX_CONFIGURATION=C:\Program Files\QNX Software Systems
QNX_HOST=C:/QNX632/host/win32/x86
QNX_TARGET=C:/QNX632/target/qnx6

contents of qconf-override.mk
USE_INSTALL_ROOT=1
INSTALL_ROOT_nto=C:/community/stage
VERSION=6.3.2

run hide-gnu script:
C:\community>c:\QNX632\host\win32\x86\usr\bin\ksh.exe hide-gnu.sh
c:/community
Locating GNUmakefile's in c:/community
Touching c:/community/trunk/utils/t/tcpdump/win32/prj/Makefile.dnm

mkdir stage
cd trunk

make OSLIST=nto hinstall

result of make:
c:/community/trunk/lib/socket/public/arpa/tftp.h ->
c:/community/stage/usr/include/arpa/tftp.h
cp: c:/community/stage/usr/include/arpa/tftp.h: Invalid argument

..............

C:/community/trunk/crypto/dist2/openssl/crypto/store/store.h ->
c:/community/stage/usr/include/openssl/store.h
cp: c:/community/stage/usr/include/openssl/store.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/txt_db/txt_db.h ->
c:/community/stage/usr/include/openssl/txt_db.h
cp: c:/community/stage/usr/include/openssl/txt_db.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/ui/ui.h ->
c:/community/stage/usr/include/openssl/ui.h
cp: c:/community/stage/usr/include/openssl/ui.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/ui/ui_compat.h ->
c:/community/stage/usr/include/openssl/ui_compat.h
cp: c:/community/stage/usr/include/openssl/ui_compat.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509/x509.h ->
c:/community/stage/usr/include/openssl/x509.h
cp: c:/community/stage/usr/include/openssl/x509.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509/x509_vfy.h ->
c:/community/stage/usr/include/openssl/x509_vfy.h
cp: c:/community/stage/usr/include/openssl/x509_vfy.h: Invalid argument
C:/community/trunk/crypto/dist2/openssl/crypto/x509v3/x509v3.h ->
c:/community/stage/usr/include/openssl/x509v3.h
cp: c:/community/stage/usr/include/openssl/x509v3.h: Invalid argument
make[4]: [hinstall] Error 1 (ignored)
C:/community/trunk/lib/crypto/openssl/opensslconf.h ->
c:/community/stage/usr/include/openssl/opensslconf.h
cp:...
View Full Message
Re: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

An interesting find!! Momentics and the debugging was taking a hit! So, I copied the executable and drivers to /tmp and 
ran it from there ... they worked! I took the same files and built them into the image using momentics, and they 
segfaulted. I think there must be something wrong with how it is building the image or generating the build file. I 
attached my build file.

With io-pkt-v4 working, I went ahead and tried the -hc. Two things I've noticed. First, the encryption results in the 
log do not match what is in the readme for mpcsec. Second, when I do an ifconfig it says the driver is configured for 
multicasting, but my multicast receiver program does not receive messages; it is still receiving messages on the ppc8260
 targets.

Thanks again for all your help! I appreciate it.
Attachment: Text project.bld 17.19 KB
RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
Hi Hayder:
	Well that's (sort of) a relief!  At least we know that the
networking build is all set up and working, although why the build file
isn't working for you confuses me...

The XML file generated by the tools is a bit difficult to interpret... I
couldn't see anything obviously wrong... Maybe we can work the other way
around.  If you send the image to me, I'll try and figure out why io-pkt
wasn't running from the image for you.

What parts of the log don't match the readme?  I know that we recently did
some tweaks to the driver to fix a problem that we found on the 8548, and
maybe those aren't reflected in the readme.  What command line do you use to
start io-pkt-v4-hc?

	It is possible that there's a bug in the driver for multicast, so
I'll try and get someone else to look into that.  Are the multicast packet
counts incrementing as expected?  

	Robert.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Friday, April 18, 2008 4:48 PM
To: builds-networking
Subject: Re: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP

R,

An interesting find!! Momentics and the debugging was taking a hit! So, I
copied the executable and drivers to /tmp and ran it from there ... they
worked! I took the same files and built them into the image using momentics,
and they segfaulted. I think there must be something wrong with how it is
building the image or generating the build file. I attached my build file.

With io-pkt-v4 working, I went ahead and tried the -hc. Two things I've
noticed. First, the encryption results in the log do not match what is in
the readme for mpcsec. Second, when I do an ifconfig it says the driver is
configured for multicasting, but my multicast receiver program does not
receive messages; it is still receiving messages on the ppc8260 targets.

Thanks again for all your help! I appreciate it.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7085
Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

More interesting finds!! I had another machine setup with momentics, so I built the 8548 bsp on it, and everything 
worked!! I don't know what would cause the difference in the images, they both have the same thing, but I still need to 
look into the differences with more detail.

I attached the output of the log. The key's and input are the same, but the iv, encryption, decryption are not right. I 
compared the readme I have to what's currently in svn, and at least for the test that were in the log the input and keys
 appear to be the same.

Thanks!
Attachment: Text output.txt 28.87 KB
Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

I jumped the gun too quickly. It was running because after I copied the image into flash, I did a go 100000. This was 
running it out of ram, instead of having the bootloader copy it into ram!! When I reset the target and want it to run 
from flash I get:

System page at phys:0000c000 user:0000c000 kern:0000c000
Starting next program at v0013b5d4
Welcome to QNX Neutrino 6.3 on the PowerPC 8548CDS board
Unable to start "devc-ser8250-mpc8540" (84)
Unable to access "/dev/ser1" (2)
Unable to access "/dev/ser1" (2)
Unable to start "slogger" (84)
Unable to start "pipe" (84)
Unable to start "io-pkt-v4-hc" (84)
Unable to access "/dev/socket" (2)
Unable to start "ifconfig" (8)
Unable to start "devc-pty" (8)
Unable to access "/dev/ptyp0" (2)
Unable to access "/dev/socket" (2)
Unable to start "qconn" (8)
Unable to start "ksh" (84)

Steps:
tftp 100000 bsp-mpc8548ads.ifs
erase ff800000 ffdfffff
cp.b 100000 ff800000 <size>

So, now more interesting questions arise!!! Why can we run io-net with the bootloader, but not io-pkt? We know io-pkt 
runs by itself, we know the whole image runs, before we reset to have the bootloader load it into ram?
RE: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics usin g XP  
Hi Hayder:
	It looks like you're previous problem was due to a corrupt
installation which you fixed by moving to a new machine.  This output looks
to me like you've got something far more serious wrong with the image than
running io-pkt since none of your drivers or other processes are starting.
The only thing that comes to mind right away is that io-pkt is significantly
bigger than io-net. Have you checked the image size to make sure that you
haven't overrun some boundary?  

It sounds like the tftp'd image ran without any problem, so the issue would
appear to be the transfer into and back out of flash.  Maybe you can post
the log output from your uboot session where you download the image, copy it
into FLASH and then reset the board to run the flash image.

	Robert.


-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Monday, April 21, 2008 8:42 AM
To: builds-networking
Subject: Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using
XP

R,

I jumped the gun too quickly. It was running because after I copied the
image into flash, I did a go 100000. This was running it out of ram, instead
of having the bootloader copy it into ram!! When I reset the target and want
it to run from flash I get:

System page at phys:0000c000 user:0000c000 kern:0000c000
Starting next program at v0013b5d4
Welcome to QNX Neutrino 6.3 on the PowerPC 8548CDS board
Unable to start "devc-ser8250-mpc8540" (84)
Unable to access "/dev/ser1" (2)
Unable to access "/dev/ser1" (2)
Unable to start "slogger" (84)
Unable to start "pipe" (84)
Unable to start "io-pkt-v4-hc" (84)
Unable to access "/dev/socket" (2)
Unable to start "ifconfig" (8)
Unable to start "devc-pty" (8)
Unable to access "/dev/ptyp0" (2)
Unable to access "/dev/socket" (2)
Unable to start "qconn" (8)
Unable to start "ksh" (84)

Steps:
tftp 100000 bsp-mpc8548ads.ifs
erase ff800000 ffdfffff
cp.b 100000 ff800000 <size>

So, now more interesting questions arise!!! Why can we run io-net with the
bootloader, but not io-pkt? We know io-pkt runs by itself, we know the whole
image runs, before we reset to have the bootloader load it into ram?

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7107
Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

I dont know if this helps or makes things more confusing, but this is a new scenario I tried. I tftp'd the image, copied
 it into flash, and instead of doing a go 100000, I did a boot. Am I correct in thinking this boots the image from flash
? If so, it works from there, but once I reset the target it I get the io-pkt seg fault.

I did not see any log options in the uboot help, where can I find this log information? Thanks.
RE: Building io-pkt for ppc in Momentics using XP  
Hi Hayder:
	By "log" I meant capture the output from your uboot terminal session
(running on the PC) so that we can see what you see when uboot is running.
In terms of what uboot does with the boot command, this depends upon how
you've set up uboot so we wouldn't be able to tell what it's actually doing.

I do know for sure that you can't download the image into RAM, "go 100000",
reset the board and "go 100000" again.  When the OS starts up it will
overwrite all of the startup code that was originally at 100000...


	Robert.



-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Monday, April 21, 2008 11:30 AM
To: builds-networking
Subject: Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using
XP

R,

I dont know if this helps or makes things more confusing, but this is a new
scenario I tried. I tftp'd the image, copied it into flash, and instead of
doing a go 100000, I did a boot. Am I correct in thinking this boots the
image from flash? If so, it works from there, but once I reset the target it
I get the io-pkt seg fault.

I did not see any log options in the uboot help, where can I find this log
information? Thanks.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7122
Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
R,

I think a solution has been found! The bootcmd environment variable had a different length than what the new image with 
io-pkt had. It was not loading the entire image into ram, and I guess io-pkt was in the middle. Changed it to make it 
bigger, and it all works fine now.

With that out of the way. Can you use io-pkt without hc to talk to a machine with hc? Does the hc encrypt/decrypt 
everything on the stack? Are the files in the svn the lastest for mpcsec?

Many thanks.
RE: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics usin g XP  
  I'm a bit surprised that anything worked at all for you in that case :)).
Glad that's cleared up!

The io-pkt-v4-hc variant of the stack has a number of extra features some of
which include:
1) WiFi
2) Support for IPSec
3) Allows the default software crypto routines to be replaced with hardware
accelerated crypto.

The v4 variant of the stack can talk to the v4-hc variant of the stack as
long as you aren't using IPSec.  The encryption in the stack isn't turned on
unless you create an IPSec session (see 

http://community.qnx.com/sf/wiki/do/viewPage/projects.networking/wiki/Ipsec_
wiki_page

)

	Robert.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Monday, April 21, 2008 12:51 PM
To: builds-networking
Subject: Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using
XP

R,

I think a solution has been found! The bootcmd environment variable had a
different length than what the new image with io-pkt had. It was not loading
the entire image into ram, and I guess io-pkt was in the middle. Changed it
to make it bigger, and it all works fine now.

With that out of the way. Can you use io-pkt without hc to talk to a machine
with hc? Does the hc encrypt/decrypt everything on the stack? Are the files
in the svn the lastest for mpcsec?

Many thanks.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7128
RE: Building io-pkt for ppc in Momentics using XP  
Forgot the last question.  The SVN repository that you see today is exactly
the same as the one that we work in, so everything there is the latest and
greatest.

	Robert.

-----Original Message-----
From: Hayder Mouhammed [mailto:hayder.mouhammed@emerson.com] 
Sent: Monday, April 21, 2008 12:51 PM
To: builds-networking
Subject: Re: RE: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using
XP

R,

I think a solution has been found! The bootcmd environment variable had a
different length than what the new image with io-pkt had. It was not loading
the entire image into ram, and I guess io-pkt was in the middle. Changed it
to make it bigger, and it all works fine now.

With that out of the way. Can you use io-pkt without hc to talk to a machine
with hc? Does the hc encrypt/decrypt everything on the stack? Are the files
in the svn the lastest for mpcsec?

Many thanks.

_______________________________________________
Builds
http://community.qnx.com/sf/go/post7128
Re: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
> the encryption results in the log do not 
> match what is in the readme for mpcsec.

Argh, I had to make a change to the test
encryptions after another bug fix for multi-iov
input and output, and I didn't update the
readme  :-(

If you start it with the verbose cranked up,
what info does it output to the console?

If you configure one machine with hardware
encryption (eg mpcsec) and the other side
with software encryption, can they talk?
Re: RE: RE: RE: RE: Building io-pkt for ppc in Momentics using XP  
Andrew,

Attached is an output of the log from the sec engine test. My goal for this morning is to get the hardware encryption 
running and talking to another machine using software encryption. Thanks for your help.

--H
Attachment: Text sec_engine_output.txt 53.96 KB