OpenWrt Forum Archive

Topic: New package ruby-1.8.4 available for integration in OpenWrt trunk

The content of this topic has been archived on 19 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello,

a patch to integrate ruby-1.8.4 in OpenWrt SVN trunk can be loaded from this URL:
http://ar7-firmware.berlios.de/openwrt/ruby.patch

For those who do not know Ruby,  here an extract from http://www.ruby-lang.org/en/ :

"Ruby is the interpreted scripting language for quick and easy
object-oriented programming. It has many features to process text files
and to do system management tasks (as in Perl).
It is simple, straight-forward, extensible, and portable."

My patch fixes ruby's cross compilation and an overflow bug in ruby-1.8.4 which
results in a crash after garbage collection.

I am looking forward to your ruby scripts for OpenWrt :-)

Stefan

Wow! Providing patches for the buildroot. That's the way we like it.

For those who want to see a useful example, I started to write a first one:
the script hd.rb dumps a file or the memory of your router. Install it on
your router somewhere in the path, set execute permission and run it.

Examples:

    hd.rb 0x00000000 0x200
        dump the first 0x200 bytes of the memory at 0x00000000 (mips interrupt area, internal RAM)

    hd.rb 0x10000000 0x200
        dump the first 0x200 bytes of the memory at 0x10000000 (AR7 mips flash memory)

    hd.rb 0x14000000 0x200
        dump the first 0x200 bytes of the memory at 0x00000000 (AR7 mips RAM)

    hd.rb hd.rb 0 9999999
        dump file hd.rb starting at offset 0

Note: physical address 0x00000000 corresponds to kernel addresses 0x80000000
and 0xa0000000.

Get the ruby script hd.rb from http://ar7-firmware.berlios.de/ruby/.

The discussion might have continued from here.