[announce] Erlang ported to linksys nslu2

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Brian Zhou-2
Hi all,

I'm pleased to announce that the latest erlang R10B-5 has been ported to run
on linksys nslu2, complete with SAE and openssl support, but with HiPE
disabled.

For those unfamiliar with this device, see the following links:
http://www.linksys.com/products/product.asp?grid=35&scid=43&prid=640
http://www.nslu2-linux.org
http://www.nslu2-linux.org/wiki/Info/CPUOverview

It's basically a tiny XSCALE based network appliance (266MHz CPU, 32M RAM)
that allows you attach USB devices, with very low power consumption and
completely silent.

I'd think it's a perfect little node for Erlang. The packaging erlang.mk and
associated patches are checked in

http://cvs.sourceforge.net/viewcvs.py/nslu/unslung/

and binary ipkg will be available as soon as it's built on the official
build machine.

The next step is try to get it cross build as the complete native
compilation took about 10 hours.

Does anyone know what it takes to port HiPE to ARM? And how much performance
gain can one expect?

Cheers,

-Brian Zhou


Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Mikael Pettersson
Brian Zhou writes:
 > The next step is try to get it cross build as the complete native
 > compilation took about 10 hours.

Erlang/OTP isn't set up for cross-compilation.
You may be in for a world of pain...

 > Does anyone know what it takes to port HiPE to ARM?

Easy, provide us with the HW :-) Seriously, any 32-bit CPU
sensible enough to be able to run Linux and the gcc toolchain,
and which is already running Erlang's BEAM interpreter, should
be "supportable". I haven't studied the ARM ISA so I can't
comment on whether generating native code would be easy or hard.

 > And how much performance
 > gain can one expect?

That depends on many factors, but as a rough cut, say a factor
of 2-4 for computational code. For I/O or BIF-bound server style
applications, native code won't bring much benefit.

/Mikael


Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Matthias Lang-2
Mikael Pettersson writes:

 > Brian Zhou writes:
 >  > The next step is try to get it cross build as the complete native
 >  > compilation took about 10 hours.

 > Erlang/OTP isn't set up for cross-compilation.
 > You may be in for a world of pain...

As someone who _does_ cross-compile Erlang (on an x86 host running
linux, for an embedded PPC target also running linux), using a fairly
ugly bag of tricks, I tend to agree with Mikael---if you can native
compile it, be happy and stop there.

Matt


Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Matthias Lang-2
Nigel Head writes:

 > Any chance (whenever you have some spare time :->) of posting some
 > pointers as to how you do this ??

>From the FAQ:

  | 8.8. Can Erlang be cross compiled?
  |
  | Not out of the box. While the VxWorks version of Erlang is cross
  | compiled, the build system for this is a one-off. The whole build
  | system wasn't written with cross compilation in mind. There have been
  | murmurs from volunteers to fix this, but no result (yet).
  |
  | Patrik Nyblom posted a step-by-step VxWorks cross-compiling guide to
  | the mailing list.
  |
  | There's a step-by-step example of what was needed to cross-compile
  | Erlang R7B for Linux on a PPC860 based embedded system.

The links in the text are

  http://www.erlang.org/faq/t1.html   (the FAQ itself)
  http://www.erlang.org/ml-archive/erlang-questions/200003/msg00013.html
  http://www.corelatus.com/~matthias/erlang_on_860.html

The example is for R7B. With a few modifications, the same tricks
work for R9C. I haven't gotten to R10 yet.

Matthias


Reply | Threaded
Open this post in threaded view
|

答复: [announce] Erlang ported to linksys nslu2

techie
Sure, almost the same trick works for the R10B.

Best Regards
Chuang

-----????-----
???: owner-erlang-questions
[mailto:owner-erlang-questions] ?? Matthias Lang
????: 2005?5?18? 14:02
???: Nigel Head
??: Erlang Questions
??: Re: [announce] Erlang ported to linksys nslu2

Nigel Head writes:

 > Any chance (whenever you have some spare time :->) of posting some
 > pointers as to how you do this ??

>From the FAQ:

  | 8.8. Can Erlang be cross compiled?
  |
  | Not out of the box. While the VxWorks version of Erlang is cross
  | compiled, the build system for this is a one-off. The whole build
  | system wasn't written with cross compilation in mind. There have been
  | murmurs from volunteers to fix this, but no result (yet).
  |
  | Patrik Nyblom posted a step-by-step VxWorks cross-compiling guide to
  | the mailing list.
  |
  | There's a step-by-step example of what was needed to cross-compile
  | Erlang R7B for Linux on a PPC860 based embedded system.

The links in the text are

  http://www.erlang.org/faq/t1.html   (the FAQ itself)
  http://www.erlang.org/ml-archive/erlang-questions/200003/msg00013.html
  http://www.corelatus.com/~matthias/erlang_on_860.html

The example is for R7B. With a few modifications, the same tricks
work for R9C. I haven't gotten to R10 yet.

Matthias



Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Brian Zhou-2
In reply to this post by Brian Zhou-2
The erlang_R10B5-2_armeb.ipk package is now available in official
unslung-native feed.

    ipkg install unslung-feed
    ipkg update
    ipkg install erlang

To see what other packages are available on this $80 device, see

    http://ipkg.nslu2-linux.org/ipkg/Packages

Cheers,

-Brian Zhou


Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Luke Gorrie-3
In reply to this post by Brian Zhou-2
"Brian Zhou" <b88zhou> writes:

> Hi all,
>
> I'm pleased to announce that the latest erlang R10B-5 has been ported
> to run on linksys nslu2, complete with SAE and openssl support, but
> with HiPE disabled.

Holy crap, a silent 150gram linux box for 795 kronor!

We bought a few of these today. I installed Openslug on mine, added
a memory stick, and installed a bunch of binaries from this ipkg dir:

  http://ipkg.nslu2-linux.org/feeds/openslug/oe

but there was no Erlang and not enough for a working gcc (no
binutils). Any tips? Should I go for Unslung instead?

Thanks for the great pointer!

-Luke




Reply | Threaded
Open this post in threaded view
|

[announce] Erlang ported to linksys nslu2

Brian Zhou-2
http://ipkg.nslu2-linux.org/feeds/unslung/native/erlang_R10B5-3_armeb.ipk

I ported and did some basic test of the package in unslung firmware. You can
try it on openembedded firmware and report back to both groups whether it
works or not. I just got my second slug and plan to install OE on it.

I'm working on making the package cross built, although not ready for
general testing yet, but it basically works. It's not as difficult as I
thought. I'll share the general step when I'm ready.

Cheers,

-Brian

----- Original Message -----
From: "Luke Gorrie" <luke>
To: <erlang-questions>
Sent: 2005 Jun 02 1:12 PM
Subject: Re: [announce] Erlang ported to linksys nslu2


> Holy crap, a silent 150gram linux box for 795 kronor!
>
> We bought a few of these today. I installed Openslug on mine, added
> a memory stick, and installed a bunch of binaries from this ipkg dir:
>
>   http://ipkg.nslu2-linux.org/feeds/openslug/oe
>
> but there was no Erlang and not enough for a working gcc (no
> binutils). Any tips? Should I go for Unslung instead?
>
> Thanks for the great pointer!
>
> -Luke
>
>
>