Ruby on the Sharp Zaurus PDA

Hi,

The Sharp Zaurus is a really cool StrongArm powered PDA that comes
with Embedix Linux. I picked one up from Amazon earlier this week and
am very impressed with it thus far.

Searching back through ruby-talk, I found a couple of postings asking
whether the Zaurus could be made to run Ruby. That shouldn’t be too
hard, I thought to myself.

Well, it’s Friday, it’s a warm lazy day here in California, and I had
an hour to kill before going home from work to the fiancée for pizza,
so I thought I’d have a stab at it.

Here are the results:

~# uname -a
Linux zaurus 2.4.6-rmk1-np2-embedix #1 Tue Jul 30 08:38:25 PDT 2002
armv4l unknown
~# ruby --version
ruby 1.6.7 (2002-03-19) [arm-linux]
~# ruby -e ‘(1…10).each {|i| puts i}’
1
2
3
4
5
6
7
8
9
10
~# ruby -rnet/http -e ‘h=Net::HTTP::new(“www.ruby-lang.org”); r,d=h.get("/en/index.html"); print d’ | head

Ruby Home Page

Hey, hey, it seems to work!

Now I can carry not only Linux, but also Ruby around in my pocket and
try out those brainwave code snippets wherever I happen to be.

I still need to make a few tweaks here and there and then get irb
running, but after I’ve done that, I’ll put up the tar file for anyone
who’s interested in using this.

Ian

···


Ian Macdonald | Bus error – driver executed.
ian@caliban.org |
>
>
>

Well, it’s Friday, it’s a warm lazy day here in California, and I had
an hour to kill before going home from work to the fiancée for pizza,
so I thought I’d have a stab at it.

Argh ! There’s currently a contest organized by Sharp. The goal is to
deveop Zaurus
apps. I registered to port ruby…

Oh well.
Here is a script to build the CVS version for the Zaurus. You will need
to have
the cross compiler installed and a x86 version of ruby to run it.

http://equinoxe.dnsalias.org/PERSO/zruby.rb

and here is the tgz binary I managed to build :

http://equinoxe.dnsalias.org/PERSO/zruby.tgz

···


Vincent.

Hi,

I talked to matz about this a few weeks ago and he invited me to ruby-
core to delve into it since he has no experience with porting stuff.
I was thinking of starting a similar project, but I have to finish some
stuff on the zaurus that is related to mysql (I’m learning QT programming
at the same time, so the task is quite slow). I have a packaged mysql
running on my zaurus, a 5500 model with a 128MB CF card an a 64MB SD card.

I’ll help you out in case you need it, since we have similar goals on
having ruby run on the zaurus (Alhtough my other goal was to really learn
Ruby anywhere, and anytime I want to. I actually had the Ruby books on
html on a CF card!) Python and Perl already works so why not Ruby? :slight_smile:

Finally, if the port does work fine, we’ll probably have to package it so
others can try it out. A sourceforge project seems to be in order when
things go rolling.

Jerome G.

···

-----Original Message-----
From: Ian Macdonald ian@caliban.org
To: ruby-talk@ruby-lang.org (ruby-talk ML)
Date: Sat, 3 Aug 2002 11:48:33 +0900
Subject: Ruby on the Sharp Zaurus PDA

Hi,

The Sharp Zaurus is a really cool StrongArm powered PDA that comes
with Embedix Linux. I picked one up from Amazon earlier this week and
am very impressed with it thus far.

Searching back through ruby-talk, I found a couple of postings asking
whether the Zaurus could be made to run Ruby. That shouldn’t be too
hard, I thought to myself.

Well, it’s Friday, it’s a warm lazy day here in California, and I had
an hour to kill before going home from work to the fiancée for pizza,
so I thought I’d have a stab at it.

Here are the results:

~# uname -a
Linux zaurus 2.4.6-rmk1-np2-embedix #1 Tue Jul 30 08:38:25 PDT 2002
armv4l unknown
~# ruby --version
ruby 1.6.7 (2002-03-19) [arm-linux]
~# ruby -e ‘(1…10).each {|i| puts i}’
1
2
3
4
5
6
7
8
9
10
~# ruby -rnet/http -e ‘h=Net::HTTP::new(“www.ruby-lang.org”);
r,d=h.get(“/en/index.html”); print d’ | head

Ruby Home Page

Hey, hey, it seems to work!

Now I can carry not only Linux, but also Ruby around in my pocket and
try out those brainwave code snippets wherever I happen to be.

I still need to make a few tweaks here and there and then get irb
running, but after I’ve done that, I’ll put up the tar file for anyone
who’s interested in using this.

Ian

Ian Macdonald | Bus error – driver executed.
ian@caliban.org |
>
>
>

Very cool!

That’s a lot more organised than the version I’ve put together, which
is basically just culled from the Debian ARM packages with the
extraneous stuff like documentation stripped out.

I’ll copy a version compiled with your script over to the Zaurus
tomorrow.

Ian

···

On Sat 03 Aug 2002 at 19:17:27 +0900, Vincent Fiack wrote:

Oh well.
Here is a script to build the CVS version for the Zaurus. You will need
to have
the cross compiler installed and a x86 version of ruby to run it.

http://equinoxe.dnsalias.org/PERSO/zruby.rb


Ian Macdonald | It destroys one’s nerves to be amiable
ian@caliban.org | every day to the same human being. –
> Benjamin Disraeli
>
>

I talked to matz about this a few weeks ago and he invited me to ruby-
core to delve into it since he has no experience with porting stuff.

Well, no porting is really necessary to get the basic package
running. It’s just another ARM based device, so you just need to use a
cross-compiler and point it at the right libraries, etc.

The Tk stuff won’t work, of course, because the necessary libraries
are missing from the Zaurus’ stripped down environment. Besides, the
Zaurus doesn’t have X.

I was thinking of starting a similar project, but I have to finish some
stuff on the zaurus that is related to mysql (I’m learning QT programming
at the same time, so the task is quite slow). I have a packaged mysql
running on my zaurus, a 5500 model with a 128MB CF card an a 64MB SD
card.

It’s amazing what you can do with the Zaurus. In addition to Ruby,
I’ve put Perl on there. Testing out snippets of code has never been
easier. With a WiFi card, a sniffer like Kismet and essential network
tools like nmap and netcat, it’s a powerful arsenal of tools in your
pocket; a veritable sysadmin’s dream.

But I digress; Ruby is the point of this thread.

Finally, if the port does work fine, we’ll probably have to package it so
others can try it out. A sourceforge project seems to be in order when
things go rolling.

I’ve put up a page at Ruby/Password,
but this only contains a link to the binary distribution (in .tar.gz
format) that I put together to install directly onto my SD card. It’s
less suitable for anyone wanting to run from a CF card or – perish
the thought – the RAM drive.

A next step would be to add a true Zaurus .ipk package, as they
require very little knowledge on the part of the user. On the other
hand, anyone wanting to hack Ruby on a Zaurus is probably not going to
be averse to getting their hands dirty on a tar file.

Ian

···

On Sun 04 Aug 2002 at 06:26:20 +0900, Jerome Gotangco wrote:

Ian Macdonald | Alexander Graham Bell is alive and well in
ian@caliban.org | New York, and still waiting for a dial
> tone.
>
>

Just FYI,

Some time ago this mailing list provided the following link to a Ruby
ipk for the Zaurus:

http://familiar.handhelds.org/feeds/unstable/ruby_1.6.5-1_arm.ipk.
There are other Ruby packages there as well, including tk.

I followed the above link and installed Ruby (only) on my Zaurus with
no problems (and also no testing, so take that with a grain of salt :slight_smile:
).

Maybe you can sync up with the maintainer of this ipk, if you can
figure out who it is.

later…

···

— Ian Macdonald ian@caliban.org wrote:

On Sun 04 Aug 2002 at 06:26:20 +0900, Jerome Gotangco wrote:

I talked to matz about this a few weeks ago and he invited me to
ruby-
core to delve into it since he has no experience with porting
stuff.

Well, no porting is really necessary to get the basic package
running. It’s just another ARM based device, so you just need to use
a
cross-compiler and point it at the right libraries, etc.
[…snip…]

A next step would be to add a true Zaurus .ipk package, as they
require very little knowledge on the part of the user. On the other
hand, anyone wanting to hack Ruby on a Zaurus is probably not going
to
be averse to getting their hands dirty on a tar file.

Ian

Ian Macdonald | Alexander Graham Bell is alive and well
in
ian@caliban.org | New York, and still waiting for a dial
> tone.
>
>
=====


Mike Thomas
http://www.samoht.com
It’s better backwards


Do You Yahoo!?
Yahoo! Health - Feel better, live better

A next step would be to add a true Zaurus .ipk package, as they
require very little knowledge on the part of the user. On the other
hand, anyone wanting to hack Ruby on a Zaurus is probably not going
to
be averse to getting their hands dirty on a tar file.

Some time ago this mailing list provided the following link to a Ruby
ipk for the Zaurus:

http://familiar.handhelds.org/feeds/unstable/ruby_1.6.5-1_arm.ipk.
There are other Ruby packages there as well, including tk.

I followed the above link and installed Ruby (only) on my Zaurus with
no problems (and also no testing, so take that with a grain of salt :slight_smile:
).

I maintain the ipkg for ruby for iPAQ, good to hear it works on Zaurus as
well; it is at version 1.6.7 now.

http://familiar.handhelds.org/feeds/ruby/

irb works, but libreadline doesn’t. The extension gets compiled, but
it does not use the shared library at runtime…

Otherwise, it is not tuned for a PDA (amounts of cached stuff, other
dimensions that influence memory usage). The suggestion for a special
page (sourcefoge iirc) seems a bit over the top. ./configure --pda
feels better to me (or maybe plain ./configure --ram=32MB ?)

Do you compile this directly on ARM-based hardware or do you
cross-compile? If you cross-compile, how do you get everything to
compile properly when the ‘miniruby’ executable built by the process
will not run on the host hardware?

Regards,
Henry.

···

On Thu, Aug 08, 2002 at 03:44:39AM +0900, Kero van Gelder wrote:

I maintain the ipkg for ruby for iPAQ, good to hear it works on Zaurus as
well; it is at version 1.6.7 now.


Henry T. So, Jr.