blob: 1730e28908225b0e3686e198f7c939d234837ea6 [file] [log] [blame]
Stewart Smith098d03e2016-03-01 13:59:42 +11001#!/bin/bash
2
3set -ex
4set -eo pipefail
5
6DEFCONFIGS=`(cd openpower/configs; ls -1 *_defconfig)`
7
8if [ -z "$1" or ! -d "$1" ]; then
9 echo "No output directory specified"
10 exit 1;
11fi
12
13if [ -z "$CCACHE_DIR" ]; then
14 CCACHE_DIR=`pwd`/.op-build_ccache
15fi
16
17shopt -s expand_aliases
18source op-build-env
19
20for i in $DEFCONFIGS; do
21 op-build $i
22 echo 'BR2_CCACHE=y' >> output/.config
23 echo "BR2_CCACHE_DIR=\"$CCACHE_DIR\"" >> output/.config
24 echo 'BR2_CCACHE_INITIAL_SETUP=""' >> output/.config
25
26 op-build olddefconfig
27 op-build
28 r=$?
29 mkdir $1/$i-images
30 mv output/images/* $1/$i-images/
31 mv output/.config $1/$i-images/.config
32 lsb_release -a > $1/$i-images/lsb_release
33 rm -rf output/*
34 if [ $r -ne 0 ]; then
35 exit $r
36 fi
37done
38