Skip to content
Merged
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
20 changes: 6 additions & 14 deletions kernel/scripts/build_kernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,17 @@
# Author: Bjordis Collaku <[email protected]>
# ===================================================

kpath=$BUILD_TOP/qcom-next/arch/arm64/boot
CRD_DTB=$kpath/dts/qcom/x1e80100-crd.dtb
EVK_DTB=$kpath/dts/qcom/hamoa-iot-evk.dtb
QCS6490_DTB=$kpath/dts/qcom/qcs6490-rb3gen2.dtb
QCS8300_DTB=$kpath/dts/qcom/qcs8300-ride.dtb
QCS9100_DTB=$kpath/dts/qcom/qcs9100-ride-r3.dtb
treedir=${1:-$BUILD_TOP/qcom-next/}
kpath="$(cd "$treedir" && pwd)/arch/arm64/boot"

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

# Make config
cd $BUILD_TOP/qcom-next/
cd $treedir
make ARCH=arm64 defconfig qcom.config
# Deploy boot config to out/
cp $BUILD_TOP/qcom-next/.config $BUILD_TOP/out/
cp $treedir/.config $BUILD_TOP/out/

# Make kernel
make ARCH=arm64 -j32;
Expand All @@ -38,9 +34,5 @@ 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

# Deploy device tree blobs to out/
[ -f "$CRD_DTB" ] && cp "$CRD_DTB" "$BUILD_TOP/out/"
[ -f "$EVK_DTB" ] && cp "$EVK_DTB" "$BUILD_TOP/out/"
[ -f "$QCS6490_DTB" ] && cp "$QCS6490_DTB" "$BUILD_TOP/out/"
[ -f "$QCS8300_DTB" ] && cp "$QCS8300_DTB" "$BUILD_TOP/out/"
[ -f "$QCS9100_DTB" ] && cp "$QCS9100_DTB" "$BUILD_TOP/out/"
# 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