linux-6.0.10 の Debian 11.5.0 へのインストールログです.複数のトラブルが発生します.
sudo su -
apt -y update
apt -y install make gcc flex bison libssl-dev libelf-dev
cd /usr/src
wget https: //cdn.kernel.org/pub /linux/kernel /v6.x/linux -6.0 .10 .tar.xz
tar xfJ linux-6.0 .10 .tar.xz
cd linux-6.0 .10
cp /boot/config-5.10 .0 -19 -amd64 .config
make oldconfig
make oldconfig の質問への回答は,結局 Enter を連打することになると思います.
make oldconfigで,
-bash: make: command not found
となってしまったら,
apt -y install make
を忘れています.
make oldconfigで,
HOSTCC scripts/basic/fixdep /bin/sh: 1: gcc: not found make[1]: *** [scripts/Makefile.host:95: scripts/basic/fixdep] Error 127 make: *** [Makefile:568: scripts_basic] Error 2
となってしまったら,
apt -y install gcc
を忘れています.
make oldconfigで,
LEX scripts/kconfig/lexer.lex.c /bin/sh: 1: flex: not found make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127 make: *** [Makefile:632: oldconfig] Error 2
となってしまったら,
apt -y install flex
を忘れています.
make oldconfigで,
YACC scripts/kconfig/parser.tab.[ch] /bin/sh: 1: bison: not found make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127 make: *** [Makefile:632: oldconfig] Error 2
となってしまったら,
apt -y install bison
を忘れています.
cp .config .config .bak
vi .config
vi .config は以下の1カ所の修正をする
9841行目 CONFIG_SYSTEM_TRUSTED_KEYS="debian/certs/debian-uefi-certs.pem" ↓ CONFIG_SYSTEM_TRUSTED_KEYS=""
make -j8 bzImage
HOSTCC scripts/sign-file scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory 25 | #include <openssl/opensslv.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make[1]: *** [scripts/Makefile.host:95: scripts/sign-file] Error 1 make: *** [Makefile:1189: scripts] Error 2
となってしまったら
apt -y install libssl-dev
を忘れている.
<stdin>:1:10: fatal error: libelf.h: No such file or directory compilation terminated. CC /usr/src/linux-6.0.10/tools/objtool/arch/x86/special.o In file included from /usr/src/linux-6.0.10/tools/objtool/include/objtool/objtool.h:13, from /usr/src/linux-6.0.10/tools/objtool/include/objtool/arch.h:11, from /usr/src/linux-6.0.10/tools/objtool/include/objtool/check.h:11, from /usr/src/linux-6.0.10/tools/objtool/include/objtool/special.h:10, from arch/x86/special.c:4: /usr/src/linux-6.0.10/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory 10 | #include <gelf.h> | ^~~~~~~~ compilation terminated. make[4]: *** [/usr/src/linux-6.0.10/tools/build/Makefile.build:97: /usr/src/linux-6.0.10/tools/objtool/arch/x86/special.o] Error 1 make[3]: *** [/usr/src/linux-6.0.10/tools/build/Makefile.build:139: arch/x86] Error 2 make[2]: *** [Makefile:54: /usr/src/linux-6.0.10/tools/objtool/objtool-in.o] Error 2 make[1]: *** [Makefile:73: objtool] Error 2 make: *** [Makefile:1348: tools/objtool] Error 2
となってしまったら
apt -y install libelf-dev
を忘れている.
CHK include/generated/compile.h make[1]: *** No rule to make target 'debian/certs/debian-uefi-certs.pem', needed by 'certs/x509_certificate_list'. Stop. make: *** [Makefile:1852: certs] Error 2
となってしまったら
vi .config の修正を忘れている.
make -j8 modules
make modules_install install
#linux #debian #debian11 #kernel #linux6 #certs #debianueficerts #pem #debianueficertspem