ARM series Lua implementation?

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

ARM series Lua implementation?

Meer, H. van der
Now that I have NAS built around a Marvell 6281 (ARM x19 series)  
running a Linux system, I wonder if there is a Lua implementation  
running on this combination. For those who are acquainted with this  
system: it is a QNAP TS-419P.

Hans van der Meer




Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

David Given
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans van der Meer wrote:
> Now that I have NAS built around a Marvell 6281 (ARM x19 series) running
> a Linux system, I wonder if there is a Lua implementation running on
> this combination. For those who are acquainted with this system: it is a
> QNAP TS-419P.

Yes, stock Lua Just Works on it. (I have a SheevaPlug, which has a
Marvell 88FR131 'Feroceon' in it.)

In general, Lua is completely platform-independent and and needs no
modification to Just Work on any 32-bit CPU with enough RAM.

There isn't a LuaJIT for ARM yet, though.

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There is nothing in the world so dangerous --- and I mean *nothing*
│ --- as a children's story that happens to be true." --- Master Li Kao,
│ _The Bridge of Birds_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK52xnf9E0noFvlzgRAj+wAJ9bHjAKvIFFGOnct8CoINumQuZ8fwCgr02G
x111nSUu/T6IqJcnfttikqU=
=UgEY
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Mikhail Gusarov
In reply to this post by Meer, H. van der

Twas brillig at 22:50:44 27.10.2009 UTC+01 when [hidden email] did gyre and gimble:

 HvdM> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
 HvdM> running a Linux system, I wonder if there is a Lua implementation
 HvdM> running on this combination.

Stock Lua will work on it, as David already pointed out. You'd probably
like to see LNUM patch, which makes Lua use integers for sufficiently
small numbers instead of floating point numbers.

--
  http://fossarchy.blogspot.com/

attachment0 (851 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Meer, H. van der
In reply to this post by David Given
On 27 okt 2009, at 22:55, David Given wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hans van der Meer wrote:
>> Now that I have NAS built around a Marvell 6281 (ARM x19 series)  
>> running
>> a Linux system, I wonder if there is a Lua implementation running on
>> this combination. For those who are acquainted with this system: it  
>> is a
>> QNAP TS-419P.
>
> Yes, stock Lua Just Works on it. (I have a SheevaPlug, which has a
> Marvell 88FR131 'Feroceon' in it.)
>

Great and glad to hear. Where can I download a suitable executable?
As far as I know my MacOSX XCode has no backend for this processor.  
That makes crosscompiling I bit difficult.

> In general, Lua is completely platform-independent and and needs no
> modification to Just Work on any 32-bit CPU with enough RAM.
>
> There isn't a LuaJIT for ARM yet, though.
>

Hans van der Meer

Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

David Given
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hans van der Meer wrote:
[...]
> Great and glad to hear. Where can I download a suitable executable?
> As far as I know my MacOSX XCode has no backend for this processor. That
> makes crosscompiling I bit difficult.

Debian's got one, but getting the binary *out* of Debian may be tricky.

You say it runs Linux. Do you know what variety? If it's an open source
version (Debian, SlugOS, etc), you're very likely to have a package
manager already on it and a binary package for Lua available.

If not, your best bet could well be to try and get ipkg up and running
on it.

(Linux' cross compilation support is usually pretty poor, and most
people just install gcc on the device and build stuff natively. Not easy
unless you have a gcc for it, though.)

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There is nothing in the world so dangerous --- and I mean *nothing*
│ --- as a children's story that happens to be true." --- Master Li Kao,
│ _The Bridge of Birds_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK53pmf9E0noFvlzgRAsPZAJwLC4Tv/uLgHsWGY6Wdaw27SpLxAwCgqtvx
PXDKgRJjiThb+E0JkjwVzEA=
=Mu9c
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Rob Kendrick
In reply to this post by Meer, H. van der
On Tue, 27 Oct 2009 22:50:44 +0100
Hans van der Meer <[hidden email]> wrote:

> Now that I have NAS built around a Marvell 6281 (ARM x19 series)

I work with ARM daily, and "ARM x19 series" means nothing to me.  Can
you expand?

> running a Linux system, I wonder if there is a Lua implementation  
> running on this combination. For those who are acquainted with this  
> system: it is a QNAP TS-419P.

For all the systems I work with, either apt-get install lua5.1, or just
build Lua from source with a cross compiler.

B.
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

KHMan
Rob Kendrick wrote:
> On Tue, 27 Oct 2009 22:50:44 +0100
> Hans van der Meer <[hidden email]> wrote:
>
>> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
>
> I work with ARM daily, and "ARM x19 series" means nothing to me.  Can
> you expand?

Apparently a Marvell Sheeva,

http://www.marvell.com/products/embedded_processors/kirkwood/index.jsp

Funny thing is, Marvell does not seem to be on the same page with
ARM on this, they are careful to claim only ARM compatibility. One
of these days, it will end in tears, or rather, a lawsuit...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

dcharno
In reply to this post by David Given
David Given wrote:
> Yes, stock Lua Just Works on it. (I have a SheevaPlug, which has a
> Marvell 88FR131 'Feroceon' in it.)

Off topic, but what do you think about the SheevaPlug.  It looks
interesting.
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Pan, Shi Zhu
In reply to this post by David Given
On Wed, Oct 28, 2009 at 5:55 AM, David Given <[hidden email]> wrote:
>
> In general, Lua is completely platform-independent and and needs no
> modification to Just Work on any 32-bit CPU with enough RAM.
>

That's not always the truth, Lua make extensive use of floating point,
so it is advisable to use integer as numbers for those CPU who do not
have hardware floating-point support.

Also, some CPUs do not support floating point at all and cannot
compile lua without any modification.

Generally, I compile lua with floating point only for x86 cpus which
have SSE support. for ARM and MIPS cpus it is better to use integer as
numbers.
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Asko Kauppi
In reply to this post by Meer, H. van der
You won't normally be getting anything binary on these devices (embedded NAS
etc.)

One either needs to compile "native" on the device itself, or cross-compile
using Linux host. OS X host can in theory be used, but one must recompile gcc
for this from scratch, which is rather time taking and complex. I've tried.

My NAS is a NSLU2 ("Slug"), and I've done compilations native on it.

http://www.nslu2-linux.org/wiki/SlugOS/HomePage

SlugOS started on the NSLU2 device, but is nowadays covering quite a number of
other NASes as well.

> Marvell 1.2GHz CPU and 512MB DDRII memory

Now that is one high performance ARM system. Forget the above; these systems should better be served by something like full-blown Debian installation.

Also forget about the LNUM patch; I'm rather sure the CPU has floating point support included?

Check here:
http://qnap.nas-central.org/wiki/Main_Page

- Asko



28.10.09 00:43, Hans van der Meer <[hidden email]> kirjoitti:

> On 27 okt 2009, at 22:55, David Given wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> > Hans van der Meer wrote:
> >> Now that I have NAS built around a Marvell 6281 (ARM x19 series)  
> >> running
> >> a Linux system, I wonder if there is a Lua implementation running on
> >> this combination. For those who are acquainted with this system: it  
> >> is a
> >> QNAP TS-419P.
> >
> > Yes, stock Lua Just Works on it. (I have a SheevaPlug, which has a
> > Marvell 88FR131 'Feroceon' in it.)
> >
>
> Great and glad to hear. Where can I download a suitable executable?
> As far as I know my MacOSX XCode has no backend for this processor.  
> That makes crosscompiling I bit difficult.
>
> > In general, Lua is completely platform-independent and and needs no
> > modification to Just Work on any 32-bit CPU with enough RAM.
> >
> > There isn't a LuaJIT for ARM yet, though.
> >
>
> Hans van der Meer
>
>



       



       
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Long Cheng
In reply to this post by Meer, H. van der
There is already lua packages in ipkg. Here is the output on my TS-209:
[~] # ipkg list | grep lua
lua - 5.1.4-2 - Lua is a powerful light-weight programming language
designed for extending applications.
luarocks - 1.0.1-1 - LuaRocks is a deployment and management system for
Lua modules.
perlconsole - 0.4-2 - Perl Console is a small program that implements a
Read-eval-print loop: it lets you evaluate Perl code interactively.
[~] #

The ipkg repository I'm currently using is:
src/gz cs05q1armel
http://ipkg.nslu2-linux.org/feeds/optware/cs05q1armel/cross/unstable

Regards
Long

Hans van der Meer 写道:

> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
> running a Linux system, I wonder if there is a Lua implementation
> running on this combination. For those who are acquainted with this
> system: it is a QNAP TS-419P.
>
> Hans van der Meer
>
>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

David Given
In reply to this post by Rob Kendrick
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Rob Kendrick wrote:
[...]
>> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
>
> I work with ARM daily, and "ARM x19 series" means nothing to me.  Can
> you expand?

It's an Kirkwood 88F6281 --- which actually turns out to be the same
processor, AFAICT, as in my SheevaPlug. In practical terms an ARMv5TE.

(Annoyingly, Marvell don't appear to document what kind of ARM core
their devices have. *Plus* some marketing drone at HR managed to
misquote the CPU model, which is where the '6281' came from. *Plus*
Linux' /proc/cpuinfo is reporting a different version number to
Marvell's documentation, which is where the '88FR131' I quoted came
from. Heigh ho.)

You *can* get ipkg for this, and can therefore install any Optware
package; and I know Lua is available. Instructions here:

http://www.turbonas.com/phpBB3/viewtopic.php?f=18&t=385

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "There is nothing in the world so dangerous --- and I mean *nothing*
│ --- as a children's story that happens to be true." --- Master Li Kao,
│ _The Bridge of Birds_
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iD8DBQFK6AVqf9E0noFvlzgRAlcKAJ9K1ibnlFouTfzf8eFoAzf32pvIsACg24No
NpxZ62ZPGmuGJkboRf2M2ss=
=KjVp
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

KHMan
In reply to this post by Rob Kendrick
Rob Kendrick wrote:
> On Tue, 27 Oct 2009 22:50:44 +0100
> Hans van der Meer wrote:
>
>> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
>
> I work with ARM daily, and "ARM x19 series" means nothing to me.  Can
> you expand?

My last post may be exaggerating due to lack of clear information
from Marvell and industry news, so I've checked the docs and news
and this is to clear things up. :-)

Marvel does have an ARM license and all, but it also does its own
cores, so maybe that's why one never sees the usual specific-core
label, like "ARM9" or "ARM7TDMI". So, compared to other ARMs,
these always seem to be conspicuously missing the particular
family designations.

Well, ARM is pretty aggressive these days and I get the feeling
that they desire more control in their war with the 800-pound
gorilla. Good luck to them...

--
Cheers,
Kein-Hong Man (esq.)
Kuala Lumpur, Malaysia

Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Meer, H. van der
In reply to this post by KHMan


On 28 okt 2009, at 01:45, KHMan wrote:

> Rob Kendrick wrote:
>> On Tue, 27 Oct 2009 22:50:44 +0100
>> Hans van der Meer <[hidden email]> wrote:
>>> Now that I have NAS built around a Marvell 6281 (ARM x19 series)
>> I work with ARM daily, and "ARM x19 series" means nothing to me.  Can
>> you expand?
>
> Apparently a Marvell Sheeva,
>
> http://www.marvell.com/products/embedded_processors/kirkwood/index.jsp

 From that data sheet I guess you're right with this processor. Other  
details fit, like the 1.2GHz.

>
> Funny thing is, Marvell does not seem to be on the same page with  
> ARM on this, they are careful to claim only ARM compatibility. One  
> of these days, it will end in tears, or rather, a lawsuit...
>
> --
> Cheers,
> Kein-Hong Man (esq.)
> Kuala Lumpur, Malaysia

Hans van der Meer
Reply | Threaded
Open this post in threaded view
|

[OT] ARMs (was: ARM series Lua implementation?)

David Given
In reply to this post by dcharno
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

dcharno wrote:
[...]
> Off topic, but what do you think about the SheevaPlug.  It looks
> interesting.

Well, I run my entire house system off one. It serves cowlark.com, does
all my incoming and outgoing email, spam filtering, is my main ssh
point-of-contact, manages all my backups, runs the Java backend for the
website comment system etc. The whole stack including SheevaPlug, home
made 64GB SSD, ADSL router, wireless router, UPS, and a bunch of USB
hubs runs at about 30 watts, going up to 40 when it spins up the
external hard drive. It runs Debian.

It's not entirely perfect --- it's got exactly one USB 2.0 port, which
means that my home made RAID array of USB keys is pushing bandwidth
limits almost continuously; there's something slightly dodgy in the
Linux kernel that causes it to kill processes under load; the Marvell
USB chipset is notoriously quirky that causes I/O errors with some
devices. OTOH it is $99, which I can forgive a lot for. Marvell are
producing a different version, the OpenRD, which has got a lot more
ports (including eSATA) and is more suitable for server use, but it's
three times the price.

The Marvell chipset is apparently based on the old StrongARM
architecture that Intel used to have; this could be the reason for their
cool relationship with ARM, as Intel and ARM aren't talking to each
other these days. The StrongARM architecture has a reputation for being
fast but hot. The thing certainly gets warm when in use. At 1.2GHz it's
pretty high-end as ARMs go but I believe the new Cortex line (from ARM)
will beat it.

I have a writeup here with some benchmarks from about a week after I got
it. It's now a bit obsolete and a few things are wrong --- I should post
an update.

http://www.cowlark.com/2009-04-15-sheevaplug/

(Yes, hosted on the SheevaPlug.)

Lua-wise, I have no complaints on it --- although as it has no FPU if I
were doing anything performance-related I'd probably want to build a
copy with LNUM. The entire website is based on a home-made CMS written
in Lua, which compiles the templates into static HTML. On the SheevaPlug
itself, it takes 15-20 seconds to rebuild the site depending whether
email comes in while it's working. That's with Debian's stock Lua. On my
Celeron-D desktop it takes about 3.

The Lua executable is 129kB of code, while on i386 it's 140kB, showing
that ARM is denser than i386. I haven't build a Thumb version (which the
SheevaPlug also supports), but it might be interesting.

This is the kind of device that an integerised ARM LuaJIT would be
really rather good on.

- --
┌─── dg@cowlark.com ───── http://www.cowlark.com ─────
│ "To be is to do" -- Nietzche
│ "To do is to be" -- Sartre
│ "Do be do be do" -- Sinatra
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkroQW8ACgkQf9E0noFvlzgCkwCgjLAPaq9Ab8a0MzpWq2a7L0WA
4DUAn3jDXQg4AYDsj9r7Ko5PvqeuROHV
=z4e2
-----END PGP SIGNATURE-----
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

steve donovan
In reply to this post by Pan, Shi Zhu
On Wed, Oct 28, 2009 at 4:01 AM, pan shizhu <[hidden email]> wrote:
> Generally, I compile lua with floating point only for x86 cpus which
> have SSE support. for ARM and MIPS cpus it is better to use integer as
> numbers.

And with the LNUM patch you can have both ...
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Rob Kendrick
In reply to this post by KHMan
On Wed, 28 Oct 2009 08:45:57 +0800
KHMan <[hidden email]> wrote:

> Apparently a Marvell Sheeva,
>
> http://www.marvell.com/products/embedded_processors/kirkwood/index.jsp
>
> Funny thing is, Marvell does not seem to be on the same page with
> ARM on this, they are careful to claim only ARM compatibility. One
> of these days, it will end in tears, or rather, a lawsuit...

At the risk of going even more off-topic, Marvell and Intel both have
licences to the ARM architecture, related patents, and test suites.

Marvell bought some elements of Intel's XScale business (which itself
came from DEC's StrongARM business), along with an Israeli company
called Ferocean, who had developed an ARM clone *without* any licences
from ARM, but that problem went away when Marvell (who did) bought
them.  The Shiva, if memory serves, is what has developed from that
Ferocean purchase.

Incidentally, anybody can build an ARM clone with no licences from
ARM.  The entire specification was placed into the public domain by
Acorn long before ARM Ltd. even existed.  However, using the ARM
trademark and some of the newer patent-encumbered instructions do
require licences.

Anyway, enough.  Back to Lua :)

B.
Reply | Threaded
Open this post in threaded view
|

Re: ARM series Lua implementation?

Rob Kendrick
In reply to this post by David Given
On Wed, 28 Oct 2009 08:48:45 +0000
David Given <[hidden email]> wrote:

> > I work with ARM daily, and "ARM x19 series" means nothing to me.
> > Can you expand?
>
> It's an Kirkwood 88F6281 --- which actually turns out to be the same
> processor, AFAICT, as in my SheevaPlug. In practical terms an ARMv5TE.

Right, so not an ARM series thing.  A Marvell series thing :)

> (Annoyingly, Marvell don't appear to document what kind of ARM core
> their devices have.

That's because they do not include an ARM core.  It's a core of their
own design (like StrongARM, XScale and Ferocean) that happens to
execute ARM code.

> You *can* get ipkg for this, and can therefore install any Optware
> package; and I know Lua is available. Instructions here:

I have a modern and up to date Ubuntu running on our Sheevaplugs quite
successfully, along with the stock Lua from their repositories.

B.