Index: freebsd/sys/kern/kern_conf.c
===================================================================
--- freebsd/sys/kern/kern_conf.c	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ freebsd/sys/kern/kern_conf.c	(revision 9a01ebf7d746344c22d081c9c8bf2ceb6dc704c3)
@@ -52,10 +52,16 @@
 #include <vm/vm.h>
 
+#ifdef __rtems__
+#define	PRIBIO			(0)
+#endif /* __rtems__ */
+
 static MALLOC_DEFINE(M_DEVT, "cdev", "cdev storage");
 
 struct mtx devmtx;
 static void destroy_devl(struct cdev *dev);
+#ifndef __rtems__
 static int destroy_dev_sched_cbl(struct cdev *dev,
     void (*cb)(void *), void *arg);
+#endif /* __rtems__ */
 static int make_dev_credv(int flags, struct cdev **dres, struct cdevsw *devsw,
     int unit, struct ucred *cr, uid_t uid, gid_t gid, int mode, const char *fmt,
@@ -138,4 +144,5 @@
 }
 
+#ifndef __rtems__
 void
 dev_ref(struct cdev *dev)
@@ -147,4 +154,5 @@
 	mtx_unlock(&devmtx);
 }
+#endif /* __rtems__ */
 
 void
@@ -156,4 +164,5 @@
 }
 
+#ifndef __rtems__
 void
 dev_rel(struct cdev *dev)
@@ -180,4 +189,5 @@
 		devfs_free(dev);
 }
+#endif /* __rtems__ */
 
 struct cdevsw *
@@ -206,4 +216,5 @@
 }
 
+#ifndef __rtems__
 struct cdevsw *
 devvn_refthread(struct vnode *vp, struct cdev **devp, int *ref)
@@ -247,4 +258,5 @@
 	return (csw);
 }
+#endif /* __rtems__ */
 
 void	
@@ -298,4 +310,5 @@
 #define dead_mmap	(d_mmap_t *)enodev
 
+#ifndef __rtems__
 static void
 dead_strategy(struct bio *bp)
@@ -304,4 +317,5 @@
 	biofinish(bp, NULL, ENXIO);
 }
+#endif /* __rtems__ */
 
 #define dead_dump	(dumper_t *)enxio
@@ -317,10 +331,16 @@
 	.d_ioctl =	dead_ioctl,
 	.d_poll =	dead_poll,
+#ifndef __rtems__
 	.d_mmap =	dead_mmap,
 	.d_strategy =	dead_strategy,
+#endif /* __rtems__ */
 	.d_name =	"dead",
+#ifndef __rtems__
 	.d_dump =	dead_dump,
+#endif /* __rtems__ */
 	.d_kqfilter =	dead_kqfilter,
+#ifndef __rtems__
 	.d_mmap_single = dead_mmap_single
+#endif /* __rtems__ */
 };
 
@@ -336,4 +356,5 @@
 #define no_mmap_single	(d_mmap_single_t *)enodev
 
+#ifndef __rtems__
 static void
 no_strategy(struct bio *bp)
@@ -342,4 +363,5 @@
 	biofinish(bp, NULL, ENODEV);
 }
+#endif /* __rtems__ */
 
 static int
@@ -368,4 +390,5 @@
 }
 
+#ifndef __rtems__
 static int
 giant_fdopen(struct cdev *dev, int oflags, struct thread *td, struct file *fp)
@@ -383,4 +406,5 @@
 	return (retval);
 }
+#endif /* __rtems__ */
 
 static int
@@ -400,4 +424,5 @@
 }
 
+#ifndef __rtems__
 static void
 giant_strategy(struct bio *bp)
@@ -418,4 +443,5 @@
 	dev_relthread(dev, ref);
 }
+#endif /* __rtems__ */
 
 static int
@@ -499,4 +525,5 @@
 }
 
+#ifndef __rtems__
 static int
 giant_mmap(struct cdev *dev, vm_ooffset_t offset, vm_paddr_t *paddr, int nprot,
@@ -534,4 +561,5 @@
 	return (retval);
 }
+#endif /* __rtems__ */
 
 static void
@@ -638,8 +666,10 @@
 		devsw->d_ioctl = dead_ioctl;
 		devsw->d_poll = dead_poll;
+#ifndef __rtems__
 		devsw->d_mmap = dead_mmap;
 		devsw->d_mmap_single = dead_mmap_single;
 		devsw->d_strategy = dead_strategy;
 		devsw->d_dump = dead_dump;
+#endif /* __rtems__ */
 		devsw->d_kqfilter = dead_kqfilter;
 	}
@@ -663,5 +693,7 @@
 
 	FIXUP(d_open,		null_open,	giant_open);
+#ifndef __rtems__
 	FIXUP(d_fdopen,		NULL,		giant_fdopen);
+#endif /* __rtems__ */
 	FIXUP(d_close,		null_close,	giant_close);
 	FIXUP(d_read,		no_read,	giant_read);
@@ -669,10 +701,14 @@
 	FIXUP(d_ioctl,		no_ioctl,	giant_ioctl);
 	FIXUP(d_poll,		no_poll,	giant_poll);
+#ifndef __rtems__
 	FIXUP(d_mmap,		no_mmap,	giant_mmap);
 	FIXUP(d_strategy,	no_strategy,	giant_strategy);
+#endif /* __rtems__ */
 	FIXUP(d_kqfilter,	no_kqfilter,	giant_kqfilter);
+#ifndef __rtems__
 	FIXUP(d_mmap_single,	no_mmap_single,	giant_mmap_single);
 
 	if (devsw->d_dump == NULL)	devsw->d_dump = no_dump;
+#endif /* __rtems__ */
 
 	LIST_INIT(&devsw->d_devs);
@@ -792,4 +828,5 @@
 	    devsw->d_name, dev2unit(dev), devtoname(dev)));
 	dev->si_flags |= SI_NAMED;
+#ifndef __rtems__
 	if (cr != NULL)
 		dev->si_cred = crhold(cr);
@@ -797,7 +834,10 @@
 	dev->si_gid = gid;
 	dev->si_mode = mode;
+#endif /* __rtems__ */
 
 	devfs_create(dev);
+#ifndef __rtems__
 	clean_unrhdrl(devfs_inos);
+#endif /* __rtems__ */
 	dev_unlock_and_free();
 
@@ -825,4 +865,5 @@
 }
 
+#ifndef __rtems__
 struct cdev *
 make_dev_cred(struct cdevsw *devsw, int unit, struct ucred *cr, uid_t uid,
@@ -930,5 +971,7 @@
 	devfs_create(dev);
 	dev_dependsl(pdev, dev);
+#ifndef __rtems__
 	clean_unrhdrl(devfs_inos);
+#endif /* __rtems__ */
 	dev_unlock();
 
@@ -1029,4 +1072,5 @@
 	return (ret);
 }
+#endif /* __rtems__ */
 
 static void
@@ -1060,4 +1104,5 @@
 	dev->si_flags &= ~SI_NAMED;
 
+#ifndef __rtems__
 	/* If we are a child, remove us from the parents list */
 	if (dev->si_flags & SI_CHILD) {
@@ -1075,7 +1120,9 @@
 		dev->si_flags &= ~SI_CLONELIST;
 	}
+#endif /* __rtems__ */
 
 	csw = dev->si_devsw;
 	dev->si_devsw = NULL;	/* already NULL for SI_ALIAS */
+#ifndef __rtems__
 	while (csw != NULL && csw->d_purge != NULL && dev->si_threadcount) {
 		csw->d_purge(dev);
@@ -1085,4 +1132,5 @@
 			    dev->si_threadcount, devtoname(dev));
 	}
+#endif /* __rtems__ */
 	while (dev->si_threadcount != 0) {
 		/* Use unique dummy wait ident */
@@ -1095,4 +1143,5 @@
 		notify_destroy(dev);
 	}
+#ifndef __rtems__
 	mtx_lock(&cdevpriv_mtx);
 	while ((p = LIST_FIRST(&cdp->cdp_fdpriv)) != NULL) {
@@ -1101,9 +1150,12 @@
 	}
 	mtx_unlock(&cdevpriv_mtx);
+#endif /* __rtems__ */
 	dev_lock();
 
 	dev->si_drv1 = 0;
 	dev->si_drv2 = 0;
+#ifndef __rtems__
 	bzero(&dev->__si_u, sizeof(dev->__si_u));
+#endif /* __rtems__ */
 
 	if (!(dev->si_flags & SI_ALIAS)) {
@@ -1127,4 +1179,5 @@
 }
 
+#ifndef __rtems__
 static void
 delist_dev_locked(struct cdev *dev)
@@ -1165,4 +1218,5 @@
 	dev_unlock();
 }
+#endif /* __rtems__ */
 
 void
@@ -1176,4 +1230,5 @@
 }
 
+#ifndef __rtems__
 const char *
 devtoname(struct cdev *dev)
@@ -1519,2 +1574,3 @@
 }
 #endif
+#endif /* __rtems__ */
Index: freebsd/sys/kern/sys_generic.c
===================================================================
--- freebsd/sys/kern/sys_generic.c	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ freebsd/sys/kern/sys_generic.c	(revision 9a01ebf7d746344c22d081c9c8bf2ceb6dc704c3)
@@ -782,4 +782,5 @@
 	return (error);
 }
+#endif /* __rtems__ */
 
 int
@@ -799,4 +800,5 @@
 }
 
+#ifndef __rtems__
 int
 sys_pselect(struct thread *td, struct pselect_args *uap)
Index: freebsd/sys/sys/conf.h
===================================================================
--- freebsd/sys/sys/conf.h	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ freebsd/sys/sys/conf.h	(revision 9a01ebf7d746344c22d081c9c8bf2ceb6dc704c3)
@@ -83,7 +83,7 @@
 #endif /* __rtems__ */
 	int		si_drv0;
-#ifndef __rtems__
 	int		si_refcount;
 	LIST_ENTRY(cdev)	si_list;
+#ifndef __rtems__
 	LIST_ENTRY(cdev)	si_clone;
 	LIST_HEAD(, cdev)	si_children;
@@ -97,5 +97,7 @@
 	int		si_iosize_max;	/* maximum I/O size (for physio &al) */
 	u_long		si_usecount;
+#endif /* __rtems__ */
 	u_long		si_threadcount;
+#ifndef __rtems__
 	union {
 		struct snapdata *__sid_snapdata;
@@ -109,4 +111,5 @@
 	} __si_pathstruct;
 #endif /* __rtems__ */
+	char		__si_namebuf[SPECNAMELEN + 1];
 };
 
@@ -220,5 +223,7 @@
 	const char		*d_name;
 	d_open_t		*d_open;
+#ifndef __rtems__
 	d_fdopen_t		*d_fdopen;
+#endif /* __rtems__ */
 	d_close_t		*d_close;
 	d_read_t		*d_read;
@@ -226,8 +231,11 @@
 	d_ioctl_t		*d_ioctl;
 	d_poll_t		*d_poll;
+#ifndef __rtems__
 	d_mmap_t		*d_mmap;
 	d_strategy_t		*d_strategy;
 	dumper_t		*d_dump;
+#endif /* __rtems__ */
 	d_kqfilter_t		*d_kqfilter;
+#ifndef __rtems__
 	d_purge_t		*d_purge;
 	d_mmap_single_t		*d_mmap_single;
@@ -236,7 +244,10 @@
 	void			*d_spare1[3];
 
+#endif /* __rtems__ */
 	/* These fields should not be messed with by drivers */
 	LIST_HEAD(, cdev)	d_devs;
+#ifndef __rtems__
 	int			d_spare2;
+#endif /* __rtems__ */
 	union {
 		struct cdevsw		*gianttrick;
Index: libbsd.py
===================================================================
--- libbsd.py	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ libbsd.py	(revision 9a01ebf7d746344c22d081c9c8bf2ceb6dc704c3)
@@ -77,5 +77,4 @@
             'rtems/rtems-kernel-cam.c',
             'rtems/rtems-kernel-chunk.c',
-            'rtems/rtems-kernel-conf.c',
             'rtems/rtems-kernel-configintrhook.c',
             'rtems/rtems-kernel-delay.c',
@@ -304,4 +303,5 @@
             'sys/kern/init_main.c',
             'sys/kern/kern_condvar.c',
+            'sys/kern/kern_conf.c',
             'sys/kern/kern_event.c',
             'sys/kern/kern_hhook.c',
Index: libbsd_waf.py
===================================================================
--- libbsd_waf.py	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ libbsd_waf.py	(revision 9a01ebf7d746344c22d081c9c8bf2ceb6dc704c3)
@@ -786,4 +786,5 @@
               'freebsd/sys/kern/init_main.c',
               'freebsd/sys/kern/kern_condvar.c',
+              'freebsd/sys/kern/kern_conf.c',
               'freebsd/sys/kern/kern_event.c',
               'freebsd/sys/kern/kern_hhook.c',
@@ -1070,5 +1071,4 @@
               'rtemsbsd/rtems/rtems-kernel-cam.c',
               'rtemsbsd/rtems/rtems-kernel-chunk.c',
-              'rtemsbsd/rtems/rtems-kernel-conf.c',
               'rtemsbsd/rtems/rtems-kernel-configintrhook.c',
               'rtemsbsd/rtems/rtems-kernel-delay.c',
Index: emsbsd/rtems/rtems-kernel-conf.c
===================================================================
--- rtemsbsd/rtems/rtems-kernel-conf.c	(revision 6c0cfc217332129e6b0b4ca9cb9877f9fb0c7895)
+++ 	(revision )
@@ -1,65 +1,0 @@
-/**
- * @file
- *
- * @ingroup rtems_bsd_rtems
- *
- * @brief This file is an rtems representation of needed methods from
- * the FreeBSD file kern_conf.c
- */
-
-/*
- * COPYRIGHT (c) 2012. On-Line Applications Research Corporation (OAR).
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <machine/rtems-bsd-kernel-space.h>
-#include <stdio.h>
-#include <rtems.h>
-
-__FBSDID("$FreeBSD$");
-
-#include <rtems/bsd/sys/param.h>
-#include <sys/conf.h>
-
-struct cdev *
-make_dev(struct cdevsw *devsw, int unit, uid_t uid, gid_t gid, int mode,
-    const char *fmt, ...)
-{
-        struct cdev *dev;
-	dev = malloc( sizeof(struct cdev) );
-
-	/* Initialize the elements that rtems uses. */
-	dev->si_flags = 0;
-	dev->si_drv0 = unit;
-	dev->si_drv1 = NULL;
-	dev->si_drv2 = NULL;
-
-        return (dev);
-}
-
-void
-destroy_dev(struct cdev *dev)
-{
-	free (dev);
-}
