Debianでカーネルをビルドする際に以下のエラーが発生して,ビルドが停止した.
make # SYSTBL arch/x86/include/generated/asm/syscalls_32.h # SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h # SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h # SYSTBL arch/x86/include/generated/asm/syscalls_64.h # HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h # SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h # SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h # SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h # . # . # . # . # CC kernel/memremap.o # CC kernel/rseq.o # AR kernel/built-in.a # CC certs/system_keyring.o # make[1]: *** No rule to make target 'debian/certs/debian-uefi-certs.pem', needed by 'certs/x509_certificate_list'. Stop. # make: *** [Makefile:1071: certs] Error 2
make[1]: *** No rule to make target 'debian/certs/debian-uefi-certs.pem', needed by 'certs/x509_certificate_list'. Stop. make: *** [Makefile:1071: certs] Error 2
解決方法を探っていたところ,この公式ドキュメントを見つけた.
Alternatively, you can use the configuration from a Debian-built kernel that you already have installed by copying the /boot/config-* file to .config and then running make oldconfig to only answer new questions. If you do this, ensure that you modify the configuration to set:
CONFIG_SYSTEM_TRUSTED_KEYS = ""
とあるため,これに従い,一応リセットしたのち,.config
の中身を修正する.
make clean && make mrproper
make menuconfig # menuconfigに限らず,任意の方法で.configを生成
cat .config | grep "CONFIG_SYSTEM_TRUSTED_KEYS" # CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/debian-uefi-certs.pem"
となっているところを,
cat .config | grep "CONFIG_SYSTEM_TRUSTED_KEYS" # CONFIG_SYSTEM_TRUSTED_KEYS=""
このように変更する.