The files in libcpu should not be directly dependent on any BSP. In

particular, using bsp.h, or getting information from the BSP which
should properly be obtained from RTEMS is forbidden.  This is
necessary to strengthen the division between the BSP independent
parts of RTEMS and the BSPs themselves.  This started after
comments and analysis by Ralf Corsepius <corsepiu@faw.uni-ulm.de>.
The changes primarily eliminated the need to include bsp.h and
peeking at BSP_Configuration.  The use of Cpu_table in each
BSP needs to be eliminated.
This commit is contained in:
Joel Sherrill
1999-11-04 18:05:09 +00:00
parent d5704c67a0
commit f817b0283c
70 changed files with 807 additions and 163 deletions

View File

@@ -114,7 +114,6 @@ extern "C" {
#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION
#ifdef __cplusplus
}
#endif

View File

@@ -116,6 +116,52 @@ typedef struct {
SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
/*
* Some handy macros to avoid dependencies on either the BSP
* or the exact format of the configuration table.
*/
#define rtems_configuration_get_work_space_start() \
(_Configuration_Table->work_space_start)
#define rtems_configuration_get_work_space_size() \
(_Configuration_Table->work_space_size)
#define rtems_configuration_get_maximum_extensions() \
(_Configuration_Table->maximum_extensions)
#define rtems_configuration_get_microseconds_per_tick() \
(_Configuration_Table->microseconds_per_tick)
#define rtems_configuration_get_milliseconds_per_tick() \
(_Configuration_Table->microseconds_per_tick / 1000)
#define rtems_configuration_get_ticks_per_timeslice() \
(_Configuration_Table->ticks_per_timeslice)
#define rtems_configuration_get_maximum_devices() \
(_Configuration_Table->maximum_devices)
#define rtems_configuration_get_number_of_device_drivers() \
(_Configuration_Table->number_of_device_drivers)
#define rtems_configuration_get_device_driver_table() \
(_Configuration_Table->device_driver_table)
#define rtems_configuration_get_number_of_initial_extensions() \
(_Configuration_Table->number_of_initial_extensions)
#define rtems_configuration_get_user_extension_table() \
(_Configuration_Table->user_extension_table)
#define rtems_configuration_get_user_multiprocessing_table() \
(_Configuration_Table->user_multiprocessing_table)
#define rtems_configuration_get_rtems_api_configuration() \
(_Configuration_Table->rtems_api_configuration)
#define rtems_configuration_get_posix_api_configuration() \
(_Configuration_Table->posix_api_configuration)
#ifdef __cplusplus
}
#endif

View File

@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
unsigned32 some_other_cpu_dependent_info;
unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
#define rtems_cpu_configuration_get_clicks_per_microsecond() \
(_CPU_Table.clicks_per_microsecond)
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by

View File

@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
unsigned32 some_other_cpu_dependent_info;
unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
#define rtems_cpu_configuration_get_clicks_per_microsecond() \
(_CPU_Table.clicks_per_microsecond)
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by

View File

@@ -116,4 +116,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = 4096;
Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}

View File

@@ -116,4 +116,5 @@ void bsp_start( void )
Cpu_table.pretasking_hook = bsp_pretasking_hook; /* init libc, etc. */
Cpu_table.postdriver_hook = bsp_postdriver_hook;
Cpu_table.interrupt_stack_size = 4096;
Cpu_table.clicks_per_microsecond = CPU_CLOCK_RATE_MHZ;
}

View File

@@ -22,10 +22,14 @@ SRCS = README
all: $(SRCS)
# We only build the Network library if HAS_NETWORKING was defined
NETWORK_yes_V = dec21140
NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
SUB_DIRS = console include pci residual openpic irq vectors start startup \
bootloader dec21140 wrapup
SUB_DIRS = clock console include pci residual openpic irq vectors \
start startup bootloader $(NETWORK) wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \

View File

@@ -0,0 +1,75 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
subdir = powerpc/mcp750/clock
RTEMS_ROOT = @RTEMS_ROOT@
PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
PGM = ${ARCH}/clock.rel
# C source names, if any, go here -- minus the .c
C_PIECES = c_clock
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
H_FILES =
SRCS = $(C_FILES) $(H_FILES)
OBJS = $(C_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(RTEMS_ROOT)/make/leaf.cfg
INSTALL_CHANGE = @INSTALL_CHANGE@
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
INSTALLDIRS = $(PROJECT_INCLUDE)/bsp
$(INSTALLDIRS):
@$(mkinstalldirs) $(INSTALLDIRS)
#
# (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 +=
CLOBBER_ADDITIONS +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
preinstall:
@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/bsp
all: ${ARCH} $(SRCS) preinstall $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

View File

@@ -0,0 +1,215 @@
/*
* Clock Tick Device Driver
*
* This routine utilizes the Decrementer Register common to the PPC family.
*
* The tick frequency is directly programmed to the configured number of
* microseconds per tick.
*
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* Modified to support the MPC750.
* Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
*
* $Id$
*/
#include <bsp.h>
#include <bsp/irq.h>
#include <rtems/libio.h>
#include <stdlib.h> /* for atexit() */
#include <assert.h>
#include <libcpu/cpu.h>
/*
* Clock ticks since initialization
*/
volatile rtems_unsigned32 Clock_driver_ticks;
/*
* This is the value programmed into the count down timer.
*/
rtems_unsigned32 Clock_Decrementer_value;
/*
* These are set by clock driver during its init
*/
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
void clockOff(const rtems_irq_connect_data* unused)
{
if (BSP_Configuration.ticks_per_timeslice) {
/*
* Nothing to do as we cannot disable all interrupts and
* the decrementer interrupt enable is MSR_EE
*/
}
}
static void clockOn(const rtems_irq_connect_data* unused)
{
PPC_Set_decrementer( Clock_Decrementer_value );
}
/*
* Clock_isr
*
* This is the clock tick interrupt handler.
*
* Input parameters:
* vector - vector number
*
* Output parameters: NONE
*
* Return values: NONE
*
*/
void clockIsr()
{
/*
* The driver has seen another tick.
*/
PPC_Set_decrementer( Clock_Decrementer_value );
Clock_driver_ticks += 1;
/*
* Real Time Clock counter/timer is set to automatically reload.
*/
rtems_clock_tick();
}
int clockIsOn(const rtems_irq_connect_data* unused)
{
unsigned32 msr_value;
_CPU_MSR_GET( msr_value );
if (msr_value & MSR_EE) return 1;
return 0;
}
static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
clockIsr,
clockOn,
clockOff,
clockIsOn};
/*
* Clock_exit
*
* This routine allows the clock driver to exit by masking the interrupt and
* disabling the clock's counter.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* Return values: NONE
*
*/
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
BSP_remove_rtems_irq_handler (&clockIrqData);
}
}
/*
* Clock_initialize
*
* This routine initializes the clock driver.
*
* Input parameters:
* major - clock device major number
* minor - clock device minor number
* parg - pointer to optional device driver arguments
*
* Output parameters: NONE
*
* Return values:
* rtems_device_driver status code
*/
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
Clock_Decrementer_value = (BSP_bus_frequency/4000)*
(BSP_Configuration.microseconds_per_tick/1000);
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Unable to initialize system clock\n");
rtems_fatal_error_occurred(1);
}
/* make major/minor avail to others such as shared memory driver */
rtems_clock_major = major;
rtems_clock_minor = minor;
return RTEMS_SUCCESSFUL;
} /* Clock_initialize */
/*
* Clock_control
*
* This routine is the clock device driver control entry point.
*
* Input parameters:
* major - clock device major number
* minor - clock device minor number
* parg - pointer to optional device driver arguments
*
* Output parameters: NONE
*
* Return values:
* rtems_device_driver status code
*/
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
goto done;
Clock_Decrementer_value = (BSP_bus_frequency/4000)*
(BSP_Configuration.microseconds_per_tick/1000);
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
clockIsr();
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Error installing clock interrupt handler!\n");
rtems_fatal_error_occurred(1);
}
}
done:
return RTEMS_SUCCESSFUL;
}

View File

@@ -13,7 +13,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
BSP_PIECES = console irq openpic pci residual startup dec21140 vectors
# We only build the Network library if HAS_NETWORKING was defined
NETWORK_yes_V = dec21140
NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
BSP_PIECES = clock console irq openpic pci residual startup $(NETWORK) vectors
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x

View File

@@ -22,10 +22,14 @@ SRCS = README
all: $(SRCS)
# We only build the Network library if HAS_NETWORKING was defined
NETWORK_yes_V = dec21140
NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
SUB_DIRS = console include pci residual openpic irq vectors start startup \
bootloader dec21140 wrapup
SUB_DIRS = clock console include pci residual openpic irq vectors \
start startup bootloader $(NETWORK) wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \

View File

@@ -0,0 +1,75 @@
#
# $Id$
#
@SET_MAKE@
srcdir = @srcdir@
top_srcdir = @top_srcdir@
top_builddir = ../../..
subdir = powerpc/mcp750/clock
RTEMS_ROOT = @RTEMS_ROOT@
PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
PGM = ${ARCH}/clock.rel
# C source names, if any, go here -- minus the .c
C_PIECES = c_clock
C_FILES = $(C_PIECES:%=%.c)
C_O_FILES = $(C_PIECES:%=${ARCH}/%.o)
H_FILES =
SRCS = $(C_FILES) $(H_FILES)
OBJS = $(C_O_FILES)
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg
include $(RTEMS_ROOT)/make/leaf.cfg
INSTALL_CHANGE = @INSTALL_CHANGE@
mkinstalldirs = $(SHELL) $(top_srcdir)/@RTEMS_TOPdir@/mkinstalldirs
INSTALLDIRS = $(PROJECT_INCLUDE)/bsp
$(INSTALLDIRS):
@$(mkinstalldirs) $(INSTALLDIRS)
#
# (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 +=
CLOBBER_ADDITIONS +=
${PGM}: ${SRCS} ${OBJS}
$(make-rel)
preinstall:
@$(mkinstalldirs) $(PROJECT_INCLUDE)/bsp
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)/bsp
all: ${ARCH} $(SRCS) preinstall $(PGM)
# the .rel file built here will be put into libbsp.a by ../wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status

View File

@@ -0,0 +1,215 @@
/*
* Clock Tick Device Driver
*
* This routine utilizes the Decrementer Register common to the PPC family.
*
* The tick frequency is directly programmed to the configured number of
* microseconds per tick.
*
* COPYRIGHT (c) 1989-1997.
* On-Line Applications Research Corporation (OAR).
* Copyright assigned to U.S. Government, 1994.
*
* The license and distribution terms for this file may in
* the file LICENSE in this distribution or at
* http://www.OARcorp.com/rtems/license.html.
*
* Modified to support the MPC750.
* Modifications Copyright (c) 1999 Eric Valette valette@crf.canon.fr
*
* $Id$
*/
#include <bsp.h>
#include <bsp/irq.h>
#include <rtems/libio.h>
#include <stdlib.h> /* for atexit() */
#include <assert.h>
#include <libcpu/cpu.h>
/*
* Clock ticks since initialization
*/
volatile rtems_unsigned32 Clock_driver_ticks;
/*
* This is the value programmed into the count down timer.
*/
rtems_unsigned32 Clock_Decrementer_value;
/*
* These are set by clock driver during its init
*/
rtems_device_major_number rtems_clock_major = ~0;
rtems_device_minor_number rtems_clock_minor;
void clockOff(const rtems_irq_connect_data* unused)
{
if (BSP_Configuration.ticks_per_timeslice) {
/*
* Nothing to do as we cannot disable all interrupts and
* the decrementer interrupt enable is MSR_EE
*/
}
}
static void clockOn(const rtems_irq_connect_data* unused)
{
PPC_Set_decrementer( Clock_Decrementer_value );
}
/*
* Clock_isr
*
* This is the clock tick interrupt handler.
*
* Input parameters:
* vector - vector number
*
* Output parameters: NONE
*
* Return values: NONE
*
*/
void clockIsr()
{
/*
* The driver has seen another tick.
*/
PPC_Set_decrementer( Clock_Decrementer_value );
Clock_driver_ticks += 1;
/*
* Real Time Clock counter/timer is set to automatically reload.
*/
rtems_clock_tick();
}
int clockIsOn(const rtems_irq_connect_data* unused)
{
unsigned32 msr_value;
_CPU_MSR_GET( msr_value );
if (msr_value & MSR_EE) return 1;
return 0;
}
static rtems_irq_connect_data clockIrqData = {BSP_DECREMENTER,
clockIsr,
clockOn,
clockOff,
clockIsOn};
/*
* Clock_exit
*
* This routine allows the clock driver to exit by masking the interrupt and
* disabling the clock's counter.
*
* Input parameters: NONE
*
* Output parameters: NONE
*
* Return values: NONE
*
*/
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
BSP_remove_rtems_irq_handler (&clockIrqData);
}
}
/*
* Clock_initialize
*
* This routine initializes the clock driver.
*
* Input parameters:
* major - clock device major number
* minor - clock device minor number
* parg - pointer to optional device driver arguments
*
* Output parameters: NONE
*
* Return values:
* rtems_device_driver status code
*/
rtems_device_driver Clock_initialize(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
Clock_Decrementer_value = (BSP_bus_frequency/4000)*
(BSP_Configuration.microseconds_per_tick/1000);
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Unable to initialize system clock\n");
rtems_fatal_error_occurred(1);
}
/* make major/minor avail to others such as shared memory driver */
rtems_clock_major = major;
rtems_clock_minor = minor;
return RTEMS_SUCCESSFUL;
} /* Clock_initialize */
/*
* Clock_control
*
* This routine is the clock device driver control entry point.
*
* Input parameters:
* major - clock device major number
* minor - clock device minor number
* parg - pointer to optional device driver arguments
*
* Output parameters: NONE
*
* Return values:
* rtems_device_driver status code
*/
rtems_device_driver Clock_control(
rtems_device_major_number major,
rtems_device_minor_number minor,
void *pargp
)
{
rtems_unsigned32 isrlevel;
rtems_libio_ioctl_args_t *args = pargp;
if (args == 0)
goto done;
Clock_Decrementer_value = (BSP_bus_frequency/4000)*
(BSP_Configuration.microseconds_per_tick/1000);
if (args->command == rtems_build_name('I', 'S', 'R', ' '))
clockIsr();
else if (args->command == rtems_build_name('N', 'E', 'W', ' '))
{
if (!BSP_install_rtems_irq_handler (&clockIrqData)) {
printk("Error installing clock interrupt handler!\n");
rtems_fatal_error_occurred(1);
}
}
done:
return RTEMS_SUCCESSFUL;
}

View File

@@ -13,7 +13,11 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
BSP_PIECES = console irq openpic pci residual startup dec21140 vectors
# We only build the Network library if HAS_NETWORKING was defined
NETWORK_yes_V = dec21140
NETWORK = $(NETWORK_$(HAS_NETWORKING)_V)
BSP_PIECES = clock console irq openpic pci residual startup $(NETWORK) vectors
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x

View File

@@ -21,8 +21,9 @@ GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x
OBJS = $(foreach piece, $(BSP_PIECES), $(wildcard ../$(piece)/$(ARCH)/*.o)) \
$(foreach piece, $(CPU_PIECES), \
../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) $(foreach \
piece, $(GENERIC_PIECES), ../../../$(piece)/$(ARCH)/$(piece).rel)
../../../../libcpu/$(RTEMS_CPU)/$(piece)/$(ARCH)/$(piece).rel) \
$(foreach piece, $(GENERIC_PIECES), \
../../../$(piece)/$(ARCH)/$(piece).rel)
LIB = $(ARCH)/libbsp.a
include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -19,7 +19,6 @@
/* should get this from bsp.h, but it is not installed yet */
rtems_isr_entry set_vector(rtems_isr_entry, rtems_vector_number, int);
extern rtems_configuration_table BSP_Configuration;
#include <stdlib.h> /* for atexit() */
@@ -103,10 +102,9 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_clicks_interrupt = 0;
Clock_clicks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
if (BSP_Configuration.ticks_per_timeslice)
{
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
* First tick is set to right amount of time in the future
@@ -175,7 +173,7 @@ Clock_isr(rtems_vector_number vector)
if (Clock_isrs == 1)
{
rtems_clock_tick();
Clock_isrs = BSP_Configuration.microseconds_per_tick / 10000;
Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
if (Clock_isrs == 0)
Clock_isrs = 1;
}
@@ -191,8 +189,7 @@ Clock_isr(rtems_vector_number vector)
void
Clock_exit(void)
{
if ( BSP_Configuration.ticks_per_timeslice )
{
if ( rtems_configuration_get_ticks_per_timeslice() ) {
(void) set_vector(0, HPPA_INTERRUPT_EXTERNAL_INTERVAL_TIMER, 1);
}
}

View File

@@ -1,10 +1,6 @@
#
# $Id$
#
# Install any include files needed by libcpu.
# Mainly this just means bsp.h which would normally be installed
# after libcpu is built.
# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -16,7 +16,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include "semaphore.h"
@@ -123,7 +123,11 @@ hppa_semaphore_pool_initialize(void *pool_base,
* If we are node0, then init all in the pool
*/
#if 0
if (cpu_number == 0)
#else
if (_Configuration_Table->User_multiprocessing_table->node == 1)
#endif
{
/*
* Tell other cpus we are not done, jic
@@ -139,7 +143,11 @@ hppa_semaphore_pool_initialize(void *pool_base,
* Tell other cpus we are done, or wait for it to be done if on another cpu
*/
#if 0
if (cpu_number == 0)
#else
if (_Configuration_Table->User_multiprocessing_table->node == 1)
#endif
SEM_CONTROL->user = rtems_build_name('D', 'O', 'N', 'E');
else
while (SEM_CONTROL->user != rtems_build_name('D', 'O', 'N', 'E'))

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -66,8 +66,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -43,13 +43,20 @@
#include <rtems.h>
#include <rtems/libio.h>
#include <bsp.h>
#define EXT_INT5 0x8000 /* external interrupt 5 */
#include "clock.h"
/* formerly in the BSP */
#if 0
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
#endif
#define CLOCKS_PER_MICROSECOND \
rtems_cpu_configuration_get_clicks_per_microsecond()
/* to avoid including the bsp */
mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
void Clock_exit( void );
rtems_isr Clock_isr( rtems_vector_number vector );
@@ -152,20 +159,20 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
/*
* If ticks_per_timeslice is configured as non-zero, then the user
* wants a clock tick.
*/
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
/*
* Hardware specific initialize goes here
*/
mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND;
mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
mips_set_timer( mips_timer_rate );
enable_int(CLOCK_VECTOR_MASK);
}
@@ -183,11 +190,9 @@ void Install_clock(
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* mips: turn off the timer interrupts */
disable_int(CLOCK_VECTOR_MASK);
}
}

View File

@@ -47,7 +47,6 @@
#include <rtems.h>
#include <bsp.h>
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
#define TIMER_MAX_VALUE 0xffffffff

View File

@@ -43,13 +43,20 @@
#include <rtems.h>
#include <rtems/libio.h>
#include <bsp.h>
#define EXT_INT5 0x8000 /* external interrupt 5 */
#include "clock.h"
/* formerly in the BSP */
#if 0
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ ) /* equivalent to CPU clock speed in MHz */
#endif
#define CLOCKS_PER_MICROSECOND \
rtems_cpu_configuration_get_clicks_per_microsecond()
/* to avoid including the bsp */
mips_isr_entry set_vector( rtems_isr_entry, rtems_vector_number, int );
void Clock_exit( void );
rtems_isr Clock_isr( rtems_vector_number vector );
@@ -152,20 +159,20 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
Clock_isrs = BSP_Configuration.microseconds_per_tick / 1000;
Clock_isrs = rtems_configuration_get_milliseconds_per_tick();
/*
* If ticks_per_timeslice is configured as non-zero, then the user
* wants a clock tick.
*/
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
Old_ticker = (rtems_isr_entry) set_vector( clock_isr, CLOCK_VECTOR, 1 );
/*
* Hardware specific initialize goes here
*/
mips_timer_rate = BSP_Configuration.microseconds_per_tick * CLOCKS_PER_MICROSECOND;
mips_timer_rate = rtems_configuration_get_microseconds_per_tick() * CLOCKS_PER_MICROSECOND;
mips_set_timer( mips_timer_rate );
enable_int(CLOCK_VECTOR_MASK);
}
@@ -183,11 +190,9 @@ void Install_clock(
void Clock_exit( void )
{
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* mips: turn off the timer interrupts */
disable_int(CLOCK_VECTOR_MASK);
}
}

View File

@@ -1,10 +1,6 @@
#
# $Id$
#
# Install any include files needed by libcpu.
# Mainly this just means bsp.h which would normally be installed
# after libcpu is built.
# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@

View File

@@ -47,7 +47,6 @@
#include <rtems.h>
#include <bsp.h>
#define CLOCKS_PER_MICROSECOND ( CPU_CLOCK_RATE_MHZ )
#define TIMER_MAX_VALUE 0xffffffff

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -20,7 +20,8 @@ INSTALL_CHANGE = @INSTALL_CHANGE@
# wrapup is the one that actually builds and installs the library
# from the individual .rel files built in other directories
SUB_DIRS = exceptions mmu clock wrapup
# SUB_DIRS = exceptions mmu clock wrapup
SUB_DIRS = exceptions mmu wrapup
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
cd $(top_builddir) \

View File

@@ -13,7 +13,8 @@ PROJECT_ROOT = @PROJECT_ROOT@
VPATH = @srcdir@
PROC_SPECIFIC_O_PIECES = exceptions mmu clock
# PROC_SPECIFIC_O_PIECES = exceptions mmu clock
PROC_SPECIFIC_O_PIECES = exceptions mmu
GENERIC_PIECES =
# bummer; have to use $foreach since % pattern subst rules only replace 1x

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -36,7 +36,6 @@
* $Id$
*/
#include <bsp.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -74,7 +73,7 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
pit_value = BSP_Configuration.microseconds_per_tick /
pit_value = rtems_configuration_get_microseconds_per_tick() /
Cpu_table.clicks_per_usec;
if (pit_value == 0) {
pit_value = 0xffff;
@@ -85,7 +84,7 @@ void Install_clock(rtems_isr_entry clock_isr)
if (pit_value > 0xffff) { /* pit is only 16 bits long */
rtems_fatal_error_occurred(-1);
}
if (BSP_Configuration.ticks_per_timeslice) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
@@ -131,7 +130,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* disable PIT and PIT interrupts */
m821.piscr &= ~(M821_PISCR_PTE | M821_PISCR_PIE);

View File

@@ -42,7 +42,6 @@
* $Id$
*/
#include <bsp.h>
#include <rtems/libio.h>
#include <mpc821.h>
#include <mpc821/console.h>

View File

@@ -1,10 +1,6 @@
#
# $Id$
#
# Install any include files needed by libcpu.
# Mainly this just means bsp.h which would normally be installed
# after libcpu is built.
# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -43,7 +43,6 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <mpc821.h>

View File

@@ -44,7 +44,6 @@
*/
#include "asm.h"
/*#include "bsp.h"*/
#define ALIGN_REGS 0x0140
.set CACHE_SIZE,16 # cache line size of 32 bytes

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -36,7 +36,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -74,7 +74,7 @@ void Install_clock(rtems_isr_entry clock_isr)
Clock_driver_ticks = 0;
pit_value = BSP_Configuration.microseconds_per_tick /
pit_value = rtems_configuration_get_microseconds_per_tick() /
Cpu_table.clicks_per_usec;
if (pit_value == 0) {
pit_value = 0xffff;
@@ -85,7 +85,7 @@ void Install_clock(rtems_isr_entry clock_isr)
if (pit_value > 0xffff) { /* pit is only 16 bits long */
rtems_fatal_error_occurred(-1);
}
if (BSP_Configuration.ticks_per_timeslice) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/*
* initialize the interval here
@@ -131,7 +131,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* disable PIT and PIT interrupts */
m860.piscr &= ~(M860_PISCR_PTE | M860_PISCR_PIE);

View File

@@ -44,7 +44,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <mpc860.h>
#include <mpc860/console.h>

View File

@@ -1,10 +1,6 @@
#
# $Id$
#
# Install any include files needed by libcpu.
# Mainly this just means bsp.h which would normally be installed
# after libcpu is built.
# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -43,7 +43,6 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <mpc860.h>

View File

@@ -44,7 +44,6 @@
*/
#include "asm.h"
/*#include "bsp.h"*/
#define ALIGN_REGS 0x0140
.set CACHE_SIZE,16 # cache line size of 32 bytes

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -37,7 +37,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <clockdrv.h>
#include <rtems/libio.h>
@@ -164,11 +164,10 @@ void Install_clock(rtems_isr_entry clock_isr)
else if ((pvr & 0xff00) == 0x0100) /* 403GB */
auto_restart = 1;
pit_value = BSP_Configuration.microseconds_per_tick *
pit_value = rtems_configuration_get_microseconds_per_tick() *
Cpu_table.clicks_per_usec;
if (BSP_Configuration.ticks_per_timeslice)
{
if ( rtems_configuration_get_ticks_per_timeslice() ) {
register rtems_unsigned32 tcr;
/*
@@ -218,8 +217,7 @@ ReInstall_clock(rtems_isr_entry new_clock_isr)
void
Clock_exit(void)
{
if ( BSP_Configuration.ticks_per_timeslice )
{
if ( rtems_configuration_get_ticks_per_timeslice() ) {
register rtems_unsigned32 tcr;
asm volatile ("mfspr %0, 0x3da" : "=r" ((tcr))); /* TCR */

View File

@@ -56,7 +56,7 @@
#define NO_BSP_INIT
#include <bsp.h>
#include <rtems.h>
#include <rtems/libio.h>
#include "../ictrl/ictrl.h"
#include <stdlib.h> /* for atexit() */

View File

@@ -31,7 +31,7 @@
#define NO_BSP_INIT
#include <bsp.h>
#include <rtems.h>
#include <rtems/libio.h>
extern rtems_cpu_table Cpu_table; /* owned by BSP */

View File

@@ -69,8 +69,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
@$(INSTALL_CHANGE) -m 644 $(H_FILES) $(PROJECT_INCLUDE)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -21,7 +21,7 @@
*/
#include "ictrl.h"
#include <bsp.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <stdlib.h> /* for atexit() */

View File

@@ -1,10 +1,6 @@
#
# $Id$
#
# Install any include files needed by libcpu.
# Mainly this just means bsp.h which would normally be installed
# after libcpu is built.
# This is a bit of a hack.
@SET_MAKE@
srcdir = @srcdir@

View File

@@ -62,8 +62,6 @@ ${PGM}: ${SRCS} ${OBJS}
all: ${ARCH} $(SRCS) $(PGM)
# the .rel file built here will be put into libbsp.a by
# libbsp/hppa/BSP/wrapup/Makefile
install: all
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status

View File

@@ -34,7 +34,6 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
extern rtems_cpu_table Cpu_table; /* owned by BSP */

View File

@@ -44,7 +44,7 @@
*/
#include "asm.h"
#include "bsp.h"
#include "rtems.h"
.set CACHE_SIZE,16 # cache line size of 32 bytes
.set CACHE_SIZE_L2,4 # cache line size, log 2

View File

@@ -22,7 +22,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <stdlib.h>
@@ -143,7 +143,7 @@ void Install_clock(
*/
Clock_driver_ticks = 0;
Clock_isrs_const = BSP_Configuration.microseconds_per_tick / 10000;
Clock_isrs_const = rtems_configuration_get_microseconds_per_tick() / 10000;
Clock_isrs = Clock_isrs_const;
/*
@@ -151,7 +151,7 @@ void Install_clock(
* wants a clock tick.
*/
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
rtems_interrupt_catch( Clock_isr, CLOCK_VECTOR, &Old_ticker );
/*
* Hardware specific initialize goes here
@@ -191,7 +191,7 @@ void Install_clock(
rtems_fatal_error_occurred( RTEMS_NOT_CONFIGURED);
/* set counter limits */
write16( _ITU_COUNTER0_MICROSECOND * BSP_Configuration.microseconds_per_tick,
write16( _ITU_COUNTER0_MICROSECOND * rtems_configuration_get_microseconds_per_tick(),
ITU_GRA0);
/* start counter */
@@ -214,7 +214,7 @@ void Install_clock(
void Clock_exit( void )
{
unsigned8 temp8 = 0;
if ( BSP_Configuration.ticks_per_timeslice ) {
if ( rtems_configuration_get_ticks_per_timeslice() ) {
/* turn off the timer interrupts */
/* set interrupt priority to 0 */

View File

@@ -30,6 +30,7 @@
*/
#include <bsp.h>
#include <rtems.h>
#include <rtems/libio.h>
#include <iosupp.h>

View File

@@ -29,7 +29,7 @@
* $Id$
*/
#include <bsp.h>
#include <rtems.h>
#include <rtems/score/sh_io.h>
#include <rtems/score/iosh7030.h>

View File

@@ -32,6 +32,8 @@ rtems_task Init(
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
#define CONFIGURE_INIT

View File

@@ -28,6 +28,8 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INIT
#include <confdefs.h>

View File

@@ -114,7 +114,6 @@ extern "C" {
#define RTEMS_MINIMUN_HETERO_CONVERSION MP_PACKET_MINIMUN_HETERO_CONVERSION
#ifdef __cplusplus
}
#endif

View File

@@ -116,6 +116,52 @@ typedef struct {
SAPI_EXTERN rtems_configuration_table *_Configuration_Table;
SAPI_EXTERN rtems_multiprocessing_table *_Configuration_MP_table;
/*
* Some handy macros to avoid dependencies on either the BSP
* or the exact format of the configuration table.
*/
#define rtems_configuration_get_work_space_start() \
(_Configuration_Table->work_space_start)
#define rtems_configuration_get_work_space_size() \
(_Configuration_Table->work_space_size)
#define rtems_configuration_get_maximum_extensions() \
(_Configuration_Table->maximum_extensions)
#define rtems_configuration_get_microseconds_per_tick() \
(_Configuration_Table->microseconds_per_tick)
#define rtems_configuration_get_milliseconds_per_tick() \
(_Configuration_Table->microseconds_per_tick / 1000)
#define rtems_configuration_get_ticks_per_timeslice() \
(_Configuration_Table->ticks_per_timeslice)
#define rtems_configuration_get_maximum_devices() \
(_Configuration_Table->maximum_devices)
#define rtems_configuration_get_number_of_device_drivers() \
(_Configuration_Table->number_of_device_drivers)
#define rtems_configuration_get_device_driver_table() \
(_Configuration_Table->device_driver_table)
#define rtems_configuration_get_number_of_initial_extensions() \
(_Configuration_Table->number_of_initial_extensions)
#define rtems_configuration_get_user_extension_table() \
(_Configuration_Table->user_extension_table)
#define rtems_configuration_get_user_multiprocessing_table() \
(_Configuration_Table->user_multiprocessing_table)
#define rtems_configuration_get_rtems_api_configuration() \
(_Configuration_Table->rtems_api_configuration)
#define rtems_configuration_get_posix_api_configuration() \
(_Configuration_Table->posix_api_configuration)
#ifdef __cplusplus
}
#endif

View File

@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
unsigned32 some_other_cpu_dependent_info;
unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
#define rtems_cpu_configuration_get_clicks_per_microsecond() \
(_CPU_Table.clicks_per_microsecond)
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by

View File

@@ -435,9 +435,12 @@ typedef struct {
void (*stack_free_hook)( void* );
/* end of fields required on all CPUs */
unsigned32 some_other_cpu_dependent_info;
unsigned32 clicks_per_microsecond;
} rtems_cpu_table;
#define rtems_cpu_configuration_get_clicks_per_microsecond() \
(_CPU_Table.clicks_per_microsecond)
/*
* This variable is optional. It is used on CPUs on which it is difficult
* to generate an "uninitialized" FP context. It is filled in by

View File

@@ -1,5 +1,6 @@
AUTOMAKE_OPTIONS = foreign
# add gnatnewlib once that one works. :)
SUBDIRS = . binutils gccnewlib gdb rtems
noinst_SCRIPTS = \

View File

@@ -4,6 +4,8 @@ AUTOMAKE_OPTIONS = foreign
MKGCCNEWLIBSPEC = $(SHELL) $(top_builddir)/mkgccnewlibspec
C_ONLY_ARG = -a $(top_builddir)/gccnewlib/gccnewlib_c_only.spec.in
MKGCCNEWLIBSPEC_DEPS = \
$(top_builddir)/mkgccnewlibspec gccnewlib.spec.in $(top_builddir)/setup.cache
@@ -14,7 +16,7 @@ i386-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i386-rtems
i960-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . i960-rtems
$(MKGCCNEWLIBSPEC) $(C_ONLY_ARG) -cfg $(top_builddir)/setup.cache -o . i960-rtems
m68k-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . m68k-rtems
@@ -38,7 +40,8 @@ sparc-rtems-$(GCCNEWLIBVERS).spec: $(MKGCCNEWLIBSPEC_DEPS)
$(MKGCCNEWLIBSPEC) -cfg $(top_builddir)/setup.cache -o . sparc-rtems
TEMPLATES = \
gccnewlib.spec.in
gccnewlib.spec.in \
gccnewlib_c_only.spec.in
RPM_SPECS_DATA = \
hppa1.1-rtems-$(GCCNEWLIBVERS).spec \

View File

@@ -9,22 +9,22 @@
Vendor: OAR Corporation
Distribution: Linux
Name: @target_alias@-gcc-newlib
Summary: gcc and newlib C Library for @target_alias@.
Summary: gnat, gcc, and newlib C Library for @target_alias@.
Group: rtems
Release: @Release@
Copyright: 1999 OARCorp
Provides: @target_alias@-gcc @target_alias@-chill @target_alias@-gcj
Provides: @target_alias@-g77 @target_alias@-objc
Provides: @target_alias@-gcc
Requires: @target_alias@-binutils
Autoreqprov: on
Packager: corsepiu@faw.uni-ulm.de and joel@OARcorp.com
Version: gcc@gcc_version@newlib@newlib_version@
Version: gnat@gnat_version@newlib@newlib_version@
Source0: ftp://ftp.gnu.org/pub/gnu/gcc/gcc-@gcc_version@.tar.gz
Source1: ftp://sourceware.cygnus/com/pub/newlib/newlib-@newlib_version@.tar.gz
Patch0: gcc-@gcc_version@-rtems-@gcc_patch_version@.diff
Source2: ftp://cs.nyu.edu/pub/gnat/gnat-@gnat_version@.tar.gz
Patch0: gcc-@gcc_version@-gnatrtems-@gcc_patch_version@.diff
Patch1: newlib-@newlib_version@-rtems-@newlib_patch_version@.diff
Buildroot: /tmp
@@ -39,7 +39,7 @@ Buildroot: /tmp
# your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
# Or you can try the ftp options of rpm :-)
#
NoSource: 0, 1
NoSource: 0, 1, 2
%description
RTEMS is an open source operating system for embedded systems.
@@ -56,44 +56,6 @@ This is gcc's and newlib C Library's sources with patches for RTEMS.
your /usr/src/redhat/SOURCES directory ($RPM_SOURCE_DIR).
Or you can try the ftp options of rpm :-)
%package -n @target_alias@-gcc
Summary: rtems gcc and newlib C Library for @target_alias@
Group: rtems
Requires: @target_alias@-binutils
%description -n @target_alias@-gcc
RTEMS is an open source operating system for embedded systems.
This is gcc and newlib C Library for @target_alias@.
%package -n @target_alias@-chill
Summary: gcc/chill compiler for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-chill
RTEMS is an open source operating system for embedded systems.
This is the gcc/chill compiler and support files for @target_alias@
%package -n @target_alias@-gcj
Summary: gcc/java compiler (gcj) for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-gcj
RTEMS is an open source operating system for embedded systems.
This is the gcc/java compiler for @target_alias@
%package -n @target_alias@-g77
Summary: gcc/g77 compiler for @target_alias@
Group: rtems
Requires: @target_alias@-gcc
%description -n @target_alias@-g77
RTEMS is an open source operating system for embedded systems.
This is the gcc/g77 compiler for @target_alias@
%package -n @target_alias@-objc

View File

@@ -17,6 +17,8 @@ usage()
exit 1 ;
}
specsrc=${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in
while test $# -ge 2; do
case $1 in
-cfg)
@@ -28,6 +30,10 @@ case $1 in
shift
dst=$1
shift
-a) # alternate specs file
shift
specsrc=$1
shift
;;
-*)
echo "invalid option $1";
@@ -56,7 +62,7 @@ sed -e "s%@Release@%${gccnewlib_rpm_release}%g" \
-e "s%@gcc_patch_version@%${gcc_patch_version}%g" \
-e "s%@newlib_version@%${newlib_version}%g" \
-e "s%@newlib_patch_version@%${newlib_patch_version}%g" \
< ${RTEMS_DIR}/gccnewlib/gccnewlib.spec.in \
< ${specsrc} \
> ${specfile}
echo Generated ${specfile}.

View File

@@ -32,6 +32,8 @@ rtems_task Init(
#define CONFIGURE_TEST_NEEDS_CLOCK_DRIVER
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_INIT_TASK_STACK_SIZE (RTEMS_MINIMUM_STACK_SIZE * 2)
#define CONFIGURE_INIT

View File

@@ -28,6 +28,8 @@ rtems_task Init(
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#define CONFIGURE_USE_MINIIMFS_AS_BASE_FILESYSTEM
#define CONFIGURE_INIT
#include <confdefs.h>