There should be no difference between booting from an image on a hard
disk, and the identical image in flash via a BIOS extension, provided
that the BIOS has completed configuring the system in each case.
Remember, the BIOS extension that you generate consists of two stages.
The first stage is responsible for copying itself to DRAM just under
1M, and then re-vectoring the int19 disk boot code to some other
location. It then sets up the second stage (the image_*_ext() functions)
to be vectored at int19, and then returns control to the BIOS. The
second stage doesn’t get executed until the BIOS has completed all
of its work, and attempts to boot from disk, by calling int19.
At this point, the QNX IPL code gets executed instead.
It’s possible that after the first stage of the IPL has finished
re-vectoring, that instead of doing a RET to return control to the
BIOS, it simply continues on and calls main() of the IPL, which goes
ahead and boots from flash. In this case, it’s possible that the BIOS
had more work to do, and is never given a chance to complete.
Well… I really do not know what is done at extended BIOS, since I am using
mkrom from QNX to do this. I just coded an IPL that copy image from flash to
DRAM, used mkrom on IPL, padded output to 32 kb (flash page size) and joined
to boot image.
Perhaps there is some BIOS configuration missing on IPL, but I do not know
what it could be. As I have little experience dealing with extended BIOS, I
do not know exactly what is to be done before giving control to IPL. I
thought mkrom would could deal with this.
When you boot the .altboot image from hard disk, is it being involked
by pressing a key to interrupt the flash boot routines, or is the
BIOS extension IPL somehow being bypassed altogether?
I just copy boot image I created to /.altboot and press ESC on boot time.
At this point, have you been able to rule out Photon as part of
the problem? Can you show a difference in performance between
booting to a text console from flash and from disk?
Even without Photon, performance is worse when booting from flash. For
example, when I run ‘pidin mem’, scroll is slower when booting from flash.
If so, could you please post the build file used to create the
boot image?
Below is boot build file. I #'ed photon start script file ‘ph-start’ since
there is noticible lower performance even in text mode.
#build file
[virtual=x86/bios +compress] boot = {
startup-bios
PATH=/proc/boot:/bin LD_LIBRARY_PATH=/proc/boot:/dev/shmem:/usr/lib:/lib
procnto
}
[+script] startup.script = {
seedres
pci-bios &
waitfor /dev/pci
io-net -d ne2000 -p ttcpip -p qnet host=p9
waitfor /dev/socket
devc-con &
reopen /dev/con1
[pri=20r] devc-pty &
pipe &
mqueue &
devc-ser8250 -u1 2f8,3 &
waitfor /dev/ser1
[+session] LD_LIBRARY_PATH=/proc/boot:/usr/lib:/lib:/phembed/lib esh &
LD_LIBRARY_PATH=/proc/boot:/usr/lib:/lib:/phembed/lib /phembed/ph-start
}
[type=link] /usr/lib/ldqnx.so.2 = /proc/boot/libc.so
[type=link] /phembed/lib/libAp.so = /phembed/lib/libAp.so.2
[type=link] /phembed/lib/libdisputil.so = /phembed/lib/libdisputil.so.2
[type=link] /phembed/lib/libffb.so = /phembed/lib/libffb.so.2
[type=link] /phembed/lib/libph.so = /phembed/lib/libph.so.2
[type=link] /phembed/lib/libphexlib.so = /phembed/lib/libphexlib.so.2
[type=link] /phembed/lib/libphrender.so = /phembed/lib/libphrender.so.2
libc.so
libcpp.so
libm.so
npm-ttcpip.so
npm-qnet.so
devn-ne2000.so
[data=copy]
esh
[+optional prefix=/bin]
seedres
pci-bios
io-net
devc-pty
devc-con
pipe
mqueue
devc-ser8250
esh
echo
on
ls
ps
pidin
[+raw] /phembed=…/phembed
Below is photon start script file.
#!/bin/esh
export PHOTON_PATH=/phembed
cd /phembed/bin
echo starting Photon…
on -p12 ./Photon &
on -w /dev/photon -W10
echo starting Photon Font Manager…
on -p12 ./phfontFF -d/phembed/font_repository -j -s 50K &
on -w /dev/phfont -W10
echo starting Graphics driver…
on -p12 ./io-graphics -g800x600x16 -dldevg-svga.so -I0 -d0x1039,0x6306 &
echo starting Keyboard/Mouse driver…
on -p12 ./devi-hirun kbd fd -d/dev/kbd msoft -R fd -d/dev/ser1 &
echo starting Led Resource Manager…
…/LedManager &
on -w /dev/led -W10
echo starting Sound Resource Manager…
…/SoundManager &
on -w /dev/sound -W10
echo starting Eeprom/Keyboard Resource Manager…
…/EepromKbdManager &
on -w /dev/eeprom -W10
echo starting PhAB Application
on -p12 ./Int &
ps -A -o pid,pri,args
And finally /phembed directory contents.
phembed:
…
…
bin
font_repository
lib
ph-start
phembed/bin:
…
…
EepromKbdManager
Encoder
Int
LedManager
Photon
SoundManager
devi-hirun
io-graphics
mqueue
phfontFF
phembed/font_repository:
…
…
fontdir
fontext
fontkey
fontmap
fonttype
phcursor.phf
tt2001m_.ttf
tt2002m_.ttf
tt2003m_.ttf
tt2004m_.ttf
tt2009m_.ttf
tt2011m_.ttf
phembed/lib:
…
…
devg-svga.so
devg-vesabios.so
libAp.so.2
libdisputil.so.2
libffb.so.2
libph.so.2
libphexlib.so.2
libphrender.so.2
Regards,
Ricardo Kazumi Ashikawa