From 5aa00a4f8b3536603be349d750853d5dd0c3748d Mon Sep 17 00:00:00 2001 From: Oleg Hahm Date: Wed, 27 Feb 2013 20:22:19 +0100 Subject: [PATCH] * fixed typo in readme * fixed documentation in irq.h * moved tools folder to dist * added check for disk space in build_gnuarm script * fixed gcc check in this script, too --- README.md | 2 +- core/include/irq.h | 13 ++++++------- .../tools}/linux-border_router/Doxyfile | 0 .../tools}/linux-border_router/Makefile | 0 .../tools}/linux-border_router/control_2xxx.c | 0 .../tools}/linux-border_router/control_2xxx.h | 0 .../tools}/linux-border_router/flowcontrol.c | 0 .../tools}/linux-border_router/flowcontrol.h | 0 .../tools}/linux-border_router/main.c | 0 .../tools}/linux-border_router/multiplex.c | 0 .../tools}/linux-border_router/multiplex.h | 0 .../tools}/linux-border_router/serial.c | 0 .../tools}/linux-border_router/serial.h | 0 .../tools}/linux-border_router/serialnumber.c | 0 .../tools}/linux-border_router/serialnumber.h | 0 .../tools}/linux-border_router/sixlowdriver.c | 0 .../tools}/linux-border_router/sixlowdriver.h | 0 .../tools}/linux-border_router/testing.c | 0 .../tools}/linux-border_router/testing.h | 0 {tools => dist/tools}/pyterm/pyterm.py | 0 .../testsuite/build_and_generate_html.sh | 0 .../tools}/testsuite/generate_html.sh | 0 {tools => dist/tools}/testsuite/html/footer | 0 {tools => dist/tools}/testsuite/html/header | 0 .../tools}/testsuite/parse_buildlog.sh | 0 {tools => dist/tools}/testsuite/run_tests.sh | 0 .../tools}/testsuite/svn_test_revision.sh | 0 .../tools}/toolchains/build_gnuarm.sh | 18 ++++++++++++++++-- .../tools}/toolchains/build_gnuarm_naked.sh | 0 29 files changed, 23 insertions(+), 10 deletions(-) rename {tools => dist/tools}/linux-border_router/Doxyfile (100%) rename {tools => dist/tools}/linux-border_router/Makefile (100%) rename {tools => dist/tools}/linux-border_router/control_2xxx.c (100%) rename {tools => dist/tools}/linux-border_router/control_2xxx.h (100%) rename {tools => dist/tools}/linux-border_router/flowcontrol.c (100%) rename {tools => dist/tools}/linux-border_router/flowcontrol.h (100%) rename {tools => dist/tools}/linux-border_router/main.c (100%) rename {tools => dist/tools}/linux-border_router/multiplex.c (100%) rename {tools => dist/tools}/linux-border_router/multiplex.h (100%) rename {tools => dist/tools}/linux-border_router/serial.c (100%) rename {tools => dist/tools}/linux-border_router/serial.h (100%) rename {tools => dist/tools}/linux-border_router/serialnumber.c (100%) rename {tools => dist/tools}/linux-border_router/serialnumber.h (100%) rename {tools => dist/tools}/linux-border_router/sixlowdriver.c (100%) rename {tools => dist/tools}/linux-border_router/sixlowdriver.h (100%) rename {tools => dist/tools}/linux-border_router/testing.c (100%) rename {tools => dist/tools}/linux-border_router/testing.h (100%) rename {tools => dist/tools}/pyterm/pyterm.py (100%) rename {tools => dist/tools}/testsuite/build_and_generate_html.sh (100%) rename {tools => dist/tools}/testsuite/generate_html.sh (100%) rename {tools => dist/tools}/testsuite/html/footer (100%) rename {tools => dist/tools}/testsuite/html/header (100%) rename {tools => dist/tools}/testsuite/parse_buildlog.sh (100%) rename {tools => dist/tools}/testsuite/run_tests.sh (100%) rename {tools => dist/tools}/testsuite/svn_test_revision.sh (100%) rename {tools => dist/tools}/toolchains/build_gnuarm.sh (91%) rename {tools => dist/tools}/toolchains/build_gnuarm_naked.sh (100%) diff --git a/README.md b/README.md index 3aa611805..09fcf6976 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ RIOT OS ======= RIOT - The revolutionary IoT OS! -RIOT OS is an operating system for Internet of Things (IoT) devices. It is basesed on a microkernel and designed for +RIOT OS is an operating system for Internet of Things (IoT) devices. It is based on a microkernel and designed for * energy efficiency * hardware independent development * a high degree of modularity diff --git a/core/include/irq.h b/core/include/irq.h index dddab5620..dd7efa2d2 100644 --- a/core/include/irq.h +++ b/core/include/irq.h @@ -14,17 +14,17 @@ * @file * @brief IRQ driver interface * - * @author Freie Universität Berlin, Computer Systems & Telematics, FeuerWhere project - * @author Michael Baar - * @version $Revision: 1410 $ + * @author Freie Universität Berlin, Computer Systems & Telematics * - * @note $Id$ */ #include /** * @brief This function sets the IRQ disable bit in the status register + * + * @note This function should be used in favour of dINT(). + * * @return previous value of status register */ unsigned disableIRQ(void); @@ -33,7 +33,6 @@ unsigned disableIRQ(void); * @brief This function clears the IRQ disable bit in the status register * @return previous value of status register * - * @example irq-driver-example.c * @see restoreIRQ */ unsigned enableIRQ(void); @@ -42,9 +41,9 @@ unsigned enableIRQ(void); * @brief This function restores the IRQ disable bit in the status register * to the value contained within passed state * @param state state to restore - * @return previous state * - * @example irq-driver-example.c + * @note This function should be used in favour of eINT(). + * * @see disableIRQ */ void restoreIRQ(unsigned state); diff --git a/tools/linux-border_router/Doxyfile b/dist/tools/linux-border_router/Doxyfile similarity index 100% rename from tools/linux-border_router/Doxyfile rename to dist/tools/linux-border_router/Doxyfile diff --git a/tools/linux-border_router/Makefile b/dist/tools/linux-border_router/Makefile similarity index 100% rename from tools/linux-border_router/Makefile rename to dist/tools/linux-border_router/Makefile diff --git a/tools/linux-border_router/control_2xxx.c b/dist/tools/linux-border_router/control_2xxx.c similarity index 100% rename from tools/linux-border_router/control_2xxx.c rename to dist/tools/linux-border_router/control_2xxx.c diff --git a/tools/linux-border_router/control_2xxx.h b/dist/tools/linux-border_router/control_2xxx.h similarity index 100% rename from tools/linux-border_router/control_2xxx.h rename to dist/tools/linux-border_router/control_2xxx.h diff --git a/tools/linux-border_router/flowcontrol.c b/dist/tools/linux-border_router/flowcontrol.c similarity index 100% rename from tools/linux-border_router/flowcontrol.c rename to dist/tools/linux-border_router/flowcontrol.c diff --git a/tools/linux-border_router/flowcontrol.h b/dist/tools/linux-border_router/flowcontrol.h similarity index 100% rename from tools/linux-border_router/flowcontrol.h rename to dist/tools/linux-border_router/flowcontrol.h diff --git a/tools/linux-border_router/main.c b/dist/tools/linux-border_router/main.c similarity index 100% rename from tools/linux-border_router/main.c rename to dist/tools/linux-border_router/main.c diff --git a/tools/linux-border_router/multiplex.c b/dist/tools/linux-border_router/multiplex.c similarity index 100% rename from tools/linux-border_router/multiplex.c rename to dist/tools/linux-border_router/multiplex.c diff --git a/tools/linux-border_router/multiplex.h b/dist/tools/linux-border_router/multiplex.h similarity index 100% rename from tools/linux-border_router/multiplex.h rename to dist/tools/linux-border_router/multiplex.h diff --git a/tools/linux-border_router/serial.c b/dist/tools/linux-border_router/serial.c similarity index 100% rename from tools/linux-border_router/serial.c rename to dist/tools/linux-border_router/serial.c diff --git a/tools/linux-border_router/serial.h b/dist/tools/linux-border_router/serial.h similarity index 100% rename from tools/linux-border_router/serial.h rename to dist/tools/linux-border_router/serial.h diff --git a/tools/linux-border_router/serialnumber.c b/dist/tools/linux-border_router/serialnumber.c similarity index 100% rename from tools/linux-border_router/serialnumber.c rename to dist/tools/linux-border_router/serialnumber.c diff --git a/tools/linux-border_router/serialnumber.h b/dist/tools/linux-border_router/serialnumber.h similarity index 100% rename from tools/linux-border_router/serialnumber.h rename to dist/tools/linux-border_router/serialnumber.h diff --git a/tools/linux-border_router/sixlowdriver.c b/dist/tools/linux-border_router/sixlowdriver.c similarity index 100% rename from tools/linux-border_router/sixlowdriver.c rename to dist/tools/linux-border_router/sixlowdriver.c diff --git a/tools/linux-border_router/sixlowdriver.h b/dist/tools/linux-border_router/sixlowdriver.h similarity index 100% rename from tools/linux-border_router/sixlowdriver.h rename to dist/tools/linux-border_router/sixlowdriver.h diff --git a/tools/linux-border_router/testing.c b/dist/tools/linux-border_router/testing.c similarity index 100% rename from tools/linux-border_router/testing.c rename to dist/tools/linux-border_router/testing.c diff --git a/tools/linux-border_router/testing.h b/dist/tools/linux-border_router/testing.h similarity index 100% rename from tools/linux-border_router/testing.h rename to dist/tools/linux-border_router/testing.h diff --git a/tools/pyterm/pyterm.py b/dist/tools/pyterm/pyterm.py similarity index 100% rename from tools/pyterm/pyterm.py rename to dist/tools/pyterm/pyterm.py diff --git a/tools/testsuite/build_and_generate_html.sh b/dist/tools/testsuite/build_and_generate_html.sh similarity index 100% rename from tools/testsuite/build_and_generate_html.sh rename to dist/tools/testsuite/build_and_generate_html.sh diff --git a/tools/testsuite/generate_html.sh b/dist/tools/testsuite/generate_html.sh similarity index 100% rename from tools/testsuite/generate_html.sh rename to dist/tools/testsuite/generate_html.sh diff --git a/tools/testsuite/html/footer b/dist/tools/testsuite/html/footer similarity index 100% rename from tools/testsuite/html/footer rename to dist/tools/testsuite/html/footer diff --git a/tools/testsuite/html/header b/dist/tools/testsuite/html/header similarity index 100% rename from tools/testsuite/html/header rename to dist/tools/testsuite/html/header diff --git a/tools/testsuite/parse_buildlog.sh b/dist/tools/testsuite/parse_buildlog.sh similarity index 100% rename from tools/testsuite/parse_buildlog.sh rename to dist/tools/testsuite/parse_buildlog.sh diff --git a/tools/testsuite/run_tests.sh b/dist/tools/testsuite/run_tests.sh similarity index 100% rename from tools/testsuite/run_tests.sh rename to dist/tools/testsuite/run_tests.sh diff --git a/tools/testsuite/svn_test_revision.sh b/dist/tools/testsuite/svn_test_revision.sh similarity index 100% rename from tools/testsuite/svn_test_revision.sh rename to dist/tools/testsuite/svn_test_revision.sh diff --git a/tools/toolchains/build_gnuarm.sh b/dist/tools/toolchains/build_gnuarm.sh similarity index 91% rename from tools/toolchains/build_gnuarm.sh rename to dist/tools/toolchains/build_gnuarm.sh index 3c8c01ee0..7d0d4b6be 100755 --- a/tools/toolchains/build_gnuarm.sh +++ b/dist/tools/toolchains/build_gnuarm.sh @@ -4,7 +4,8 @@ PREFIX=${HOME}/gnuarm # directory to download source files and store intermediates -GNUARM_BUILDDIR=${GNUARM_BUILDDIR:-"/tmp/gnuarm-${USER}"} +TMP_DIR=/var/tmp +GNUARM_BUILDDIR=${GNUARM_BUILDDIR:-"${TMP_DIR}/gnuarm-${USER}"} GCC_VER=4.7.2 GCC_MD5=cc308a0891e778cfda7a151ab8a6e762 @@ -29,7 +30,10 @@ DOWNLOADER_OPTS="-nv -c" # FILES=. -HOST_GCC_VER=`gcc --version | awk '{ if (NR == 1) { print $4 } }'` +HOST_GCC_VER=`gcc --version | awk '/gcc/{print $NF}'` + +SPACE_NEEDED=2641052 +FREETMP=`df ${TMP_DIR} | awk '{ if (NR == 2) print $4}'` build_binutils() { echo "Building binutils..." @@ -138,8 +142,18 @@ download_file() { echo "${3} ${2}" | md5sum -c - } +check_space() { + echo "Checkign disk space in ${TMP_DIR}" + if [ $FREETMP -lt $SPACE_NEEDED ] + then + echo "Not enough available space in ${TMP_DIR}. Minimum ${SPACE_NEEDED} free bytes required." + exit 1 + fi +} + build_all() { echo "Starting in ${GNUARM_BUILDDIR}. Installing to ${PREFIX}." + check_space && download && build_binutils && extract_newlib && diff --git a/tools/toolchains/build_gnuarm_naked.sh b/dist/tools/toolchains/build_gnuarm_naked.sh similarity index 100% rename from tools/toolchains/build_gnuarm_naked.sh rename to dist/tools/toolchains/build_gnuarm_naked.sh