From 716d28f99637d6f2b8eb2758c2da41da67b8027c Mon Sep 17 00:00:00 2001 From: Fulup Ar Foll Date: Tue, 15 Aug 2017 14:13:49 +0200 Subject: Documentation --- README.md | 147 +++++++++++++++++++++++++++++++++++++++++--------------------- 1 file changed, 98 insertions(+), 49 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 4e449cb..5daae1e 100644 --- a/README.md +++ b/README.md @@ -1,78 +1,63 @@ ------------------------------------------------------------------------ -AGL-AUDIO bindings expose low+high level API through AGL framework + AGL-Advanced-Audio-Agent ------------------------------------------------------------------------ -Cloning Audio-Binding from Git +# Cloning Audio-Binding from Git ------------------------------------------------------- ``` +# Initial clone with submodules git clone --recurse-submodules https://github.com/iotbzh/audio-bindings cd audio-binding +# Do not forget submodules with pulling +git pull --recurse-submodules https://github.com/iotbzh/audio-bindings + ``` -AFB_daemon dependency on Standard Linux Distributions +# AFB-daemon dependencies ------------------------------------------------------- - # handle dependencies > (OpenSuse-42.2, Fedora-25, Ubuntu 16.04.2LTS) - gcc > 4.8 - systemd-devel (libsystemd-dev>=222) - libuuid-devel - file-devel(OpenSuSe) or libmagic-dev(Ubuntu) - libjson-c-devel - alsa-devel - ElectricFence (BUG should not be mandatory) - libopenssl-devel libgcrypt-devel libgnutls-devel (optional but requested by libmicrohttpd for https) - OpenSuse >=42.2 - zypper in gcc5 gdb gcc5-c++ git cmake make ElectricFence systemd-devel libopenssl-devel libuuid-devel alsa-devel libgcrypt-devel libgnutls-devel libjson-c-devel file-devel mxml-devel + OpenSuse >=42.2, Fedora>=25, Ubuntu>=16.4 Binary packages from https://en.opensuse.org/LinuxAutomotive - Ubuntu >= 16.4 libuuid-devel - apt-get install cmake git electric-fence libsystemd-dev libssl-dev uuid-dev libasound2-dev libgcrypt20-dev libgnutls-dev libgnutls-dev libjson-c-dev libmagic-dev libmxml-dev + For other distro see # Building AFB-daemon from source on Standard Linux Distribution + + +# Specific Dependencies + + * alsa-devel >= 1.1.2 Warning some distro like Fedora-25 still ship version 1.1.1 as default + * lua >= 5.3 Most distribution only ship version 5.2 but binary package should be easy to find - libmicrohttpd>=0.9.55 (as today OpenSuse-42.2 or Ubuntu-.16.4 ship older versions) - afb-daemon from AGL Gerrit git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder ``` - # Might want to add following variables into ~/.bashrc - echo "#---------- AGL options Start ---------" >>~/.bashrc - echo "# Object: AGL cmake option for binder/bindings" >>~/.bashrc - echo "# Date: `date`" >>~/.bashrc - echo 'export CC=gcc-5; export CXX=g++-5' >>~/.bashrc # if using gcc5 - echo 'export INSTALL_PREFIX=$HOME/opt' >>~/.bashrc - echo 'export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc - echo 'export LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc - echo 'export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib64/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig' >>~/.bashrc - echo 'export PATH=$INSTALL_PREFIX/bin:$PATH' >>~/.bashrc - echo 'export RSYNC_TARGET=MY_TARGET_HOSTNAME' >>~/.bashrc - echo 'export RSYNC_PREFIX=./opt' >>~/.bashrc + OpenSuse + - LUA-5.3-devel https://software.opensuse.org//download.html?project=devel%3Alanguages%3Alua&package=lua53 + - Alsa-devel zypper --install alsa-devel # 42.3 is shipped default with 1.1.4 +``` - echo "#---------- AGL options End ---------" >>~/.bashrc - source ~/.bashrc - # install LibMicroHttpd - LIB_MH_VERSION=0.9.55 - wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${LIB_MH_VERSION}.tar.gz - tar -xzf libmicrohttpd-${LIB_MH_VERSION}.tar.gz - cd libmicrohttpd-${LIB_MH_VERSION} - ./configure --prefix=${INSTALL_PREFIX} - make - sudo make install-strip +# Compile AGL-Advanced-Audio-Agent +-------------------------------------- - # retrieve last AFB_daemon from AGL - git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder +* Edit your ~/.config/app-templates/cmake.d/00-common-userconf.cmake to reflect your local configuration - # Warning: previous GCC options should be set before initial cmake (clean Build/*) - cd app-framework-binder; mkdir -p build; cd build - cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX .. - make - make install ``` + message(STATUS "*** Fulup Local Config For Native Linux ***") + add_compile_options(-DNATIVE_LINUX) + + set (RSYNC_TARGET "10.20.101.198") + set (RSYNC_PREFIX "opt") + set(CMAKE_INSTALL_PREFIX $ENV{HOME}/opt) + set(BINDINGS_INSTALL_PREFIX $ENV{HOME}/opt) + + set(CMAKE_PREFIX_PATH ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig) + set(LD_LIBRARY_PATH ${CMAKE_INSTALL_PREFIX}/lib64 ${CMAKE_INSTALL_PREFIX}/lib) + +``` -# Compile binding ``` - source ~/.bashrc # or any other file where your have place your compilation preferences mkdir -p build cd build cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX .. @@ -121,8 +106,16 @@ from the wrong relative directory, either you have to use 'set solib-search-path info sharedlibrary afb-* ``` +# ToBeBone (WorkInProgess: This list is getting longer every day) +------------------------------------------------------------------- + +* Support response from LUA with nested table (currently fail miserably) +* Add timer base callback from Lua +* Enable export of LUA commands directly from Plugin # Running an debugging on a target +------------------------------------------------------- + ``` export RSYNC_TARGET=root@xx.xx.xx.xx @@ -148,3 +141,59 @@ Note: remote-target-populate will Note that Netbeans impose to set debug directory to ./build/pkgout or it won't find binding symbols for source debugging +# Building AFB-daemon from source on Standard Linux Distribution +------------------------------------------------------- + + # handle dependencies > (OpenSuse-42.2, Fedora-25, Ubuntu 16.04.2LTS) + gcc > 4.8 + systemd-devel (libsystemd-dev>=222) + libuuid-devel + file-devel(OpenSuSe) or libmagic-dev(Ubuntu) + libjson-c-devel + ElectricFence (BUG should not be mandatory) + libopenssl-devel libgcrypt-devel libgnutls-devel (optional but requested by libmicrohttpd for https) + + OpenSuse >=42.2 + zypper in gcc5 gdb gcc5-c++ git cmake make ElectricFence systemd-devel libopenssl-devel libuuid-devel alsa-devel libgcrypt-devel libgnutls-devel libjson-c-devel file-devel mxml-devel + + Ubuntu >= 16.4 libuuid-devel + apt-get install cmake git electric-fence libsystemd-dev libssl-dev uuid-dev libasound2-dev libgcrypt20-dev libgnutls-dev libgnutls-dev libjson-c-dev libmagic-dev libmxml-dev + + libmicrohttpd>=0.9.55 (as today OpenSuse-42.2 or Ubuntu-.16.4 ship older versions) + afb-daemon from AGL Gerrit git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder + +``` + # Might want to add following variables into ~/.bashrc + echo "#---------- AGL options Start ---------" >>~/.bashrc + echo "# Object: AGL cmake option for binder/bindings" >>~/.bashrc + echo "# Date: `date`" >>~/.bashrc + echo 'export CC=gcc-5; export CXX=g++-5' >>~/.bashrc # if using gcc5 + echo 'export INSTALL_PREFIX=$HOME/opt' >>~/.bashrc + echo 'export LD_LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc + echo 'export LIBRARY_PATH=$INSTALL_PREFIX/lib64:$INSTALL_PREFIX/lib' >>~/.bashrc + echo 'export PKG_CONFIG_PATH=$INSTALL_PREFIX/lib64/pkgconfig:$INSTALL_PREFIX/lib/pkgconfig' >>~/.bashrc + echo 'export PATH=$INSTALL_PREFIX/bin:$PATH' >>~/.bashrc + echo 'export RSYNC_TARGET=MY_TARGET_HOSTNAME' >>~/.bashrc + echo 'export RSYNC_PREFIX=./opt' >>~/.bashrc + + echo "#---------- AGL options End ---------" >>~/.bashrc + source ~/.bashrc + + # install LibMicroHttpd + LIB_MH_VERSION=0.9.55 + wget https://ftp.gnu.org/gnu/libmicrohttpd/libmicrohttpd-${LIB_MH_VERSION}.tar.gz + tar -xzf libmicrohttpd-${LIB_MH_VERSION}.tar.gz + cd libmicrohttpd-${LIB_MH_VERSION} + ./configure --prefix=${INSTALL_PREFIX} + make + sudo make install-strip + + # retrieve last AFB_daemon from AGL + git clone https://gerrit.automotivelinux.org/gerrit/src/app-framework-binder + + # Warning: previous GCC options should be set before initial cmake (clean Build/*) + cd app-framework-binder; mkdir -p build; cd build + cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX .. + make + make install +``` -- cgit 1.2.3-korg