Project Home
Project Home
Trackers
Trackers
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Booting QNX on x86 from CompactFlash: (3 Items)
   
Booting QNX on x86 from CompactFlash  
I'm having trouble getting QNX to boot on my x86 board, from a CompactFlash card. I'm new to this whole area, so I may 
be making an obvious mistake, but I can't work out what is wrong.

The board is an Advantech PCM 3370F PC104 with an x86 processor and bios. I developing on a Windows machine. Currently 
I've got it booting over the network (it loads the etherboot bootloader from CD-ROM which downloads my QNX OS image via 
TFTP). This works fine - my OS image is in ELF format, and it boots and works perfectly. What I am trying to do is boot 
my image from a 1GB CompactFlash card connected via an IDE adapter.

When I try to boot from the flash disk, I get:

press F1-F4 to select drive or select partition 1? 1
Hit Esc for .altboot.............................

It prints dots for a while then freezes (no error message or character). My understanding is that this means the QNX 
bootloader is running, but failing to load the OS image (but for some reason does not give any error message).

What I've tried so far:

From within QNX, I used fdisk to create a QNX4 partition on the disk (I've tried a small partition and one filling the 
whole disk with the same results), and made that partition bootable. I've then used 

dinit -f image.ifs -h /dev/hd1t77 

to initialise the partition and write the image to disk. I've run dcheck and the disk is fine. The image I'm using for 
this is the same one that boots successfully over the network, but changed from ELF format to bios format. The .boot 
file at the root of the flash disk filesystem appears to be the correct image.

Is there something obvious that I'm doing wrong here? Should this be working? Any suggestions would be more than welcome
.

Cheers.
Re: Booting QNX on x86 from CompactFlash  
Hi Alex,

Try running 'dloader /dev/hd1t77 pc2' to try the other second-stage boot loader.

As I understand things, PC BIOSes today have two different BIOS calls to access mass storage devices: a legacy call that
 was part of the original PC BIOS specification, but does not allow addressing above 504MB without some kind of 
translation support in the BIOS; and a second extended call that allowed for direct addressing to the large disk.  QNX 
ships two second-stage loaders (the program that reads the .boot file from the disk), one for each call [pc2 for the 
extended call, pc2-flop for the legacy call].  By default dinit loads the legacy pc2-flop loader which maximizes 
compatibility with older BIOSes, but tends to break on "large" disks because the BIOS translation when using the legacy 
call may not match the direct addressing used by the QNX native driver.

We use CFs as our system drives on a variety of different boards in a number of different form factors.  Unfortunately 
we've found that neither pc2 nor pc2-flop works reliably in all combinations, but the pc2 loader seems to have a higher 
success rate so far.

Hope this helps,

-Will
Re: Booting QNX on x86 from CompactFlash  
Hi Will,

Thank you so much. That worked perfectly. 

Strangely enough, I thought I had tried that previously with no effect, but clearly I did something wrong last time.

Thanks for you help!

Alex.