feature:TSG-10176:TSG-X-P1403继续适配centos7,新增TSG-X-P0804适配rockylinux8.5

This commit is contained in:
fumingwei
2022-04-12 11:34:45 +08:00
parent 7d7a75fdb3
commit cd0376ba50
14 changed files with 254 additions and 27 deletions

View File

@@ -10,8 +10,12 @@ yum_config=$1
target=$2
projectdir=$3
profile_id=$4
if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then
kernel_version="5.4.159-1.el7.elrepo.x86_64"
if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then
if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then
kernel_version="5.4.159-1.el7.elrepo.x86_64"
else
kernel_version="3.10.0-1160.59.1.el7.x86_64"
fi
fi
set -ex
@@ -26,7 +30,7 @@ package_to_install_RockyLinux85="@base @core @debugging @anaconda-tools @additio
grub2 epel-release efibootmgr ansible yum-utils ipmitool OpenIPMI docker-ce docker-ce-cli containerd.io lrzsz python3 watchdog pcm git tmux fish kernel kernel-devel
kernel-tools-libs kernel-modules kernel-tools kernel-core rpm-build libtool kernel-rpm-macros python36-devel tcsh kernel-modules-extra gcc-gfortran"
if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then
if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then
locak_package_to_install_CentOS7="$projectdir/package/kernel-lt-$kernel_version.rpm
$projectdir/package/kernel-lt-devel-$kernel_version.rpm"
fi
@@ -36,14 +40,18 @@ kernel_package_to_install="kernel-3.10.0-1160.59.1.el7.x86_64 kernel-devel-3.10.
setopt="group_package_types=mandatory,default,optional"
yum -c "$yum_config" --installroot="$target" -y makecache
if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then
if [ $profile_id != "TSG-X-NXR620G40-R01-P0804" ];then
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_CentOS7
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install_CentOS7
if [ $profile_id != "TSG-X-NXR620G40-R01-P1403" ];then
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt localinstall $locak_package_to_install_CentOS7
else
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $kernel_package_to_install
fi
else
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install_RockyLinux85
fi
if [ $profile_id == "TSG-X-NXR620G40-R01-P1403" ];then
if [ $profile_id == "TSG-X-NXR620G40-R01-P0804" ];then
kernel_version=$(ls $target/boot/vmlinuz-*.x86_64 | grep -oP "^$target/boot/vmlinuz-\K.*")
fi
#git clone --depth 1 https://github.com/brendangregg/FlameGraph.git /opt/tools/FlameGraph/