2022-07-12 11:15:51 +00:00
|
|
|
# Contributor: Stefan Reimer <stefan@zero-downtime.net>
|
|
|
|
# Maintainer: Stefan Reimer <stefan@zero-downtime.net>
|
2024-03-20 11:04:12 +00:00
|
|
|
# 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
|
|
|
|
#
|
2022-07-12 11:15:51 +00:00
|
|
|
pkgname=aws-neuron-driver
|
2024-04-19 13:39:25 +00:00
|
|
|
pkgver=2.16.7.0
|
2022-08-31 13:51:59 +00:00
|
|
|
pkgrel=0
|
2022-07-12 11:15:51 +00:00
|
|
|
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"
|
|
|
|
|
2023-04-26 17:22:52 +00:00
|
|
|
source="$pkgname-$pkgver.deb::https://apt.repos.neuron.amazonaws.com/pool/main/a/aws-neuronx-dkms/aws-neuronx-dkms_"$pkgver"_amd64.deb"
|
2022-07-12 11:15:51 +00:00
|
|
|
|
|
|
|
unpack() {
|
2023-04-26 17:22:52 +00:00
|
|
|
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"
|
2022-11-24 19:01:40 +00:00
|
|
|
rm -rf usr data.tar.xz control.tar.xz debian-binary
|
2022-07-12 11:15:51 +00:00
|
|
|
|
|
|
|
# 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))
|
|
|
|
|
2024-04-03 14:27:05 +00:00
|
|
|
unset CFLAGS CPPFLAGS CXXFLAGS
|
|
|
|
unset LDFLAGS
|
|
|
|
|
2022-07-12 11:15:51 +00:00
|
|
|
make KERNEL_SRC_DIR=/lib/modules/$KERNEL_VERSION/build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
KERNEL_VERSION=$(basename $(ls -d /lib/modules/*-virt))
|
2023-04-26 17:22:52 +00:00
|
|
|
depends="linux-virt~$(echo $KERNEL_VERSION | sed -e 's/-.*$//')"
|
2022-07-12 11:15:51 +00:00
|
|
|
|
2022-08-16 12:41:09 +00:00
|
|
|
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
|
2022-07-12 11:15:51 +00:00
|
|
|
|
|
|
|
echo 'KERNEL=="neuron*", MODE="0666"' > "$pkgdir"/lib/udev/rules.d/90-neuron-udev.rules
|
|
|
|
}
|
|
|
|
|
2023-04-26 17:22:52 +00:00
|
|
|
sha512sums="
|
2024-04-19 13:39:25 +00:00
|
|
|
968eb60bcd6826fa7dba827c29eda0033c626e016c7a57389a821f64c966d076a85da885f772e937098885853fe50765013a1368aab8b0ca85d732c34e60a26e aws-neuron-driver-2.16.7.0.deb
|
2023-04-26 17:22:52 +00:00
|
|
|
"
|