EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
<== Date ==> <== Thread ==>

Subject: Re: Porting EPICS to NetBSD
From: Andrew Johnson <anj@aps.anl.gov>
To: David Dudley <DavidDu@cctexas.com>
Cc: tech-talk@aps.anl.gov
Date: Tue, 15 Aug 2006 17:23:15 -0500
Hi David,

Welcome to the EPICS community!

David Dudley wrote:

Is there anything available that provides any documentation on how to port EPICS to a new architecture?

Unfortunately I don't think there is, although there ought to be. However I suspect that in your case the work required shouldn't be very hard since NetBSD is probably pretty compliant with Posix standards.


Here's an outline of the approach you'll need to take:

* Download the EPICS Base R3.14.8.2 tarfile, and unpack it.
* Skim chapter 4 of the IOC Application Developers Guide (hereafter known as the AppDevGuide; our build system is different to the usual "./configure && make" approach.
* Build your <base> on a linux-x86 or solaris-sparc system so you know what a fully built system actually looks and acts like. You can build multiple architectures in the same source tree, which makes for easier comparisons. On linux this should be as simple as
export EPICS_HOST_ARCH=linux-x86
cd <base>
make
* On a NetBSD system, setenv EPICS_HOST_ARCH to the name for your new architecture, which should probably be netbsd-x86 (or whatever CPU is appropriate).
* In the <base>/configure/os directory, create these files
CONFIG.Common.<arch>
CONFIG.<arch>.Common
CONFIG_SITE.<arch>.Common
by copying and editing the files from an existing architecture - I would suggest looking at the darwin-ppc or linux-x86 versions to start with; you should be able to make use of the *UnixCommon* files to do most of the work like they do, assuming this architecture is self-hosting. If you have to cross-compile then there's more work you have to do.
* Running 'make' in the <base>/configure directory should succeed and create an appropriate O.<arch> directory.
* Once you have the new files for the build system, check out the <base>/src/libCom/osi/os subdirectories - these contain any code that has to be OS-specific; in your case the posix and default directories may provide almost all of the implementation you need. Create a new directory named for your OS_CLASS to put any new files in.
* Try running 'make' in the <base> top level directory and see how far it gets.
* Keep us informed of your progress, and don't be afraid to ask questions here and post the errors and locations that you get stuck on, there are lots of people here who should be able to help.
* When you have base built, follow the Chapter 2: Getting Started instructions in the AppDevGuide to create an IOC on the new architecture, and try running it.
* When this works, send me a patch file with your changes and we'll incorporate your new architecture into the next release.


HTH,

- Andrew
--
Not everything that can be counted counts,
and not everything that counts can be counted.
  -- Albert Einstein

Replies:
RE: Porting EPICS to NetBSD Allison, Stephanie
References:
Porting EPICS to NetBSD David Dudley

Navigate by Date:
Prev: Porting EPICS to NetBSD David Dudley
Next: RE: Porting EPICS to NetBSD Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019 
Navigate by Thread:
Prev: Porting EPICS to NetBSD David Dudley
Next: RE: Porting EPICS to NetBSD Allison, Stephanie
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  <20062007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019