diff options
author | Jeevan Shriram <jshriram@codeaurora.org> | 2020-12-16 11:46:43 -0800 |
---|---|---|
committer | Jeevan Shriram <jshriram@codeaurora.org> | 2020-12-16 11:50:57 -0800 |
commit | f90523ca9bf80e74181aa18201caa50d516c4de6 (patch) | |
tree | ff6950d07271f25d0da06b4bf1d823d6543dbe8a | |
parent | ae347cd1f51412389d217558af10918ecae2dfa4 (diff) |
kernelscripts: Add support for modules_prepare for modules
Add support for modules_prepare for preparing kernel for compiling
external modules in parallel. This helps in saving complete android
build time of 10-15 minutes approximately as external modules are
compiled early on without waiting for the kernel image to compile first.
Change-Id: Ibacb40fc9e22725366f39e3d79f474db336768b1
-rwxr-xr-x | buildkernel.sh | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/buildkernel.sh b/buildkernel.sh index 6880d95..26eaaf0 100755 --- a/buildkernel.sh +++ b/buildkernel.sh @@ -74,6 +74,18 @@ headers_install() set +x } +# Module preparations before kernel compilation +make_modules_prepare() +{ + echo "======================" + echo "Make modules_prepare for external modules" + set -x + (cd ${OUT_DIR} && \ + ${MAKE_PATH}make HOSTCFLAGS="${TARGET_INCLUDES}" HOSTLDFLAGS="${TARGET_LINCLUDES}" ARCH=${ARCH} CROSS_COMPILE=${CROSS_COMPILE} O=${OUT_DIR} ${CC_ARG} ${MAKE_ARGS} modules_prepare) + set +x + +} + # Building Kernel build_kernel() { @@ -388,9 +400,9 @@ fi if [ "${HEADERS_INSTALL}" -ne "0" ]; then make_defconfig headers_install +# Also prepare for external module compilation + make_modules_prepare else - make_defconfig - headers_install build_kernel modules_install copy_all_to_prebuilt ${KERNEL_BINS} |