summaryrefslogtreecommitdiffstats
path: root/ci/build-sdk.sh
blob: 8267af3805397bc495934726081312f0f8d7c68f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/bash

set -ex
set -eo pipefail

if [ -z "$1" ]; then
	echo "No build distro specified"
	exit 1;
fi

if [ -z "$2" ]; then
	echo "No defconfig to build SDK from specified"
	exit 1;
fi

if [ -z "$CCACHE_DIR" ]; then
	CCACHE_DIR=`pwd`/.op-build_ccache
fi

shopt -s expand_aliases
source op-build-env

if [ -n "$DL_DIR" ]; then
	unset BR2_DL_DIR
	export BR2_DL_DIR=${DL_DIR}
fi

export O=`pwd`/output-$1-$2/
op-build O=$O $2
./buildroot/utils/config --file $O/.config --set-val BR2_CCACHE y
./buildroot/utils/config --file $O/.config --set-str BR2_CCACHE_DIR $CCACHE_DIR
op-build O=$O olddefconfig
op-build O=$O sdk
OpenPOWER on IntegriCloud