I am trying to build a GKI kernel image from aosp. After updating the kernel config, the build does not seem to use my config. Instead, it always uses some default config.
How can I build with custom kernel configs?
I am using this branch: /+/refs/heads/android-gs-felix-6.1-android15-qpr2-beta
I am updating the config as follows:
CC=clang ARCH=arm64 LLVM=1 make gki_defconfig
CC=clang ARCH=arm64 LLVM=1 make nconfig #this is where I edit
CC=clang ARCH=arm64 LLVM=1 make savedefconfig
mv defconfig arch/arm64/configs/gki_defconfig
make mrproper
Then I build
ENABLE_STRICT_KMI=0 BUILD_AOSP_KERNEL=1 ./build_felix.sh --kernel_package=@//aosp
But on inspecting the kernel inside the boot.img using extract-ikconfig, I find that my config changes are not present. It seem to be reset.
This workflow used to work in older aosp branches but doesn't in newer ones. I also tried using bazel but in vain
tools/bazel run //common:kernel_aarch64_config -- nconfig
How can I build with custom kernel configs?