diff --git a/BUILD.bazel b/BUILD.bazel index 07ca453610c9..5df071cea56e 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -144,14 +144,30 @@ filegroup( visibility = ["//visibility:public"], ) +# Temp target to fork form build.config.gki.aarch64 which may potentially be +# used elsewhere. +# TODO(b/236012223): Delete this once we have build-config-less builds for GKI. +write_file( + name = "build.config.gki.aarch64_generated", + out = "build.config.gki.aarch64.generated", + content = [ + ". ${ROOT_DIR}/${KERNEL_DIR}/build.config.common", + ". ${ROOT_DIR}/${KERNEL_DIR}/build.config.aarch64", + "", # keep new line at the end + ], + visibility = ["//visibility:private"], +) + common_kernel( name = "kernel_aarch64", outs = DEFAULT_GKI_OUTS, arch = "arm64", - build_config = "build.config.gki.aarch64", + build_config = ":build.config.gki.aarch64_generated", build_gki_artifacts = True, + check_defconfig_minimized = True, ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive", ddk_module_headers = [":all_headers_aarch64"], + defconfig = "arch/arm64/configs/gki_defconfig", extra_dist = [ ":test_mappings_zip", ":tests_zip_arm64", @@ -180,10 +196,12 @@ common_kernel( name = "kernel_aarch64_16k", outs = DEFAULT_GKI_OUTS, arch = "arm64", - build_config = "build.config.gki.aarch64", + build_config = ":build.config.gki.aarch64_generated", build_gki_artifacts = True, + check_defconfig_minimized = True, ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive", ddk_module_headers = [":all_headers_aarch64"], + defconfig = "arch/arm64/configs/gki_defconfig", extra_dist = [ ":test_mappings_zip", ":tests_zip_arm64", @@ -210,9 +228,11 @@ common_kernel( name = "kernel_aarch64_interceptor", outs = DEFAULT_GKI_OUTS, arch = "arm64", - build_config = "build.config.gki.aarch64", + build_config = ":build.config.gki.aarch64_generated", + check_defconfig_minimized = True, ddk_headers_archive = ":kernel_aarch64_ddk_headers_archive", ddk_module_headers = [":all_headers_aarch64"], + defconfig = "arch/arm64/configs/gki_defconfig", enable_interceptor = True, extra_dist = [ ":test_mappings_zip", @@ -225,6 +245,20 @@ common_kernel( visibility = ["//visibility:public"], ) +# Temp target to fork form build.config.gki.x86_64 which may potentially be +# used elsewhere. +# TODO(b/236012223): Delete this once we have build-config-less builds for GKI. +write_file( + name = "build.config.gki.x86_64_generated", + out = "build.config.gki.x86_64.generated", + content = [ + ". ${ROOT_DIR}/${KERNEL_DIR}/build.config.common", + ". ${ROOT_DIR}/${KERNEL_DIR}/build.config.x86_64", + "", # keep new line at the end + ], + visibility = ["//visibility:private"], +) + fail_rule( name = "kernel_x86_64_debug", message = """\ @@ -238,9 +272,11 @@ common_kernel( name = "kernel_x86_64", outs = X86_64_OUTS, arch = "x86_64", - build_config = "build.config.gki.x86_64", + build_config = "build.config.gki.x86_64_generated", build_gki_artifacts = True, + check_defconfig_minimized = True, ddk_module_headers = [":all_headers_x86_64"], + defconfig = "arch/x86/configs/gki_defconfig", extra_dist = [ ":test_mappings_zip", ":tests_zip_x86_64", diff --git a/build.config.gki b/build.config.gki index 4b931d9eb333..1ab17536a63c 100644 --- a/build.config.gki +++ b/build.config.gki @@ -1,2 +1,5 @@ +echo "WARNING: Do not source build.config.gki. + Use kernel_build.defconfig and kernel_build.check_defconfig instead." >&2 + DEFCONFIG=gki_defconfig POST_DEFCONFIG_CMDS="check_defconfig" diff --git a/build.config.gki.aarch64 b/build.config.gki.aarch64 index 3069101736a6..6ed2a4d0aaa3 100644 --- a/build.config.gki.aarch64 +++ b/build.config.gki.aarch64 @@ -1,3 +1,8 @@ +# Note: This file is no longer used by the GKI to build. The file is kept +# here because of external usages. +# TODO(b/236012223): Deprecate and remove this file once build-config-less +# builds are fully supported. + . ${ROOT_DIR}/${KERNEL_DIR}/build.config.common . ${ROOT_DIR}/${KERNEL_DIR}/build.config.aarch64 . ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki diff --git a/build.config.gki.x86_64 b/build.config.gki.x86_64 index d679a20eff43..1098aa19c857 100644 --- a/build.config.gki.x86_64 +++ b/build.config.gki.x86_64 @@ -1,3 +1,8 @@ +# Note: This file is no longer used by the GKI to build. The file is kept +# here because of external usages. +# TODO(b/236012223): Deprecate and remove this file once build-config-less +# builds are fully supported. + . ${ROOT_DIR}/${KERNEL_DIR}/build.config.common . ${ROOT_DIR}/${KERNEL_DIR}/build.config.x86_64 . ${ROOT_DIR}/${KERNEL_DIR}/build.config.gki