xtang你好,我是一个QNX初学者,我想问一下,做一个可启动的系统镜像的具体步骤有哪些?包括怎么用软盘之类的把它引导启动!我想先在一台x86的PC上自己做一个简单的系统。我也看了帮助文档,知道应该先做一个buildfile,然后用mkifs命令生成.ifs文件,但就是不知道接下来应该怎么做了!
问题对你来说可能有点简单,但是恳切的希望你能解答一下!
谢谢你了!!!
做镜像就是生成这个.ifs,怎么load这个.ifs文件,取决于你用的板子。
好一点的,有tftp支持,可以通过tftp把这个文件下传到板子上去执行。或者,可以通过串口传到板子上去。
如果是标准的有BIOS的x86,用你生成的.ifs覆盖/.boot就行了(QNX4文件系统)。如果你用的是QNX6文件系统,/.boot是个目录,直接把你的.ifs放在/.boot下就行了。
谢谢xtang的指导!
我现在想在一台x86的PC机裸机上装一个系统。用下面的buildfile生成了一个.ifs镜像,用U盘引导启动PC机可以成功启动。
###########################################################################
QNX Neutrino trunk on an PC BIOS compatible system
This is for building a bootable neutrino image with a minimal
filesystem. (i.e. only what is in the image)
Note that the default image links at 4M. If you have 4M or less,
uncomment the line below
[image=1m]
###########################################################################
[virtual=x86,bios +compress] boot = {
startup-bios
PATH=/proc/boot procnto -v
}
[+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
Start up some consoles
devc-con -n4 &
reopen /dev/con1
display_msg Welcome to QNX Neutrino 6.4.1
slogger &
Start the pci server
seedres
pci-bios &
waitfor /dev/pci
Some common servers
pipe &
mqueue &
devc-ser8250 -e &
devc-pty &
display_msg “—> Starting EIDE Driver”
devb-eide
waitfor /dev/hd0t77
Mount one QNX 4 filesystem as /
mount /dev/hd0t77 /
display_msg “—> Starting /etc/rc.d/rc.local”
/etc/rc.d/rc.local
\
Start a debug server for debugging programs
waitfor /dev/ser1
[+session] pdebug /dev/ser1 &
These env variables inherited by all the programs which follow
SYSNAME=nto
TERM=qansi
HOME=/root
PATH=:/proc/boot:/bin:/usr/bin:/opt/bin:/sbin:/usr/sbin:/usr/photon/bin
LD_LIBRARY_PATH=:/proc/boot:/lib:/usr/lib:/lib/dll:/opt/lib
Start some extra shells on other consoles
reopen /dev/con2
[+session] sh &
reopen /dev/con3
[+session] sh &
Start a high priority shell just in case…
reopen /dev/con4
[pri=25 +session] sh &
Start the main shell
reopen /dev/con1
[+session] sh
[+session] login -p
}
Cheat and make the /temp point to the shared memory area…
[type=link] /tmp=/dev/shmem
Redirect console messages for syslog
[type=link] /dev/console=/dev/con1
We use the “c” shared lib (which also contains the runtime linker)
libc.so
uncomment for legacy binary support (Momentics 6.3.2 and earlier)
#libc.so.2
Just incase someone needs floating point…
fpemu.so.2
The files above this line can be shared by mutiple processes
[data=c]
Executables must currently be below this line
Include a console driver
devc-con
Include pci server
pci-bios
seedres
\
Include all tie files for the default filesystems
libcam.so
io-blk.so
cam-disk.so
fs-qnx4.so
fs-dos.so
devb-eide
\
Use the “public domain korn shell” as the default shell “sh”
sh=ksh
or use the smaller non-posix “Fat Embedded Shell” as the default shell “sh”
#sh=fesh
Other executables
pdebug
pipe
mqueue
devc-ser8250
devc-pty
ls
cat
pidin
uname
slogger
sloginfo
mount
env
就是用dinit -h /dev/umass0t11初始化U盘,然后再用.ifs镜像文件覆盖U盘里面的.boot文件,就可以引导成功PC机。请问
(1)用U盘引导启动就是这样做的吗?
(2)我想在里面加图形界面的话,应该怎么做?
谢谢!!!