blob: 9132319de2c6c69f6d45b4c0f686b47f07ef8645 [file] [log] [blame]
Benny Prijono0c59fea2006-05-27 13:11:32 +00001
2
3
4 Build Instructions for PJLIB/PJMEDIA/PJSIP RTEMS Port
5
6
7
8The RTEMS port uses the POSIX abstraction layer at the moment, and has been
9tested with RTEMS 4.6 on i386 target.
10
11
12Building RTEMS
13---------------
14I use RTEMS 4.6 on a cygwin host with i386/pc386 as target, but I think it
15should work with different RTEMS versions/hosts/targets.
16
17RTEMS was built with the following commands:
18
19 $ /opt/src/rtems-4.6.6/configure --enable-cxx --enable-posix --enable-networking --enable-rdbg --enable-tests --enable-rtemsbsp=pc386 --target=i386-rtems
20 $ make
21 $ make install
22
23
24Supported Targets
25-----------------
26At the moment, pjlib supports i386 and mpc860 CPU target. For other targets,
27you would need to create/tweak the appropriate "m-xxx.mak" in "build" directory
28and the corresponding "m_xxx.h" header file in "pj/compat" directory.
29
30Please refer to pjlib porting guide about how to port PJLIB to new CPU target.
31
32
33Building PJLIB/PJMEDIA/PJSIP
34----------------------------
35Use the following steps to build the libraries:
36
37
381. Set RTEMS_LIBRARY_PATH environment variable to point to your BSP directory
39 (which is <RTEMS INSTALLATION POINT>/<BOARD SUPPORT PACKAGE>).
40
41 For example (with sh):
42
43 $ export RTEMS_LIBRARY_PATH=/opt/rtems-4.6/i386-rtems/pc386
44
45
462. Unfortunately pjproject's configure script is unable to create "build.mak"
47 for cross compilation (but this may change in the future), so we need to
48 create "build.mak" manually.
49
50 The file "README-configure" has some info about the variables in "build.mak".
51
52 For example, the "build.mak" for i386 target:
53
54 export MACHINE_NAME := i386
55 export OS_NAME := rtems
56 export HOST_NAME := mingw
57 export CC_NAME := gcc
58 export TARGET_NAME := i386-rtems
59 export CROSS_COMPILE := i386-rtems-
60
61
623. Put additional CFLAGS or LDFLAGS that are specific to your target in
63 "user.mak".
64
65 For example, my "user.mak" looks like this:
66
67 export CFLAGS +=
68 export LDFLAGS += -Wl,-Ttext,0x00100000 -Wl,--defsym -Wl,HeapSize=0x400000
69
70
714. Build the libraries:
72
73 $ make dep && make distclean && make
74
75
765. That should be it. The libraries should be in "lib" directory and
77 applications in "bin" directory.
78
79
80
81Acknowledgements
82----------------
83Many thanks for Phil Torre <ptorre at zetron dot com>, who did most of the
84initial porting and testing with pjlib etc. All credits go to him.
85
86
87