| Author |
Message |
|
|
|
Post subject: access and save my boot image
Posted: Apr 14, 2007 - 06:50 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
I try to make a boot image. Now my boot image can boot on a flash HD.
Its function can ftp and telnet . But I want to save some data on the HD!
How do I make my image?
my code:
[type=link] /tmp=/dev/shmem
I can work on the path (/tmp) but I can't copy the data for the other path!
Are there any idea for me? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 14, 2007 - 11:07 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
# cp ls /tmp It is normal!
#cp ls /bin
cp: Can’t open destination file (/bin//ls):No such file or directory
Help ! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 16, 2007 - 05:24 PM
|
|
Active Member
Joined: Jun 17, 2003
Posts: 11
|
|
| Please post your entire boot image script, there isn't enough information here. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 17, 2007 - 02:09 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
Thanx! my code :
[virtual=x86,bios +compress] .bootstrap = {
#[virtual=x86,bios] .bootstrap = {
startup-bios
PATH=/proc/boot procnto-smp
}
[+script] startup-script = {
display_msg "Welcome to QNX Neutrino on an PC compatible BIOS system for SMP"
seedres
pci-bios &
waitfor /dev/pci
# Start 1 keyboard console
# devc-con -n8 &
#20070202
devc-con -e &
#**************
# Start serial A driver
waitfor /dev/con1
reopen /dev/con1
#reopen
devc-ser8250 -e -b38400
waitfor /dev/ser1
pipe
#touch /tmp/syslog
syslogd
slogger
# scan IDE machine
devb-eide
#devb-eide blk cache=5M
waitfor /dev/hd0
mount /dev/hd0 /
devc-pty
##### /*USB driver**/
display_msg "Start USB driver...."
on -C 1 /sbin/io-usb -duhci -dohci -dehci
waitfor /dev/io-usb/io-usb 4
display_msg "Start network interface"
#**************************************************************************************************
multi net card in the same /dev/io-net -> Test OK 20070115
io-net -dvia-rhine -dasix -di82544 -di82544 -ptcpip
waitfor /dev/socket
ifconfig en0 10.153.29.95 netmask 255.255.255.0
ifconfig en1 10.153.29.94 netmask 255.255.255.0
ifconfig en2 192.168.0.124 netmask 255.255.255.0
ifconfig en3 10.153.29.124 netmask 255.255.255.0
waitfor /dev/socket
inetd &
qconn &
display_msg "Network interface initial finish"
waitfor /dev/ptyp0 4
display_msg "Startup Finish"
[+session] PATH=/bin:/proc/boot esh &
}
# Make /tmp point to the shared memory area...
[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] /bin/sh=/bin/ksh
[type=link] /bin/sh=/bin/esh
#[type=link] /dev/socket=/dev/socket
# We use the "c" shared lib (which also contains the
# runtime linker)
libc.so
libm.so
libsocket.so
npm-tcpip.so
npm-tcpip-v4.so
#npm-ttcpip.so
#npm-pppmgr.so
#devn-ne2000.so
#D-link net card LIB
devn-via-rhine.so
#RTL net card LIB
devn-rtl.so
devn-i82544.so
io-blk.so
fs-qnx4.so
cam-disk.so
libcam.so
#####/*uncomment for USB driver*/
libusbdi.so
devu-uhci.so
devu-ohci.so
devu-ehci.so
devn-asix.so
######/*end USB driver*/
# The files above this line can be shared by multiple
# processes
[data=c]
devc-con
devc-ser8250
devc-pty
pci-bios
seedres
mqueue
pipe
io-net
/bin/echo=echo
/bin/stty=stty
#/dev/socket=/dev/socket
cat
tail
pci
#chat
ifconfig
ping
syslogd
#touch
slogger
ls
qconn
pidin
pdebug
slay
mount
devb-eide
ftp
inetd
shutdown
sin
use
esh
mount
sloginfo
telnet
#20070203
on
more
grep
nicinfo
#####/*USB*/
io-usb
usb
#####/*end USB*/
#./modem_ans_ppp.sh
#Services (telnetd etc) config
/usr/sbin/telnetd=telnetd
/usr/sbin/ftpd=ftpd
#/usr/sbin/pppd=pppd
/bin/login=login
/bin/sh=esh
/sbin/io-net=io-net
/sbin/io-usb=io-usb
/bin/on=on
/etc/ppp/chap-secrets = {
# Client Server Secret Addrs
#########################################
* * "password" *
}
/etc/syslog.conf = {
*.* /tmp/syslog
*.* /.../....
}
# Inetd config Files
/etc/services= /etc/services
/etc/protocols= /etc/protocols
/etc/termcap= /etc/termcap
/etc/passwd= /etc/passwd
/etc/default/login= /etc/default/login
/etc/resolv.conf= /etc/resolv.conf
/etc/shadow = /etc/shadow
#061218-ftp
#/home/sam = /home/sam
/etc/inetd.conf = {
telnet stream tcp nowait root /usr/sbin/telnetd in.telnetd
ftp stream tcp nowait root /usr/sbin/ftpd in.ftpd
-l
}
#061218-ftp deline
/etc/services={
ftp 21/tcp
telnet 23/tcp
}
/etc/ftpusers={
}
/etc/shadow={
root:CDIdxOja3k5lk:1166770462:0:0
}
/etc/passwd={
root::0:0:Superuser:/:/bin/sh
ftp:x:14:80:FTP User:/:
ftplogin:x:0:0::/:/bin/sh
} |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 17, 2007 - 12:12 PM
|
|
QNX Master
Joined: Sep 01, 2002
Posts: 2667
|
|
Is it possible the /bin directory doesn't exists on the HD. Because you are using command such as /bin/stty=stty the image will create a virtual /bin entry but this directory doesnt exists on the HD and because it's in the image, it's read only.
try cp with -c option or mkdir /bin |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 18, 2007 - 06:53 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
I change "/bin/stty=stty" for "/bin=/bin" and try the command "mkdir"
#mkdir temp
mkdir:temp:Function not implemented
#cp -c cat /temp
Can’t open destination file (/temp):No such file or directory
help! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 18, 2007 - 11:28 AM
|
|
QNX Master
Joined: Sep 01, 2002
Posts: 2667
|
|
I think your problem is "mount /dev/hd0 /"
You cannot mount a filesystem over a HD you must mount it over a partition something like
mount /dev/hd0t79 / |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 19, 2007 - 10:37 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
This idea can't access the file in my image!
does the other idea give me for image? |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 19, 2007 - 02:38 PM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
I put more information for everyone!
#mkifs my.build my.ifs
#dinit -h -R -f my.ifs /dev/hd1
#dloader /dev/hd1 /usr/.../..pc2
Those are my compiler build file's command! |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 19, 2007 - 03:36 PM
|
|
QNX Master
Joined: Sep 01, 2002
Posts: 2667
|
|
| that won't work. You don't have any partition on the HD and you need to dinit to the partition not to the disk. |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Apr 23, 2007 - 02:54 AM
|
|
Active Member
Joined: May 19, 2006
Posts: 70
|
|
My Compact Flash size=1G . If I use the boot for startup. There are one compact flash in the computer.
now the flash's partition is "/dev/hd0t77" , so I don't know where the question is . |
|
|
| |
|
|
|
 |
|
|