尝试make xxx_defconfig然后make savedefconfig,再向defconfig中添加CONFIG

结果提示 savedefconfig does not match 的错误

2024-04-19T02:02:11.png

记得正确编译内核的几个步骤吗,中间还有一步是通过菜单去修改CONFIG,然后保存出来的可以

所以正确操作是在savedefconfig之前去修改.config

不过注意手动修改.config的时候,如果要修改或者添加的已经有xxx not set,记得删掉这个

要不然会有这个警告,当然,无伤大雅。。。

  • warning: override: reassigning to symbol ...

对了,别傻乎乎给gki_defconfig增添config,直接拉去手机对应的分支去改defconfig,因为gki限制严格,会出现下面的异常导致编译不过

 Checking the list of modules:
+ /home/runner/work/KernelSU/KernelSU/android-kernel/build/abi/compare_to_symbol_list /home/runner/work/KernelSU/KernelSU/android-kernel/out/android12-5.10/common/Module.symvers /home/runner/work/KernelSU/KernelSU/android-kernel/out/android12-5.10/common/abi_symbollist.raw
========================================================
 Comparing the KMI and the symbol lists:
ERROR: Differences between ksymtab and symbol list detected!
Symbols missing from ksymtab:
 - __cfi_slowpath
 - kasan_flag_enabled
Symbols missing from symbol list: