Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.ruby > #6447
| From | Steve Gooberman-Hill <stevegoobermanhill@gmail.com> |
|---|---|
| Newsgroups | comp.lang.ruby |
| Subject | ARM Port - Ruby1.8.7 on Techbase NPE Industrial Computer (GSM / GPRS / EDGE Modem) |
| Date | 2012-02-06 02:20 -0800 |
| Organization | http://groups.google.com |
| Message-ID | <5178771.72.1328523657375.JavaMail.geo-discussion-forums@yqds15> (permalink) |
Hi,
I'd just like to let folks know that I have a successful port of ruby1.8.7p357 onto the Techbase NPE series.
The Techbase modem is a nice little device (and no, I don't work for them!). It has variants either without or with various flavours of cellular coms), and also has an RS485 (Modbus) port as well as Ether which makes it suitable for industrial monitoring.
Unfortunately, ruby 1.9 won't run properly on this device - threading is broken as the current ulibc installed on the NPE series is quite old, and a bit broken, so we are stuck with ruby1.8 at the moment. Techbase claim there is no demand for embedded ruby (maybe they are right!), so they are unlikely to update their toolchain. However if there is demand, they will update the toolchain.
Anyway, for those who are interested, here is how the port was done - it isn't too painful, but ruby1.8 does not run quickly on this device!
if you want to discuss - please use my work email address steve at ucratos dot com.
kind regards
steve
Cross compile instructions for the Techbase NPE range
=====================================================
Steve Gooberman-Hill
Feb 2012
1. download ruby (1.8.7-p357 ) from ruby-lang.org, and unpack
gunzip ruby-1.8.7-p357.tar.gz
tar -xvf ruby-1.8.7-p357.tar
2. Obtain the NPE toolchain and unpack. Note - this really need to be in a /home/user directory, so creating a "user" user is probably the easiest way to do this.
3. At the moment I have an npe user which uses the /home/user directory, so I login as npe
4. There is an error in the configure file when cross-compiling. comment out or remove lines 9040-9078, as setpgrp is not needed for a cross compile
5. Now configure and build
npe@steve-laptop:/home/user/ruby-1.8.7-p357$ ./configure --build=i686-linux --host=arm-linux CC=/home/user/ARMLinux/buildroot/build_arm/staging_dir/bin/arm-linux-cc --prefix /mnt/nand-user/ruby1.8.7
6. The generated makefile doesn't work as stock. Assuming you have an existing ruby 1.8 installation with binary ruby1.8 (I haven't tried using ruby1.9 existing installation but may work):
a. replace the MINIRUBY definition with
MINIRUBY = ruby1.8 -I/home/user/ruby-1.8.7-p357 -I /home/user/ruby-1.8.7-p357/lib -rfake $(MINIRUBYOPT)
b. Socket support: IPV6 enable/disable at the configure line appears broken, so edit ext/socket/extconfig.rb, comment out lines 52 and 53 so they read
# $defs << "-DENABLE_IPV6" << "-DINET6"
# ipv6 = true
7. now you should be able to make ruby and install
npe@steve-laptop:/home/user/ruby-1.8.7-p357$ make; make install
8. Finally, copy /mnt/nand-user/ruby1.8.7 onto the NPE device, into mnt/nan-user/ruby1.8.7. Then use symbolic links to make it available (I simply ln -s / mnt/nand-user/ruby1.8.7 /usr/local
Back to comp.lang.ruby | Previous | Next | Find similar
ARM Port - Ruby1.8.7 on Techbase NPE Industrial Computer (GSM / GPRS / EDGE Modem) Steve Gooberman-Hill <stevegoobermanhill@gmail.com> - 2012-02-06 02:20 -0800
csiph-web