..png)
리눅스 커널을 컴파일하려고 합니다5.12.4./linux-5.12.4/arch/x86/boot
kernel.org에서 가져왔으며 오류 없이 컴파일되지만 일반적으로 "Image xyz is Ready"라는 메시지가 표시되지 않고 다른 곳이나 어느 곳에서도 이미지를 찾을 수 없습니다. 내가 실행하는 명령은 다음과 같습니다.
cd linux-5.12.4
cp /boot/config-`uname -r` .config
yes '' | make oldconfig
make clean
time make -j`nproc` bzImage
다음은 출력의 마지막 몇 줄입니다.
CC fs/binfmt_elf.o
CC fs/compat_binfmt_elf.o
CC fs/mbcache.o
CC fs/posix_acl.o
CC fs/coredump.o
CC fs/drop_caches.o
CC fs/fhandle.o
AR fs/built-in.a
real 0m34.893s
user 14m48.740s
sys 1m36.019s
그래서 커널을 컴파일한 것이 이번이 처음은 아니지만, 커널을 마지막으로 컴파일한 지 1년 정도 되어서 뭔가 달라진 것 같은데, 여러 웹사이트에서 찾은 지침을 따랐더니 거의 같은 결과가 나왔습니다. 내용, 내가 무엇을 놓치고 있는지 모르겠습니다. 이전에 이 작업을 수행한 적이 있으며 과거에도 작동했습니다.
나는 또한 그것을 시도했지만 time make -j32 LOCALVERSION=-custom
다시 이미지가 생성되지 않았습니다.
저는 Ubuntu 20.04(AMD Ryzen)를 사용하고 있습니다.
답변1
좋아, 문제를 발견했고(Stephen Kitt 덕분에) 실제로 출력에 오류가 발생했습니다. 이런 식으로 오류가 표시되는 것을 본 것은 이번이 처음입니다. 그래서 다음 명령을 실행했습니다.
time make -j32 bzImage > ~/Desktop/log_std.txt 2> ~/Desktop/log_err.txt
그리고...
make[1]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop.
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1851: certs] Error 2
make: *** Waiting for unfinished jobs....
arch/x86/hyperv/hv_apic.c: In function ‘hv_send_ipi_mask_allbutself’:
arch/x86/hyperv/hv_apic.c:236:1: warning: the frame size of 1032 bytes is larger than 1024 bytes [-Wframe-larger-than=]
236 | }
| ^
그러다가 내가 찾았어이것젠투 포럼에 글을 올리세요:
3193 CONFIG_SYSTEM_TRUSTED_KEYS="n"
You specified that additional keys would be found in file n, but no such file exists. Most likely, you should set this field to be empty, not the string n.
내 파일을 찾아보니 .config
다음과 같은 내용이 있었습니다.
CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
내 경우에는 무슨 일이 일어나는지 확인하기 위해 해당 줄을 주석 처리했습니다.
#CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"
이것이 작동하지 않거나 오류가 발생하면 주어진 조언을 따를 것입니다.
Most likely, you should set this field to be empty
그런 다음
`time make -j32 bzImage`
**Kernel: arch/x86/boot/bzImage is ready** (#2)
real 1m37.761s
user 33m57.677s
sys 4m3.008s
(컴파일 후) 구성을 보면 이제 알 수 있습니다.CONFIG_SYSTEM_TRUSTED_KEYS=""
이제 작동합니다 :)