aboutsummaryrefslogtreecommitdiff
path: root/build_server.sh
blob: 48664647dec36d05a37873b62c02ead3ea578aed (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
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
# This build script is used by the build server.
# It's supposed to be executed in the directory where it lives.

set -x -e

if [ -z $BUILD_CONFIG ]; then
  echo "Please set BUILD_CONFIG!"
  exit 2
fi

if [ -z $BUILD_OUTPUT ]; then
  echo "Please set output dir BUILD_OUTPUT!"
  exit 2
fi

if [ -z $BUILD_JOBS ]; then
  BUILD_JOBS=10
fi

FILES_TO_ARCHIVE="u-boot.img spl/u-boot-spl.bin"

export ARCH=arm
export CROSS_COMPILE=arm-eabi-

make clean
make $BUILD_CONFIG
make -j $BUILD_JOBS
mkdir -p $BUILD_OUTPUT
cp -f $FILES_TO_ARCHIVE $BUILD_OUTPUT

if [ "$BUILD_CONFIG" = "omap4_tungsten_config" ]; then
make clean
make MFG=1 $BUILD_CONFIG
make MFG=1 -j $BUILD_JOBS
cp -f u-boot.img $BUILD_OUTPUT/factory_u-boot.img

make clean
make FORCE_FBT=1 $BUILD_CONFIG
make FORCE_FBT=1 -j $BUILD_JOBS
cp -f u-boot.bin $BUILD_OUTPUT/3RD.unsigned
fi