[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Adding Lua and common modules to uClinux?
- From: "Timm S. Mueller" <tmueller@...>
- Date: Fri, 11 Jun 2010 01:23:28 +0200
On Fri, 11 Jun 2010 00:33:07 +0200
Gilles Ganault <gilles.ganault@free.fr> wrote:
> I successfully compiled uClinux for a Blackfin BF532-based appliance,
> but it appears that it only include the Lua interpreter, while I would
> also need common modules like LuaSocket, LuaSQL + SQLite, etc.
>
> Has someone already tried to include a full Lua environment into
> uClinux before compiling an image, and could explain to me how to do
> it?
Yes, of course, and it works beautifully, but this very much depends on
your application, build and packaging system. I'm using buildroot for
my current project.
Since I need a heavily customized Lua interpreter anyway, I build Lua,
Luasocket, etc. all myself using the toolchain provided by buildroot.
For example, the relevant lines for Lua in my top-level Makefile look
like this:
$(MAKE) CC=${CROSS_COMPILE}gcc AR="${CROSS_COMPILE}ar r" RANLIB=
${CROSS_COMPILE}ranlib linux
installation:
$(MAKE) INSTALL_TOP=$(LOCALPATH) install
For Luasocket:
$(MAKE) CC=${CROSS_COMPILE}gcc LD=${CROSS_COMPILE}gcc
EXTRACFLAGS=-I$(LOCALPATH)/include INSTALL_TOP_SHARE=
$(LOCALPATH)/share/lua/5.1 INSTALL_TOP_LIB=$(LOCALPATH)/lib/lua/5.1
installation:
$(MAKE) CC=${CROSS_COMPILE}gcc INSTALL_TOP_SHARE=
$(LOCALPATH)/share/lua/5.1 INSTALL_TOP_LIB=$(LOCALPATH)/lib/lua/5.1
install
$(LOCALPATH) refers to the intermediate installation path. For the
deployment target in my makefile, I simply copy things over to
buildroot/target/generic/target_skeleton/ . But this is really just an
example. It's hardly possible to go more into detail here.
- Timm
--
Timm S. Mueller <tmueller@schulze-mueller.de>
Schulze & Mueller GbR, Gryphiusstr. 2, 10245 Berlin,
Gesellschafter: Franciska Schulze, Timm S. Mueller,
Tel. +49 30 93624410, http://www.schulze-mueller.de/