rpi
This commit is contained in:
parent
4cb46b565e
commit
af8476e980
27
build.sh
27
build.sh
@ -16,28 +16,26 @@ echo ""
|
|||||||
|
|
||||||
# Check dependencies
|
# Check dependencies
|
||||||
echo "Installing dependencies..."
|
echo "Installing dependencies..."
|
||||||
apt-get update
|
#apt-get update
|
||||||
apt-get install swig libftdi-dev python-dev
|
#apt-get install swig libftdi-dev python-dev
|
||||||
|
#apt-get install swig python-dev
|
||||||
|
|
||||||
# Install LoRaWAN packet forwarder repositories
|
# Install LoRaWAN packet forwarder repositories
|
||||||
INSTALL_DIR="/opt/ttn-gateway"
|
INSTALL_DIR="/opt/ttn-gateway"
|
||||||
if [ ! -d "$INSTALL_DIR" ]; then mkdir $INSTALL_DIR; fi
|
if [ ! -d "$INSTALL_DIR" ]; then mkdir $INSTALL_DIR; fi
|
||||||
pushd $INSTALL_DIR
|
pushd $INSTALL_DIR
|
||||||
|
|
||||||
# Build libraries
|
# Build WiringPi
|
||||||
if [ ! -d libmpsse ]; then
|
if [ ! -d wiringPi ]; then
|
||||||
git clone https://github.com/devttys0/libmpsse.git
|
git clone git://git.drogon.net/wiringPi
|
||||||
pushd libmpsse/src
|
pushd wiringPi
|
||||||
else
|
else
|
||||||
pushd libmpsse/src
|
pushd wiringPi
|
||||||
git reset --hard
|
git reset --hard
|
||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./configure --disable-python
|
./build
|
||||||
make
|
|
||||||
make install
|
|
||||||
ldconfig
|
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
@ -51,13 +49,8 @@ else
|
|||||||
git pull
|
git pull
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cp ./libloragw/99-libftdi.rules /etc/udev/rules.d/99-libftdi.rules
|
sed -i -e 's/PLATFORM= kerlink/PLATFORM= imst_rpi/g' ./libloragw/library.cfg
|
||||||
|
|
||||||
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/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
|
make
|
||||||
|
|
||||||
|
@ -54,7 +54,9 @@ fi
|
|||||||
cp ./libloragw/99-libftdi.rules /etc/udev/rules.d/99-libftdi.rules
|
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/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= 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
|
sed -i -e 's/ATTRS{idProduct}=="6010"/ATTRS{idProduct}=="6014"/g' /etc/udev/rules.d/99-libftdi.rules
|
||||||
|
|
||||||
make
|
make
|
||||||
|
Loading…
Reference in New Issue
Block a user