Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions kernel/scripts/build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@
#
# Author: Bjordis Collaku <bcollaku@qti.qualcomm.com>
# ===================================================
set -euo pipefail

treedir=${1:-$BUILD_TOP/qcom-next/}
kpath="$(cd "$treedir" && pwd)/arch/arm64/boot"

# Clean previous build
rm -rf $BUILD_TOP/out/*;
rm -rf $OUT_PATH/*;

# Make config
cd $treedir
Expand All @@ -24,15 +25,15 @@ make ARCH=arm64 defconfig qcom.config
cp $treedir/.config $BUILD_TOP/out/

# Make kernel
make ARCH=arm64 -j32;
make ARCH=arm64 -j$(nproc)
# Deploy kernel Image to out/
cp $kpath/Image $BUILD_TOP/out/
cp $KPATH/Image $OUT_PATH

# Make modules
mkdir -p $BUILD_TOP/out/modules/
mkdir -p $OUT_PATH/modules/
make ARCH=arm64 modules
# Deploy kernel modules to out/
make ARCH=arm64 modules_install INSTALL_MOD_PATH=$BUILD_TOP/out/modules INSTALL_MOD_STRIP=1
make ARCH=arm64 modules_install INSTALL_MOD_PATH=$OUT_PATH/modules INSTALL_MOD_STRIP=1

# Deploy ALL device tree blobs (*.dtb) to out/ (recursively)
find "$kpath/dts" -type f -name '*.dtb' -print0 | xargs -0 -I{} cp "{}" "$BUILD_TOP/out/"
Loading