feat: Update aws-neuron-driver to v2.3.3 built from deb dpkm sources

This commit is contained in:
Stefan Reimer 2022-05-13 23:16:13 +02:00
parent 01230af838
commit 22263b8b85
3 changed files with 25 additions and 30 deletions

View File

@ -2,7 +2,7 @@ BUILDER ?= v3.15.2-1
RELEASE := v3.15
PKG := '*'
.PHONY: builder aports_update
.PHONY: builder aports_update download upload
all: build
@ -32,6 +32,9 @@ build: packages distfiles aports_update work
public.ecr.aws/zero-downtime/alpine-builder:${BUILDER} $(PKG)
doas rm -rf /tmp/_alpine-work
download:
aws s3 sync s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ packages/work/x86_64/ --exclude APKINDEX.tar.gz
upload:
aws s3 sync --delete packages/work/x86_64/ s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --exclude APKINDEX.tar.gz
aws s3 cp packages/work/x86_64/APKINDEX.tar.gz s3://zero-downtime-web/cdn/alpine/$(RELEASE)/kubezero/x86_64/ --cache-control max-age=1

View File

@ -1,42 +1,46 @@
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
pkgname=aws-neuron-driver
pkgver=0.1.0
pkgrel=2
pkgver=2.3.3.0
pkgrel=0
pkgdesc="Linux Kernel module for AWS Neuron INF instances"
url="https://github.com/aws/aws-neuron-driver"
arch="x86_64"
license="GPL-2.0"
makedepends="bash linux-headers linux-virt-dev"
makedepends="bash xz linux-headers linux-virt-dev"
options="!check"
# No Tags nor releases ;-(
# cad466aa978944bc8ef51f2228c2ca80618d3103"
source="$pkgname-$pkgver.zip::https://github.com/aws/$pkgname/archive/refs/heads/master.zip
missing-io.patch
"
# apt-get download --print-uris aws-neuron-dkms | cut -d' ' -f1
source="$pkgname-$pkgver.deb::https://apt.repos.neuron.amazonaws.com/pool/main/a/aws-neuron-dkms/aws-neuron-dkms_"$pkgver"_amd64.deb"
unpack() {
ar -x /var/cache/distfiles/$pkgname-$pkgver.deb
tar xfJ data.tar.xz
mv usr/src/aws-neuron-$pkgver $srcdir/$pkgname-$pkgver
# What is wrong with AWS ?
find $srcdir/$pkgname-$pkgver -type d -exec chmod 755 {} \;
}
builddir="$srcdir/aws-neuron-driver-master"
build() {
# Hack running the build inside a container other uname -r returns host kernel
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
# Hack running the build inside a container other uname -r returns host kernel
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
make KERNEL_SRC_DIR=/lib/modules/$KERNEL_VERSION/build
}
package() {
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION "$pkgdir"/lib/udev/rules.d
cp neuron.ko "$pkgdir"/lib/modules/$KERNEL_VERSION
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION "$pkgdir"/lib/udev/rules.d
cp neuron.ko "$pkgdir"/lib/modules/$KERNEL_VERSION
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
depends="$(apk info linux-virt -d | grep description: | awk '{print $1}')"
depends="linux-virt=$(apk info linux-virt -d | grep description: | awk '{print $1}' | sed -e 's/linux-virt-//')"
}
sha512sums="
521c65cbdf4f5c05d20a2dbee2c3c597b075189cb729fa3213691e10486706f10776316da7c16dc8d869489c979878d4040f73eddfed1c29f9fec83ef19faf27 aws-neuron-driver-0.1.0.zip
6658805f1cc830020544b3fe42c4e0a28791f84d0c6d9594961c11761b9228b9591841f740ac78bf9411655c3138af3286da5fa9eb9cb3f03a1cd6bf0d58a8f3 missing-io.patch
1719a211d52581acdc0a3cf2279761e1748ec2008831b97b41592fc03cf732eef34ec273f8adaf8822ae4e5a080335f541632f41ffc0ac87063e49b77a243948 aws-neuron-driver-2.3.3.0.deb
"

View File

@ -1,12 +0,0 @@
diff --git a/neuron_reg_access.h b/neuron_reg_access.h
index a547c4b..c0f4db8 100644
--- a/neuron_reg_access.h
+++ b/neuron_reg_access.h
@@ -9,6 +9,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
+#include <linux/io.h>
#include <asm/bug.h>
#include <asm/barrier.h>
#include <asm/delay.h>