User Tools

Site Tools


chumbyimagehowto

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

chumbyimagehowto [2010/06/14 16:07]
gonium
chumbyimagehowto [2012/10/30 10:27] (current)
Line 1: Line 1:
 +=== Download a prepared Image ===
 +
 +You can download the finished images here: [[ChumbyImageDownload]].
 +
 +=== Build an Image on your own ===
 +
 Some daemons need to be compiled on another host machine, since the Chumby is not powerful enough for this task (and has not enough memory). Here are my notes: Some daemons need to be compiled on another host machine, since the Chumby is not powerful enough for this task (and has not enough memory). Here are my notes:
 +====== Install Scratchbox ======
 +[[http://wiki.chumby.com/mediawiki/index.php/Scratchbox|as described here.]] This greatly simplifies cross-compiling things. It also provides you a way to run the compiled ruby interpreter on a bigger host machine using QEMU. This is essential because I rely on rubygems, and the Chumby is too small to execute the gem install commands. Besides, at least for the sqlite3-ruby and mongrel gems, I need to compile native code.
 +
 +The CMake tool does not compile in a Scratchbox environment, see [[http://www.staerk.de/thorsten/Nokia_N810#cmake]]:
 +the error msg is
 +<code>
 +make[2]: *** No rule to make target `Source/CMakeFiles/CMakeLib.dir/link.txt', needed by `Source/libCMakeLib.a'.  Stop.
 +</code>
 +Workaround: I took link.txt from another computer and copied it => cmake is installed on the N810
 +
 +The complete command sequence is:
 +<code>
 +mkdir build
 +cd build
 +../bootstrap --prefix=/mnt/storage/usr && make
 +# make install also fails, so:
 +cp bin/* /mnt/storage/usr/bin
 +</code>
  
-  - Install Scratchbox as described here. This greatly simplifies cross-compiling things. It also provides you a way to run the compiled ruby interpreter on a bigger host machine using QEMU. This is essential because I rely on rubygems, and the Chumby is too small to execute the gem install commands. Besides, at least for the sqlite3-ruby and mongrel gems, I need to compile native code. +====== Install dependencies ====== 
-  - Install dependencies. I found the following libraries necessary:+I found the following libraries necessary:
     - OpenSSL 0.9.8n – avoid the 1.0.0 version, it causes problems with the Ruby interpreter.     - OpenSSL 0.9.8n – avoid the 1.0.0 version, it causes problems with the Ruby interpreter.
     - Zlib 1.5.3 – same as installed on the Chumby.     - Zlib 1.5.3 – same as installed on the Chumby.
     - Readline 6.1     - Readline 6.1
     - A recent version of sqlite, since I need it for my gems later on.     - A recent version of sqlite, since I need it for my gems later on.
-    Compile the libraries and install them into /mnt/storage (use –-prefix where necessary). +    Compile the libraries and install them into /mnt/storage (use –-prefix where necessary).  
-  - Adjust the environment to use the new libraries: +====== Adjust the environment ====== 
-    <code> +to use the new libraries: 
-    BASEDIR=/mnt/storage/usr +<code> 
-    export PATH=$PATH:$BASEDIR/bin +BASEDIR=/mnt/storage/usr 
-    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib +export PATH=$PATH:$BASEDIR/bin 
-    </code> +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$BASEDIR/lib 
-  - Install Ruby and rubygemsI was not able to compile Ruby 1.8.7, but Ruby 1.8.6-p399 works nice. To configure everything, I use the following commands:+</code> 
 +====== Install Ruby and rubygems ====== 
 + I was not able to compile Ruby 1.8.7, but Ruby 1.8.6-p399 works nice. To configure everything, I use the following commands:
 <code> <code>
 export ac_cv_func_getpgrp_void=yes export ac_cv_func_getpgrp_void=yes
Line 20: Line 46:
 ./configure --target=arm-linux --host=arm-linux --disable-pthread --enable-wide-getaddrinfo --enable-zlib --with-zlib-dir=/mnt/storage/usr --enable-readline --with-readline-dir=/mnt/storage/usr --prefix=/mnt/storage/usr --with-openssl-dir=/mnt/storage/usr && make && make install ./configure --target=arm-linux --host=arm-linux --disable-pthread --enable-wide-getaddrinfo --enable-zlib --with-zlib-dir=/mnt/storage/usr --enable-readline --with-readline-dir=/mnt/storage/usr --prefix=/mnt/storage/usr --with-openssl-dir=/mnt/storage/usr && make && make install
 </code> </code>
-  - Install rubygems:+Install rubygems:
 <code> <code>
 /mnt/storage/usr/bin/ruby setup.rb --prefix=/mnt/storage/usr /mnt/storage/usr/bin/ruby setup.rb --prefix=/mnt/storage/usr
Line 29: Line 55:
 gem install sqlite3-ruby -- --with-sqlite3-dir=/mnt/storage/usr gem install sqlite3-ruby -- --with-sqlite3-dir=/mnt/storage/usr
 </code> </code>
-The result is an image with Ruby installed, and all necessary gems for my project. The tarball can be downloaded here. To install, scp it to the Chumby and log in:+ 
 + 
 +====== The result ====== 
 +is an image with Ruby installed, and all necessary gems for my project. The tarball can be downloaded here. To install, scp it to the Chumby and log in:
 <code> <code>
 scp *tarball* root@*chumby-ip*:/mnt/storage scp *tarball* root@*chumby-ip*:/mnt/storage
chumbyimagehowto.1276524461.txt.gz · Last modified: 2012/10/30 10:36 (external edit)