linux-6.1.4 の Fedora 37 1.7 へのインストール

linux-6.1.4 の Fedora 37 1.7へのインストールログです.複数のトラブルが発生します.

sudo su -
dnf -y update
dnf -y install make gcc flex bison openssl-devel bc elfutils-libelf-devel perl zstd
cd /usr/src
curl -O https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.1.4.tar.xz
tar xfJ linux-6.1.4.tar.xz
cd linux-6.1.4
cp /boot/config-6.0.18-300.fc37.x86_64 .config
make oldconfig

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

make oldconfigで,

-bash: make: command not found

となってしまったら,

dnf -y install make

を忘れています.

make oldconfigで,

/bin/sh: line 1: gcc: command not found
make[1]: *** [scripts/Makefile.host:111: scripts/basic/fixdep] Error 127
make: *** [Makefile:633: scripts_basic] Error 2

となってしまったら,

dnf -y install gcc

を忘れています.

make oldconfigで,

/bin/sh: line 1: flex: command not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:697: oldconfig] Error 2

となってしまったら,

dnf -y install flex

を忘れています.

make oldconfigで,

/bin/sh: line 1: bison: command not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:697: oldconfig] Error 2

となってしまったら,

dnf -y install bison

を忘れています.

cp .config .config.bak
vi .config

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

10154行目
CONFIG_DEBUG_INFO_BTF=y

CONFIG_DEBUG_INFO_BTF=n

make -j8 bzImage modules

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:111: scripts/sign-file] Error 1
make: *** [Makefile:1254: scripts] Error 2

となってしまったら

dnf -y install openssl-devel

を忘れている.

/bin/sh: line 1: bc: command not found
make[1]: *** [Kbuild:24: include/generated/timeconst.h] Error 127
make: *** [Makefile:1270: prepare0] Error 2

となってしまったら

dnf -y install bc

を忘れている.

<stdin>:1:10: fatal error: libelf.h: No such file or directory
compilation terminated.
CC /usr/src/linux-6.1.4/tools/objtool/arch/x86/special.o
In file included from /usr/src/linux-6.1.4/tools/objtool/include/objtool/objtool.h:13,
from /usr/src/linux-6.1.4/tools/objtool/include/objtool/arch.h:11,
from /usr/src/linux-6.1.4/tools/objtool/include/objtool/check.h:11,
from /usr/src/linux-6.1.4/tools/objtool/include/objtool/special.h:10,
from arch/x86/special.c:4:
/usr/src/linux-6.1.4/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.1.4/tools/build/Makefile.build:97: /usr/src/linux-6.1.4/tools/objtool/arch/x86/special.o] Error 1
make[3]: *** [/usr/src/linux-6.1.4/tools/build/Makefile.build:139: arch/x86] Error 2
make[2]: *** [Makefile:54: /usr/src/linux-6.1.4/tools/objtool/objtool-in.o] Error 2
make[1]: *** [Makefile:73: objtool] Error 2
make: *** [Makefile:1423: tools/objtool] Error 2

となってしまったら

dnf -y install elfutils-libelf-devel

を忘れている.

/bin/sh: line 1: perl: command not found
make[3]: *** [usr/include/Makefile:91: usr/include/asm-generic/auxvec.hdrtest] Error 127
make[2]: *** [scripts/Makefile.build:500: usr/include] Error 2
make[1]: *** [scripts/Makefile.build:500: usr] Error 2
make: *** [Makefile:1992: .] 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:34: vmlinux] Error 1
make: *** [Makefile:1236: vmlinux] Error 2

となってしまったら

vi .config
での
10154行目
CONFIG_DEBUG_INFO_BTF=y

CONFIG_DEBUG_INFO_BTF=n
の修正

を忘れている.

TEST posttest
arch/x86/tools/insn_decoder_test: success: Decoded and checked 5802964 instructions
TEST posttest
arch/x86/tools/insn_sanity: Success: decoded and checked 1000000 random instructions with 0 errors (seed:0x2402ee22)
ZSTD22 arch/x86/boot/compressed/vmlinux.bin.zst
/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:276: bzImage] Error 2

となってしまったら

dnf -y install zstd

を忘れている.

sudo make modules_install install

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