Merge ~epics-core/epics-base/+git/rtems5:hj/rtems5 into ~epics-core/epics-base/+git/epics-base:core/master

Proposed by Heinz Junkes
Status: Rejected
Rejected by: mdavidsaver
Proposed branch: ~epics-core/epics-base/+git/rtems5:hj/rtems5
Merge into: ~epics-core/epics-base/+git/epics-base:core/master
Diff against target: 187 lines (+72/-9)
7 files modified
.gitignore (+1/-0)
configure/CONFIG_COMMON (+7/-6)
configure/CONFIG_SITE (+1/-1)
configure/os/CONFIG.Common.RTEMS (+14/-1)
configure/os/CONFIG.Common.RTEMS-beatnik (+2/-1)
configure/os/CONFIG_SITE.Common.RTEMS (+15/-0)
documentation/RELEASE_NOTES.html (+32/-0)
Reviewer Review Type Date Requested Status
mdavidsaver Disapprove
Review via email: mp+342546@code.launchpad.net
To post a comment you must log in.
Revision history for this message
mdavidsaver (mdavidsaver) wrote :
review: Disapprove

Unmerged commits

c4f6beb... by Heinz Junkes

Add support for Rtems 5

Rtems recommends the posix api for new developments to enable the use of
SMP in the future. To support multiple APIs in the same OS the GNUmake
variable $(OS_API) have been incorporated.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/.gitignore b/.gitignore
2index af33a79..51cba4f 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -14,3 +14,4 @@ O.*/
6 *.orig
7 *.log
8 .*.swp
9+/nbproject/
10\ No newline at end of file
11diff --git a/configure/CONFIG_COMMON b/configure/CONFIG_COMMON
12index 79807c2..a5f47ea 100644
13--- a/configure/CONFIG_COMMON
14+++ b/configure/CONFIG_COMMON
15@@ -4,7 +4,7 @@
16 # Copyright (c) 2002 The Regents of the University of California, as
17 # Operator of Los Alamos National Laboratory.
18 # EPICS BASE is distributed subject to a Software License Agreement found
19-# in file LICENSE that is included with this distribution.
20+# in file LICENSE that is included with this distribution.
21 #*************************************************************************
22 #
23 # CONFIG_COMMON
24@@ -136,10 +136,11 @@ BUILDLIB_SUFFIX = $(BUILDLIB_SUFFIX_$(SHARED_LIBRARIES))
25 #--------------------------------------------------
26 # vpath directories
27 POSIX_YES = os/posix
28+OS_IMPL_DIRS = $(if $(OS_API),os/$(OS_CLASS)-$(OS_API),) os/$(OS_CLASS)
29 GENERIC_SRC_DIRS = .. $(SRC_DIRS)
30-OS_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
31- $(addprefix $(dir)/, os/$(OS_CLASS) $(POSIX_$(POSIX)) os/default ))
32-CMPLR_SRC_DIRS += . $(foreach dir, .. $(SRC_DIRS), \
33+OS_SRC_DIRS += . $(foreach dir, $(GENERIC_SRC_DIRS), \
34+ $(addprefix $(dir)/, $(OS_IMPL_DIRS) $(POSIX_$(POSIX)) os/default ))
35+CMPLR_SRC_DIRS += . $(foreach dir, $(GENERIC_SRC_DIRS), \
36 $(addprefix $(dir)/, compiler/$(CMPLR_CLASS) compiler/default ))
37 ALL_SRC_DIRS = $(CMPLR_SRC_DIRS) $(OS_SRC_DIRS) $(GENERIC_SRC_DIRS)
38
39@@ -261,7 +262,7 @@ LIBRARY_SRCS=$(basename $(foreach lib,$(LIBRARY) $(TESTLIBRARY) $(LOADABLE_LIBRA
40 LIBRARY_SRC_CFLAGS=$($(patsubst $*,SHRLIB,$(findstring $*,$(LIBRARY_SRCS)))_CFLAGS)
41
42 #--------------------------------------------------
43-# prefix, suffix, and ldflags for loadable shared libraries
44+# prefix, suffix, and ldflags for loadable shared libraries
45 TARGET_LIB_LDFLAGS=$($(patsubst $*,LOADABLE_,$(findstring $*,$(LOADABLE_LIBRARY)))SHRLIB_LDFLAGS)
46 LOADABLE_SHRLIB_PREFIX=$(SHRLIB_PREFIX)
47 LOADABLE_SHRLIB_SUFFIX=$(SHRLIB_SUFFIX)
48@@ -459,5 +460,5 @@ COMMON_INC += $(filter $(COMMON_DIR)/%, $(foreach file, $(INC), \
49 SOURCE_INC = $(wildcard $(file) $(SOURCE_INC_bbb) )
50 SOURCE_INC_bbb = $(foreach dir, $(ALL_SRC_DIRS), $(SOURCE_INC_aaa) )
51 SOURCE_INC_aaa = $(addsuffix /$(file), $(dir) )
52-
53+
54 endif
55diff --git a/configure/CONFIG_SITE b/configure/CONFIG_SITE
56index b657f5b..85329c0 100644
57--- a/configure/CONFIG_SITE
58+++ b/configure/CONFIG_SITE
59@@ -107,7 +107,7 @@
60 # Which target architectures to cross-compile for.
61 # Definitions in configure/os/CONFIG_SITE.<host>.Common
62 # may override this setting.
63-CROSS_COMPILER_TARGET_ARCHS=
64+CROSS_COMPILER_TARGET_ARCHS=RTEMS-beatnik
65 #CROSS_COMPILER_TARGET_ARCHS=vxWorks-ppc32
66
67 # If only some of your host architectures can compile the
68diff --git a/configure/os/CONFIG.Common.RTEMS b/configure/os/CONFIG.Common.RTEMS
69index c22e37a..c34bfe1 100644
70--- a/configure/os/CONFIG.Common.RTEMS
71+++ b/configure/os/CONFIG.Common.RTEMS
72@@ -91,14 +91,27 @@ MODEXT=.obj
73 OS_CLASS = RTEMS
74
75 #--------------------------------------------------
76+# operating system API (src/os/<os_class>-<os-api>)
77+OS_API_4.7 = kernel
78+OS_API_4.8 = kernel
79+OS_API_4.9 = kernel
80+OS_API_4.10 = kernel
81+OS_API_4.11 = $(error RTEMS-4-11 is not currently supported)
82+# Later RTEMS versions will use posix, no need to specify
83+OS_API = $(firstword $(OS_API_$(RTEMS_SERIES)) posix)
84+
85+#--------------------------------------------------
86 # Operating system flags
87 OP_SYS_LDLIBS += -lrtemsCom -lc -lrtemscpu -lCom -lnfs -lm
88-OP_SYS_LDFLAGS += $(CPU_CFLAGS) -u Init \
89+
90+OP_SYS_LDFLAGS_posix += -u POSIX_Init
91+OP_SYS_LDFLAGS_kernel += -u Init \
92 $(PROJECT_RELEASE)/lib/no-dpmem.rel \
93 $(PROJECT_RELEASE)/lib/no-mp.rel \
94 $(PROJECT_RELEASE)/lib/no-part.rel \
95 $(PROJECT_RELEASE)/lib/no-signal.rel \
96 $(PROJECT_RELEASE)/lib/no-rtmon.rel
97+OP_SYS_LDFLAGS += $(CPU_CFLAGS) $(OP_SYS_LDFLAGS_$(OS_API))
98
99 MOD_SYS_LDFLAGS += $(CPU_CFLAGS) -Wl,-r -nostdlib
100
101diff --git a/configure/os/CONFIG.Common.RTEMS-beatnik b/configure/os/CONFIG.Common.RTEMS-beatnik
102index aaf6116..ed30e2e 100644
103--- a/configure/os/CONFIG.Common.RTEMS-beatnik
104+++ b/configure/os/CONFIG.Common.RTEMS-beatnik
105@@ -7,7 +7,8 @@
106 EXE = .elf
107 RTEMS_TARGET_CPU = powerpc
108 GNU_TARGET = powerpc-rtems
109-ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
110+# will use bootp
111+#ARCH_DEP_CFLAGS += -DMY_DO_BOOTP=NULL
112 ARCH_DEP_CFLAGS += -DHAVE_MOTLOAD
113 ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_MBUF_SPACE=2048
114 ARCH_DEP_CFLAGS += -DRTEMS_NETWORK_CONFIG_CLUSTER_SPACE=5120
115diff --git a/configure/os/CONFIG_SITE.Common.RTEMS b/configure/os/CONFIG_SITE.Common.RTEMS
116index 0b5d227..2b72811 100644
117--- a/configure/os/CONFIG_SITE.Common.RTEMS
118+++ b/configure/os/CONFIG_SITE.Common.RTEMS
119@@ -3,11 +3,26 @@
120 # Site-specific information for all RTEMS targets
121 #-------------------------------------------------------
122
123+# RTEMS Series and Version
124+
125+#RTEMS_SERIES = 4.9
126+#RTEMS_VERSION = 4.9.2
127+
128+#RTEMS_SERIES = 4.10
129+#RTEMS_VERSION = 4.10.2
130+
131+#RTEMS_SERIES = 5
132+#RTEMS_VERSION = 5
133+
134 # Where to find RTEMS
135 #
136 # APS:
137 RTEMS_VERSION = 4.10.2
138 RTEMS_BASE = /usr/local/vw/rtems/rtems-$(RTEMS_VERSION)
139+# FHI:
140+RTEMS_SERIES = 5
141+RTEMS_VERSION = 5
142+RTEMS_BASE = /Users/junkes/RTEMS/rtems-$(RTEMS_VERSION)
143
144 # Cross-compile toolchain in $(RTEMS_TOOLS)/bin
145 #
146diff --git a/documentation/RELEASE_NOTES.html b/documentation/RELEASE_NOTES.html
147index d798b50..8c7a13d 100644
148--- a/documentation/RELEASE_NOTES.html
149+++ b/documentation/RELEASE_NOTES.html
150@@ -17,6 +17,38 @@
151 <p>Description</p>
152
153 -->
154+<h3>Support for RTEMS 5</h3>
155+
156+<p>The next major release of the RTEMS real-time OS will be version 5 which
157+contains many changes including the ability to support SMP systems. The earlier
158+EPICS support for RTEMS made use of various RTEMS-specific kernel APIs which
159+cannot be used on an SMP system, so the changes here required a completely new
160+port to the Posix real-time APIs that RTEMS-5 now recommends. A new RTEMS
161+configuration variable RTEMS_SERIES has been added which should be set to the
162+OS version number, e.g. 4.9. When this is 5 (first release is without minor
163+number) or greater the new libCom/osi/os/RTEMS-posix source files will be used;
164+the older API source files can now be found in libCom/osi/os/RTEMS-kernel, and
165+those which are common to both installations are in libCom/osi/os/RTEMS. The
166+same distinction will also apply to libCom/RTEMS. Configs rtems_[net]config.c
167+can be found either in libCom/RTEMS/kernel for rtems &lt; 5 and
168+libCom/RTEMS/posix from version 5+ on.
169+</p>
170+
171+<p>Note that EPICS Base can only be built for a single RTEMS version at a time.
172+ The RTEMS version number is set in the CONFIG_SITE.Common.RTEMS file and
173+ cannot be different for specific targets. This allows different header files
174+ to be used and installed for the two different APIs.</p>
175+
176+<h3>Support for multiple APIs in the same OS</h3>
177+
178+<p>The build configuration files for a particular build target may now select
179+between multiple implementations with different OS APIs by setting the GNUmake
180+variable <kbd>OS_API</kbd>. This changes the search path used for OS-specific
181+source files, inserting a directory <kbd>os/$(OS_CLASS)-$(OS_API)</kbd> before
182+the existing <kbd>os/$(OS_CLASS)</kbd> directory. Note though that the include
183+file search path does not change, so OS-specific header files must be able to
184+handle both APIs simultaneously, and their source files should go in the
185+<kbd>os/$(OS_CLASS)</kbd> directory.</p>
186
187 <h1 align="center">EPICS Release 7.0.1.1</h1>
188

Subscribers

People subscribed via source and target branches