-
Notifications
You must be signed in to change notification settings - Fork 3
/
builduefi.sh
executable file
·41 lines (38 loc) · 1.25 KB
/
builduefi.sh
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
#!/bin/bash
if [ -z "${BIOS_WORKSPACE}" ] ; then
echo "BIOS_WORKSPACE must be set!"
exit
fi
NPROC=`nproc`
if [ $NPROC -gt 1 ] ; then
NPROC=`expr $NPROC - 1`
fi
if [ "${SDK_VER}" = "4.4" ]; then
export WORKSPACE= # for Jenkins' workspace to not interfere with UEFI's one
export EDK_TOOLS_PATH=${BIOS_WORKSPACE}/edk2/BaseTools
export GCC6_AARCH64_PREFIX=${CROSS}
cd ${BIOS_WORKSPACE}/edk2
if ! [ -f ./Conf/target.txt ] ; then
mkdir -p ${BIOS_WORKSPACE}/edk2/Conf
. ./edksetup.sh --reconfig || exit
else
. ./edksetup.sh || exit
fi
build -p ArmBaikalPkg/ArmBaikalBfkm.dsc -b ${BUILD_TYPE} ${UEFI_FLAGS} || exit
else
export WORKSPACE=${BIOS_WORKSPACE}
export EDK_TOOLS_PATH=${BIOS_WORKSPACE}/edk2/BaseTools
export GCC5_AARCH64_PREFIX=${CROSS}
export ARCH=AARCH64
export PACKAGES_PATH=${WORKSPACE}/edk2:${WORKSPACE}/edk2-non-osi:${WORKSPACE}/edk2-platform-baikal
cd ${BIOS_WORKSPACE}
if ! [ -f edk2/Conf/target.txt ] ; then
. edk2/edksetup.sh --reconfig || exit
else
. edk2/edksetup.sh || exit
fi
echo "Running build -p Platform/Baikal/Baikal.dsc -b ${BUILD_TYPE} -a ${ARCH} -t GCC5 -n ${NPROC} ${UEFI_FLAGS}"
build -p Platform/Baikal/Baikal.dsc -b ${BUILD_TYPE} -a ${ARCH} -t GCC5 -n ${NPROC} ${UEFI_FLAGS} || exit
fi
echo "UEFI build: Done"
exit 0