PDA

View Full Version : jivelite: alternative of luajit (Odroid C2)?



Videopac
2017-01-21, 14:54
For my Odroid C2 running Squeezelite I would like to add a touch screen. For this I need to install Jivelite but in order to make Jivelite working i need luajit but luajit is not available for the Odroid C2 yet.

Is there a way to get luajit working on an Odroid C2 or another way to get Jivelite working?

ralphy
2017-01-22, 06:28
I build jivelite with the lua 5.1.1 from squeezeplay for the picoreplayer project and solaris sparc.

You need to have the SDL 1.2 dev packages installed to build jivelite.

Debian packages are libsdl1.2-dev libsdl-ttf2.0-dev libsdl-gfx1.2-dev libsdl-image1.2-dev and you'll likely need others but that will depend on your OS setup.


svn checkout https://github.com/ralph-irving/squeezeplay.git/trunk/src/lua-5.1.1
cd lua-5.1.1
wget https://raw.githubusercontent.com/ralph-irving/tcz-jivelite/master/squeezplay-lua.patch
patch -p0 -i squeezplay-lua.patch

You'll need to remove the armv6 specific changes from src/Makefile after applying the patch.

--- src/Makefile.orig 2017-01-22 06:56:26.018074303 -0500
+++ src/Makefile 2017-01-22 06:59:15.878371202 -0500
@@ -104,7 +104,7 @@
$(MAKE) all MYCFLAGS=

linux:
- $(MAKE) all MYCFLAGS="-s -O3 -march=armv6 -mfloat-abi=hard -mfpu=vfp -DLUA_USE_LINUX" MYLIBS="-ldl" OSXPREFIX="pwd"
+ $(MAKE) all MYCFLAGS="-s -O3 -DLUA_USE_LINUX" MYLIBS="-ldl" OSXPREFIX="pwd"

squeezeos:
$(MAKE) all MYCFLAGS="-Os -Wall -fpic -DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-ldl" OSXPREFIX="pwd"


Create the install directory and change the owner to your login. For example;

sudo mkdir -p /opt/jivelite
id -a
uid=1007(ralphy) gid=100(users) groups=100(users),10(wheel)
sudo chown ralphy:users /opt/jivelite

Now build and install lua into /opt/jivelite

make linux
make INSTALL_TOP=/opt/jivelite install

and make sure it runs. Control-D to exit the > prompt.

/opt/jivelite/bin/lua
Lua 5.1.1T-int-lno Copyright (C) 1994-2006 Lua.org, PUC-Rio
>


Then checkout jivelite.


git clone https://github.com/ralph-irving/jivelite.git
cd jivelite
patch -p0 -i scripts/remove-ffi.patch

# Apply attached patch
patch -p0 -i jivelite-lua-5.1.patch.txt

make PREFIX=/opt/jivelite

# Install
cp -p bin/jivelite /opt/jivelite/bin
cp -pr lib /opt/jivelite
cp -pr share /opt/jivelite

# Run
/opt/jivelite/bin/jivelite

The jivelite-lua-5.1.patch.txt patch is based on my picoreplayer one with the arm specific changes removed.

EDIT: I tried this on a 2nd system and had to change the SDL include path in src/Makefile for it to build.

-CFLAGS += -I. -I$(PREFIX)/include -I$(PREFIX)/include/SDL -Wall -fPIC -DOPTJIVELITE -s -O3
+CFLAGS += -I. -I$(PREFIX)/include -I/usr/include/SDL -Wall -fPIC -DOPTJIVELITE -s -O3