This set of changes is the build of what was required to convert to

GNU autoconf.  This is the first large step in allowing an RTEMS
user to perform a one-tree build (per crossgcc FAQ) including RTEMS
in the build process.  With this change RTEMS is configured in
built in the same style as the GNU tools, yet retains the basic
structure of its traditional Makefiles (ala Tony Bennett).
Jiri Gaisler (jgais@wd.estec.esa.nl) deserves (and received)
a big thank you for doing this.

There are still issues to be resolved but as of this commit, all target
which can be built on a linux host have been using a modified version
of the source Jiri submitted.  This source was merged and most targets
built in the tree before this commit.

There are some issues which remain to be resolved but they are primarily
related to host OS dependencies, script issues, the use of gawk
for hack_specs, and the dependence on gcc snapshots.  These will
be resolved.
This commit is contained in:
Joel Sherrill
1997-04-01 23:07:52 +00:00
parent 467eae4da5
commit 254b445071
461 changed files with 27179 additions and 239 deletions

99
Makefile.in Normal file
View File

@@ -0,0 +1,99 @@
#
# top level directory for RTEMS build tree
#
# Modified by Jiri to implement autoconf and cygnus one-tree build
#
@SET_MAKE@
srcdir = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
target = @target@
manext = 1
mandir = @mandir@/man$(manext)
program_prefix = @program_prefix@
VPATH=@srcdir@
CFLAGS = @CFLAGS@
CPPFLAGS = @CPPFLAGS@
DEFS = @DEFS@
LDFLAGS =
LIBS = @LIBS@
CC_FOR_BUILD = gcc
CC_FOR_TARGET = $(program_prefix)gcc
AS_FOR_TARGET = $(program_prefix)as
AR_FOR_TARGET = $(program_prefix)ar
NM_FOR_TARGET = $(program_prefix)nm
LD_FOR_TARGET = $(program_prefix)ld
OBJCOPY_FOR_TARGET = $(program_prefix)objcopy
SIZE_FOR_TARGET = $(program_prefix)size
AWK = @AWK@
RTEMS_ROOT = @RTEMS_ROOT@
RTEMS_HOST = @RTEMS_HOST@
PROJECT_ROOT = @PROJECT_ROOT@
RTEMS_HAS_POSIX_API = @RTEMS_HAS_POSIX_API@
RTEMS_USE_MACROS = @RTEMS_USE_MACROS@
ifeq ($(RTEMSBSP),)
RTEMS_BSP = @RTEMS_BSP@
else
RTEMS_BSP = $(RTEMSBSP)
endif
include $(RTEMS_ROOT)/make/main.cfg
MTARGETS = all $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_all) \
clean_wrapup distclean clean_dirs clean_tools install tests clean
.PHONY: clean_modules mlink
EXIT_CMD = exit 1
# Don't pass flags from previous make - especially NOT CFLAGS
override MAKEFLAGS=
$(MTARGETS): mlink
BASEDIR=`pwd`; \
for bsp in $(RTEMS_BSP) xxx; \
do if [ $$bsp != xxx ] ; then \
cd $$BASEDIR; \
cmd="cd c; $(MAKE) RTEMS_BSP=$$bsp $(FLAGS_TO_PASS) \
RTEMS_CUSTOM=$(RTEMS_ROOT)/make/custom/$$bsp.cfg \
INSTALL=$(PROJECT_ROOT)/$$bsp/build-tools/install-if-change \
\"CC=$(CC_FOR_TARGET)\" \
\"XCFLAGS=$(CFLAGS_FOR_TARGET)\" \
\"CC_FOR_BUILD=$(CC_FOR_BUILD)\" \
\"AS=$(AS_FOR_TARGET)\" \
\"LD=$(LD_FOR_TARGET)\" \
\"NM=$(NM_FOR_TARGET)\" \
\"AR=$(AR_FOR_TARGET)\" \
\"SIZE=$(SIZE_FOR_TARGET)\" \
\"OBJCOPY=$(OBJCOPY_FOR_TARGET)\" \
\"RTEMS_ROOT=$(RTEMS_ROOT)\" \
\"RTEMS_HOST=$(RTEMS_HOST)\" \
\"PROJECT_HOME=$(PROJECT_ROOT)/$$bsp\" \
\"PROJECT_ROOT=$(PROJECT_ROOT)\" \
\"RTEMS_HAS_POSIX_API=$(RTEMS_HAS_POSIX_API)\" \
\"RTEMS_USE_MACROS=$(RTEMS_USE_MACROS)\" \
\"AWK=$(AWK)\" $@" ; \
eval $$cmd || $(EXIT_CMD); \
fi; done;
clean_modules:
rm -f src/Modules/rtems/.moduleavailcache
rm -f src/Modules/rtems/.moduleavailcachedir
mlink:
test -d make || ln -s $(RTEMS_ROOT)/make make

179
README.configure Normal file
View File

@@ -0,0 +1,179 @@
1. Autoconf support
===================
This version of RTEMS is configured with GNU autoconf. RTEMS can be
configured and built either standalone or together with the compiler
tools in the Cygnus one-tree structure. Using autoconf also means
that RTEMS now can be built in a separate build directory.
2. Installation
===============
2.1 Standalone build
To configure RTEMS for a specific target, run configure in the build
directory. In addition to the standard configure options, the following
RTEMS-specific option are supported:
--disable-rtems-inlines
--disable-posix
--disable-tests
--enable-rtemsbsp="bsp1 bsp2 ..."
By default, the RTEMS posix interface is built for targets that support
it. It can be disabled with the --disable-posix option. The --disable-tests
will not configure the RTEMS test suite. This is used only to speed-up
configuration in case building the tests are not necessary. By default,
all bsps for a target are built. There is two ways of changing this:
+ use the --enable-rtemsbsp otion which will set the specified
bsps as the default bsps, or
+ set the RTEMSBSP variable during make (see below).
The cross-compiler is set to $(target)-gcc by default. This can be
overriden by one of the following methods:
+ running make with CC_FOR_TARGET=compiler_to_use. The same applies to
all the target specific tools (AS, AR, NM, OBJCOPY, SIZE, LD), or
+ by using the --program-prefix option to configure to specify the
string which will prepended to the tool names. Be sure to include
a trailing "-". For example, to use a m68k-coff toolset, use the
--program-prefix=m68k-coff- option.
The --target= option configures RTEMS for a specific target architecture.
The following targets are supported:
(none) will build the host-based version on Linux,
Solaris and HPUX.
a29k-rtems only standalone, uses non-gnu compiler
i386-rtems
i960-rtems
hppa1_1-rtems
m68k-rtems
mips64orion-rtems
no_cpu-rtems
powerpc-rtems
sparc-rtems
To build, run make in the build directory. To specify which bsps to build,
add the RTEMSBSP="bsp1 bsp2 .." to the make command.
Installation is done under $(prefix)/$(target)/rtems.
As an example, to build and install the mvme136 and dmv152 bsps for m68k do:
(path_to_rtems_src)/configure --target=m68k-rtems
make RTEMSBSP="mvme136 dmv152"
make install RTEMSBSP="mvme136 dmv152"
The sample tests are built by 'make all', do a 'make test' to build the full
test suite.
2.2 Build with Cygnus one-tree release
To build and install RTEMS with the one-tree structure, just copy the rtems
directory to the tree. The one-tree configure.in and Makefile.in has to be
replaced with the RTEMS-aware versions. The build options are the same as
for the standalone build.
3. To use the installed RTEMS library
=====================================
To use the installed RTEMS bsps to build applications, the application
makefile has to include a bsp-specific makefile that will define the
RTEMS variables necessary to find include files and libraries. The
bsp-specific makefile is installed at
$(prefix)/$(target)/rtmes/$(RTEMS_BSP)/Makefile.inc
For the erc32 bsp installed at /usr/local/cross, the line would read:
include /usr/local/cross/sparc-rtems/rtems/erc32/Makefile.inc
4. Supported target bsps
========================
The following bsps are supported:
host-based : posix (on linux, solaris and hpux)
a29k : portsw
i386 : force386 i386ex
i960 : cvme961
hppa1_1 : simhppa
m68k : efi332 gen68302 idp mvme147 mvme162 dmv152 efi68k gen68360
mvme136 mvme147s go32
no_cpu : no_bsp
mips64orion : p4600 p4650 (p4000 port with either R4600 or R4650)
powerpc : papyrus
sparc : erc32
5. Makefile structure
=====================
The makefiles have been re-organised. Most gnu-based bsps now use three
main makefiles:
+ custom/default.cfg,
+ custom/bsp.cfg and
+ ompilers/gcc-target-default.cfg.
Default.cfg sets the deafult values of certain common build options.
Bsp.cfg set bsp-specific build options and can also override the
default settings.
Gcc-target-default.cfg contains the common gcc definitions. Some targets
(a29k, no_cpu, and posix) still use the old structure.
6. Adding a bsp
===============
The top-level configure.in has to be modified if a new target is added
or if a new bsp is to be built by default. The additions required is
basically to add which makefiles are to be created by configure and
to add the target to the selection statement. To re-generate
configure, autoconf-2.12 is needed.
7. Tested configurations
========================
All gnu-based bsps have been built on Linux.
The native (posix) ports have been built and run on Linux ans Solaris.
The sparc port has been tested on SunOS and Linux.
The following configurations have NOT been tested:
+ Anything on Nextstep, HPUX and Irix.
+ The a29k port.
8. Pre-requisites
=================
Gawk version 2 or higher.
GNU make version 3.72 or higher.
Bash.
gcc version ???
TODO
====
The install-if-change script requires bash. On solaris systems, this should
be changed to ksh, since ksh is provided with solaris (bash not).
A fairly rescent version of gawk is needed to build RTEMS. This should be
changed so that a plain vanilla awk also works.
'make install' should only install necessary files, not the full
PROJECT_RELEASE directory as now.
Posix port on solaris-2.5 fails due to undefined built-in functions
(gcc-2.7.2, might be my installation).
Improve support for 'make CFLAGS=xxx'.

98
c/Makefile.in Normal file
View File

@@ -0,0 +1,98 @@
#
# $Id$
#
# top level directory for RTEMS build tree
# This Makefile is *not* a good example of a directory Makefile.
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
target = @target@
manext = 1
mandir = @mandir@/man$(manext)
program_prefix = @program_prefix@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
# dubious, but needed by rtems-glom ...
export PROJECT_HOME
SUB_DIRS=build-tools src
# directories to be created in install point
CREATE_DIRS = include include/sys \
include/rtems include/rtems/score include/rtems/rtems include/rtems/posix \
include/libc include/libc/sys \
lib \
bin \
samples tests \
build-tools update-tools
# Make all/install must include 'env'
all $(TARGET_VARIANTS:%=%_install) $(TARGET_VARIANTS:%=%_all): env
# top level clean/clobber will delete the install points
clean_WRAPUP = $(MAKE) clean_wrapup
clobber_WRAPUP = $(MAKE) clean_wrapup
clean_wrapup: clean_tools clean_dirs clean_modules
.PHONY: dirs clean_wrapup clean_dirs clean_tools clean_modules env install
# XXX The link is temporary while switching to -specs options.
dirs:
-$(MKDIR) ${CREATE_DIRS:%=$(PROJECT_ROOT)/$(RTEMS_BSP)/%}
-ln -s $(PROJECT_ROOT)/$(RTEMS_BSP)/include \
$(PROJECT_ROOT)/$(RTEMS_BSP)/lib/include
distclean: clobber
clean_dirs:
$(RM) -r $(PROJECT_RELEASE)
clean_tools:
cd build-tools; $(MAKE) clean
# NOTE: The wildcard on the install should pick up everything except
# the tests directory. This significantly minimizes the install size.
install: all
-$(MKDIR) $(prefix)/$(target)
-$(MKDIR) $(prefix)/$(target)/rtems
-$(MKDIR) $(prefix)/$(target)/rtems/make
-$(MKDIR) $(prefix)/$(target)/rtems/make/compilers
-$(MKDIR) $(prefix)/$(target)/rtems/make/custom
-$(MKDIR) $(prefix)/$(target)/rtems/make/os
-rm -rf $(prefix)/$(target)/rtems/$(RTEMS_BSP)
cd ../; tar cf - $(RTEMS_BSP)/[bilsu]* | \
(cd $(prefix)/$(target)/rtems; tar xpBf - )
cd $(srcdir); tar cf - make/compilers make/custom make/os \
make/leaf.cfg make/directory.cfg make/main.cfg | \
(cd $(prefix)/$(target)/rtems; tar xpBf - )
echo RTEMS_BSP = $(RTEMS_BSP) > \
$(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
cat make/Templates/Makefile.inc >> \
$(prefix)/$(target)/rtems/$(RTEMS_BSP)/Makefile.inc
tests:
cd src/tests; $(MAKE) all
env: $(SRCS) dirs

13
c/build-tools/Makefile.in Normal file
View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
SUB_DIRS=os scripts src

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/directory.cfg
SUB_DIRS=$(wildcard $(RTEMS_HOST))

View File

@@ -0,0 +1,39 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
INSTALLED=$(DESTDIR)/ifc.exe \
$(DESTDIR)/cklength.exe \
$(DESTDIR)/fixtimer.exe
all: $(DESTDIR) $(PGMS) install
echo $(DESTDIR)
$(DESTDIR):
[ -d $@ ] || $(MKDIR) $@
install: $(INSTALLED)
# Install the programs
$(DESTDIR)/ifc.exe: ifc_exe.uue
uudecode <ifc_exe.uue
mv ifc.exe $(DESTDIR)/ifc.exe
$(DESTDIR)/cklength.exe: cklength.uue
uudecode <cklength.uue
mv cklength.exe $(DESTDIR)/cklength.exe
$(DESTDIR)/fixtimer.exe: fixtimer.uue
uudecode <fixtimer.uue
mv fixtimer.exe $(DESTDIR)/fixtimer.exe

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
# RTEMS build tools
# NOTE: of course we can't use any of these tools
# in this Makefile. Most notably: install-if-change
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg
DESTDIR=$(PROJECT_RELEASE)/build-tools
PGMS=hackspecs.awk install-if-change rcs-clean \
lock-directory unlock-directory rtems-glom
INSTALLED=$(PGMS:%=$(DESTDIR)/%)
all: $(DESTDIR) $(PGMS) install
echo $(DESTDIR)
$(DESTDIR):
[ -d $@ ] || $(MKDIR) $@
install: $(INSTALLED)
# Install the program
$(DESTDIR)/%: %
$(make-script)

View File

@@ -0,0 +1,61 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
exec_prefix = @exec_prefix@
bindir = @bindir@
libdir = @libdir@
includedir = @includedir@
manext = 1
mandir = @mandir@/man$(manext)
VPATH=@srcdir@
# we use host compiler in this directory
USE_HOST_COMPILER=yes
# C source names, if any, go here -- minus the .c
C_PIECES=cklength eolstrip packhex unhex
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=$(ARCH)/%.o)
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
PGMS=$(ARCH)/cklength $(ARCH)/eolstrip $(ARCH)/packhex $(ARCH)/unhex
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS +=
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(HOST_ARCH)
CLOBBER_ADDITIONS +=
all: $(ARCH) $(SRCS) $(PGMS)
$(INSTALL_VARIANT) -m 555 $(PGMS) ${PROJECT_RELEASE}/build-tools

View File

@@ -88,10 +88,10 @@ void error(int errn, ...);
#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */
#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */
#if (defined(sparc) && (sunos < 500))
#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */
#ifdef HAVE_STRTOUL
#define stol(p) strtoul(p, (char **) NULL, 0)
#else
#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */
#define stol(p) strtol(p, (char **) NULL, 0)
#endif
int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm);

View File

@@ -88,10 +88,10 @@ void error(int errn, ...);
#define ERR_ABORT (ERR_ERRNO / 4) /* error is fatal; abort */
#define ERR_MASK (ERR_ERRNO | ERR_FATAL | ERR_ABORT) /* all */
#if (defined(sparc) && (sunos < 500))
#define stol(p) strtol(p, (char **) NULL, 0) /* Sunos */
#ifdef HAVE_STRTOUL
#define stol(p) strtoul(p, (char **) NULL, 0)
#else
#define stol(p) strtoul(p, (char **) NULL, 0) /* Solaris */
#define stol(p) strtol(p, (char **) NULL, 0)
#endif
int unhex(FILE *ifp, char *inm, FILE *ofp, char *onm);

15
c/src/Makefile.in Normal file
View File

@@ -0,0 +1,15 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=exec lib tests/tools tests/support tests/samples

17
c/src/exec/Makefile.in Normal file
View File

@@ -0,0 +1,17 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
POSIX_DIRS_yes_V=posix
POSIX_DIRS = $(POSIX_DIRS_$(HAS_POSIX_API)_V)
SUB_DIRS=score rtems $(POSIX_DIRS) sapi wrapup

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=base sys headers $(INLINE) optman src

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES= aio devctl intr limits mqueue pthread sched semaphore \
# signal time unistd
H_PIECES= pthread sched
# limits.h may have been moved into newlib -- check before removing it
# from the cvs tree
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= cond condmp config key mutex mutexmp posixapi \
priority psignal pthread pthreadmp seterr threadsup time
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
# time
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= cond condmp config key mutex mutexmp posixapi \
priority psignal pthread pthreadmp seterr threadsup time
#H_PIECES= cancel cond condmp intr key mqueue mqueuemp mutex \
# mutexmp pthread pthreadmp priority semaphore semaphoremp threadsup \
# time
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES=utsname
H_PIECES=
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/sys

View File

@@ -0,0 +1,33 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES= aio devctl intr limits mqueue pthread sched semaphore \
# signal time unistd
H_PIECES= pthread sched
# limits.h may have been moved into newlib -- check before removing it
# from the cvs tree
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#I_PIECES= cond intr key mqueue mutex pthread priority semaphore
I_PIECES=cond key mutex pthread priority
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#I_PIECES= cond intr key mqueue mutex pthread priority semaphore
I_PIECES=cond key mutex pthread priority
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# Right now there are not macro implementation of the posix inline routines
# So it won't build
I_PIECES=
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
#$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,31 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
# Right now there are not macro implementation of the posix inline routines
# So it won't build
I_PIECES=
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
#$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/posix

View File

@@ -0,0 +1,46 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES=
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
#$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,50 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#C_PIECES= aio cancel cond devctl intr key mqueue mutex pthread \
# ptimer sched semaphore signal time types unistd utsname
C_PIECES= adasupp cond getpid key mutex pthread psignal sched time \
types unistd
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) ${OBJS}
# temporary so we can see how many things are left to implement
not:
grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL
@echo
@echo
@echo
@echo `grep -i NOT_IMPL $(C_FILES) | grep -v MP_NOT_IMPL | wc -l ` places marked not implemented
@echo `wc -l $(C_FILES) | grep total` lines of C code to test

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
#H_PIECES=utsname
H_PIECES=
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/sys

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) optman src

View File

@@ -0,0 +1,37 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES=asr attr clock config dpmem event eventmp eventset \
intr message modes mp msgmp options part partmp \
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
support taskmp tasks timer types
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = rtems
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/rtems
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,37 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES=asr attr clock config dpmem event eventmp eventset \
intr message modes mp msgmp options part partmp \
ratemon region regionmp rtemsapi sem semmp signal signalmp status \
support taskmp tasks timer types
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = rtems
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/rtems
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,30 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES=asr attr dpmem event eventset message modes options \
part ratemon region sem status support tasks timer
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems/rtems

View File

@@ -0,0 +1,49 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES= no-dpmem.c no-event.c no-mp.c no-msg.c \
no-part.c no-region.c no-rtmon.c no-sem.c no-signal.c no-timer.c
S_FILES=
H_FILES=
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,40 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_PIECES=clock dpmem event eventmp intr mp msg msgmp \
part partmp ratemon region regionmp sem semmp signal signalmp \
taskmp tasks timer
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) ${OBJS}

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) optman src

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= config directives extension fatal init io mptables sptables
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = confdefs
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,135 @@
#
# $Id$
#
Configuring a System Using the Template in confdefs.h
=====================================================
The file confdefs.h is a Configuration Template file which can be
used to greatly simplify the creation and maintenance of RTEMS
Configuration Tables. The basic concepts are:
+ confdefs.h provides defaults for all configuration parameters
+ applications specify only those values they wish to override
+ confdefs.h can be the only file which knows the precise layout
of the RTEMS Configuration Tables.
The Configuration Template setup is used by all RTEMS tests to
simplify the maintenance of the tests.
Here is the section from the system.h file from test tm21 from
the Timing Test Suite:
/* configuration information */
#define CONFIGURE_TMTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 102
#define CONFIGURE_MAXIMUM_TIMERS 100
#define CONFIGURE_MAXIMUM_SEMAPHORES 100
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
#define CONFIGURE_MAXIMUM_PARTITIONS 100
#define CONFIGURE_MAXIMUM_REGIONS 100
#define CONFIGURE_MAXIMUM_PORTS 100
#define CONFIGURE_MAXIMUM_PERIODS 100
#define CONFIGURE_TICKS_PER_TIMESLICE 0
#include <confdefs.h>
The above example overrides a number of the configuration parameters.
It informs the template that it is a member of the Timing Suite,
requires a console and timer driver, and that it needs 102 tasks,
100 timers, 100 semaphores, 100 message queues, 100 partitions,
100 regions, 100 ports, and 100 periods. By default, the test
would have gotten no drivers, 10 tasks, and no other RTEMS objects.
The following shows the configuration tables generated by the
template by default.
#include <bsp.h>
#define NULL_DRIVER_TABLE_ENTRY \
{ NULL, NULL, NULL, NULL, NULL, NULL }
rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
CONSOLE_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
CLOCK_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
STUB_DRIVER_TABLE_ENTRY,
#endif
NULL_DRIVER_TABLE_ENTRY,
};
rtems_initialization_tasks_table Initialization_tasks[] = {
{ rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
1, /* init task priority */
RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
Init, /* init task entry point */
RTEMS_NO_PREEMPT, /* init task initial mode */
0 /* init task argument list */
}
};
#ifdef CONFIGURE_MPTEST
/*
* NODE_NUMBER is assumed to be set on the compile line.
*/
rtems_multiprocessing_table Multiprocessing_configuration = {
NODE_NUMBER, /* local node number */
2, /* maximum # nodes in system */
32, /* maximum # global objects */
32, /* maximum # proxies */
&MPCI_table /* pointer to MPCI config table */
};
#endif
/*
* CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
* tasks in the system plus enough extra to get a whole 64K extra.
*
* The NULL address for the workspace area is assumed to be assigned
* at startup time by the BSP.
*/
rtems_configuration_table Configuration = {
NULL, /* executive RAM work area */
CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
10, /* maximum # tasks */
0, /* maximum # timers */
0, /* maximum # semaphores */
0, /* maximum # message queues */
0, /* maximum # messages */
0, /* maximum # partitions */
0, /* maximum # regions */
0, /* maximum # dp memory areas */
0, /* maximum # periods */
0, /* maximum # user extensions */
RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
50, /* # ticks in a timeslice */
sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
/* number of init tasks */
Initialization_tasks, /* init task(s) table */
sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
/* number of device drivers */
Device_drivers, /* pointer to driver address table */
NULL, /* pointer to initial extensions */
#ifdef CONFIGURE_MPTEST
&Multiprocessing_configuration
#else
NULL /* ptr to MP config table */
#endif
};

View File

@@ -0,0 +1,34 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
H_PIECES= config directives extension fatal init io mptables sptables
H_FILES=$(H_PIECES:%=$(srcdir)/%.h)
# H_FILES that get installed externally
EXTERNAL_H_PIECES = confdefs
EXTERNAL_H_FILES=$(EXTERNAL_H_PIECES:%=$(srcdir)/%.h)
SRCS=$(H_FILES) $(EXTERNAL_H_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include

View File

@@ -0,0 +1,135 @@
#
# $Id$
#
Configuring a System Using the Template in confdefs.h
=====================================================
The file confdefs.h is a Configuration Template file which can be
used to greatly simplify the creation and maintenance of RTEMS
Configuration Tables. The basic concepts are:
+ confdefs.h provides defaults for all configuration parameters
+ applications specify only those values they wish to override
+ confdefs.h can be the only file which knows the precise layout
of the RTEMS Configuration Tables.
The Configuration Template setup is used by all RTEMS tests to
simplify the maintenance of the tests.
Here is the section from the system.h file from test tm21 from
the Timing Test Suite:
/* configuration information */
#define CONFIGURE_TMTEST
#define CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_TEST_NEEDS_TIMER_DRIVER
#define CONFIGURE_MAXIMUM_TASKS 102
#define CONFIGURE_MAXIMUM_TIMERS 100
#define CONFIGURE_MAXIMUM_SEMAPHORES 100
#define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 100
#define CONFIGURE_MAXIMUM_PARTITIONS 100
#define CONFIGURE_MAXIMUM_REGIONS 100
#define CONFIGURE_MAXIMUM_PORTS 100
#define CONFIGURE_MAXIMUM_PERIODS 100
#define CONFIGURE_TICKS_PER_TIMESLICE 0
#include <confdefs.h>
The above example overrides a number of the configuration parameters.
It informs the template that it is a member of the Timing Suite,
requires a console and timer driver, and that it needs 102 tasks,
100 timers, 100 semaphores, 100 message queues, 100 partitions,
100 regions, 100 ports, and 100 periods. By default, the test
would have gotten no drivers, 10 tasks, and no other RTEMS objects.
The following shows the configuration tables generated by the
template by default.
#include <bsp.h>
#define NULL_DRIVER_TABLE_ENTRY \
{ NULL, NULL, NULL, NULL, NULL, NULL }
rtems_driver_address_table Device_drivers[] = {
#ifdef CONFIGURE_TEST_NEEDS_CONSOLE_DRIVER
CONSOLE_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
CLOCK_DRIVER_TABLE_ENTRY,
#endif
#ifdef CONFIGURE_TEST_NEEDS_STUB_DRIVER
STUB_DRIVER_TABLE_ENTRY,
#endif
NULL_DRIVER_TABLE_ENTRY,
};
rtems_initialization_tasks_table Initialization_tasks[] = {
{ rtems_build_name( 'U', 'I', '1', ' ' ), /* init task name */
RTEMS_MINIMUM_STACK_SIZE, /* init task stack size */
1, /* init task priority */
RTEMS_DEFAULT_ATTRIBUTES, /* init task attributes */
Init, /* init task entry point */
RTEMS_NO_PREEMPT, /* init task initial mode */
0 /* init task argument list */
}
};
#ifdef CONFIGURE_MPTEST
/*
* NODE_NUMBER is assumed to be set on the compile line.
*/
rtems_multiprocessing_table Multiprocessing_configuration = {
NODE_NUMBER, /* local node number */
2, /* maximum # nodes in system */
32, /* maximum # global objects */
32, /* maximum # proxies */
&MPCI_table /* pointer to MPCI config table */
};
#endif
/*
* CONFIGURE_EXECUTIVE_RAM_SIZE is a rough guess based on the number of
* tasks in the system plus enough extra to get a whole 64K extra.
*
* The NULL address for the workspace area is assumed to be assigned
* at startup time by the BSP.
*/
rtems_configuration_table Configuration = {
NULL, /* executive RAM work area */
CONFIGURE_EXECUTIVE_RAM_SIZE, /* executive RAM size */
10, /* maximum # tasks */
0, /* maximum # timers */
0, /* maximum # semaphores */
0, /* maximum # message queues */
0, /* maximum # messages */
0, /* maximum # partitions */
0, /* maximum # regions */
0, /* maximum # dp memory areas */
0, /* maximum # periods */
0, /* maximum # user extensions */
RTEMS_MILLISECONDS_TO_MICROSECONDS(10), /* # us in a tick */
50, /* # ticks in a timeslice */
sizeof (Initialization_tasks) / sizeof(rtems_initialization_tasks_table),
/* number of init tasks */
Initialization_tasks, /* init task(s) table */
sizeof (Device_drivers) / sizeof(rtems_driver_address_table),
/* number of device drivers */
Device_drivers, /* pointer to driver address table */
NULL, /* pointer to initial extensions */
#ifdef CONFIGURE_MPTEST
&Multiprocessing_configuration
#else
NULL /* ptr to MP config table */
#endif
};

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,29 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
I_PIECES= extension
I_FILES=$(I_PIECES:%=$(srcdir)/%.inl)
SRCS=$(I_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS += $(LIB)
CLOBBER_ADDITIONS +=
all: $(SRCS)
$(INSTALL) -m 444 ${I_FILES} ${PROJECT_RELEASE}/include/rtems

View File

@@ -0,0 +1,46 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_FILES= no-ext.c no-io.c
H_FILES=
SRCS=$(C_FILES) $(H_FILES)
OBJS=$(C_O_FILES) $(S_O_FILES)
PGMS=$(C_FILES:%.c=$(ARCH)/%.rel)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
ASM4FLAGS += -I $(PROJECT_RELEASE)/include/rtems
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) $(OBJS) $(PGMS)
$(INSTALL_VARIANT) -m 555 ${PGMS} ${PROJECT_RELEASE}/lib

View File

@@ -0,0 +1,38 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
C_PIECES= debug extension fatal init io posixapi rtemsapi
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
SRCS=$(C_FILES)
OBJS=$(C_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/lib.cfg
#
# Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) ${OBJS}

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=headers $(INLINE) tools cpu src

View File

@@ -0,0 +1,13 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/directory.cfg
SUB_DIRS=$(RTEMS_CPU)

View File

@@ -0,0 +1,88 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
# Normally cpu_asm and rtems are assembly files
C_PIECES=cpu rtems
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/a29ktypes.h
# H_FILES that get installed externally
# a29k.h is handled separately
EXTERNAL_H_FILES = $(srcdir)/asm.h $(srcdir)/amd.ah $(srcdir)/pswmacro.ah $(srcdir)/register.ah
# Assembly source names, if any, go here -- minus the .s
# Normally cpu_asm and rtems are assembly files
S_PIECES=cpu_asm sig
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS +=
CFLAGS += $(CFLAGS_OS_V)
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
all: ${ARCH} $(SRCS) preinstall $(OBJS) $(RELS)
$(INSTALL_VARIANT) -m 444 $(RELS) ${PROJECT_RELEASE}/lib
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
# Install the program(s), appending _g or _p as appropriate.
# for include files, just use $(INSTALL)
preinstall: ${PROJECT_RELEASE}/include/rtems/score/a29k.h \
${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/a29k.h: a29k.h
$(SED) -e 's?REPLACE_THIS_WITH_THE_CPU_MODEL?$(RTEMS_CPU_MODEL)?' \
-e 's?REPLACE_THIS_WITH_THE_BSP?$(RTEMS_BSP)?' \
< $< >$(ARCH)/a29k.h.tmp
$(INSTALL) -m 444 $(ARCH)/a29k.h.tmp $@
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

View File

@@ -0,0 +1,83 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
VPATH=@srcdir@
RELS=$(ARCH)/rtems-cpu.rel
# C source names, if any, go here -- minus the .c
C_PIECES=cpu
C_FILES=$(C_PIECES:%=%.c)
C_O_FILES=$(C_PIECES:%=${ARCH}/%.o)
H_FILES=$(srcdir)/cpu.h $(srcdir)/hppa.h $(srcdir)/cpu_asm.h \
$(srcdir)/hppatypes.h
# H_FILES that get installed externally
EXTERNAL_H_FILES =
# Assembly source names, if any, go here -- minus the .s
S_PIECES=cpu_asm rtems
S_FILES=$(S_PIECES:%=%.s)
S_O_FILES=$(S_FILES:%.s=${ARCH}/%.o)
SRCS=$(C_FILES) $(CC_FILES) $(H_FILES) $(S_FILES) $(EXTERNAL_H_FILES)
OBJS=$(C_O_FILES) $(CC_O_FILES) $(S_O_FILES)
include $(RTEMS_CUSTOM)
include $(PROJECT_ROOT)/make/leaf.cfg
#
# (OPTIONAL) Add local stuff here using +=
#
DEFINES +=
CPPFLAGS := -I$(ARCH) $(CPPFLAGS)
CFLAGS += $(CFLAGS_OS_V)
LD_PATHS +=
LD_LIBS +=
LDFLAGS +=
#
# Add your list of files to delete here. The config files
# already know how to delete some stuff, so you may want
# to just run 'make clean' first to see what gets missed.
# 'make clobber' already includes 'make clean'
#
CLEAN_ADDITIONS +=
CLOBBER_ADDITIONS +=
$(ARCH)/offsets.h: $(ARCH) cpu.h $(PROJECT_RELEASE)/bin/genoffsets
$(RM) $@
$(PROJECT_RELEASE)/bin/genoffsets > $@
$(CHMOD) -w $@
$(ARCH)/rtems-cpu.rel: $(OBJS)
$(make-rel)
all: ${ARCH} install-headers $(SRCS) $(ARCH)/offsets.h preinstall $(RELS)
preinstall:
$(INSTALL) -m 444 $(ARCH)/offsets.h ${PROJECT_RELEASE}/include/rtems/score
install-headers: $(ARCH) ${PROJECT_RELEASE}/include/rtems/score/targopts.h \
${PROJECT_RELEASE}/lib/bsp_specs
$(INSTALL) -m 444 ${H_FILES} ${PROJECT_RELEASE}/include/rtems/score
# we will share the basic cpu file
$(INSTALL) -m 444 ${EXTERNAL_H_FILES} ${PROJECT_RELEASE}/include
${PROJECT_RELEASE}/include/rtems/score/targopts.h: $(ARCH)/targopts.h-tmp
$(INSTALL) -m 444 $(ARCH)/targopts.h-tmp $@
# $(ARCH)/targopts.h-tmp rule is in leaf.cfg
${PROJECT_RELEASE}/lib/bsp_specs: $(ARCH)/bsp_specs.tmp
$(INSTALL) -m 444 $(ARCH)/bsp_specs.tmp $@
# $(ARCH)/bsp_specs.tmp rule is in leaf.cfg

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More