Browse code

linux: added ENA driver for AMI

Change-Id: Ie817faf8bbaea4827cc37798bfddbbe516d7c113
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/2807
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Vinay Kulkarni <kulkarniv@vmware.com>

Alexey Makhalov authored on 2017/05/26 06:12:32
Showing 1 changed files
... ...
@@ -2,7 +2,7 @@
2 2
 Summary:        Kernel
3 3
 Name:           linux
4 4
 Version:    	4.4.70
5
-Release:    	1%{?dist}
5
+Release:    	2%{?dist}
6 6
 License:    	GPLv2
7 7
 URL:        	http://www.kernel.org/
8 8
 Group:        	System Environment/Kernel
... ...
@@ -11,6 +11,9 @@ Distribution: 	Photon
11 11
 Source0:    	http://www.kernel.org/pub/linux/kernel/v4.x/%{name}-%{version}.tar.xz
12 12
 %define sha1 linux=857eedbb2c61efa3d8a281111d4563476f52183b
13 13
 Source1:	config
14
+%define ena_version 1.1.3
15
+Source2:    	https://github.com/amzn/amzn-drivers/archive/ena_linux_1.1.3.tar.gz
16
+%define sha1 ena_linux=84138e8d7eb230b45cb53835edf03ca08043d471
14 17
 Patch0:         double-tcp_mem-limits.patch
15 18
 Patch1:         linux-4.4-sysctl-sched_weighted_cpuload_uses_rla.patch
16 19
 Patch2:         linux-4.4-watchdog-Disable-watchdog-on-virtual-machines.patch
... ...
@@ -99,6 +102,8 @@ This package contains the 'perf' performance analysis tools for Linux kernel.
99 99
 
100 100
 %prep
101 101
 %setup -q
102
+%setup -D -b 2
103
+
102 104
 %patch0 -p1
103 105
 %patch1 -p1
104 106
 %patch2 -p1
... ...
@@ -125,6 +130,11 @@ sed -i 's/CONFIG_LOCALVERSION=""/CONFIG_LOCALVERSION="-%{release}"/' .config
125 125
 make LC_ALL= oldconfig
126 126
 make VERBOSE=1 KBUILD_BUILD_VERSION="1-photon" KBUILD_BUILD_HOST="photon" ARCH="x86_64" %{?_smp_mflags}
127 127
 make -C tools perf
128
+# build ENA module
129
+bldroot=`pwd`
130
+pushd ../amzn-drivers-ena_linux_%{ena_version}/kernel/linux/ena
131
+make -C $bldroot M=`pwd` VERBOSE=1 modules %{?_smp_mflags}
132
+popd
128 133
 
129 134
 %define __modules_install_post \
130 135
     find %{buildroot}/lib/modules/%{uname_r} -name *.ko | xargs xz \
... ...
@@ -154,6 +164,11 @@ install -vdm 755 %{buildroot}/etc/modprobe.d
154 154
 install -vdm 755 %{buildroot}/usr/src/%{name}-headers-%{uname_r}
155 155
 install -vdm 755 %{buildroot}/usr/lib/debug/lib/modules/%{uname_r}
156 156
 make INSTALL_MOD_PATH=%{buildroot} modules_install
157
+# install ENA module
158
+bldroot=`pwd`
159
+pushd ../amzn-drivers-ena_linux_%{ena_version}/kernel/linux/ena
160
+make -C $bldroot M=`pwd` INSTALL_MOD_PATH=%{buildroot} modules_install
161
+popd
157 162
 
158 163
 # Verify for build-id match
159 164
 # We observe different IDs sometimes
... ...
@@ -259,6 +274,8 @@ ln -sf %{name}-%{uname_r}.cfg /boot/photon.cfg
259 259
 /usr/share/perf-core
260 260
 
261 261
 %changelog
262
+*   Fri May 26 2017 Alexey Makhalov <amakhalov@vmware.com> 4.4.70-2
263
+-   Added ENA driver for AMI
262 264
 *   Thu May 25 2017 Alexey Makhalov <amakhalov@vmware.com> 4.4.70-1
263 265
 -   Fix CVE-2017-7487 and CVE-2017-9059
264 266
 *   Tue May 9 2017 Alexey Makhalov <amakhalov@vmware.com> 4.4.67-1