Home
Developer Resources

packagebsp

PDF Documents
Caution: This version of this document is no longer maintained. For the latest documentation, see http://www.qnx.com/developers/docs.

packagebsp

Package a board support package (QNX Neutrino)

Syntax:

QNX Neutrino and Linux hosts:

packagebsp [-BhQv] [-a base_installation] [-c config_file] [-d dest_dir] [-e shortname]
           [-f version] [-g longname] [-i images_root] [-j prebuilt_root] [-k release_notes]
           [-l license_file] [-m thirdparty_shiplist] [-n doc_root]
           [-o source_shiplist] [-p plugin[,plugin...]]
           [-q doc_shiplist] [-r images_shiplist] [-s source_root] [-t prebuilt_shiplist]
           [-x xml_path]

Windows hosts:

ksh $QNX_HOST/usr/bin/packagebsp options

Runs on:

Neutrino, Windows, Linux

Options:

You can specify most options on the command line or in a configuration file. In the tables below, "Key" is the string that identifies the option in a configuration file. You can use command-line options to override the settings in the configuration file.


Note: There are a lot of options -- which is why we've used arbitrary letters for them -- so you might find it more convenient to specify the settings in a configuration file than on the command line. We've included a configuration file that you can use as a template.

Some of the options are in pairs; one might specify the root directory of an optional component, while another specifies the shiplist. If you specify only one of these options, packagebsp doesn't add the optional component.


You can specify these options only on the command line:

-B
Package binaries only -- no source.
-c config_file
Get the settings from the specified configuration file. For an example, see "Configuration file," below.
-h
Display help information.
-Q
Be quiet; suppress normal output, but still display error messages.
-v
Be verbose.

Note: The -Q and -v options are mutually exclusive.

You must specify the following items, either on the command line or in the configuration file:

Option Key Description
-a base_installation base The version of QNX Momentics that you must have installed for the BSP (e.g. 6.3.0 SP2).
-d dest_dir dst_dir The directory to put the zip files in.
-e shortname bsp_shortname The short form of the BSP name, to be used in the name of the zip file.
-f version version The version of the BSP (e.g. 1.0.1)
-g longname name The full name of the BSP, to be used in the XML file.
-j prebuilt_root prebuilt_root The root of the directory structure containing any prebuilt items (e.g. libraries and binaries)
-l license_file license ("el") The path to a text file that contains the license for the BSP. The script puts this into the root directory of the zip file as license.txt.
-t prebuilt_shiplist prebuiltshiplist The shiplist for the prebuilt items.

If you want to include the source code -- that is, you aren't using the -B (binaries only) option -- you must also specify the following items, either on the command line or in the configuration file:

Option Key Description
-s source_root src_root The root of the directory structure that contains the source files, as well as the Makefile that you need to build the IFS images on the command line.
-o source_shiplist srcshiplist The path to the shiplist of source files.
-x xml_path srcxml_file The path of the source.xml file that the IDE uses for the BSP. For an example, see "source.xml," below.

The following items are optional; if you don't specify them on the command line or in the configuration file, they aren't included in the package. If you specify a root path for an item, you must also specify a shiplist for it.

Option Key Description
-m thirdparty_shiplist thirdp_license The shiplist for any third-party license files.
-n doc_root doc_root The root of the directory structure that contains the documentation.
-p plugin[,plugin...] doc_plugin A comma-separated list of paths to plugins or JAR files that contain the documentation in a form suitable for the IDE's help system.
-q doc_shiplist docshiplist The shiplist for the documentation. We've provided some HTML templates that you can modify to suit your BSP.
-i images_root img_root The root of the directory structure that contains any OS images.
-r images_shiplist imgshiplist The shiplist for the images.
-k release_notes relnote The path for the release notes. You should use the release notes to identify the board or boards that your BSP supports, along with any known issues and other useful information.

Description:

The packagebsp script packages a BSP that you've developed so that it will be compatible with QNX Momentics. This script uses zip to create an archive for all supported hosts.

You can use the command line or a configuration file to specify the following inputs to the packagebsp script:

Depending on the options you specify, the script produces:

Shiplists

As described above, you use a shiplist to identify the files for various components of a BSP. All of the shiplists are in the same format:

Here's an example:

#################################################
# Source Shiplist for the Freescale Sandpoint BSP
#################################################

hardware/Makefile
hardware/startup/Makefile
hardware/startup/lib/
hardware/startup/boards/Makefile
hardware/startup/boards/common.mk
hardware/startup/boards/sandpoint/

hardware/ipl/lib/
hardware/ipl/Makefile
hardware/ipl/boards/Makefile
hardware/ipl/boards/common.mk
hardware/ipl/boards/sandpoint/

hardware/flash/mtd-flash/
hardware/flash/Makefile
hardware/flash/boards/Makefile
hardware/flash/boards/common.mk
hardware/flash/boards/generic/

hardware/devc/Makefile
hardware/devc/common.mk
hardware/devc/public/hw/8250.h
hardware/devc/public/hw/bcm1250.h
hardware/devc/public/hw/dsiu.h
hardware/devc/public/hw/s2681.h
hardware/devc/public/hw/ucb1300.h
hardware/devc/public/hw/zscc.h
hardware/devc/public/ppc/403spu.h
hardware/devc/ser8250/

hardware/pci/Makefile
hardware/pci/common.mk
hardware/pci/public/
hardware/pci/include/dl.h
hardware/pci/include/dl_sandpoint.h
hardware/pci/include/pcidrvr.h
hardware/pci/include/server.h
hardware/pci/dl.c
hardware/pci/server.c
hardware/pci/sandpoint/  

You can create a shiplist by listing all of the files in directory (the sandpoint_1.0.1/binaries directory in this case):

cd sandpoint_1.0.1/binaries
find . ! -type d > ../prebuiltshiplist

On Windows, the DOS version of find is before the QNX version in your path. If you use cmd.exe, you should use:

%QNX_HOST%\usr\bin\find . ! -type d > ../prebuiltshiplist

but if you use bash or ksh, you should use:

$QNX_HOST/usr/bin/find . ! -type d > ../prebuiltshiplist

You can edit the resulting file to remove items that you don't want to ship.

Configuration file

The configuration file provides information for the shiplist locations, BSP name, documentation location, release notes (both location and name), source.xml location and the version of the BSP.

Comments start with a number sign (#) and continue until the end of the line. Each line is a name-value pair, using the keys given earlier. Here's an example:

#######################################
name              Freescale Sandpoint
version           1.0.1
bsp_shortname     freescale-sandpoint
dst_dir           sandpoint_1.0.1/package
base              QNX Momentics 6.3.0 SP1
src_root          sandpoint_1.0.1/source
img_root          sandpoint_1.0.1/images
doc_root          sandpoint_1.0.1/docs
prebuilt_root     sandpoint_1.0.1/prebuilt
relnote           sandpoint_1.0.1/freescale-sandpoint_rel.html
srcshiplist       sandpoint_1.0.1/srcshiplist
docshiplist       sandpoint_1.0.1/docshiplist
imgshiplist       sandpoint_1.0.1/imgshiplist
prebuiltshiplist  sandpoint_1.0.1/prebuiltshiplist
srcxml_file       sandpoint_1.0.1/source.xml
license           sandpoint_1.0.0/license.txt
#####################################

source.xml

The IDE uses the source.xml to build and display information about a BSP. Here's an example for the Freescale Sandpoint board:

<!--  Unless otherwise specified, values/attributes are free-form strings   --> 
<!--  type is currently either BSP or SourceOnly   --> 
<sourcePackage type="BSP" id="bsp-freescale-sandpoint">
  <title>Freescale Sandpoint</title> 
  <release>1.0.1</release> 
  <description>This package contains the source and build files for 
targeting QNX Neutrino on the Freescale Sandpoint reference 
board. This includes support for the MPC750, MPC755, 
MPC7400, MPC7410, MPC7450, MPC7447A, MPC7455, 
MPC8240, and MPC8245.</description> 
  <vendor>QNX Software Systems</vendor> 
  <qnxTargetVersion>6.3.0SP1</qnxTargetVersion> 
  <qnxTargetCPU variant="ppcbe">PowerPC</qnxTargetCPU> 
<!--  type is currently only import, will be extended in the future. --> 
<bsp type="import">
  <import id="sandpoint-flash">images/sandpoint-flash.build</import> 
  <import id="sandpoint">src/hardware/startup/boards/sandpoint/build</import> 
  <imageCombine iplEnable="true" iplFileName="ipl-sandpoint" 
iplPadSize="0x2000" finalEnable="true" finalFormat="srec" /> 
  </bsp>
  </sourcePackage>

Output from the script

The packagebsp script produces one of the following zip files:

where bsp_shortname and version are the values you provided to the packagebsp script, and date is the current date, in the form yyyymmdd. For example, if you used the configuration file given earlier to package the binaries and source for the Freescale Sandpoint BSP on March 26, 2006, the filename would be freescale-sandpoint-1.0.1-20060326binsrc.zip.

If you include the source and all the optional parts, the zip file includes the following:

File or directory Description
images/ All buildfiles and the Makefile
install/ An empty directory where make installs the binaries that it builds from the source code
prebuilt/ Prebuilt binaries, libraries, and headers
src/ Source code
Makefile Control file for building the source code
source.xml The XML file that the IDE uses
docs/usr/help/product/bsp_BSP_name/ Documentation to be copied to $QNX_TARGET/usr/help/product
BSP_name_rel.html Release notes
license.txt The license for the BSP

Exit status:

0
Success.
1
An error occurred.
2
The archive was created but there were warnings.

See also:

setupbsp

Working with a BSP and Packaging a Board Support Package chapters of Building Embedded Systems

QNX BSP Documentation Templates