Installing

Building from source

Dependencies

Mandatory (apt):

apt install cmake pkg-config luajit libluajit-5.1-dev uthash-dev \
    libsystemd-dev libmxml-dev

Mandatory (from source):

Optional blocks — install the corresponding dependencies before building to enable these blocks:

Block

Dependency

How to install

lsdb-intf

lsdbus (from source)

git clone https://github.com/kmarkus/lsdbus.git; see below

webgraph

lua-socket, json.lua

apt install lua-socket lua-json

ubx/gps

libgps

apt install libgps-dev gpsd

ubx/gpio

libgpiod >= 2.0

apt install libgpiod-dev

ubx/iio, ubx/iio_buf

libiio >= 0.21

apt install libiio-dev libiio-utils

Optional tools — extend ubx-log with additional features:

Tool / feature

Dependency

How to install

ubx-log -d (daemon mode)

libdaemon

apt install libdaemon-dev

lsdb-intf also requires enabling at cmake time: cmake -DBLOCK_LSDB_INTF=ON ..

Install lsdbus from source:

git clone https://github.com/kmarkus/lsdbus.git
cd lsdbus && mkdir build && cd build
cmake .. -DCONFIG_LUA_VER=jit
make -j$(nproc) && sudo make install

Optional (testing):

  • lua-unit (apt: lua-unit, git)

Building

Clone the code:

$ git clone https://gitlab.com/kmarkus/microblx.git
$ git clone https://github.com/kmarkus/uutils.git
$ git clone https://github.com/corsix/ffi-reflect.git

Install uutils:

$ cd ../uutils
$ sudo make install

Install ffi-reflect:

$ cp ffi-reflect/reflect.lua /usr/local/share/lua/5.1/

Now build microblx:

$ cd ../microblx
$ mkdir build && cd build
$ cmake ..
$ make
$ sudo make install

Using yocto

If you are developing for an embedded system, the recommended way is use the meta-microblx yocto layer. Please see the README in that repository for further instructions.