[Mod] 支持bear生成compile_commands.json文件生成:uboot、kernel、modules
This commit is contained in:
@ -147,7 +147,7 @@ function build_uboot()
|
|||||||
cp -f "$OUTPUT_DIR"/fip_pre/fip_pre_${ATF_KEY_SEL}.bin \
|
cp -f "$OUTPUT_DIR"/fip_pre/fip_pre_${ATF_KEY_SEL}.bin \
|
||||||
"$OUTPUT_DIR"/fip_pre/fip_pre.bin
|
"$OUTPUT_DIR"/fip_pre/fip_pre.bin
|
||||||
|
|
||||||
make u-boot
|
bear --append --output ${TOP_DIR}/compile_commands.json -- make u-boot
|
||||||
)}
|
)}
|
||||||
|
|
||||||
function build_uboot_env_tools()
|
function build_uboot_env_tools()
|
||||||
@ -193,7 +193,7 @@ function build_kernel()
|
|||||||
print_notice "Run ${FUNCNAME[0]}() function"
|
print_notice "Run ${FUNCNAME[0]}() function"
|
||||||
_build_kernel_env
|
_build_kernel_env
|
||||||
cd "$BUILD_PATH" || return
|
cd "$BUILD_PATH" || return
|
||||||
make kernel || return "$?"
|
bear --append --output ${TOP_DIR}/compile_commands.json -- make kernel
|
||||||
|
|
||||||
# generate boot.itb image.
|
# generate boot.itb image.
|
||||||
if [[ ${1} != noitb ]]; then
|
if [[ ${1} != noitb ]]; then
|
||||||
@ -313,7 +313,7 @@ function build_osdrv()
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "$OSDRV_PATH"
|
pushd "$OSDRV_PATH"
|
||||||
make KERNEL_DIR="$KERNEL_PATH"/"$KERNEL_OUTPUT_FOLDER" INSTALL_DIR="$SYSTEM_OUT_DIR"/ko "$osdrv_target" || return "$?"
|
bear --append --output ${TOP_DIR}/compile_commands.json -- make KERNEL_DIR="$KERNEL_PATH"/"$KERNEL_OUTPUT_FOLDER" INSTALL_DIR="$SYSTEM_OUT_DIR"/ko "$osdrv_target" || return "$?"
|
||||||
popd
|
popd
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user