TOC PREV NEXT INDEX

QNX Logo


3 Introducing QNX RTP

This chapter covers the following topics:

What is QNX RTP?

Read all about it on the QNX Realtime Platform product page at our web site.

[Author's Comments: add what is QNX6?]

How to get RTP

Download RTP or order the CD online from our RTP download web site.

What is QNX 6?

Get some background information on QNX 6 from our QNX product web site. For a more technical description of the QNX 6 OS, see System Architecture

QNX 6 core components:

What is Photon?

[Author's Comments: incorporate description from 1.14 user's guide]

For more background information on the Photon microGUI, go to our QNX Realtime Platform web site.

Photon core components:

What is a Resource Manager?

QNX 6 resource managers are responsible for presenting an interface to various types of devices. This may involve managing actual hardware devices (like serial ports, parallel ports, network cards, and disk drives) or virtual devices (like /dev/null, a network filesystem, and pseudo-ttys).

A resource manager is a user-level server program that accepts messages from other programs and, optionally, communicates with hardware.

The binding between the resource manager and the client programs that use the associated resource is done through a flexible mechanism called pathname space mapping. In pathname space mapping, an association is made between a pathname and a resource manager. The resource manager sets up this pathname space mapping by informing the QNX 6 Process Manager that it is the one responsible for handling requests at (or below, in the case of filesystems), a certain mountpoint. This allows the Process Manager to associate services (i.e. functions provided by resource managers) with pathnames.

Once the resource manager has established its pathname prefix, it will receive messages whenever any client program tries to do an open(), read(), write(), etc. on that pathname.

[Author's Comments: give a list of the main resource managers & what they do]

A resource manager

Here is an example of the heart of a resource manager

initialize the dispatch interface
register the pathname with the Process Manager
DO forever
   receive a message
   SWITCH on the type of message
       CASE io_open:
           perform io_open processing
           ENDCASE
       CASE io_read:
           perform io_read processing
           ENDCASE
       CASE io_write:
           perform io_write processing
           ENDCASE
       .   // etc. handle all other messages
       .   // that may occur, performing
       .   // processing as appropriate
   ENDSWITCH
ENDDO 

The architecture contains three parts:

This message-processing structure (the switch/case, above) is required for every resource manager. However, we provide a set of convenient library functions to handle this functionality (and other key functionality as well).

For more detailed information on the resource manager concept, see System Architecture

What is the Package installer?

The Package Installer is the user interface for the QNX 6 package file system. This file system gives users a customized view of their files and directories; for an overview of this file system, see System Architecture; for more technical detail, see "Package filesystem".

The Package Installer is a resource manager (see "What is a Resource Manager?"). Once the Package Installer has established its pathname prefixes, it will receive messages whenever any client program tries to do an open(), read(), or write() on those pathnames.

You can use the following set of utilities to create, manage, and install packages. These utilities are described in the Utilities Reference.
To find out how to:
Look up:
Create packages for use with the package installer
packager
Extract information about a file from the package file system
pkgctl
Install software packages from a repository on CD-ROM or the Internet
pkg-installer

Installing a package from QNX

You can download and install a package from the QNX WWW website or CD_ROM repositories from Photon or from the command line.

Installing a package from Photon

To start the installation process from within Photon, do this:

[Author's Comments: Add something about the find button. Explaing this: the package install does resolve dependencies with a third screen. This screen has a "find" button which goes out to each repository in your hotlist and looks for packages which satisfy your installation requirements]
Installing a package from the command line

To start the installation process from the command line, you can use the package installer utility in either of two ways:

The index file contains the list of packages to be installed (must be the full path). As an example, your index file might look like this:

http://blah/package.qpm 
file:///blah/package.qpm 

[Author's Comments: this needs fleshing out to cover installs from the CD-ROM Repository and to emulate all of the steps in the Photon section)]

The package installer installs the specified packages automatically, as it does when you install from Photon.

What the package installer does

After you have started the process, the packages will be downloaded from the web site and expanded into the local repository you selected (if you needed to enter a license key, it will be used now for on-the-fly decrypting of the package). This is what the package installer does next:


The package installer may carry out other actions during this sequence. For example, a package may have dependencies listed in its manifest; dependencies contain instructions on what to do if certain conditions apply. The package installer may install or remove packages according to these dependency instructions. Some instructions recommend rather than demand a certain action and in those cases you may be asked for your preferences.

For more information on the package installer, see pkg-installer in the Utilities Reference. Also, search on "package" in the Helpviewer.

[Author's Comments: can the package installer log its actions to a file? The package installer doesn't log its actions at the moment; this facility is planned.]

After the install

After you have successfully installed a package and as long as you have permission, you will be able to access the executable file in the directory specified in the MANIFEST file (the mapping of the installed files into the union filesystem).

Usually, scripts add icons pointing to the file on the Photon shelf, but this is not always the case, e.g. compiler tools don't do this. The executable should be placed in the path: this is not the responsibility of the package installer; the file is stored where packager is told to store it.

For more information about an executable you have installed, do one of the following:

[Author's Comments: what does the user have to do to install the software and start using it? Once the package is installed, it is up to the package to make sure it is available to the user. The user should be able to run the required commands right away.]

How to make a package

You use an interactive session with the packager utility to create a set of QPR packages for use with the package installer. The packager utility prompts you for information about the package.

If you specify an existing QPM file with the -m option, packager uses the information from the file as the default answers to its questions. If you also specify the -u option, packager uses the default answers to the questions without prompting you.

The -v option controls the amount of detail in the questions; if you specify a value of 2 (expert), packager displays only the questions without the explanations.

Example packager session

First, you have to create a base directory containing all the files and symbolic links that need be installed on your target system. Assuming you created a directory called test_packager, here's an example of an interactive session with packager:

[Author's Comments: show the session and check it out with packager. There will be a packager session article available soon -- this will include some in-depth discussion about what the "right" values are for the questions it asks.]

Setting up a package repository

[Author's Comments: add information here, refer to where? This is about setting up a package repository. I believe that all you have to do is use the packager and it will take care of everything for you. Then all you need to do is tell people where this information is stored. Check out later. The new packager adds support for creating a repository - even interactively!]

Migrating from QNX4 to QNX6

If you are migrating from QNX4 to QNX 6, you will need to install the migration package from the RTP CD-ROM repository (to find out how to do this, take a look at "Installing new software"). Or download the software you need from our migration kit website.

Similarities between QNX4 and QNX 6

QNX 4 and QNX 6 are similar in several respects including the following:

Differences between QNX4 and QNX 6

QNX 4 and QNX 6 are different in several respects including the following:

Planning the migration

When you migrate from QNX 4 to QNX 6, you will want a migration plan; here are some suggestions:

Migrating a program

Migrating a program involves these three steps:

Detailed information

For detailed information on migrating from QNX 4 to QNX 6, install the migration package from the RTP CD-ROM repository (to find out how to do this, take a look at "Installing new software". Or download the software you need from our migration kit website.

Migrating from another OS to QNX 6

[Author's Comments: This section should provide answers to these questions from users: I am new to this UNIX- type world: should I start by getting to know UNIX (etc.) info from the many UNIX books out there? What are differences between QNX, UNIX, Linux,MS? What is the equivalent of the Windows registry? Are there DLLs? I am coming from Linux/Sun/MS what do I need to know?) How do I migrate from Amiga to RTP?)]

Where to start learning about RTP

RTP is similar to other UNIX-type operating systems. If you know nothing about UNIX, it's probably best to dive in and start learning about RTP from the start, because there are some differences among UNIX-type operating systems. A good book to start would be Rob Krten's book "Getting Started with Neutrino".

To learn about writing programs to run under UNIX, try Advanced Programming in the UNIX Environment by W. Richard Stevens, Addison Wesley. This book is the definitive guide to POSIX routines.

RTP, like Linux, uses POSIX threads, commonly known as Pthreads. A good book for learning about Pthreads is Programming with POSIX Threads, David R. Butenhof, Addison Wesley.

Differences between RTP and other OS

RTP-specific directories include /usr/photon, /$processor, /pkgs and /etc/system. Almost all other directories attempt to match the Filesystem Hierarchy Standard (FHS). This is a reference specification for UNIX distribution developers, package developers, and system implementers. For more inormation, see the FHS web site at http://www.pathname.com/fhs





QNX Software Systems Ltd.
http://www.qnx.com
Voice: +1 613 591 0931
Fax: +1 613 591 3579
info@qnx.com
TOC PREV NEXT INDEX