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: https://android.googlesource.com/kernel/devices/google/felix/+/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?
arch/arm64/configs/gki_defconfig? How have you tried to confirm if your assumption is true? BTW "I am updating the config as follows: ..." - This should actually be preceded with amake distcleanormake mrproper. "Then I build ..." - Instead of sitting back and waiting for the build to complete, review the output on the screen to see what is actually performed.makecommand to build the kernel, or is there something else?make savedefconfig) differs. Usescripts/diffconfig. I suspect that your changes somehow not applicable to the machine in question. Most likely due to some kernel configuration dependencies or limitations.