View topic - Boot script for TCIPI
Boot script for TCIPI
14 posts
• Page 1 of 1
Boot script for TCIPI
Dear all,
I was using a PC/104 (http://www.advantech.net.au/products/PC ... C91D8.aspx) for my project. it only has 1 ethernet port. My boot script is working fine.
However, I have got a new PC/104 (http://www.advantech.net.au/products/PC ... 36A1C.aspx). I tried to apply the same boot script for this new PC/104. However it gives me error said that:
ifconfig: SIOCGIFFLAGS en0: no such device or address
I don't know how to fix this. May I get some help please? Thanks a lot
Donald
I was using a PC/104 (http://www.advantech.net.au/products/PC ... C91D8.aspx) for my project. it only has 1 ethernet port. My boot script is working fine.
However, I have got a new PC/104 (http://www.advantech.net.au/products/PC ... 36A1C.aspx). I tried to apply the same boot script for this new PC/104. However it gives me error said that:
ifconfig: SIOCGIFFLAGS en0: no such device or address
I don't know how to fix this. May I get some help please? Thanks a lot
Donald
- Code: Select all
[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot:/bin
LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll procnto
}
[+script] startup-script = {
# Programs require the runtime linker (ldqnx.so) to be at a fixed location
procmgr_symlink ../../proc/boot/libc.so.3 /usr/lib/ldqnx.so.2
display_msg Booting...
#System logger
slogger &
# Start up some consoles
devc-con -n2 &
reopen /dev/con1
# Start the PCI server
display_msg Starting PCI Server...
# Seed system resources on x86 platforms
seedres
pci-bios &
waitfor /dev/pci
# Some common servers
pipe &
mqueue &
devc-pty &
# Start IDE and mount the flash disk in /usr/hdd
devb-eide blk automount=hd0t77:/usr/hdd &
#######################################################################
#serial driver #
#######################################################################
display_msg Starting Serial Com...
devc-ser8250 0x3F8,4 0x2F8,3 -t 8 -b 9600 &
# Start a debug server for debugging programs
waitfor /dev/ser1
waitfor /dev/ser2
stty par=none -ihflow -ohflow +cs8 stopb=1
#######################################################################
# ## network driver: Substitute your IP address for x.x.x.x #
#######################################################################
display_msg Starting Networking...
io-pkt-v4 -d speedo duplex=1 -p tcpip &
waitfor /dev/socket
ifconfig en0 169.254.45.90 netmask 255.255.255.0
qconn port=8000
#Programs to run
/usr/hdd/IMU
# These env variables inherited by all the programs which follow
SYSNAME=nto
TERM=qansi
# Start some extra shells on other consoles
reopen /dev/con2
[pri=25 +session] sh &
reopen /dev/con1
[+session] sh
}
# Make the /temp point to the shared memory area
[type=link] /dev/console=/dev/ser1
[type=link] /bin/sh=/proc/boot/ksh
[type=link] /tmp=/dev/shmem
# Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[type=link] /lib/libm.so.2=/proc/boot/libm.so
libc.so.2
libc.so
libm.so
/lib/libhiddi.so.1
#For floating points
fpemu.so.2
#########################################################################
## Networking ##
#########################################################################
libsocket.so
devn-speedo.so
devnp-shim.so
lsm-qnet.so
/usr/sbin/qconn
#########################################################################
## uncomment for BLOCK driver ##
#########################################################################
libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so
fs-qnx6.so
fs-ext2.so
# These programs need to be run only once from the boot image.
# "data=uip" will waste less memory as the RAM from the boot
# image will be used directly without making a copy of the data
# (i.e. as the default "data=cpy" does). When they have been
# run once, they will be unlinked from /proc/boot.
# Seed system resources on x86 platforms
[data=c]
#########################################################################
## general commands ##
#########################################################################
ls
pipe
pidin
ksh
slogger
slay
mqueue
#########################################################################
## uncomment for serial ##
#########################################################################
devc-con
devc-pty
devc-ser8250
#########################################################################
## uncomment for tcpip &pci ##
#########################################################################
pci-bios
pci
seedres
io-pkt-v4
ifconfig
ping
stty
#########################################################################
## uncomment for BLOCK driver ##
#########################################################################
devb-eide
# Use the "public domain korn shell" as the default shell "sh"
sh=ksh
/usr/hdd/IMU
#/usr/hdd/ssc4
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
You are using the speedo network driver.
I think that you want to use the e1000 driver.
I think that you want to use the e1000 driver.
- maschoen
- QNX Master
- Posts: 2730
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Boot script for TCIPI
maschoen wrote:You are using the speedo network driver.
I think that you want to use the e1000 driver.
Thanks Maschoen,
I have modify the code to the following
- Code: Select all
#######################################################################
# ## network driver: Substitute your IP address for x.x.x.x #
#######################################################################
display_msg Starting Networking...
io-pkt-v4 -d e1000 -p tcpip
waitfor /dev/socket
ifconfig en0 169.254.45.90 netmask 255.255.255.0
qconn port=8000
devup-e1000.so
But this lead me to another problem.
I was using a QNX 6.4, the boot up script gives me the same error.
I have installed QNX 6.5 into another computer (both Neutrino and Momentics)
I create the boot drive again, the network finally works (I can see the device on Momentics)
However I tried to run the program on Momentics. It gives me
"ldd:FATAL:: Could not load library libsocket.so.2"
Then I added libsocket.so.2 into the boot script
This time the boot up gives me
"syspage memory request of 65567 exceeds maximum of 65535 bytes"
How should I solve this two problem?
Thank you very much for your help.
Donald
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
I don't know what the "syspage memory request" problem is about. The libsocket.so.2 problem probably has to do with which OS you compile under vs. which you run under. If you are going to run on 6.5, then compile with 6.5.
I assume you don't literally mean you ran the program under Momentics, since that would mean you are trying to run a QNX program on a non-QNX os. Did you mean run the program from Momentics on a target system?
I assume you don't literally mean you ran the program under Momentics, since that would mean you are trying to run a QNX program on a non-QNX os. Did you mean run the program from Momentics on a target system?
- maschoen
- QNX Master
- Posts: 2730
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Boot script for TCIPI
maschoen wrote:I don't know what the "syspage memory request" problem is about. The libsocket.so.2 problem probably has to do with which OS you compile under vs. which you run under. If you are going to run on 6.5, then compile with 6.5.
I assume you don't literally mean you ran the program under Momentics, since that would mean you are trying to run a QNX program on a non-QNX os. Did you mean run the program from Momentics on a target system?
Yes, I am building and run the program from Momentics (IDE4.7) on a target system (6.5).
How can I compile it with 6.5? I am using a Window host.
I have read (http://www.qnx.com/developers/docs/6.4. ... incfg.html)
I went to the QNX Software Development Platform 6.5.0 > Configuration> Chose "QNX Software Development Platform 6.5.0 "
Then I also checked My Computer > MAKEFLAGS : -IC:/QNX650/target/qnx6/usr/include
the libsocket.so.2 error still appears
Thank you very much for your help
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
Yes, I am building and run the program from Momentics (IDE4.7) on a target system (6.5).
How can I compile it with 6.5? I am using a Window host.
I'm not an expert when it comes to using Momentics. I do almost all of my development self hosted. That said, on my Windows system I see in my root directory C:\QNX650. Is that what you have? The momentics I have loaded is 4.7, the same version as yours. If you have only QNX650, then I'm without any advice. If you have only QNX641, then you obviously do not have The QNX 6.5 development loaded on your Momentics machine. If you have both, well there's probably some menu/configuration option somewhere in Momentics that you have to find.
The only other thought that comes to mind would be to search the C:\QNX6?? directory for the missing .so file and copy it to the /lib or /usr/lib directory on the target.
- maschoen
- QNX Master
- Posts: 2730
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Boot script for TCIPI
I have two computers. One of them is QNX6.5 only, the other one has both QNX6.5 and QNX6.4 both of them give me the same error. Both of them missing the libsocket.so.2
I tried to copy the libsocket.so.2 to the target though Momentics but Momentics does not allow me to do that. Do you have any other method to copy libsocket.so.2 to the target?
Thanks
I tried to copy the libsocket.so.2 to the target though Momentics but Momentics does not allow me to do that. Do you have any other method to copy libsocket.so.2 to the target?
Thanks
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
I tried to copy the libsocket.so.2 to the target though Momentics but Momentics does not allow me to do that. Do you have any other method to copy libsocket.so.2 to the target?
That is very strange. Copying a file to a target system is a very basic function of Momentics.
The other way to get the .so file over is to recreate your target image, this time including the file and then reload the image.
- maschoen
- QNX Master
- Posts: 2730
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Boot script for TCIPI
maschoen wrote:I tried to copy the libsocket.so.2 to the target though Momentics but Momentics does not allow me to do that. Do you have any other method to copy libsocket.so.2 to the target?
That is very strange. Copying a file to a target system is a very basic function of Momentics.
The other way to get the .so file over is to recreate your target image, this time including the file and then reload the image.
I believe I am copying the file correctly. I opened up the window contains the libsocket.so.2, then drag and drop the file into Momentics window of target/lib it gives me an error "Copy operation error: C:\QNX650\target\qnx6\armle\lib\libsocket.so.2 No such file or directory"
If I rewrite the boot script with libsocket.so.2 it gives me the error "syspage memory request of 65567 exceeds maximum of 65535 bytes" during boot stage
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
>>>"Copy operation error: C:\QNX650\target\qnx6\armle\lib\libsocket.so.2 No such file or directory"
That means you are trying to copy to a read-only directory. You probably have to put it in /tmp.
>>>If I rewrite the boot script with libsocket.so.2 it gives me the error "syspage memory request of
65567 exceeds maximum of 65535 bytes" during boot stage
Sounds like your ifs has grown too large.
That means you are trying to copy to a read-only directory. You probably have to put it in /tmp.
>>>If I rewrite the boot script with libsocket.so.2 it gives me the error "syspage memory request of
65567 exceeds maximum of 65535 bytes" during boot stage
Sounds like your ifs has grown too large.
- denkelly
- Senior Member
- Posts: 163
- Joined: Sat Aug 02, 2008 3:27 pm
Re: Boot script for TCIPI
denkelly wrote:>>>"Copy operation error: C:\QNX650\target\qnx6\armle\lib\libsocket.so.2 No such file or directory"
That means you are trying to copy to a read-only directory. You probably have to put it in /tmp.
I can copy the folder into /tmp. But I cannot move the folder around (e.g. /lib, I do not have permission to move into /lib). So Momentics still gives me the same error.
denkelly wrote:>>>If I rewrite the boot script with libsocket.so.2 it gives me the error "syspage memory request of
65567 exceeds maximum of 65535 bytes" during boot stage
Sounds like your ifs has grown too large.
I found someone have similar problem (http://www.openqnx.com/newsgroups/viewt ... 12&t=21986), but they did not follow up the answer
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
Re: Boot script for TCIPI
Is it possible that /lib is part of the .boot file?
- maschoen
- QNX Master
- Posts: 2730
- Joined: Wed Jun 25, 2003 5:18 pm
Re: Boot script for TCIPI
Copy to /tmp, then add /tmp to LD_LIBRARY_PATH.
- denkelly
- Senior Member
- Posts: 163
- Joined: Sat Aug 02, 2008 3:27 pm
Re: Boot script for TCIPI
denkelly wrote:Copy to /tmp, then add /tmp to LD_LIBRARY_PATH.
I added /tmp to LD_LIBRARY_PATH
then manually copy libsocket.so.2 to /tmp
and it finally works
thanks alot
- doncmh
- Active Member
- Posts: 16
- Joined: Thu May 10, 2012 7:12 am
14 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest