From 6fe1376501533dc608d5a1f1d5ce4c32911ee2d2 Mon Sep 17 00:00:00 2001 From: Bart Van Der Meerssche Date: Sun, 19 Dec 2010 21:01:24 +0100 Subject: [PATCH] openwrt: port install shell script to flukso v2 --- mote/v2/openwrt/INSTALL | 2 ++ mote/v2/openwrt/install.sh | 51 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 mote/v2/openwrt/INSTALL create mode 100755 mote/v2/openwrt/install.sh diff --git a/mote/v2/openwrt/INSTALL b/mote/v2/openwrt/INSTALL new file mode 100644 index 0000000..209ed62 --- /dev/null +++ b/mote/v2/openwrt/INSTALL @@ -0,0 +1,2 @@ +To set up a customized OpenWRT Backfire build environment for Flukso targets, just run: +./install.sh /path/you/would/like/to/backfire diff --git a/mote/v2/openwrt/install.sh b/mote/v2/openwrt/install.sh new file mode 100755 index 0000000..d5d8dcd --- /dev/null +++ b/mote/v2/openwrt/install.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash + +USAGE="Usage: ./install " + +if (( $# < 1 )) +then + echo "Error. Not enough arguments." + echo $USAGE + exit 1 +elif (( $# > 1 )) +then + echo "Error. Too many arguments." + echo $USAGE + exit 2 +elif [ $1 == "--help" ] +then + echo $USAGE + exit 3 +fi + +REPO_PATH=$(pwd) +BACKFIRE_PATH=$1 + +# checkout the stock OpenWRT build environment to the path specified on the command line +mkdir -p $BACKFIRE_PATH +svn co svn://svn.openwrt.org/openwrt/branches/backfire $BACKFIRE_PATH + +# add the specific flukso packages as a feed +echo "src-link flukso $REPO_PATH/package" > $BACKFIRE_PATH/feeds.conf +$BACKFIRE_PATH/scripts/feeds update +$BACKFIRE_PATH/scripts/feeds install -a -p flukso + +# copy over the build config settings and the files directory +cp .config $BACKFIRE_PATH +cp -r files $BACKFIRE_PATH + +# add patches to the linux atheros target +cp patches/300-set_AR2315_RESET_GPIO_to_6.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30 +cp patches/310-hotplug_button_jiffies_calc.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30 +cp patches/400-spi_gpio_support.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30 +cp patches/410-spi_gpio_enable_cs_line.patch $BACKFIRE_PATH/target/linux/atheros/patches-2.6.30 + +# patch files of the OpenWRT build system +cd $BACKFIRE_PATH +patch -p0 < $REPO_PATH/patches/900-disable_console.patch +patch -p0 < $REPO_PATH/patches/910-set_ttyS0_baud_to_115200.patch + +# and then build the Fluksometer firmware... +echo To compile this custom backfire build for Flukso, just type: make -j8 +echo Use at least as many jobs as the number of cores available on your build machine. +