summaryrefslogtreecommitdiffstats
path: root/carl9170fw/autogen.sh
diff options
context:
space:
mode:
Diffstat (limited to 'carl9170fw/autogen.sh')
-rwxr-xr-xcarl9170fw/autogen.sh47
1 files changed, 47 insertions, 0 deletions
diff --git a/carl9170fw/autogen.sh b/carl9170fw/autogen.sh
new file mode 100755
index 0000000..6843f19
--- /dev/null
+++ b/carl9170fw/autogen.sh
@@ -0,0 +1,47 @@
+#!/bin/bash
+
+set -e
+
+case "$1" in
+ config)
+ echo "Configuring..."
+ pushd config
+ cmake .
+ make
+ popd
+ config/conf Kconfig
+ cmake .
+ ;;
+
+ compile)
+ echo "Compile time..."
+ make
+ ;;
+
+ install)
+ if [ ! -e .config ]; then
+ exit 1
+ fi
+
+ . ./.config
+ make
+
+ echo -n "Installing firmware..."
+ if [ "$CONFIG_CARL9170FW_BUILD_TOOLS" = "y" ] &&
+ [ "$CONFIG_CARL9170FW_BUILD_MINIBOOT" = "y" ]; then
+ echo -n "Apply miniboot..."
+ tools/src/miniboot a carlfw/carl9170.fw minifw/miniboot.fw
+ fi
+
+ install -m 644 carlfw/carl9170.fw \
+ ../carl9170-$CONFIG_CARL9170FW_RELEASE_VERSION.fw
+ echo "done."
+ ;;
+
+ *)
+ $0 config
+ $0 compile
+ ;;
+
+
+esac