正在做一个硬盘启动的东西。BUILD文件如下:
[+compress]
[virtual=x86,bios] .bootstrap = {
startup-bios -NSBS
PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin:/usr/photon/bin LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/lib:/lib/dll:/usr/lib:/usr/dll procnto
}
[+script] .script = {
Start up some consoles
devc-con -n4 &
reopen /dev/con1
Start the pci server
pci-bios &
waitfor /dev/pci
DiskOnChip driver
devb-eide blk automount=hd0t79:/ &
Wait for a bin for the rest of the commands (up to 60 secs)
waitfor /dev/hd0t79 60
Some common servers
pipe &
mqueue &
devc-ser8250 &
devc-pty &
These env variables inherited by all the programs which follow
SYSNAME=nto
TERM=vt100
HOME=/
PHOTON_PATH=/usr/photon
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
hostname sbs
io-net -dspeedo -pqnet
[+session] sh &
Photon &
on -w /dev/photon -W10
/usr/photon/bin/phfontFA -d /usr/photon/font_repository -j -s 300k &
on -w /dev/phfont -W10
io-graphics -g640x480x8 -dldevg-vga.so -Pvga4.pal
sleep 5
/usr/photon/bin/devi-hirun kbd fd -d /dev/kbd ps2 mousedev &
sleep 5
devi-elo smartset fd -d/dev/ser2 &
#pterm &
./mynew
pterm &
#[+session] login -p
}
Cheat and make the /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] /usr/lib/libsocket.so.2=/proc/boot/libsocket.so
We use the “c” shared lib (which also contains the runtime linker)
libc.so
Just incase someone needs floating point…
fpemu.so.2
Include the socket library
libsocket.so
Include the disk files so we can access files on DiskOnChip
libcam.so
io-blk.so
filesystem required shared libs
cam-disk.so
fs-qnx4.so
devn-speedo.so
npm-qnet.so
npm-tcpip.so=/lib/dll/npm-tcpip-v4.so
[data=copy]
Include a console driver
devc-con
devc-ser8250
waitfor
ifconfig
io-net
ping
pipe
mqueue
devc-pty
Include pci server
pci-bios
ls
pidin
shutdown
slay
mount
devb-eide
devb-fdc
cp
rm
sh=/bin/fesh
sync
最后启动后显示的是这样的
io-blk:Failed to automount filesystem at ‘/’-Program version wrong
Path=0 - Cyrix Cx5530
target=0 lun=0 Direct-Access(0) HTS…
Unable to start “pipe”(2)
Unable to start “mqueue”(2)
…
Unable to access “dev/ser1”(2)
…
Unable to start “sh”(2)
哪位老兄能指点一下迷津啊,头发都快调光了