52 lines
1.9 KiB
Plaintext
52 lines
1.9 KiB
Plaintext
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
|
# https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/runtime/aws-neuronx-dkms/index.html#neuron-driver-release-notes
|
|
#
|
|
# Todo: needs fix of https://github.com/aws-neuron/aws-neuron-sdk/issues/843
|
|
#
|
|
pkgname=aws-neuron-driver
|
|
pkgver=2.18.12.0
|
|
pkgrel=0
|
|
pkgdesc="Linux Kernel module for AWS Neuron INF instances"
|
|
url="https://awsdocs-neuron.readthedocs-hosted.com/en/latest/release-notes/index.html#"
|
|
arch="x86_64"
|
|
license="GPL-2.0"
|
|
makedepends="bash xz linux-headers linux-virt-dev"
|
|
options="!check"
|
|
|
|
source="$pkgname-$pkgver.deb::https://apt.repos.neuron.amazonaws.com/pool/main/a/aws-neuronx-dkms/aws-neuronx-dkms_"$pkgver"_amd64.deb"
|
|
|
|
unpack() {
|
|
ar -x "$srcdir/$pkgname-$pkgver.deb" && find . -type d -exec chmod 755 {} \; && tar xfJo data.tar.xz
|
|
mv usr/src/aws-neuronx-"$pkgver" "$srcdir/$pkgname-$pkgver"
|
|
rm -rf usr data.tar.xz control.tar.xz debian-binary
|
|
|
|
# What is wrong with AWS ?
|
|
find $srcdir/$pkgname-$pkgver -type d -exec chmod 755 {} \;
|
|
}
|
|
|
|
|
|
build() {
|
|
# Hack running the build inside a container other uname -r returns host kernel
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
|
|
|
unset CFLAGS CPPFLAGS CXXFLAGS
|
|
unset LDFLAGS
|
|
|
|
make KERNEL_SRC_DIR=/lib/modules/$KERNEL_VERSION/build
|
|
}
|
|
|
|
package() {
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
|
depends="linux-virt~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
|
|
|
mkdir -p "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel "$pkgdir"/lib/udev/rules.d
|
|
gzip -9 -c neuron.ko > "$pkgdir"/lib/modules/$KERNEL_VERSION/kernel/neuron.ko.gz
|
|
|
|
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
|
|
}
|
|
|
|
sha512sums="
|
|
fdabcd3acff8576e0edbb9cb20892c2ae2be96d84313e5576ee295672b7964ceb81cc512ff760820c903ee4eec831162bec17ebc8c4a32676b9c670c29dcdbeb aws-neuron-driver-2.18.12.0.deb
|
|
"
|