Ruby on Amazon Kindle

Porting Ruby on Amazon Kindle was not too hard. I’ve just reused my cross compiling environment for Nmap. There were few changes required in the source (ext/socket/extconf.rb) due to IPv6 structures used even if you disabled IPv6. The rest was straightforward.

Download

http://ftp.linux.hr/kindle/ruby-1.9.3-p0-kindle-bin.tar.bz2

Install

  • Create opt directory and extract files there
    mkdir /mnt/us/opt && cd /mnt/us/opt
    tar xvjf ruby-1.9.3-p0-kindle.tar.bz2
  • Run

  • Just call the ruby binary
    /mnt/us/opt/ruby-1.9.3-p0/bin/ruby
  • …or invoke interactive Ruby shell:
    /mnt/us/opt/ruby-1.9.3-p0/bin/irb
  • Compile

    For building statically linked Ruby, I have used appropriate scratchbox for kindle and following command line:

    ac_cv_linux_vers=2 ./configure --prefix=/mnt/us/opt/ruby-1.9.3-p0 --host=arm-none-linux --with-baseruby=/opt/ruby-1.9.3-p0/bin/ruby --with-static-linked-ext --disable-shared

    Note that –disable-ipv6 and –without-ipv6 does not work any more.
    I have made following changes in order to compile the source:
    http://ftp.linux.hr/kindle/ruby-1.9.3-kindle.diff

    Advertisements

    Leave a Reply

    Fill in your details below or click an icon to log in:

    WordPress.com Logo

    You are commenting using your WordPress.com account. Log Out / Change )

    Twitter picture

    You are commenting using your Twitter account. Log Out / Change )

    Facebook photo

    You are commenting using your Facebook account. Log Out / Change )

    Google+ photo

    You are commenting using your Google+ account. Log Out / Change )

    Connecting to %s

    %d bloggers like this: