Add RTEMS R4.10 support

This commit is contained in:
Eric Norum
2010-07-23 09:26:29 -07:00
4 changed files with 47 additions and 3 deletions

View File

@@ -77,6 +77,12 @@ but target-architecture-specific values must be set in a target-specific
<p>Added build support for the latest Wind River release.</p>
<h4>RTEMS 4.10 support</h4>
<p>Added support for the latest release of RTEMS. There is no longer a
distinction between executive and malloc memory pools. The new mount() API
is used.</p>
<h4>Dependency file generation</h4>
<p>Changes to the way in which we generate header dependency files, which are

View File

@@ -21,7 +21,7 @@
*/
#define CONFIGURE_RTEMS_INIT_TASKS_TABLE
#if __RTEMS_MAJOR__>4 || ( __RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9 )
#if __RTEMS_MAJOR__>4 || (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || (__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
# define CONFIGURE_UNIFIED_WORK_AREAS
#else
# define CONFIGURE_EXECUTIVE_RAM_SIZE (2000*1024)
@@ -55,6 +55,9 @@ rtems_task Init (rtems_task_argument argument);
#define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
#define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
#define CONFIGURE_FILESYSTEM_NFS
#define CONFIGURE_FILESYSTEM_IMFS
/*
* This should be made BSP dependent, not CPU dependent but I know of no
* appropriate conditionals to use.

View File

@@ -169,6 +169,41 @@ initialize_local_filesystem(char **argv)
return 0;
}
#ifndef OMIT_NFS_SUPPORT
#if __RTEMS_MAJOR__>4 || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__>9) || \
(__RTEMS_MAJOR__==4 && __RTEMS_MINOR__==9 && __RTEMS_REVISION__==99)
static int
nfsMount(char *uidhost, char *path, char *mntpoint)
{
int devl = strlen(uidhost) + strlen(path) + 2;
char *dev;
int rval = -1;
if ((dev = malloc(devl)) == NULL) {
fprintf(stderr,"nfsMount: out of memory\n");
return -1;
}
sprintf(dev, "%s:%s", uidhost, path);
printf("Mount %s on %s\n", dev, mntpoint);
if (rtems_mkdir(mntpoint, S_IRWXU | S_IRWXG | S_IRWXO))
printf("Warning -- unable to make directory \"%s\"\n", mntpoint);
if (mount(dev, mntpoint, RTEMS_FILESYSTEM_TYPE_NFS,
RTEMS_FILESYSTEM_READ_WRITE, NULL)) {
perror("mount failed");
}
else {
rval = 0;
}
free(dev);
return rval;
}
#define NFS_INIT
#else
#define NFS_INIT rpcUdpInit(); nfsInit(0,0);
#endif
#endif
static void
initialize_remote_filesystem(char **argv, int hasLocalFilesystem)
{
@@ -198,8 +233,7 @@ initialize_remote_filesystem(char **argv, int hasLocalFilesystem)
int l = 0;
printf ("***** Initializing NFS *****\n");
rpcUdpInit();
nfsInit(0,0);
NFS_INIT
if (env_nfsServer && env_nfsPath && env_nfsMountPoint) {
server_name = env_nfsServer;
server_path = env_nfsPath;

View File

@@ -9,6 +9,7 @@
#include <time.h>
#include <stdio.h>
#include <unistd.h>
#include "epicsAssert.h"
#include "bucketLib.h"