blob: 14f57623201f647b20962d909978332cd105484d [file] [log] [blame]
. ${ROOT_DIR}/common-modules/virtual-device/build.config.virtual_device
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.x86_64
. ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki_kprobes
DEFCONFIG=cf_x86_64_gki_defconfig
# HACK: bug in bash 5.2 that if the last command of the eval in a subshell is not a built-in
# command, the subshell exits prematurely. This is fixed in 5.2.15 but we leave
# this hack in until bash becomes hermetic (unlikely).
# See b/275468906#comment8
PRE_DEFCONFIG_CMDS="mkdir -p \${OUT_DIR}/arch/x86/configs && \
KCONFIG_CONFIG=\${OUT_DIR}/arch/x86/configs/${DEFCONFIG} \
${ROOT_DIR}/${KERNEL_DIR}/scripts/kconfig/merge_config.sh -m -r \
${ROOT_DIR}/${KERNEL_DIR}/arch/x86/configs/gki_defconfig \
${ROOT_DIR}/common-modules/virtual-device/virtual_device_core.fragment \
${ROOT_DIR}/common-modules/virtual-device/virtual_device.fragment" && \
true"
POST_DEFCONFIG_CMDS="update_kprobes_config"
DO_NOT_STRIP_MODULES=1
function update_kprobes_config() {
${KERNEL_DIR}/scripts/config --file ${OUT_DIR}/.config \
-d LTO \
-d LTO_CLANG_THIN \
-d CFI \
-d CFI_PERMISSIVE \
-d CFI_CLANG \
-e CONFIG_DYNAMIC_FTRACE \
-e CONFIG_FUNCTION_TRACER \
-e CONFIG_IRQSOFF_TRACER \
-e CONFIG_FUNCTION_PROFILER \
-e CONFIG_PREEMPT_TRACER \
-e CONFIG_CHECKPOINT_RESTORE \
-d CONFIG_RANDOMIZE_BASE
(cd ${OUT_DIR} && \
make ${TOOL_ARGS} O=${OUT_DIR} olddefconfig)
}
# Not saving any kernel images. This build step is meant purely to generate the .kos.
FILES=""