Home Forum Developers IP0x Adding scripting language + SQLite?

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


Gilles
useravatar
User Info

Adding scripting language + SQLite?

Hello,

Now that I can succesfully compile the latest Switchfin SVN source into an uImage using the default settings, I need to figure out how to do a couple of things:

1. Add the following applications to the source tree:
- SQLite3
- a good scripting language, either PHP5, Python, or Lua + common modules. I need this for AGI scripts

Is there a good HOWTO on how to try to port an application that is meant for an MMU CPU like x86, see if it compiles and works OK with the Blackfin CPU, and either package it as BAPS or insert it into Switchfin so that it's included in an uImage? My C skills are basic, and I have no experience cross-compiling software, so this is brand new to me.

2. Once the image is installed and running on the Atcom IP01, run a second instance of Lighttp, on a different port, so that I can have both the Asterisk GUI and my own web server

Thank you.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Adding scripting language + SQLite?

Hi Gilles,

Sorry for the late response.
-We have SQlite3 in Switchfin, we may need to updated it though
You may confirm that it is working well.
-As for the PHP5 it is not working very well on uClinux. The memory gets quickly granulated (it is an experience we had from Astfin2, not tested with the SLUB memory allocator we use now in Switchfin). So I think we may search for alternative of PHP5. What do you guys suggest? 

Best Regards
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Adding scripting language + SQLite?

I agree with PHP5 not being a good idea for the Blackfin. Unless someone knows of a better alternative, I suggest Lua (+ some common modules) because it's very small while providing an easy way to write scripts.


Administrator has disabled public posting
hads
useravatar
User Info

Re: Adding scripting language + SQLite?

I agree, Lua would seem like a good choice. It's small, portable and easy to use.


Administrator has disabled public posting
admin
useravatar
User Info

Re: Adding scripting language + SQLite?

Hi Guys,

I also spent some time checking around Lua. It is already integrated in Asterisk 1.6 so seems to be the way to go.

It will require some backporting of the Lua pbx_switch.
I will give it a try very soon.

Best Regards
Dimitar


Administrator has disabled public posting
Gilles
useravatar
User Info

Re: Adding scripting language + SQLite?

If it's any help, Lua is already part of the uClinux-dist. That should make it easier to add Lua to Switchfin:

Code:


ll /usr/src/uClinux-dist/user/lua/

It only contains the interpreter (and the compiler, but I understand that the interpreter is so fast that people usually just ship scripts as source and let the interpreter recompile them at execution time), so I guess we'd need at least the most common modules (LuaSQL + SQLite, LuaSocket, etc. Check the list of most downloaded + active projects at http://www.luaforge.net/)


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 202
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked