1 karl 1.1.2.1 Title: Building Pegasus for Embedded Systems
2 Date: 1 November 2007
3 Status: Draft
4
|
5 karl 1.1.2.2 Overview
6 There are some signnificant differences between implementing
7 Pegasus for an embedded system with limited resources and for a
8 general purpose server or client platform. Typically the
9 differences are:
10
11 1. The whole build process is different in that the server is
12 built on a host system for a different target system.
13
14 2. The sofware resources such as shells, etc. are significantly
15 limited in the target platform.
16
17 3. Memory resources are often severly limited and with absolute
18 limits without swap space, etc.
19
20 4. The platform is often completely defined before installation
21 with no capabilities for extension (new providers, etc.) and
22 minimal capabilities for change of functionality and
23 parameterization.
24
25 Therefore, to enable improved use on these platforms Pegasus has
26 karl 1.1.2.2 been modified with a number of options that we hope will help
27 embedded system implementors create more effective
28 implementations.
29
30 NOTE: Today this has been designed around the usage in the VxWorks
31 platform but much of this functionality is considered general.
32
33 The major area of effort include:
34
35 1. Separate of the server and client builds
36
37 2. Building the complete Pegasus application as a single image.
38 a. Move from dynamic library build to static build
39 b. Add concept of static providers (Providers linked with the
40 server)
41 c. Add concept of memory-resident repository.
42 d. Limit the capability to modify parameters and provide for
43 parameter setup as part of server start. (NOT DONE YET)
44 e. Set limits on memory usage and control memory usage (NOT
45 DONE YET)
46
47 karl 1.1.2.2 3. Removing server functionality not required for the embedded server.
48
49 The following sections define several particular components of
50 functionality and the build process particular to embedded
51 systems.
|
52 karl 1.1.2.1
53 Separation of the server and client builds
54
|
55 karl 1.1.2.2 When building for embedded systems typically the server is built targeted
56 to one platform and the clients and support tools are build targeted to
57 another (host) platform. Thus, for example, for VxWorks, the cim server
58 would be targeted to the target VxWorks platform and the remiaining
59 components of Pegasus (clients, compiler, end-end tests) would be
60 targeted towards the development system.
61
62 The Pegasus build environment has been extended to make this possible.
63 The user may elect to work from either a single source tree or multiple
64 source trees. But in any case, two separate build sequences are required
65 for a complete Pegasus build, the target platform build (cross compile)
66 of the cimserver and server unit tests and the host build. The sections
67 below describe these processes.
68
69 Note that this work has expanded the make structure of pegasus to include
70 a new make configuration file (config.mak) located in the PEGASUS_ROOT
71 directory. If this file exists, the definitions included in the file are
72 included in the mak/configure.mak file which means that this file
73 can be used to setup configuration parameters for the make. The
74 host and target make structure uses this new file.
|
75 karl 1.1.2.1
76
77 Building the server for the target platform
78
|
79 karl 1.1.2.2 1. Set up a configure.mak in the pegasus source root directory with the
80 specific directives for the target make. Note that there are several
81 sample configure.mak files defined in the pegasus.vxworks directory.
82 Since there may be a number of variations of the make structure
83 depending on the test configuraiton, it is logical to set up a
84 configure.mak for each and simply copy or softlink the correct one
85 into the pegasus source root.
86 NOTE: There are several sample configure.mak files in the
87 direcotry pegasus/vxworks/configuration each named for the
88 appropriate vxworks target
|
89 karl 1.1.2.1
|
90 karl 1.1.2.2 2. Execute the Make to build the server image
|
91 karl 1.1.2.1
92
|
93 karl 1.1.2.2 TBD: Note that this new procedure has not yet been tested
|
94 karl 1.1.2.1
95 Building the clients on the host platform
96
|
97 karl 1.1.2.2 The host platform build is the same as as any normal pegasus build.
98 It is initiated through the top level make file and builds all
99 components of the envrionment for execution on the host system.
100 Typically this can be executed with the alternatives defined below.
|
101 karl 1.1.2.1
102 make new world -- builds everything
103 make -- build the source
104 make repository -- builds the repository for the host system.
105
|
106 karl 1.1.2.2 There is no specific make today to simply build the non-server components.
|
107 karl 1.1.2.1
|
108 karl 1.1.2.2 NOTE: The $PEGASUS_ROOT/configure.mak is normally used to set up the
109 configuration for the target build. It need not be used for the host
110 build. It can be used to generate parameters for this build
|
111 karl 1.1.2.1
112
113 Special characteristics of the Embedded OpenPegasus Server
114
|
115 karl 1.1.2.2 OpenPegasus implemented several special characteristics to support
116 embedded platforms including:
|
117 karl 1.1.2.1
|
118 karl 1.1.2.2 1. Memory-Resident Repository (PEP 307)
119 2. Static providers (PEP 309)
120 3. Single image build that produces a single output file containing
121 the server, providers, and the memory-resident class repository.
122
123 This section provides an overview of how to create a complete embedded
124 server.
125
126 Note that there is a working example in the directory vxWorks/cimserver of
127 a build with some sample providers and a complete class repository
128 containing 3 namespaces.
|
129 karl 1.1.2.1
130 Building the Memory-Resident Repository
131
|
132 karl 1.1.2.2 See the note readme.MemoryResidentRepository file for detailed
133 information on the memory-resident repository
|
134 karl 1.1.2.1
135 Building Providers
136
|
137 karl 1.1.2.2 See the note readme.StaticProviders for detailed information on building
138 static providers for OpenPegasus embedded systems.
|
139 karl 1.1.2.1
140
141
|