3
System Management Interface Based on HPI-B (Centellis 4620) User’s Guide (6806800D85A) 21
Developing Applications

3.1 Overview

This chapter describes how to develop applications that make use of the HPI-B library.
Depending on the CPU architecture of the target system where you want to run your HPI-B
application and on the operating system, different RPM files are delivered which contain include
files and static libraries needed for the application development. The naming scheme used for
these files is as follows: bbs-hpib-devel-<version>-1.<architecture>-
<distribution>-<os>.rpm
In order to run your HPI-B clients, you furthermore need to install the HPI-B client base package
applicable to the blade where the client is running. See Setting Up HPI Clients on page 19.
The HPI-B client base package contains compiled example applications which illustrate the use
of HPI-B controls. For these example applications the source codes and an example make file
are available as well. You may want to use the source code and the make file as a starting point
for developing your own applications. For further details refer to Appendix A, Example
Applications, on page 39.

3.2 Building the Application

If your development system is based on the same operating system/CPU architecture
environment as the target system, then you can simply install the RPM files on the target
system. If the development system is based on another operating system/CPU architecture
environment and you consequently intend to do cross-compilation, then the RPM files should
be converted to the cpio format and then extracted, using the standard Linux rpm2cpio tool.
In order to do this, you would for example enter the following at the command prompt:
1. cd <working directory>
2. rpm2cpio <rpm file> | cpio -id
After extracting the RPM or CPIO files, you obtain the following directories with the following
contents.
Table 3-1 Development RPMs - Directory Structure
Directory Content
/opt/motorola/include/bbs-hpib Include files
opt/motorola//lib or
opt/motorola//lib64 Static libraries