forked from andreiw/RaspberryPiPkg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild5
executable file
·36 lines (31 loc) · 906 Bytes
/
build5
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
#
# Adjust to taste.
#
# This assumes the following directory structure:
#
# \
# \edk2
# \RaspberryPiPkg
# \gcc-linaro-5.5.0-2017.10-i686_aarch64-linux-gnu
# \build5
#
set -e
export WORKSPACE=$PWD
export PACKAGES_PATH=$WORKSPACE/edk2:$WORKSPACE/RaspberryPiPkg
export EDK_TOOLS_PATH=$WORKSPACE/edk2/BaseTools
export PATH=$PATH:$PWD/gcc-linaro-5.5.0-2017.10-i686_aarch64-linux-gnu/bin
export GCC5_AARCH64_PREFIX=aarch64-linux-gnu-
rm -rf Conf
mkdir Conf
make -C $EDK_TOOLS_PATH
echo $EDK_TOOLS_PATH
. $WORKSPACE/edk2/edksetup.sh BaseTools
pushd $WORKSPACE/RaspberryPiPkg
BUILD_COMMIT=`git rev-parse --short HEAD`
popd
BUILD_DATE=`date +%m/%d/%Y`
BUILD_EPOCH=`date +%s`
COMMON_OPTS="-DBUILD_EPOCH=$BUILD_EPOCH -DBUILD_DATE=$BUILD_DATE -DBUILD_COMMIT=$BUILD_COMMIT"
TARGET="-a AARCH64 -t GCC5 -p RaspberryPiPkg/RaspberryPiPkg.dsc"
build -b DEBUG $TARGET $COMMON_OPTS
build -b RELEASE $TARGET $COMMON_OPTS