]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
The necessary mods to the source code necessary to build using our debian setup.
authorR. Steve McKown <rsmckown@gmail.com>
Mon, 7 Dec 2009 20:47:28 +0000 (13:47 -0700)
committerR. Steve McKown <rsmckown@gmail.com>
Mon, 7 Dec 2009 22:14:16 +0000 (15:14 -0700)
debian/rules
tinyos.sh [new file with mode: 0644]
tools/release/tinyos.files
tools/release/tinyos.filter [new file with mode: 0644]

index aaf038406dc7efd555b0c25f152a7cef848e4bf7..89ac2214bb7c9ee55b1a6dda69512165bbea0bcb 100755 (executable)
@@ -139,7 +139,7 @@ binary-arch: checkroot build install
        $(install_dir) $(dtmp)/$(srcpkg)/opt/tinyos
        chmod u+x tools/release/extractor
        tools/release/extractor $(dtmp)/$(srcpkg)/opt/tinyos/$(version) < \
-               tools/release/tinyos.files >/dev/null
+               tools/release/tinyos.filter >/dev/null
        $(install_dir) $(dtmp)/$(srcpkg)/usr/share/lintian/overrides
        $(install_file) debian/$(srcmetapkg).lintian-overrides \
                $(dtmp)/$(srcpkg)/usr/share/lintian/overrides/$(srcpkg)
diff --git a/tinyos.sh b/tinyos.sh
new file mode 100644 (file)
index 0000000..20814c4
--- /dev/null
+++ b/tinyos.sh
@@ -0,0 +1,43 @@
+#! /usr/bin/env bash
+# Here we setup the environment
+# variables needed by the tinyos 
+# make system
+
+TOSBASE=/opt/tinyos
+
+# $1 is a directory or tos version number
+# returns a fully rooted and valid TOSROOT
+getdir()
+{
+    if [ -d "$1" -a -d "$1/tos" ]; then
+       echo "$1"
+    elif [ -d "$TOSBASE/$1" -a -d "$TOSBASE/$1/tos" ]; then
+       echo "$TOSBASE/$1"
+    fi
+}
+
+# Clear TOS environment
+if [ -n "$TOSROOT" ]; then
+    CLASSPATH=$(echo $CLASSPATH | sed -e "s|:$TOSROOT/support/sdk/java||")
+fi
+unset TOSDIR MAKERULES
+
+# Set TOS environment
+TOSROOT=$(getdir "$1")
+if [ -z "$TOSROOT" ]; then
+    TOSROOT=$(cat ~/.tosrc 2>/dev/null)
+fi
+
+if [ -z "$TOSROOT" ]; then
+    echo "No TinyOS source directory found.  Usage:" >&2
+    echo "source /opt/tinyos/tinyos.sh [<version> | <directory>]" >&2
+    export TOSROOT TOSDIR MAKERULES
+else
+    echo "Setting up for TinyOS source in $TOSROOT"
+    echo "$TOSROOT" > ~/.tosrc
+    TOSDIR="$TOSROOT/tos"
+    CLASSPATH=$CLASSPATH:$TOSROOT/support/sdk/java
+    MAKERULES="$TOSROOT/support/make/Makerules"
+    export TOSROOT TOSDIR CLASSPATH MAKERULES
+fi
+unset TOSBASE tmp
index 746d68f77823e62110486c6ee6c13f2b6c0a9201..8985c6088d8f60150ba3af3ebb35d1781e757657 100644 (file)
@@ -3,41 +3,5 @@ VERSION=2.0.2
 
 cd ../..
 rm -rf $NAME-$VERSION
-tools/release/extractor $NAME-$VERSION <<'EOF' | gzip >../$NAME-$VERSION.tar.gz
-!^./apps/tests/(eyesIFX|mica2|msp430|RadioStress|TestAlarm|TestAMOnOff|TestAMService|TestBroadcast|TestCollection|TestMultihopLqi|TestOscilloscopeLQI|TestPowerManager|TestPowerup|TestPrintf|TestRadioPM|TestScheduler|TestSerialBandwidth|TestSharedResource|TestSimTimers|TestSleep|TestTimerSync|TestTreeRouting|TestTrickleTimer)
-!^/apps/(BlinkAlarm|BlinkMSP430|BlinkTask|BlinkToRadio|Test|TestADC|TestArbiter|TestCC2420|TestRadio|TestSPI|TestScheduler|TestSchedulerTemp|TestSerial)
-!^./doc
-!^./overall-todo.txt
-!^./support/make/Makelocal
-!^./support/make/btnode3.target
-!^./tests
-!^./tools
-!^./tos/chips/Atmega128
-!^./tos/chips/cc2420_pm
-!^./tos/chips/cc1000_pm
-!^./tos/lib/adc
-!^./tos/lib/ByteRadio
-!^./tos/lib/deluge
-!^./tos/lib/net/collection
-!^./tos/lib/oski
-!^./tos/platforms/btnode3
-!/.cvsignore
-!/CVS/
-!/CVS$
-!~$
-!/build/
-!/build$
-!#
-!.class$
-./RadioSenseToLeds/RadioSenseMsg.class
-./MViz/MVizMsg.class
-./tests/cc2420/TestPacketLink/TestPacketLink.class
-./tests/cc2420/TestPacketLink/PacketLinkMsg.class
-./tests/cc2420/TxThroughput/ThroughputMsg.class
-./tests/cc2420/TxThroughput/TxThroughput.class
-./tests/cc2420/LplBroadcastCountToLeds/RadioCountMsg.class
-./tests/cc2420/RssiToSerial/SpecAnalyzer.class
-./tests/cc2420/RssiToSerial/RssiSerialMsg.class
-./RadioCountToLeds/RadioCountMsg.class
-EOF
+tools/release/extractor $NAME-$VERSION < tools/release/tinyos.filter | gzip >../$NAME-$VERSION.tar.gz
 rm -rf $NAME-$VERSION
diff --git a/tools/release/tinyos.filter b/tools/release/tinyos.filter
new file mode 100644 (file)
index 0000000..93b5de9
--- /dev/null
@@ -0,0 +1,44 @@
+!^./tinyos.sh
+!^./tos.mk
+!^./debian
+!^./(patch|configure|build|install)-stamp
+!^./apps/tests/(eyesIFX|mica2|msp430|RadioStress|TestAlarm|TestAMOnOff|TestAMService|TestBroadcast|TestCollection|TestMultihopLqi|TestOscilloscopeLQI|TestPowerManager|TestPowerup|TestPrintf|TestRadioPM|TestScheduler|TestSerialBandwidth|TestSharedResource|TestSimTimers|TestSleep|TestTimerSync|TestTreeRouting|TestTrickleTimer)
+!^/apps/(BlinkAlarm|BlinkMSP430|BlinkTask|BlinkToRadio|Test|TestADC|TestArbiter|TestCC2420|TestRadio|TestSPI|TestScheduler|TestSchedulerTemp|TestSerial)
+!^./doc
+!^./overall-todo.txt
+!^./support/make/Makelocal
+!^./support/make/btnode3.target
+!^./tests
+!^./tools
+!^./tos/chips/Atmega128
+!^./tos/chips/cc2420_pm
+!^./tos/chips/cc1000_pm
+!^./tos/lib/adc
+!^./tos/lib/ByteRadio
+!^./tos/lib/deluge
+!^./tos/lib/net/collection
+!^./tos/lib/oski
+!^./tos/platforms/btnode3
+!/.cvsignore
+!/CVS/
+!/CVS$
+!/.svn/
+!/.svn$
+!^./.git
+!^./.gitignore
+!^./.gbp.conf
+!~$
+!/build/
+!/build$
+!#
+!.class$
+./RadioSenseToLeds/RadioSenseMsg.class
+./MViz/MVizMsg.class
+./tests/cc2420/TestPacketLink/TestPacketLink.class
+./tests/cc2420/TestPacketLink/PacketLinkMsg.class
+./tests/cc2420/TxThroughput/ThroughputMsg.class
+./tests/cc2420/TxThroughput/TxThroughput.class
+./tests/cc2420/LplBroadcastCountToLeds/RadioCountMsg.class
+./tests/cc2420/RssiToSerial/SpecAnalyzer.class
+./tests/cc2420/RssiToSerial/RssiSerialMsg.class
+./RadioCountToLeds/RadioCountMsg.class