rh7: Install mlx ofed kernel modules for rh73, 74 & 75 (#15)

This commit is contained in:
Santosh 2019-01-28 18:03:00 +05:30 коммит произвёл Manasa Boitei
Родитель ef028a21a6
Коммит c263c6f5e8
3 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -164,10 +164,10 @@ def buildrhel7(branch, buildname,source):
run("git clone "+source)
os.chdir(directory+"/hv-rhel7.x/")
run("git checkout "+ branch)
run("tar -cvzf lis-next-rh73.tar.gz hv")
run("tar -cvzf lis-next-rh7-mlx.tar.gz hv")
run("rm -f hv/mlnx-ofa_kernel-4.5.tgz")
run("tar -cvzf lis-next-rh7.tar.gz hv")
shutil.copy("lis-next-rh73.tar.gz" , homedir+"/rh7/SOURCES/")
shutil.copy("lis-next-rh7-mlx.tar.gz" , homedir+"/rh7/SOURCES/")
shutil.copy("lis-next-rh7.tar.gz" , homedir+"/rh7/SOURCES/")
os.chdir(homedir)
shutil.rmtree(directory)

Просмотреть файл

@ -11,11 +11,11 @@ Runbuild()
rhel_major=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $1 }')
rhel_minor=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $2 }')
rhel_release_code=$((rhel_major << 8 | rhel_minor))
if [ $rhel_release_code -eq 1795 ]; then
if [ $rhel_release_code -ge 1795 ] && [ $rhel_release_code -lt 1798 ]; then
rm -vrf /root/rpmbuild/SOURCES/lis-next-rh7.tar.gz
mv /root/rpmbuild/SOURCES/lis-next-rh73.tar.gz /root/rpmbuild/SOURCES/lis-next-rh7.tar.gz
mv /root/rpmbuild/SOURCES/lis-next-rh7-mlx.tar.gz /root/rpmbuild/SOURCES/lis-next-rh7.tar.gz
else
rm -vrf /root/rpmbuild/SOURCES/lis-next-rh73.tar.gz
rm -vrf /root/rpmbuild/SOURCES/lis-next-rh7-mlx.tar.gz
fi
rpmbuild --clean /root/rpmbuild/SPECS/lis-rhel7.spec
# rpmbuild --clean /root/rpmbuild/SPECS/lis-centos7.spec

Просмотреть файл

@ -83,7 +83,7 @@ for flavor in %flavors_to_build; do
rhel_major=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $1 }')
rhel_minor=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $2 }')
rhel_release_code=$((rhel_major << 8 | rhel_minor))
if [ $rhel_release_code -eq 1795 ] && [ -f "$PWD/obj/$flavor/mlnx-ofa_kernel-4.5.tgz" ]; then
if [ $rhel_release_code -ge 1795 ] && [ $rhel_release_code -lt 1798 ] && [ -f "$PWD/obj/$flavor/mlnx-ofa_kernel-4.5.tgz" ]; then
pushd $PWD/obj/$flavor
echo "Build MLX OFED 4.5 ..."
tar zxf mlnx-ofa_kernel-4.5.tgz
@ -107,7 +107,7 @@ for flavor in %flavors_to_build; do
rhel_major=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $1 }')
rhel_minor=$(grep -Eoh [0-9]+\.[0-9]+ /etc/{issue,*release} | head -1 | awk -F'.' '{ print $2 }')
rhel_release_code=$((rhel_major << 8 | rhel_minor))
if [ $rhel_release_code -eq 1795 ] && [ -f "$PWD/obj/$flavor/mlnx-ofa_kernel-4.5.tgz" ]; then
if [ $rhel_release_code -ge 1795 ] && [ $rhel_release_code -lt 1798 ] && [ -f "$PWD/obj/$flavor/mlnx-ofa_kernel-4.5.tgz" ]; then
pushd $PWD/obj/$flavor/mlnx-ofa_kernel-4.5
echo "Install MLX OFED 4.5 ..."
find . -name *.ko -exec cp {} $INSTALL_MOD_PATH/lib/modules/$(uname -r)/$INSTALL_MOD_DIR \;