1. Use BUILD_CONFIG to build for bluecross or bonito 2. Also add friendly build_*.sh to indicate build command for bluecross and bonito Bug: 119540871 Change-Id: Ia2fd5c08d2b95dad57a26a34cc0bb4a266f969a4 Signed-off-by: Robin Peng <robinpeng@google.com>
24 lines
1.0 KiB
Plaintext
24 lines
1.0 KiB
Plaintext
DEFCONFIG=b1c1_defconfig
|
|
KERNEL_DIR=private/msm-google
|
|
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.common.clang
|
|
PRE_DEFCONFIG_CMDS="pre_defconfig"
|
|
POST_DEFCONFIG_CMDS="check_defconfig"
|
|
POST_KERNEL_BUILD_CMDS="post_kernel_build"
|
|
|
|
function pre_defconfig() {
|
|
# Watch KERNEL_DIR recursively, record all files opened during the build
|
|
rm -f ${OUT_DIR}/kernel-files.tmp1
|
|
inotifywait -m -r -e open --format '%w%f' ${KERNEL_DIR} -o ${OUT_DIR}/kernel-files.tmp1 &
|
|
PID_INOTIFYWAIT=$!
|
|
sleep 5
|
|
}
|
|
|
|
function post_kernel_build() {
|
|
# Stop watching KERNEL_DIR
|
|
kill ${PID_INOTIFYWAIT}
|
|
# Generate list of touched files and merge commit message
|
|
cat ${OUT_DIR}/kernel-files.tmp1 | sed "s,${KERNEL_DIR}/,,g" | sort -u > ${OUT_DIR}/kernel-files.tmp2
|
|
(set +x; for f in $(cat ${OUT_DIR}/kernel-files.tmp2); do [ -f "${KERNEL_DIR}/${f}" ] && echo "${f}"; done > ${OUT_DIR}/kernel-files.txt)
|
|
(cd ${KERNEL_DIR} && ${ROOT_DIR}/build/buildinfo/generate-merge-commit-msg.py HEAD~1..HEAD ${OUT_DIR}/kernel-files.txt > ${OUT_DIR}/merge-commit-msg.txt)
|
|
}
|