Skip to content

Commit 42b6442

Browse files
authored
Clone dpdk-kmods repo for igb_uio (#11)
1 parent e0911c4 commit 42b6442

File tree

2 files changed

+19
-11
lines changed

2 files changed

+19
-11
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ e.g.:
3535
```
3636
packer build \
3737
-var kubernetes_version=1.32 \
38-
-var source_ami_id=ami-0f114867066b78822
38+
-var source_ami_id=ami-0f114867066b78822 \
39+
amazon-ebs.pkr.hcl
3940
```
4041

4142
Arbitrary additional tags can be added to the AMI by specifying a JSON
@@ -44,7 +45,8 @@ map of tags as the `tags` variable, e.g.:
4445
```
4546
packer build \
4647
-var kubernetes_version=1.32 \
47-
-var 'tags={"mykey": "myvalue", "myotherkey": "myothervalue"}'
48+
-var 'tags={"mykey": "myvalue", "myotherkey": "myothervalue"}' \
49+
amazon-ebs.pkr.hcl
4850
```
4951

5052
Note that when building the AMI, the following warnings are expected and can be ignored:

install.sh

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,23 @@
11
#!/usr/bin/env bash
22
# This script must be run as the root user.
33

4-
set -x
4+
set -ex
5+
6+
dnf install -y \
7+
"kernel-devel-$(uname -r)" \
8+
git
59

610
# Download and build the igb_uio driver, and load it into the kernel.
711
# N.B. A warning for 'Skipping BTF generation' is expected. This doesn't affect
812
# the performance of the built driver.
9-
dnf install -y "kernel-devel-$(uname -r)"
10-
11-
mkdir igb_uio
12-
curl https://git.dpdk.org/dpdk-kmods/snapshot/dpdk-kmods-e721c733cd24206399bebb8f0751b0387c4c1595.tar.gz | tar -xz -C igb_uio --strip-components 1
13-
make -C igb_uio/linux/igb_uio
14-
cp igb_uio/linux/igb_uio/igb_uio.ko "/lib/modules/$(uname -r)/kernel/drivers/uio"
13+
git clone git://dpdk.org/dpdk-kmods
14+
cd dpdk-kmods
15+
git switch e721c733cd24206399bebb8f0751b0387c4c1595 --detach
16+
make -C linux/igb_uio
17+
cp linux/igb_uio/igb_uio.ko "/lib/modules/$(uname -r)/kernel/drivers/uio"
1518
depmod "$(uname -r)"
16-
rm -rf igb_uio
19+
cd ../
20+
rm -rf dpdk-kmods
1721

1822
# TuneD is not available in the Amazon Linux 2023 repository, so download our
1923
# own version instead.
@@ -35,7 +39,9 @@ mkdir tuned
3539
curl -L https://github.com/redhat-performance/tuned/archive/refs/tags/v2.24.1.tar.gz | tar -xz -C tuned --strip-components 1
3640
# N.B. The 'desktop-file-install' action is expected to fail. This doesn't
3741
# affect the installation of the tuned service.
38-
make -C tuned install
42+
if ! make -C tuned install; then
43+
echo "desktop-file-install failure is expected. Continuing with installation..."
44+
fi
3945
rm -rf tuned
4046

4147
# Set up the sysctls.

0 commit comments

Comments
 (0)