aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>2020-08-11 22:43:50 +0530
committerVijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>2020-10-11 19:00:11 +0530
commit8ffc138d8317016f83897dcbe3277f5ce8dd27e2 (patch)
treec23197f93be2829220cf548ec8d546eb8e457c8e
parent8c5db851606628e3ae0b26c5bc0720028a41c1c2 (diff)
build-*.sh: use parallelism to make build faster
Use $PARALLELISM for make builds to spawn multiple jobs. This results in better utilization of multi-core processor in the host machine used for build resulting in lesser build time. Change-Id: I2986a0ba3baf1db7409f55c018a4ebbcf6ccbc73 Signed-off-by: Vijayenthiran Subramaniam <vijayenthiran.subramaniam@arm.com>
-rwxr-xr-xbuild-arm-tf.sh4
-rwxr-xr-xbuild-grub.sh2
-rwxr-xr-xbuild-mbedv2.sh4
-rwxr-xr-xbuild-scp.sh2
-rwxr-xr-xbuild-tftf.sh2
-rwxr-xr-xbuild-uefi.sh4
6 files changed, 9 insertions, 9 deletions
diff --git a/build-arm-tf.sh b/build-arm-tf.sh
index a001a19..8211279 100755
--- a/build-arm-tf.sh
+++ b/build-arm-tf.sh
@@ -83,8 +83,8 @@ do_build ()
done
# make tools
- make certtool
- make fiptool
+ make -j $PARALLELISM certtool
+ make -j $PARALLELISM fiptool
popd
fi
}
diff --git a/build-grub.sh b/build-grub.sh
index 3915465..9a14dd5 100755
--- a/build-grub.sh
+++ b/build-grub.sh
@@ -61,7 +61,7 @@ do_build ()
./autogen.sh
./configure STRIP=$CROSS_COMPILE_DIR/aarch64-linux-gnu-strip --target=aarch64-linux-gnu --with-platform=efi --prefix=$TOP_DIR/$GRUB_PATH/output/ --disable-werror
fi
- make -j8 install
+ make -j $PARALLELISM install
output/bin/grub-mkimage -v -c ${GRUB_PLAT_CONFIG_FILE} -o output/grubaa64.efi -O arm64-efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux help part_msdos terminal terminfo configfile lsefi search normal gettext loadenv read search_fs_file search_fs_uuid search_label
fi
fi
diff --git a/build-mbedv2.sh b/build-mbedv2.sh
index 5341e80..aa862e9 100755
--- a/build-mbedv2.sh
+++ b/build-mbedv2.sh
@@ -49,8 +49,8 @@ do_build ()
for app in $MBEDV2_APPS; do
for plat in $MBEDV2_PLATS; do
- python build.py -m $plat -t GCC_ARM -j 16
- python make.py -m $plat -t GCC_ARM -n $app -j 16
+ python build.py -m $plat -t GCC_ARM -j $PARALLELISM
+ python make.py -m $plat -t GCC_ARM -n $app -j $PARALLELISM
python project.py -m $plat -i gcc_arm -n $app
done
done
diff --git a/build-scp.sh b/build-scp.sh
index fa8e401..49a34f6 100755
--- a/build-scp.sh
+++ b/build-scp.sh
@@ -63,7 +63,7 @@ do_build ()
local outdir=$TOP_DIR/$SCP_PATH/output
mkdir -p ${outdir}
- make PRODUCT=$item MODE=$SCP_BUILD_MODE CC=${SCP_COMPILER_PATH}/arm-eabi-gcc
+ make -j $PARALLELISM PRODUCT=$item MODE=$SCP_BUILD_MODE CC=${SCP_COMPILER_PATH}/arm-eabi-gcc
cp -r build/product/$item/* ${outdir}/
done
popd
diff --git a/build-tftf.sh b/build-tftf.sh
index 349831f..174feaa 100755
--- a/build-tftf.sh
+++ b/build-tftf.sh
@@ -47,7 +47,7 @@ do_build ()
pushd $TOP_DIR/$TFTF_PATH
for plat in $TFTF_PLATS; do
- make PLAT=${plat} DEBUG=${TFTF_DEBUG_ENABLED} TEST_REPORTS="${TFTF_REPORTS}"
+ make -j $PARALLELISM PLAT=${plat} DEBUG=${TFTF_DEBUG_ENABLED} TEST_REPORTS="${TFTF_REPORTS}"
done
popd
fi
diff --git a/build-uefi.sh b/build-uefi.sh
index 289fd2f..56ba3c2 100755
--- a/build-uefi.sh
+++ b/build-uefi.sh
@@ -53,13 +53,13 @@ do_build ()
if [ "$UEFI_BUILD_ENABLED" == "1" ]; then
pushd $TOP_DIR/$UEFI_ACPICA_PATH
unset HOST
- make iasl
+ make -j $PARALLELISM iasl
popd
pushd $TOP_DIR/$UEFI_PATH
CROSS_COMPILE_DIR=$(dirname $CROSS_COMPILE)
PATH="$PATH:$CROSS_COMPILE_DIR"
source ./edksetup.sh
- make -C BaseTools
+ make -j $PARALLELISM -C BaseTools
export EDK2_TOOLCHAIN=$UEFI_TOOLCHAIN
export ${UEFI_TOOLCHAIN}_AARCH64_PREFIX=$CROSS_COMPILE
local vars=