blob: 49f3a03bf4a0d4a0cd1c96c12513f0fdee3b310a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# Maintainer: Jake Buchholz <tomalok@gmail.com>
_name=aws-ena-driver
_flavor=${FLAVOR:-vanilla}
_kpkg=linux-$_flavor
_kver=4.14.88
_krel=0
_kpkgver="$_kver-r$_krel"
_kabi="$_kver-$_krel-$_flavor"
_kabi_virt="$_kver-$_krel-virt"
_ver=2.0.2
_rel=0
pkgname=$_name-$_flavor
pkgver=$_kver
pkgrel=$(( $_krel + $_rel ))
pkgdesc="Linux Kernel driver for Elastic Network Adapter (ENA) family ($_flavor kernel)"
url="https://github.com/amzn/amzn-drivers"
arch="x86 x86_64"
license="GPL-2.0"
# Upstream has no tests
options="!strip !check"
depends=
makedepends="linux-$_flavor-dev=$_kpkgver linux-virt-dev=$_kpkgver"
install=
source="https://github.com/amzn/amzn-drivers/archive/ena_linux_$_ver.tar.gz ena.conf"
_subdir="amzn-drivers-ena_linux_$_ver"
builddir="$srcdir/$_subdir"
subpackages="$_name-virt:virt $_name:_common:noarch"
install_if="$_name=$pkgver-r$pkgrel linux-$_flavor"
prepare() {
local i
cd "$builddir"
default_prepare
# verify the kernel version
local _kapkbuild=../../main/linux-$_pkgver/APKBUILD
if [ -f $_kapkbuild ]; then
( . $_kapkbuild
pkgname=$_name-$_flavor
[ "$_kver" != "$pkgver" ] && die "please update _kver to $pkgver"
[ "$_krel" != "$pkgrel" ] && die "please update _krel to $pkgrel"
return 0
)
fi
for i in $_kabi $_kabi_virt; do
mkdir -p "$srcdir/$i"
tar -C "$srcdir/$i" -zxf "$srcdir/ena_linux_$_ver.tar.gz"
done
}
build() {
local i
for i in $_kabi $_kabi_virt; do
cd "$srcdir/$i/$_subdir"/kernel/linux/ena
make BUILD_KERNEL="$i"
done
}
package() {
local i
install -Dm644 "$srcdir"/ena.conf \
"$pkgdir"/etc/modules-load.d/ena.conf
for i in $_kabi $_kabi_virt; do
cd "$srcdir/$i/$_subdir"/kernel/linux/ena
install -Dm644 ena.ko \
"$pkgdir/lib/modules/$i"/kernel/drivers/net/ethernet/amazon/ena/ena.ko
done
}
virt() {
pkgdesc="Linux Kernel driver for Elastic Network Adapter (ENA) family - (virt kernel)"
install_if="$_name=$pkgver-r$pkgrel linux-virt"
mkdir -p "$subpkgdir"/lib/modules
mv "$pkgdir"/lib/modules/$_kabi_virt \
"$subpkgdir"/lib/modules
}
_common() {
pkgdesc="Elasic Network Adapter (ENA) driver common file(s)"
install_if=
mkdir -p "$subpkgdir"
mv "$pkgdir"/etc/ "$subpkgdir"/
}
sha512sums="8f2dcb2a7fc957c4a845881d3abe0be5e1aa3ab12705aafce4c3bc5cd6b6055225e9b59461741c95fd85decc8aa0ef50ffa5c2b973a7ca25de674231e25b4b22 ena_linux_2.0.2.tar.gz
479a96de0284c815cb4bc60ee129be831f97424f121ede3c14c3dfead162ebb5a3f16c535cc412caf0bdcf2de70c6c3f6cc1c83ff2d4aae1f5e3848279f927d2 ena.conf"
|