diff options
author | 2017-05-13 23:29:24 +0200 | |
---|---|---|
committer | 2017-05-15 09:31:31 +0200 | |
commit | ce833be819475cc2eeac8c90ea6587ea1b808b91 (patch) | |
tree | 0bd9038cc15c0364cd3d4eac1e0cfa19d338d016 /INSTALL | |
parent | b4a6e1cd6c718f4f58536d516174a2afa75fba08 (diff) |
Add missing part of XDS flavour.
Change-Id: I6ed939a5c64626149921fa082320a5b118fb9b65
Signed-off-by: Sebastien Douheret <sebastien.douheret@iot.bzh>
Diffstat (limited to 'INSTALL')
-rw-r--r-- | INSTALL/flavours/generic.tasks | 5 | ||||
-rw-r--r-- | INSTALL/flavours/xds.tasks | 2 | ||||
-rw-r--r-- | INSTALL/tasks.d/20_base_tools | 8 | ||||
-rw-r--r-- | INSTALL/tasks.d/30_yocto | 15 | ||||
-rw-r--r-- | INSTALL/tasks.d/80_xds | 45 | ||||
-rw-r--r-- | INSTALL/tasks.d/81_xds_tools | 4 |
6 files changed, 61 insertions, 18 deletions
diff --git a/INSTALL/flavours/generic.tasks b/INSTALL/flavours/generic.tasks index 58c6828..4ce793f 100644 --- a/INSTALL/flavours/generic.tasks +++ b/INSTALL/flavours/generic.tasks @@ -2,6 +2,9 @@ # # each task listed below should be present as a scriptlet in INSTALL/tasks.d/<taskname> +# base tools +20_base_tools + # platform builds 30_yocto 31_yocto_toaster @@ -12,7 +15,7 @@ # tools & environment for Yocto SDK 50_sdk -# extra UI tools +# extra UI tools 60_x11_tools # tools to generate documentation site diff --git a/INSTALL/flavours/xds.tasks b/INSTALL/flavours/xds.tasks index a189fda..e9f7079 100644 --- a/INSTALL/flavours/xds.tasks +++ b/INSTALL/flavours/xds.tasks @@ -2,6 +2,8 @@ # # each task listed below should be present as a scriptlet in INSTALL/tasks.d/<taskname> +20_base_tools 40_netboot 50_sdk 80_xds +81_xds_tools diff --git a/INSTALL/tasks.d/20_base_tools b/INSTALL/tasks.d/20_base_tools new file mode 100644 index 0000000..b18fb4d --- /dev/null +++ b/INSTALL/tasks.d/20_base_tools @@ -0,0 +1,8 @@ +#!/bin/bash + +# install prereqs for bitbake (Yocto mega-manual) +# +apt-get install -y wget curl git git-core unzip zip + +# dev tools +apt-get install -y make ccache diff --git a/INSTALL/tasks.d/30_yocto b/INSTALL/tasks.d/30_yocto index af21a8c..dee5308 100644 --- a/INSTALL/tasks.d/30_yocto +++ b/INSTALL/tasks.d/30_yocto @@ -2,19 +2,16 @@ # install prereqs for bitbake (Yocto mega-manual) # http://www.yoctoproject.org/docs/2.2/mega-manual/mega-manual.html#detailed-supported-distros -apt-get install -y gawk wget git git-core diffstat unzip texinfo gcc-multilib \ - build-essential chrpath socat - -# some packages are not mentioned or not pulled... -apt-get install -y libsdl1.2-dev cpio libzip2 lsb-release python3 +apt-get install -y gawk diffstat texinfo gcc-multilib \ + build-essential chrpath socat -# dev tools -apt-get install -y make ccache +# some packages are not mentioned or not pulled... +apt-get install -y libsdl1.2-dev cpio libzip2 lsb-release python3 # for documentation #apt-get install -y xsltproc docbook-utils fop dblatex xmlto -# for gerrit +# for gerrit apt-get install -y git-review # libncurses5-dev for kernel 'make menuconfig' @@ -30,7 +27,7 @@ apt-get install -y python-lzma python-gpgme pbzip2 pigz lzop dpkg -i \ $INSTDIR/tools/bmaptools/bmap-tools*.deb \ $INSTDIR/tools/tar/*.deb \ - $INSTDIR/tools/xz-utils/*.deb + $INSTDIR/tools/xz-utils/*.deb # install specific scripts mkdir -p /usr/local/bin diff --git a/INSTALL/tasks.d/80_xds b/INSTALL/tasks.d/80_xds index 69d7999..3a81557 100644 --- a/INSTALL/tasks.d/80_xds +++ b/INSTALL/tasks.d/80_xds @@ -1,16 +1,45 @@ #!/bin/bash # install required tools for XDS -# TODO -# clone XDS repo -# TODO +XDS_BINDIR=/usr/local/bin +XDS_WWWDIR=/usr/local/lib/xds/www +XDS_CONFDIR=${DEVUSER_HOME}/.xds -# build daemon -# TODO +curdir=`pwd` + +## Install Go to build xds +apt-get install -y golang-1.6 +export GOPATH=/tmp/go +export PATH=${PATH}:/usr/lib/go-1.6/bin:${GOPATH}/bin +mkdir -p ${GOPATH}/{src,bin,pkg} + + +## Build and install XDS server and XDS tools (eg. Syncthing) +url="https://github.com/iotbzh/xds-server" \ + && mkdir -p /tmp/src/github.com/iotbzh && cd /tmp/src/github.com/iotbzh \ + && git clone "${url}" \ + && cd xds-server \ + && INSTALL_DIR="${XDS_BINDIR}" INSTALL_WEBAPP_DIR="${XDS_WWWDIR}" && make install \ + && mkdir -p ${XDS_CONFDIR} \ + && cat <<EOF >${XDS_CONFDIR}/config.json +{ + "webAppDir": "${XDS_WWWDIR}", + "shareRootDir": "${XDS_CONFDIR}/projects", + "syncthing": { + "home": "${XDS_CONFDIR}/syncthing-config", + "gui-address": "http://localhost:8384" + } +} +EOF + +# Change owner of created files +chown -R ${DEVUSER}:${DEVUSER_UID} ${XDS_CONFDIR} -# install in container -# TODO # cleanup (remove build tools) -# TODO +cd $curdir +rm -rf /tmp/* + +apt-get remove -y golang-1.6 +npm cache clean diff --git a/INSTALL/tasks.d/81_xds_tools b/INSTALL/tasks.d/81_xds_tools new file mode 100644 index 0000000..a2593c4 --- /dev/null +++ b/INSTALL/tasks.d/81_xds_tools @@ -0,0 +1,4 @@ +#!/bin/bash + +# install essential tools used when compiling a project with XDS +apt-get install -y cmake uuid-dev libssl-dev |