Drobo

Cross-compiling for DroboFS: Lua 5.1 [incomplete]

I’m trying to cross-compile Lua 5.1 for the DroboFS. I’ll update this with how far I have gotten.

THIS POST DOES NOT DESCRIBE HOW TO BUILD LUA… YET.

Introduction: Why Lua 5.1?

It is a very small and versatile scripting language. I personally would like to use it for Lighttpd CGI.

Overall compiling complexity: UNKNOWN, but the Lua authors like to think it is easy.

Step 1: Background info

To be able to make use of this post, you need a VM configured as indicated in this post.

Step 2: Enter the cross-compiling environment

See step 2 of this post to see instructions on how to enter the chroot environment.

Step 3: Dependencies

from ubuntu packages:

Step 4: Get the source code

Lua’s website: http://www.lua.org/download.html
Version: 5.1.4
Direct link: http://www.lua.org/ftp/lua-5.1.4.tar.gz

Make sure that you are in the folder /root/code, then type:

wget http://www.lua.org/ftp/lua-5.1.4.tar.gz tar zxf lua-5.1.4.tar.gz cd lua-5.1.4

Step 5: Configuration

Currently returns march value error during “make” command.

Step 6: Compiling

UNKNOWN

Step 6: Installing

UNKNOWN

Hi there,

I managed to cross-compile Lua as part of the lighttpd DroboApp.

To summarize, this will take you from code to compiled version:

wget http://www.lua.org/ftp/lua-5.1.4.tar.gz tar zxf lua-5.1.4.tar.gz cd lua-5.1.4/ make clean make PLAT=linux RANLIB=$RANLIB CC=$CC AR="$AR rcu" make INSTALL_TOP=<anywhere you want>install

This assumes that you are using a cross-compile VM like this one. You might need some more parameters in there, but that is the gist of it.

(btw LUA is also very good for making games that can run on basic direct x video cards without needing any special 3d cards - eg “HARVEST: Massive Encounter” by Oxeye Games uses it, and lots of others are writing mods using Lua for the game - its cool stuff too btw and free fully playable demo - :slight_smile: