blob: 8267af3805397bc495934726081312f0f8d7c68f [file] [log] [blame]
Stewart Smithc4b9bf62018-08-24 13:30:15 +10001#!/bin/bash
2
3set -ex
4set -eo pipefail
5
6if [ -z "$1" ]; then
7 echo "No build distro specified"
8 exit 1;
9fi
10
11if [ -z "$2" ]; then
12 echo "No defconfig to build SDK from specified"
13 exit 1;
14fi
15
16if [ -z "$CCACHE_DIR" ]; then
17 CCACHE_DIR=`pwd`/.op-build_ccache
18fi
19
20shopt -s expand_aliases
21source op-build-env
22
23if [ -n "$DL_DIR" ]; then
24 unset BR2_DL_DIR
25 export BR2_DL_DIR=${DL_DIR}
26fi
27
28export O=`pwd`/output-$1-$2/
29op-build O=$O $2
30./buildroot/utils/config --file $O/.config --set-val BR2_CCACHE y
31./buildroot/utils/config --file $O/.config --set-str BR2_CCACHE_DIR $CCACHE_DIR
32op-build O=$O olddefconfig
33op-build O=$O sdk