Permalink
Browse files

add sources for ONG-3.4.0

  • Loading branch information...
mlouiset committed Sep 10, 2014
0 parents commit 6ae1587427f54d57e6ccca299744365a74c93b68
Showing 3,537 changed files with 658,719 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
139 README.md
@@ -0,0 +1,139 @@
This folder contains all the sources required to generate ONG software.
ONG is the Actility implementation of ETSI M2M GSCL function.
Please refer to http://cocoon.actility.com/
This way of presenting the ONG sources is a firt attempt to provide all the
sources at once, as well as to offer a manner to generate the whole ONG
packages. This is not the preferrable way to work on ONG.
Once you've generate all the sub-modules once, you can re-work on the
closest sub-modules of the ONG you are interested in.
Installing the compilation environment:
=======================================
- Install "centos6.3 i386" or "centos6.3 x86_64" Linux distrib, with
"Basic Server" installation profile
- Install "Development tools" group package
$ yum groupinstall Development tools
- Install a recent JDK
$ yum install java-1.7.0-openjdk-devel.i686
- Download Maven 3 from http://maven.apache.org/download.cgi, and follow
the instructions for installation
- Download Actility boot-repository on http://cocoon.actility.com/download
and unpack it in $HOME/.m2/repository
$ mkdir -p $HOME/.m2/repository
$ tar zxvf boot-repository-*.tgz -C $HOME/.m2/repository
Retrieve the ONG sources:
=========================
we assume that you clone the ong project into /usr/local/src/ directory:
$ cd /usr/local/src/
$ git clone https://github.com/actility/ong.git
Configuring APU environment:
============================
APU stands for Actility Package Unit. This is the elementary installable
entity for the ONG. "apu" is the file format used for none-java modules.
The format of an "apu" file is close to the IPKG one
(http://en.wikipedia.org/wiki/Ipkg).
"apu" file are generated with "apu-make" tool, which is written in Linux
shell.
It requires a few configuration in order to run:
Define APU building environment:
--------------------------------
- Define APU_HOME environment variable (for instance in your .bashrc file)
œexport APU_HOME=/usr/local/src/ong/dev-tools/apu-tools/
- Add APU_HOME to your PATH
export PATH=$PATH:$APU_HOME
- Create a folder so called ".apu" in your homedir
$ mkdir $HOME/.apu/
- and add file $HOME/.apu/apu-tools.conf with following content:
NEXUS_SRV_ADDR=<your-nexus-server-ip-address-or-blank>
NEXUS_SRV_PORT=<your-nexus-server-port-or-blank>
HOST_TARGET="centos6-x86"
HOST_ARCH="x86"
NEXUS_BASE=http://$NEXUS_SRV_ADDR:$NEXUS_SRV_PORT/nexus
- Don't forget to source your .bashrc file if you've changed it.
Compiling for CentOs:
=====================
- Change to directory "ong" and run "./build_ong.sh centos6-x86"
Cross-compiling:
================
Before you can cross-compile, you'll have to compile the ONG for the HOST_TARGET (i.e.
centos6-x86 or centos6-x86_64)
Cross-compiling for Raspberry Pi B (rpib):
------------------------------------------
Toolchain to use is provided with "poky-eglibc-i686-arm-toolchain-1.4.1.sh",
for Raspberry Pi B
1. install the toolchain in $HOME/toolchains/poky/1.4.1/
2. Create the path $HOME/.apu/toolchains/org/yoctoproject/toolchain-poky-eglibc-arm/1.4.1/
and add file toolchain.cfg in it, with the following content:
export TOOLCHAIN_HOME=$HOME/toolchains/poky/1.4.1/
export PATH=$TOOLCHAIN_HOME/sysroots/i686-pokysdk-linux/usr/bin/armv6-vfp-poky-linux-gnueabi:$PATH
3. Go to the source directory:
$ cd /usr/local/src/ong/targets/target-cross-rpib
4. Generate the APU file:
$ apu-make install noarch
5. Install the APU file:
$ apu-make install-target rpib
6. Then, you can build the ONG for rpbi
$ cd /usr/local/src/ong/
$ ./build_ong.sh rpib
Cross-compiling for "Connected Object" v2 (cov2):
-------------------------------------------------
Toolchain to use is provided with "gcc_4.5.1.tar.bz2", for ARM 920T
1. Install the toolchain in $HOME/toolchains/cov2/4.5.1/
2. Create the path
$HOME/.apu/toolchains/com/actility/m2m/toolchain-arm-none-linux-gnueabi/4.5.1/
and add file toolchain.cfg in it, with the following content:
export TOOLCHAIN_HOME=$HOME/toolchains/cov2/4.5.1/
export PATH=$TOOLCHAIN_HOME/bin:$PATH
3. Go to the source directory:
$ cd /usr/local/src/ong/targets/target-cross-cov2
4. Generate the APU file:
$ apu-make install noarch
5. Install the APU file:
$ apu-make install-target cov2
6. Then, you can build the ONG for cov2
$ cd /usr/local/src/ong/
$ ./build_ong.sh cov2
Cross-compiling for centos6-x86 under centos6-x86_64:
-----------------------------------------------------
You may also want to install a 64bits OS, but need to cross-compile for 32bits target.
To do that, you'll need to generate and install the target-cross-centos6-x86 APU:
1. Go to the source directory:
$ cd /usr/local/src/ong/targets/target-cross-centos6-x86
2. Generate the APU file:
$ apu-make install noarch
3. Install the APU file:
$ apu-make install-target cross-centos6-x86
4. Then, you can build the ONG for centos6-x86
$ cd /usr/local/src/ong/
$ ./build_ong.sh centos6-x86
@@ -0,0 +1,224 @@
#! /bin/bash
CURRENT=$(pwd)
APU_MAKE=apu-make
APU_INSTALL=apu-install-stdalone.sh
TARGET=$1
usage() {
echo "usage: $0 <target>"
echo "where <target> can be {centos6-x86|centos6-x86_64|cov1|cov2|rpib}"
echo
}
abortWithMsg() {
echo "*************************************" >&2
echo "*** "$1"; aborted" >&2
cd $CURRENT
exit 1
}
apuBuild() {
SUB_MOD_TARGET=$1
ROOTACT=$(cd .. && pwd) eval $APU_MAKE install $SUB_MOD_TARGET || \
abortWithMsg "failed to build apu in $(pwd)"
}
apuInstall() {
APU=$1
TARGET_DIR=$2
echo "Installing $APU in $TARGET_DIR"
mkdir -p $TARGET_DIR || \
abortWithMsg "Failed to create TARGET_DIR dir ($TARGET_DIR) while installing $APU"
cd $TARGET_DIR
ROOTACT=$(pwd) eval $APU_INSTALL -y $APU || \
abortWithMsg "failed to install APU $APU"
cd $CURRENT
}
apuInstallTarget() {
SUB_MOD_TARGET=$1
ROOTACT=$(cd .. && pwd) eval $APU_MAKE install-target $SUB_MOD_TARGET || \
abortWithMsg "failed to install target $SUB_MOD_TARGET"
}
mavenBuild() {
SUB_MOD_TARGET=$1
OPTIONS="-Dmaven.test.skip=true"
[ -n "$SUB_MOD_TARGET" ] && OPTIONS=$OPTIONS" -Dbuild.type=$SUB_MOD_TARGET" && \
[ $SUB_MOD_TARGET == "rpib" ] && OPTIONS=$OPTIONS" -Dbuild.arch=arm"
mvn clean install $OPTIONS || \
abortWithMsg "failed to build jar"
}
build() {
SUB_MOD_PATH=$1
SUB_MOD_TARGET=$2
SUB_MOD_SUPPORTED_TARGETS=$3
echo "==============================================================================="
echo
echo " Building sub-module $SUB_MOD_PATH for $TARGET"
echo
echo "==============================================================================="
if [ -n "$SUB_MOD_SUPPORTED_TARGETS" ]; then
SUPPORTED_TARGETS=$(echo $SUB_MOD_SUPPORTED_TARGETS | tr -s '{}' '|')
if ! [[ "|$SUPPORTED_TARGETS|" =~ "|$TARGET|" ]]; then
echo "This module is not required for this target; skipped."
return
fi
fi
cd $SUB_MOD_PATH || abortWithMsg "$SUB_MOD_PATH not found"
if [ -d "apu" ]; then
echo "Found apu folder; invoke apu-make"
apuBuild $SUB_MOD_TARGET
elif [ -f "pom.xml" ]; then
echo "Found maven project; invoke maven"
mavenBuild $SUB_MOD_TARGET
else
abortWithMsg "Unable to detect how to build in $SUB_MOD_PATH"
fi
cd $CURRENT
}
[ -x $(which $APU_MAKE) ] || abortWithMsg "apu-make not found"
[ -z "$TARGET" ] && usage && abortWithMsg "<target> is missing"
[ -f $HOME/.apu/apu-tools.conf ] || abortWithMsg "APU environment not set; please refer to README file"
source $HOME/.apu/apu-tools.conf
chmod +x dev-tools/apu-tools/$APU_MAKE
chmod +x dev-tools/apu-tools/$APU_INSTALL
case "$HOST_TARGET" in
"centos6-x86")
if [ -z "$(apu-make ls-targets | grep ^centos6-x86$)" ]; then
build targets/target-centos6-x86 noarch
apuInstallTarget centos6-x86
fi
;;
"centos6-x86_64")
if [ -z "$(apu-make ls-targets | grep ^centos6-x86_64$)" ]; then
build targets/target-centos6-x86_64 noarch
apuInstallTarget centos6-x86_64
fi
;;
*)
abortWithMsg "Unsupported HOST_TARGET in $HOME/.apu/apu-tools.conf ($HOST_TARGET)"
;;
esac
# now build all sub-modules in the right order
build external/argp-standalone $TARGET "{lpv3}"
build external/libiconv $TARGET
build external/pthsem $TARGET
build external/eibd $TARGET
build external/libxml2 $TARGET
build external/mxml $TARGET
build external/ntpclient $TARGET "{cov1|cov2|rpib}"
build external/libpcap $TARGET
build external/tcpdump $TARGET
build external/libmodbus $TARGET
build external/sqlite $TARGET
build external/curl $TARGET
build external/cproto $TARGET
build external/libmicrohttpd $TARGET
build external/jni $TARGET
build external/exip $TARGET
build external/phoneme-advanced-mr2 $TARGET "{cov1|cov2|rpib|lpv3|centos6-x86}"
PHONEME_VERSION=$(cat external/phoneme-advanced-mr2/Version)-$(cat external/phoneme-advanced-mr2/apu/revision)
export PHONEME_TARGET_DIR=$CURRENT/.build/$TARGET/phoneme
PHONEME_APU=$HOME/.m2/repository/com/sun/phoneme-advanced-mr2/$PHONEME_VERSION/phoneme-advanced-mr2-$PHONEME_VERSION-$TARGET.apu
apuInstall $PHONEME_APU $PHONEME_TARGET_DIR
export PHONEME_HOME=$PHONEME_TARGET_DIR/bin/phoneme
build common/java.pom
build common/java.cdc.pom
build common/makefile-common noarch
build dev-tools/apu-maven-plugin
build dev-tools/cocoon-maven-plugin
build common/rtbase $TARGET
build common/xo $TARGET
build common/libcoap $TARGET
build common/libdIa $TARGET
build common/m2mxoref $HOST_TARGET
build common/stdin-logger $TARGET
build common/trans_pty $TARGET
build common/tty_mapper $TARGET
build common/libSongOverHttp $TARGET
build common/libHttpSubsMgmt $TARGET
build drivers/AZAP $TARGET
build drivers/drvcommon $TARGET
build drivers/zigbee $TARGET
build drivers/watteco $TARGET
build drivers/wmbus $TARGET
build drivers/knx $TARGET
build drivers/iec61131 $TARGET
build drivers/modbus $TARGET
build gscl/backend.api
build gscl/storage.api
build gscl/storage.driver.api
build gscl/jxo.api
build gscl/m2m.api
build gscl/song.api
build gscl/jxo.ni.api
build gscl/cm.api
build gscl/framework.resources.api
build gscl/log.api
build gscl/shutdown.hook.ni.api
build gscl/song.binding.coap.ni.api
build gscl/song.binding.http.api
build gscl/song.binding.http.ni.api
build gscl/storage.driver.sqlite.ni.api
build gscl/transport.logger.api
build gscl/org.apache.felix.shell.acy.api
build gscl/util
build gscl/backend
build gscl/org.apache.felix.shell.acy
build gscl/org.apache.felix.shell.tui.acy
build gscl/felix.shell.telnet
build gscl/song
build gscl/backend.command.shell
build gscl/song.command.shell
build gscl/song.trace.command.shell
build gscl/cm.command.shell
build gscl/log.command.shell
build gscl/inspector.command.shell
build gscl/phoneme.command.shell
build gscl/m2m
build gscl/storage
build gscl/system.version
build gscl/shutdown.hook
build gscl/storage.driver.sqlite
build gscl/jxo
build gscl/song.binding.http
build gscl/song.binding.coap
build gscl/scl.app.me
build gscl/cm
build gscl/framework.command.shell.me
build gscl/framework.command.shell.se
build gscl/song.binding.http.command.shell
build gscl/jxo.jni $TARGET
build gscl/framework.resources.osgi
build gscl/log
build gscl/shutdown.hook.jni $TARGET
build gscl/song.binding.coap.jni $TARGET
build gscl/song.binding.http.jni $TARGET
build gscl/storage.driver.sqlite.jni $TARGET
build gscl/transport.logger.log
build gscl/scl $TARGET
build installer/ong-installer
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>java.cdc.pom</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
@@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1
Oops, something went wrong.

0 comments on commit 6ae1587

Please sign in to comment.