Permalink
Browse files

update the way node bin gets pulled, update arm tools, add drone helpers

  • Loading branch information...
contra committed Nov 12, 2012
1 parent c09a6ab commit 7efa4352326c69ce6b06d4f277e1d4fdc7ab68ee
Showing with 41 additions and 10 deletions.
  1. +1 −1 .gitignore
  2. +23 −0 helpers/ardrone2.sh
  3. +1 −1 platforms/ardrone2.sh
  4. +16 −8 setup-vm.sh
View
@@ -1,4 +1,4 @@
.vagrant
/node
-/build
+/build
View
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -eu
+
+if [ ! -e build/bin/node ]; then
+ echo "-> Spinning up VM"
+ vagrant up
+ echo "-> Building node binary"
+ vagrant ssh -c "cd cross-compiler && ./setup-vm.sh && make ardrone2"
+else
+ echo "-> Skipping build (node binary exists)"
+fi
+
+echo "Would you like to install node on the drone? (Connect now) [Y/n]"
+read a
+if [[ $a == "Y" || $a == "y" || $a = "" ]]; then
+ echo "-> Uploading binary"
+ ftp -u ftp://anonymous:anonymous@192.168.1.1/node build/bin/node
+ echo "-> Installing"
+ { echo "cd /data/video && mv ./node /bin && rm -rf node && exit"; sleep 1; } | telnet 192.168.1.1
+ echo "-> Installation completed!"
+else
+ echo "-> Build completed!"
+fi
View
@@ -1,6 +1,6 @@
#!/bin/bash
-export SOURCERY="`cd ../arm-2009q1 && pwd`"
+export SOURCERY="`cd ../armtools && pwd`"
export TOOL_PREFIX="${SOURCERY}/bin/arm-none-linux-gnueabi"
export CXX="${TOOL_PREFIX}-g++"
export AR="${TOOL_PREFIX}-ar"
View
@@ -1,24 +1,32 @@
#!/bin/bash
set -eu
-NODE_BRANCH="v0.8.11-release"
-NODE_REPO="git://github.com/joyent/node.git"
+NODE_VERSION="v0.8.14"
echo "-> Installing apt-get packages"
sudo apt-get -y install \
build-essential \
- git-core \
curl
echo "-> Installing node.js"
-if [ ! -d node ]; then git clone ${NODE_REPO} node; fi
-( cd node && git checkout ${NODE_BRANCH} )
+if [ ! -d node ]; then
+ curl -O http://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}.tar.gz
+ tar -zxf node-${NODE_VERSION}.tar.gz
+ mv node-${NODE_VERSION} node
+ rm -rf node-${NODE_VERSION}.tar.gz
+fi
+cd node
# Unfortunately we can't put this into our project dir as vboxfs complains
# about hardlinks in the tar : /
echo "-> Installing code sourcer (arm toolchain)"
-cd ~
-curl -OL "http://www.codesourcery.com/sgpp/lite/arm/portal/package4571/public/arm-none-linux-gnueabi/arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2"
-tar -xf "arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2"
+if [ ! -d ~/armtools ]; then
+ cd ~
+ tarball="arm-2012.03-57-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2"
+ curl -OL http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/${tarball}
+ tar -xf ${tarball}
+ mv arm-2012.03 armtools
+ rm -rf ${tarball}
+fi

0 comments on commit 7efa435

Please sign in to comment.