linux-6.4.11 の Fedora 38 へのインストール

linux-6.4.11 の Fecora 38 へのインストールログです.複数のトラブルが発生します.

sudo su -
dnf -y update
dnf -y install make gcc flex bison elfutils-libelf-devel openssl-devel perl zstd
cd /usr/src
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.4.11.tar.xz
tar xfJ linux-6.4.11.tar.xz
cd linux-6.4.11
cp /boot/config-6.4.11-200.fc38.x86_64 .config
make oldconfig

make oldconfig の質問への回答は,結局 Enter を連打することになると思います.

もし
-bash: make: command not found
と,表示されたら
dnf -y install make
を忘れています.

もし
/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/Makefile.host:114: scripts/basic/fixdep] Error 127
make: *** [Makefile:628: scripts_basic] Error 2
と,表示されたら
dnf -y install gcc
を忘れています.

もし
/bin/sh: line 1: flex: command not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:692: oldconfig] Error 2
と,表示されたら
dnf -y install flex
を忘れています.

もし
/bin/sh: line 1: bison: command not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:692: oldconfig] Error 2
と,表示されたら
dnf -y install bison
を忘れています.

cp .config .config.bak
vi .config

vi .config は以下の1カ所の修正をする

10342行目
CONFIG_DEBUG_INFO_BTF=y

CONFIG_DEBUG_INFO_BTF=n

make -j8 bzImage modules

もし
make[3]: *** [/usr/src/linux-6.4.11/tools/build/Makefile.build:98: /usr/src/linux-6.4.11/tools/objtool/builtin-check.o] Error 1
HDRINST usr/include/linux/cifs/cifs_netlink.h
HDRINST usr/include/linux/close_range.h
HDRINST usr/include/linux/cn_proc.h
HDRINST usr/include/linux/coff.h
HDRINST usr/include/linux/coda.h
In file included from /usr/src/linux-6.4.11/tools/objtool/include/objtool/objtool.h:13,
from objtool.c:16:
/usr/src/linux-6.4.11/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory
10 | #include <gelf.h>
| ^~~~~~~~
compilation terminated.
と,表示されたら
dnf -y install elfutils-libelf-devel
を忘れています.

もし
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:114: scripts/sign-file] Error 1
make: *** [Makefile:1271: scripts] Error 2
と,表示されたら
dnf -y install openssl-devel
を忘れています.

もし
/bin/sh: line 1: perl: command not found
make[3]: *** [usr/include/Makefile:91: usr/include/asm-generic/bitsperlong.hdrtest] Error 127
make[2]: *** [scripts/Makefile.build:497: usr/include] Error 2
make[1]: *** [scripts/Makefile.build:497: usr] Error 2
make: *** [Makefile:2032: .] Error 2
と,表示されたら
dnf -y install perl
を忘れています.

もし
BTF: .tmp_vmlinux.btf: pahole (pahole) is not available
Failed to generate BTF for vmlinux
Try to disable CONFIG_DEBUG_INFO_BTF
make[1]: *** [scripts/Makefile.vmlinux:36: vmlinux] Error 1
make: *** [Makefile:1250: vmlinux] Error 2
make: *** Waiting for unfinished jobs....
と,表示されたら
vi .config
10342行目
CONFIG_DEBUG_INFO_BTF=y

# CONFIG_DEBUG_INFO_BTF is not set
を忘れています.

もし
/bin/sh: line 1: zstd: command not found
make[2]: *** [arch/x86/boot/compressed/Makefile:146: arch/x86/boot/compressed/vmlinux.bin.zst] Error 127
make[2]: *** Deleting file 'arch/x86/boot/compressed/vmlinux.bin.zst'
make[1]: *** [arch/x86/boot/Makefile:116: arch/x86/boot/compressed/vmlinux] Error 2
make: *** [arch/x86/Makefile:282: bzImage] Error 2
と,表示されたら
dnf -y install zstd
を忘れています.

make modules_install install

#linux
#カーネル
#kernel
#Fedora
#Fedora38
#linux6
#linux6_4
#linux6_4_11


この記事が気に入ったらサポートをしてみませんか?