From af8476e980e218eb1d38ee0f9fe5509ed5385e7d Mon Sep 17 00:00:00 2001 From: Ray Ozzie Date: Fri, 25 Mar 2016 09:45:32 -0400 Subject: [PATCH] rpi --- build.sh | 27 ++++++++++----------------- build.sh~ | 2 ++ 2 files changed, 12 insertions(+), 17 deletions(-) diff --git a/build.sh b/build.sh index 1b1b121..0ec4818 100755 --- a/build.sh +++ b/build.sh @@ -16,28 +16,26 @@ echo "" # Check dependencies echo "Installing dependencies..." -apt-get update -apt-get install swig libftdi-dev python-dev +#apt-get update +#apt-get install swig libftdi-dev python-dev +#apt-get install swig python-dev # Install LoRaWAN packet forwarder repositories INSTALL_DIR="/opt/ttn-gateway" if [ ! -d "$INSTALL_DIR" ]; then mkdir $INSTALL_DIR; fi pushd $INSTALL_DIR -# Build libraries -if [ ! -d libmpsse ]; then - git clone https://github.com/devttys0/libmpsse.git - pushd libmpsse/src +# Build WiringPi +if [ ! -d wiringPi ]; then + git clone git://git.drogon.net/wiringPi + pushd wiringPi else - pushd libmpsse/src + pushd wiringPi git reset --hard git pull fi -./configure --disable-python -make -make install -ldconfig +./build popd @@ -51,13 +49,8 @@ else git pull fi -cp ./libloragw/99-libftdi.rules /etc/udev/rules.d/99-libftdi.rules - -sed -i -e 's/CFG_SPI= native/CFG_SPI= ftdi/g' ./libloragw/library.cfg -#sed -i -e 's/PLATFORM= kerlink/PLATFORM= imst_rpi/g' ./libloragw/library.cfg -sed -i -e 's/PLATFORM= kerlink/PLATFORM= lorank/g' ./libloragw/library.cfg +sed -i -e 's/PLATFORM= kerlink/PLATFORM= imst_rpi/g' ./libloragw/library.cfg sed -i -e 's/DEBUG_HAL= 0/DEBUG_HAL= 1/g' ./libloragw/library.cfg -sed -i -e 's/ATTRS{idProduct}=="6010"/ATTRS{idProduct}=="6014"/g' /etc/udev/rules.d/99-libftdi.rules make diff --git a/build.sh~ b/build.sh~ index e331309..1b1b121 100755 --- a/build.sh~ +++ b/build.sh~ @@ -54,7 +54,9 @@ fi cp ./libloragw/99-libftdi.rules /etc/udev/rules.d/99-libftdi.rules sed -i -e 's/CFG_SPI= native/CFG_SPI= ftdi/g' ./libloragw/library.cfg +#sed -i -e 's/PLATFORM= kerlink/PLATFORM= imst_rpi/g' ./libloragw/library.cfg sed -i -e 's/PLATFORM= kerlink/PLATFORM= lorank/g' ./libloragw/library.cfg +sed -i -e 's/DEBUG_HAL= 0/DEBUG_HAL= 1/g' ./libloragw/library.cfg sed -i -e 's/ATTRS{idProduct}=="6010"/ATTRS{idProduct}=="6014"/g' /etc/udev/rules.d/99-libftdi.rules make