[Dibbler-devel] dhcpv6 porting to ecos

Tomek Mrugalski thomson at klub.com.pl
Fri Jan 20 13:34:32 CET 2012


On 12-01-20 00:13, Leon Huang wrote:
> Hi Thomson,
>  
> Thank you for your email. I was busy on some other projects and recently
> resume my work of porting dippler to ECOS.
>  
> ECOS is not linux or bsd based. I usually do cross-compile from cygwin(a
> windows platform linux environment) for my ecos project.
I know cygwin, but I never tried to compile Dibbler under Cygwin. I'm
using visual studio to compile for Windows platforms. For other
platforms, autotools (autoconf, automake) and make is used.

> I tried KAME-WIDE DHCPv6, but it has so many linux api calls. What do i
> need to do with Dippler?
Have you read my mail from Oct. 14th? It gives you some starting points.
You need to modify configure.ac script to recognize ecos system and then
regenerate scripts (autoreconf --install). You should try to use --host
parameter in configure.

I'm not sure how similar ecos is to Linux or to BSD. Depending on the
answer, there are 3 possible ways:
a) copy linux-specific code (Port-linux) to Port-ecos and modify it
b) copy bsd-specific code (Port-bsd) to Port-ecos and modify it
c) write Port-ecos code from scratch.

You should check how many errors are there during compilation of the
Linux version or BSD version. You may use --build parameter in configure
to force specific OS. If you don't have any specific preferences, I
would suggest using BSD code as it is simpler and cleaner.

Let's continue this discussion on dibbler-devel. Other folks may be
interested in porting discussion.

Cheers,
Tomek

> On Sat, Oct 15, 2011 at 3:24 PM, Tomasz Mrugalski <thomson at klub.com.pl
> <mailto:thomson at klub.com.pl>> wrote:
> 
>     On 11-10-14 18:53, Leon Huang wrote:
>     > Hi Thomson,
>     > Thanks a lot for your quick reply. Here is the link about ecos:
>     > http://ecos.sourceware.org/
>     > http://en.wikipedia.org/wiki/ECos
>     >
>     > It's a small embedded OS. I am running it on powerpc ppc405. Its a
>     small
>     > network but need to provide dhcpv6 functionality.
>     >
>     > Ecos is not linux, BSD based. Looks like i need to do the proting and
>     > compile dibbler. I will study the dev guide first and let you know.
>     Ok, in that case you may reuse code in Port-bsd. Ecos' uname -s returns
>     something different than "FreeBSD", you will need to modify
>     configure.ac <http://configure.ac/>. Look for "Detect OS" around
>     line 190 and tune that code.
> 
>     Compilation should more or less look like:
>     autoreconf --install
>     ./configure (add ecos-specific parameters here, if needed)
>     make
> 
>     Good luck,
>     Thomson
> 
>     >
>     > Thanks a lot for your help!
>     > Leon
>     >
>     >
>     >
>     >
>     >
>     >
>     > On Fri, Oct 14, 2011 at 12:14 AM, Tomasz Mrugalski
>     <thomson at klub.com.pl <mailto:thomson at klub.com.pl>
>     > <mailto:thomson at klub.com.pl <mailto:thomson at klub.com.pl>>> wrote:
>     >
>     >     On 14.10.2011 02:42, Leon Huang wrote:
>     >     > Hi Thomson,
>     >     >
>     >     > I would like to port the DHCPv6 to ecos. Please give me some
>     guidance.
>     >     Great!
>     >     Get the latest sources from GIT. That is pretty common sense,
>     but people
>     >     occasionally send me patches for ancient versions.
>     >
>     >     I know nothing about ecos. Can you provide some more details?
>     It is
>     >     something from ARM family? What operating system does it run?
>     Depending
>     >     on if it is Linux, BSD-like or something completely different,
>     you have
>     >     several choices. You can adapt Linux port, adapt BSD port or
>     create your
>     >     own port.
>     >
>     >     Most of the code is written in C++. If ecos provides
>     reasonable C++
>     >     compiler, you will be good. There is about 20 low-level
>     methods that
>     >     needs to be ported. The most important ones are documented in
>     >     Developer's Guide. You can generate your own copy by doing:
>     >     cd doc; make devel
>     >
>     >     There's also on-line copy here: http://klub.com.pl/dhcpv6/doxygen/
>     >
>     >     See Section 3.
>     >
>     >     Examples for Linux implementations are in Port-linux/. Note that I
>     >     reused code from iproute2 package, so it is not a clean cut
>     and there
>     >     are some left-overs that are not really needed. Port-BSD is much
>     >     cleaner. It is functional on Mac OS and FreeBSD. Other BSDs
>     were not
>     >     tried yet.
>     >
>     >     Does ecos have problems with memory alignment? I was recently
>     contacted
>     >     by an engineer, who is working on running dibbler on ARM
>     processors from
>     >     CPU_ARCH_ARMv6 (i.e. arm926ejs) family. He provide a patch
>     that fixed
>     >     mis-aligned memory reads and writes. This code is not merged
>     yet, but
>     >     I'm working on it.
>     >
>     >     Dibbler moved recently to autotools. There is configure script
>     that
>     >     should detect what is and what is not available on ecos platform.
>     >
>     >     If you are building not on ecos, but doing cross-compilation,
>     you may
>     >     take a look at tips Peter Pisar sent when he was
>     cross-compiling for
>     >     mipsel. See section 2.14 in developer's guide.
>     >
>     >     Hope that helps. If not, please let me know. You may also want
>     to sign
>     >     up and post to dibbler-devel. That list is a VERY LOW traffic
>     list (the
>     >     last post was in 2008), but there is over 30 people subscribed
>     there. If
>     >     you have some problems that I can't solve (I know nothing
>     about ecos),
>     >     you may want to ask there.
>     >
>     >     Good luck with the port,
>     >     Thomson
>     >
>     >     p.s.
>     >     What the heck is ecos? Can you tell me more about it? A link to
>     >     architecture description would be great.
>     >
>     >
> 
> 



More information about the Dibbler-devel mailing list