Skip navigation.
Home
The QNX Community Portal

View topic - How to get QNX 2 running on Bochs under QNX 6 :-)

How to get QNX 2 running on Bochs under QNX 6 :-)

Read-only archive of qnx.porting (Discuss migrating applications from QNX4, VxWorks, PSOS, or Linux to QNX Neutrino) at inn.qnx.com

How to get QNX 2 running on Bochs under QNX 6 :-)

Postby rk » Wed Aug 11, 2004 11:28 pm

Ok, just got QNX 2 running under Bochs under QNX 6 :-)

Here's the list of gotchas and tricks.

Compilation:
Bochs will not compile out of the box. You need to perform the following
hacks:
i) add -lsocket to the top level Makefile
ii) gui/gui.cc procedure bx_gui_c::snapshot_handler(void), you need
to comment out the code that does the strcmp() against the "wx"
string; else it will SIGSEGV when you take a snapshot
iii) gui/textconfig.cc you need to remove the extern "C" {} stuff
around the system headers
iv) same thing in top-level bochs.h

Environment and bootup procedure:
The main trick to booting bochs off the hard disk is the hard disk
geometry and the hard disk driver.

I used the option "2" driver, rather than the option "3" driver
from the QNX 2 installation menu (option "3" says "recommended for
IDE drives"; I used the older one).

(This is the driver invoked by the line "mount disk 3 /drivers/disk.at")

The hard disk needs to be created with something like "dd".

I created a 51.6MB disk by:

dd if=/dev/zero of=disk_3 count=100800

Then you need to point the bochs emulator at the floppy disk image
and the hard disk image.

Here's the configuration file I use, I saved it to "bochs-qnx2.rc":

# configuration file generated by Bochs
config_interface: textconfig
display_library: x
megs: 32
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/local/share/bochs/VGABIOS-lgpl-latest
boot: disk
floppya: 1_44="/root/bochs-qnx2.floppy", status=inserted
floppyb: 1_44="none", status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, translation=none, path="/data/static/images/qnx220/disks/drive_3", cylinders=100, heads=16, spt=63, biosdetect=auto, model="Generic 1234"
ata1: enabled=0
ata2: enabled=0
ata3: enabled=0
parport1: enabled=1, file=""
com1: enabled=1, dev=""
usb1: enabled=1, ioaddr=0xff80, irq=10
# no sb16
floppy_bootsig_check: disabled=0
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
ips: 1000000
text_snapshot_check: 0
mouse: enabled=0
private_colormap: enabled=0
i440fxsupport: enabled=0
clock: sync=realtime, time0=local
# no ne2k
newharddrivesupport: enabled=1
# no loader
log: /root/bochs-qnx2.log
logprefix: %t%e%d
debugger_log: -
panic: action=report
error: action=report
info: action=report
debug: action=ignore
pass: action=fatal
keyboard_mapping: enabled=0, map=
keyboard_type: mf
user_shortcut: keys=none
# no cmosimage

The floppy lives in /root/bochs-qnx2.floppy, and the 51.6MB disk lives in the
/data/static/images... path. BE CAREFFUL WITH THE HEADS and SPT values!
This took me about an hour to figure out; I naively used an incorrect value
and there was grief.

Anyway, once you get this configured, run bochs, and go into the edit menu
to boot off the floppy (the configuration file above is set to book off the
hard disk, 'cuz that's what you'll be doing 99.999% of the time after).

Finally, you might want to create a /usr/local/bin/ script called "qnx2":

#! /bin/sh
nice bochs -f /root/bochs-qnx2.rc

Run bochs, install qnx2, and then reboot onto the hard disk.

Enjoy!

-RK

(QNX4 is next). :-)

--
[If replying via email, you'll need to click on the URL that's emailed to you
afterwards to forward the email to me -- spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/
rk
Senior Member
 
Posts: 172
Joined: Mon Sep 15, 2003 3:58 pm

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby Miguel Simon » Thu Aug 12, 2004 4:42 am

Hi RK...

Interesting. But... why? I suppose that you are just having fun, ah?
:) Good for you!

Can you do the same for QNX 4.2x? (I am not sure why any one would want
to do this)? Just wondering...

Regards...

Miguel.

PS: my dear one just peaked onto the computer and said: "...are you
spending time with your QNX geek friends again?... :| " I could not
help but to laugh because I was just writing this eamil asking you
'why?'... I replied that 'we are not geeks...', but she insists that we
are 'gearheads' just the same. Humm... perception is king! Any way, too
many jokes, too little time... :)

P.S.2. just for fun: http://www.geekcode.com/


Robert Krten wrote:

Ok, just got QNX 2 running under Bochs under QNX 6 :-)

Here's the list of gotchas and tricks.

Compilation:
Bochs will not compile out of the box. You need to perform the following
hacks:
i) add -lsocket to the top level Makefile
ii) gui/gui.cc procedure bx_gui_c::snapshot_handler(void), you need
to comment out the code that does the strcmp() against the "wx"
string; else it will SIGSEGV when you take a snapshot
iii) gui/textconfig.cc you need to remove the extern "C" {} stuff
around the system headers
iv) same thing in top-level bochs.h

Environment and bootup procedure:
The main trick to booting bochs off the hard disk is the hard disk
geometry and the hard disk driver.

I used the option "2" driver, rather than the option "3" driver
from the QNX 2 installation menu (option "3" says "recommended for
IDE drives"; I used the older one).

(This is the driver invoked by the line "mount disk 3 /drivers/disk.at")

The hard disk needs to be created with something like "dd".

I created a 51.6MB disk by:

dd if=/dev/zero of=disk_3 count=100800

Then you need to point the bochs emulator at the floppy disk image
and the hard disk image.

Here's the configuration file I use, I saved it to "bochs-qnx2.rc":

# configuration file generated by Bochs
config_interface: textconfig
display_library: x
megs: 32
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/local/share/bochs/VGABIOS-lgpl-latest
boot: disk
floppya: 1_44="/root/bochs-qnx2.floppy", status=inserted
floppyb: 1_44="none", status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, translation=none, path="/data/static/images/qnx220/disks/drive_3", cylinders=100, heads=16, spt=63, biosdetect=auto, model="Generic 1234"
ata1: enabled=0
ata2: enabled=0
ata3: enabled=0
parport1: enabled=1, file=""
com1: enabled=1, dev=""
usb1: enabled=1, ioaddr=0xff80, irq=10
# no sb16
floppy_bootsig_check: disabled=0
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
ips: 1000000
text_snapshot_check: 0
mouse: enabled=0
private_colormap: enabled=0
i440fxsupport: enabled=0
clock: sync=realtime, time0=local
# no ne2k
newharddrivesupport: enabled=1
# no loader
log: /root/bochs-qnx2.log
logprefix: %t%e%d
debugger_log: -
panic: action=report
error: action=report
info: action=report
debug: action=ignore
pass: action=fatal
keyboard_mapping: enabled=0, map=
keyboard_type: mf
user_shortcut: keys=none
# no cmosimage

The floppy lives in /root/bochs-qnx2.floppy, and the 51.6MB disk lives in the
/data/static/images... path. BE CAREFFUL WITH THE HEADS and SPT values!
This took me about an hour to figure out; I naively used an incorrect value
and there was grief.

Anyway, once you get this configured, run bochs, and go into the edit menu
to boot off the floppy (the configuration file above is set to book off the
hard disk, 'cuz that's what you'll be doing 99.999% of the time after).

Finally, you might want to create a /usr/local/bin/ script called "qnx2":

#! /bin/sh
nice bochs -f /root/bochs-qnx2.rc

Run bochs, install qnx2, and then reboot onto the hard disk.

Enjoy!

-RK

(QNX4 is next). :-)
Miguel Simon
 

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby rk » Thu Aug 12, 2004 11:15 am

Miguel Simon <simon@ou.edu> wrote:
Hi RK...

Interesting. But... why? I suppose that you are just having fun, ah?
:) Good for you!

Can you do the same for QNX 4.2x? (I am not sure why any one would want
to do this)? Just wondering...

Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...

Regards...

Miguel.

PS: my dear one just peaked onto the computer and said: "...are you
spending time with your QNX geek friends again?... :| " I could not
help but to laugh because I was just writing this eamil asking you
'why?'... I replied that 'we are not geeks...', but she insists that we
are 'gearheads' just the same. Humm... perception is king! Any way, too
many jokes, too little time... :)

P.S.2. just for fun: http://www.geekcode.com/

:-)

Cheers,
-RK

Robert Krten wrote:

Ok, just got QNX 2 running under Bochs under QNX 6 :-)

Here's the list of gotchas and tricks.

Compilation:
Bochs will not compile out of the box. You need to perform the following
hacks:
i) add -lsocket to the top level Makefile
ii) gui/gui.cc procedure bx_gui_c::snapshot_handler(void), you need
to comment out the code that does the strcmp() against the "wx"
string; else it will SIGSEGV when you take a snapshot
iii) gui/textconfig.cc you need to remove the extern "C" {} stuff
around the system headers
iv) same thing in top-level bochs.h

Environment and bootup procedure:
The main trick to booting bochs off the hard disk is the hard disk
geometry and the hard disk driver.

I used the option "2" driver, rather than the option "3" driver
from the QNX 2 installation menu (option "3" says "recommended for
IDE drives"; I used the older one).

(This is the driver invoked by the line "mount disk 3 /drivers/disk.at")

The hard disk needs to be created with something like "dd".

I created a 51.6MB disk by:

dd if=/dev/zero of=disk_3 count=100800

Then you need to point the bochs emulator at the floppy disk image
and the hard disk image.

Here's the configuration file I use, I saved it to "bochs-qnx2.rc":

# configuration file generated by Bochs
config_interface: textconfig
display_library: x
megs: 32
romimage: file=/usr/local/share/bochs/BIOS-bochs-latest, address=0xf0000
vgaromimage: /usr/local/share/bochs/VGABIOS-lgpl-latest
boot: disk
floppya: 1_44="/root/bochs-qnx2.floppy", status=inserted
floppyb: 1_44="none", status=inserted
ata0: enabled=1, ioaddr1=0x1f0, ioaddr2=0x3f0, irq=14
ata0-master: type=disk, mode=flat, translation=none, path="/data/static/images/qnx220/disks/drive_3", cylinders=100, heads=16, spt=63, biosdetect=auto, model="Generic 1234"
ata1: enabled=0
ata2: enabled=0
ata3: enabled=0
parport1: enabled=1, file=""
com1: enabled=1, dev=""
usb1: enabled=1, ioaddr=0xff80, irq=10
# no sb16
floppy_bootsig_check: disabled=0
vga_update_interval: 300000
keyboard_serial_delay: 250
keyboard_paste_delay: 100000
floppy_command_delay: 500
ips: 1000000
text_snapshot_check: 0
mouse: enabled=0
private_colormap: enabled=0
i440fxsupport: enabled=0
clock: sync=realtime, time0=local
# no ne2k
newharddrivesupport: enabled=1
# no loader
log: /root/bochs-qnx2.log
logprefix: %t%e%d
debugger_log: -
panic: action=report
error: action=report
info: action=report
debug: action=ignore
pass: action=fatal
keyboard_mapping: enabled=0, map=
keyboard_type: mf
user_shortcut: keys=none
# no cmosimage

The floppy lives in /root/bochs-qnx2.floppy, and the 51.6MB disk lives in the
/data/static/images... path. BE CAREFFUL WITH THE HEADS and SPT values!
This took me about an hour to figure out; I naively used an incorrect value
and there was grief.

Anyway, once you get this configured, run bochs, and go into the edit menu
to boot off the floppy (the configuration file above is set to book off the
hard disk, 'cuz that's what you'll be doing 99.999% of the time after).

Finally, you might want to create a /usr/local/bin/ script called "qnx2":

#! /bin/sh
nice bochs -f /root/bochs-qnx2.rc

Run bochs, install qnx2, and then reboot onto the hard disk.

Enjoy!

-RK

(QNX4 is next). :-)



--
[If replying via email, you'll need to click on the URL that's emailed to you
afterwards to forward the email to me -- spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/
rk
Senior Member
 
Posts: 172
Joined: Mon Sep 15, 2003 3:58 pm

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby bilcar » Thu Aug 12, 2004 12:47 pm

Miguel Simon <simon@ou.edu> wrote:

MS > PS: my dear one just peaked onto the computer and said: "...are you
MS > spending time with your QNX geek friends again?... :| " I could not
MS > help but to laugh because I was just writing this eamil asking you
MS > 'why?'... I replied that 'we are not geeks...', but she insists that we
MS > are 'gearheads' just the same. Humm... perception is king! Any way, too
MS > many jokes, too little time... :)

MS > P.S.2. just for fun: http://www.geekcode.com/


Hey now. I'm a geek and damn proud of it!
bilcar
Senior Member
 
Posts: 573
Joined: Wed Feb 04, 2004 5:50 pm
Location: Crete, IL

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby rk » Thu Aug 12, 2004 5:26 pm

Miguel Simon <simon@ou.edu> wrote:
Hi RK...

Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)

I haven't done QNX 2 work in about 5 years; last time I touched it was
a quick "maintenance" kind of thing :-)

It's very small and fast.

At the risk of getting booted off the conferences forever, I always
liked the joke "QNX 2, what Neutrino was meant to be" :-)
[It's even funnier if you recall the ad campaign that QNX had for
QNX 4, which was, "QNX 4: what UNIX was meant to be"]

Cheers,
-RK


Regards...

Miguel.


Robert Krten wrote:

Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...



:-)

Cheers,
-RK



--
[If replying via email, you'll need to click on the URL that's emailed to you
afterwards to forward the email to me -- spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/
rk
Senior Member
 
Posts: 172
Joined: Mon Sep 15, 2003 3:58 pm

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby Miguel Simon » Thu Aug 12, 2004 5:54 pm

Hi RK...

Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)

Regards...

Miguel.


Robert Krten wrote:
Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...



:-)

Cheers,
-RK
Miguel Simon
 

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby rk » Thu Aug 12, 2004 6:56 pm

Colin Burgess <cburgess@qnx.com> wrote:
Robert Krten wrote:

Miguel Simon <simon@ou.edu> wrote:

Hi RK...


Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)


I haven't done QNX 2 work in about 5 years; last time I touched it was
a quick "maintenance" kind of thing :-)

It's very small and fast.

At the risk of getting booted off the conferences forever, I always
liked the joke "QNX 2, what Neutrino was meant to be" :-)
[It's even funnier if you recall the ad campaign that QNX had for
QNX 4, which was, "QNX 4: what UNIX was meant to be"]

Here's a challenge, RK. Take a project that you wrote for QNX6, and
'back port' it to QNX2.

Write a blog about your adventures.

I'm sure it would be interesting... :v)

Oh - but don't worry about trying anything with TCP/IP... or threads... :v)

#include <stdio.h>

main ()
{
printf ("Hello, world\n");
}

Done. QED.

So, am I booted off the conferences now? :-)

Cheers,
-RK

Robert Krten wrote:

Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...



:-)

Cheers,
-RK





--
cburgess@qnx.com

--
[If replying via email, you'll need to click on the URL that's emailed to you
afterwards to forward the email to me -- spam filters and all that]
Robert Krten, PDP minicomputer collector http://www.parse.com/~pdp8/
rk
Senior Member
 
Posts: 172
Joined: Mon Sep 15, 2003 3:58 pm

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby Colin Burgess » Thu Aug 12, 2004 7:02 pm

Robert Krten wrote:

Miguel Simon <simon@ou.edu> wrote:

Hi RK...


Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)


I haven't done QNX 2 work in about 5 years; last time I touched it was
a quick "maintenance" kind of thing :-)

It's very small and fast.

At the risk of getting booted off the conferences forever, I always
liked the joke "QNX 2, what Neutrino was meant to be" :-)
[It's even funnier if you recall the ad campaign that QNX had for
QNX 4, which was, "QNX 4: what UNIX was meant to be"]

Here's a challenge, RK. Take a project that you wrote for QNX6, and
'back port' it to QNX2.

Write a blog about your adventures.

I'm sure it would be interesting... :v)

Oh - but don't worry about trying anything with TCP/IP... or threads... :v)


Cheers,
-RK



Regards...


Miguel.



Robert Krten wrote:

Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...



:-)

Cheers,
-RK





--
cburgess@qnx.com
Colin Burgess
 

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby Colin Burgess » Thu Aug 12, 2004 7:55 pm

How much did you charge the customer for that project?!!

What about documentation, testing etc? ;v)

Not to mention the Pizza! :vD

Robert Krten wrote:
Colin Burgess <cburgess@qnx.com> wrote:

Robert Krten wrote:


Miguel Simon <simon@ou.edu> wrote:


Hi RK...


Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)


I haven't done QNX 2 work in about 5 years; last time I touched it was
a quick "maintenance" kind of thing :-)

It's very small and fast.

At the risk of getting booted off the conferences forever, I always
liked the joke "QNX 2, what Neutrino was meant to be" :-)
[It's even funnier if you recall the ad campaign that QNX had for
QNX 4, which was, "QNX 4: what UNIX was meant to be"]


Here's a challenge, RK. Take a project that you wrote for QNX6, and
'back port' it to QNX2.


Write a blog about your adventures.


I'm sure it would be interesting... :v)


Oh - but don't worry about trying anything with TCP/IP... or threads... :v)


#include <stdio.h

main ()
{
printf ("Hello, world\n");
}

Done. QED.

So, am I booted off the conferences now? :-)

Cheers,
-RK


Robert Krten wrote:


Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...



:-)

Cheers,
-RK





--
cburgess@qnx.com



--
cburgess@qnx.com
Colin Burgess
 

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby bilcar » Fri Aug 13, 2004 3:07 pm

What was amazing about QNX2 was multi-user multi-tasking on an 8088!

It was light years ahead of it's time.


Robert Krten <rk@parse.com> wrote:
RK > Miguel Simon <simon@ou.edu> wrote:
Hi RK...

Do you still do work on QNX 2? What applications? (I never saw QNX 2
in action)

RK > I haven't done QNX 2 work in about 5 years; last time I touched it was
RK > a quick "maintenance" kind of thing :-)

RK > It's very small and fast.

RK > At the risk of getting booted off the conferences forever, I always
RK > liked the joke "QNX 2, what Neutrino was meant to be" :-)
RK > [It's even funnier if you recall the ad campaign that QNX had for
RK > QNX 4, which was, "QNX 4: what UNIX was meant to be"]

RK > Cheers,
RK > -RK


Regards...

Miguel.


Robert Krten wrote:

Working on QNX 4.

As for why... I think I'm going to run freeBSD as my desktop, which means
that I still need to do QNX 4 and QNX 6 development -- instead of wasting
power having a qnx 4, and qnx6 box powered up, just emulate it :-)

QNX 2 is actually an "important" accomplishment because I've heard that
a lot of the new boxes won't run QNX 2 -- this means that I can actually
develop QNX 2 code in case someone needs it...
bilcar
Senior Member
 
Posts: 573
Joined: Wed Feb 04, 2004 5:50 pm
Location: Crete, IL

Re: How to get QNX 2 running on Bochs under QNX 6 :-)

Postby Miguel Simon » Fri Aug 13, 2004 6:03 pm

Hi...

That is impressive, but 8088 is not supported any more, is it?.

Regards...

Miguel.


Bill Caroselli wrote:
What was amazing about QNX2 was multi-user multi-tasking on an 8088!

It was light years ahead of it's time.

Miguel Simon
 


Return to qnx.porting

Who is online

Users browsing this forum: No registered users and 1 guest