Add ncurses module

A requirement for libedit, which is required by the cli.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add libedit module

Required by the cli.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add lua module

Required by cli. Downloads and builds Lua 5.2.

Lua's original Makefile comes without a target to create a shared-object.
For this, this build extract the sources to `src/` which contains a Makefile
that creates the shared-object.

Also adds the following modules:

* LuaSocket
* LPeg
* LuaJSON

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Add cli module code

cli.c embeds Lua as the engine of the CLI. It makes it dynamic and scriptable.
The added benefit is that Lua maintains its own state, which enables us to
treat it as a single entity that can be reset when needed.

The cli takes a command with libedit and passes it to cli() in cli.lua. If an
error occures (assert() or error()), it is being taken care of with a proper
message.

Some utilities are available, like table/column printing (see table_print())
and getopt_long()-like method (see echo commands for usage example).

It is possible to use this cli locally (outside OSv), but you need to build
its dependencies first: modules/{ncurses,libedit,lua}.

Commands are placed under commands/ folder.
More documentation is placed under docs/, currently.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Build code for cli module

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Some documents created while working on the CLI

Signed-off-by: Or Cohen <orc@fewbytes.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
Merge branch 'lua-cli'

From Or:

  This patch set adds an initial version of the Lua based CLI to have the
  development continue upstream.

  It also adds the dependant (osv) modules: lua, ncurses and libedit.

Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>