linux-5.17 の CentOS Linux release 7.3 へのインストール

linux-5.17 の 5年以上前リリースの CentOS 7.3 へのインストールログです.以外にもトラブルは少な目です.

環境

# cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

インストール

GCC 11のインストール

sclを用いて gcc 11をインストールします.詳しくはこちら

yum install -y centos-release-scl centos-release-scl-rh
yum list | grep devtoolset | grep gcc

yum list | grep devtoolset | grep gcc
の結果を見て,インストールするバージョンを決めてください.
私の場合は 11

yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-binutils
scl enable devtoolset-11 bash
gcc --version

scl enable devtoolset-11 bash
と,bashを起動した中で,gcc --version を行うと,gcc 11が起動できます.

# gcc --version
gcc (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Linxu 5.17のインストール

yum -y install flex bison

wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.17.tar.xz
tar xfJ linux-5.17.tar.xz
cd linux-5.17/
cp /boot/config-3.10.0-514.10.2.el7.x86_64 .config
make oldconfig

もし

***
*** Compiler is too old.
*** Your GCC version: 4.8.5
*** Minimum GCC version: 5.1.0
***
scripts/Kconfig.include:44: Sorry, this compiler is not supported.
なら
gcc 11のinstallと scl enable devtoolset-11 bash

となってしまったら、gcc 11のインストールを忘れています.

make -j8
make modules -j8
sudo make modules_install install

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