build.config.bonito_lts 1.0 KB

1234567891011121314151617181920212223
  1. DEFCONFIG=bonito_defconfig
  2. KERNEL_DIR=private/msm-google
  3. . ${ROOT_DIR}/${KERNEL_DIR}/build.config.common.clang
  4. PRE_DEFCONFIG_CMDS="pre_defconfig"
  5. POST_DEFCONFIG_CMDS="check_defconfig"
  6. POST_KERNEL_BUILD_CMDS="post_kernel_build"
  7. function pre_defconfig() {
  8. # Watch KERNEL_DIR recursively, record all files opened during the build
  9. rm -f ${OUT_DIR}/kernel-files.tmp1
  10. inotifywait -m -r -e open --format '%w%f' ${KERNEL_DIR} -o ${OUT_DIR}/kernel-files.tmp1 &
  11. PID_INOTIFYWAIT=$!
  12. sleep 5
  13. }
  14. function post_kernel_build() {
  15. # Stop watching KERNEL_DIR
  16. kill ${PID_INOTIFYWAIT}
  17. # Generate list of touched files and merge commit message
  18. cat ${OUT_DIR}/kernel-files.tmp1 | sed "s,${KERNEL_DIR}/,,g" | sort -u > ${OUT_DIR}/kernel-files.tmp2
  19. (set +x; for f in $(cat ${OUT_DIR}/kernel-files.tmp2); do [ -f "${KERNEL_DIR}/${f}" ] && echo "${f}"; done > ${OUT_DIR}/kernel-files.txt)
  20. (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)
  21. }