For participants only. Not for public distribution.

Note #28
Building embedded QNX images

John Nagle
Last revised July 16, 2003.

Introduction

This is a preliminary version of how to make a QNX image. It's not yet too useful.

Building a bootable CD-ROM

Approach 1

Makes a CD-ROM bootable on desktop-type PCs.This is a bit clunky, requiring two computers and a floppy drive. We hope to simplify this process shortly.

Requires:
  • A working QNX development machine with QNX 6.2.1 NC or QNX 6.2.1 PE.
  • A floppy drive and blank diskette.
  • A Windows or Linux machine with a CD writer, and a CD-R blank.
  • A network connection between the two computers.
  • The program "mkisofs".
  • The QNX program "mkifs".
  • The base QNX components  "bios.boot", "startup-bios", and "procnto".

Step 1 - build a QNX image

This process is explained in standard QNX help files. Start with the documentation roadmap, and read "Building Embedded Systems", expecially "Chapter 2, making an OS image".  Briefly, you collect together all the necessary component files, write a ".bld" file (here named "demo.bld") which describes how to put the components together, and run

mkisofs demo.bld demo.ifs

Step 2 - build a boot floppy

Put a blank diskette in the diskette drive. Make the diskette drive writeable by ordinary users by

su ****
chmod 777 /dev/fd0
Then execute
/sbin/dinit -f demo.ifs /dev/fd0
This creates a bootable floppy, which can be booted.

Step 3 - capture an image of the boot floppy as a file

Bootable CDs, which conform to something called the "El Torito Specification", actually contain a bit-for-bit image of a boot floppy, because booting from CD was a retrofit to existing PC technology. So we need the image of that floppy in a file.

mkdir boot
dd if=/dev/fd0 of=boot/boot.img bs=10k count=144

Step 4 - build a boot CD image

We then build a bit-for-bit image (an ".iso" file) of the CD to be created, using "mkisofs"
mkisofs -b boot/boot.img -c boot/boot.catalog -o bootcd.iso

Step 5 - move the image to a Windows (or Linux) machine for output to CD

Standard QNX doesn't yet write CD-R disks. Very soon, though, it will.

Step 6 - Burn .iso file to CD-R

Use something like EZ CD Creator on Windows to do this.