add CentOS7 .ko + add automatic try to compile the .ko 18/4318/1
authorYaroslav Brustinov <[email protected]>
Fri, 9 Dec 2016 09:18:13 +0000 (11:18 +0200)
committerYaroslav Brustinov <[email protected]>
Fri, 9 Dec 2016 09:18:13 +0000 (11:18 +0200)
Change-Id: I467aabb0efa8e50d779257b2a3e7ca8adf25221f
Signed-off-by: Yaroslav Brustinov <[email protected]>
scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko [new file with mode: 0644]
scripts/trex-cfg

diff --git a/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko b/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko
new file mode 100644 (file)
index 0000000..a85b9ad
Binary files /dev/null and b/scripts/ko/3.10.0-327.el7.x86_64/igb_uio.ko differ
index 714aea6..c6f12a7 100755 (executable)
@@ -55,13 +55,23 @@ if ! lsmod | grep -q igb_uio  ;  then
         fi
     else
         echo "ERROR: We don't have precompiled igb_uio.ko module for your kernel version"
-        echo "You can try compiling yourself, using the following commands:"
-        echo "\$cd ko/src  "
-        echo "\$make  "
-        echo "\$make install  "
-        echo "\$cd -  "
-        echo "Then try to run Trex again"
-        exit 1
+        echo Will try compiling automatically.
+        {
+            cd ko/src &&
+            make &&
+            make install &&
+            cd -
+        } &> /dev/null || {
+            echo Automatic compilation failed.
+            echo "You can try compiling yourself, using the following commands:"
+            echo "\$cd ko/src  "
+            echo "\$make  "
+            echo "\$make install  "
+            echo "\$cd -  "
+            echo "Then try to run TRex again"
+            exit 1
+        }
+        echo Success.
     fi
 fi